Skip to content

Commit 44532a9

Browse files
committed
Revert "[lldb] Add 'modify' type watchpoints, make it default (llvm#66308)"
TestStepOverWatchpoint.py and TestUnalignedWatchpoint.py are failing on the ubuntu and debian bots https://lab.llvm.org/buildbot/#/builders/68/builds/60204 https://lab.llvm.org/buildbot/#/builders/96/builds/45623 and the newly added test TestModifyWatchpoint.py does not work on windows bot https://lab.llvm.org/buildbot/#/builders/219/builds/5708 I will debug tomorrow morning and reland. This reverts commit 3692267.
1 parent af935cf commit 44532a9

File tree

31 files changed

+57
-386
lines changed

31 files changed

+57
-386
lines changed

lldb/bindings/headers.swig

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -77,5 +77,4 @@
7777
#include "lldb/API/SBValueList.h"
7878
#include "lldb/API/SBVariablesOptions.h"
7979
#include "lldb/API/SBWatchpoint.h"
80-
#include "lldb/API/SBWatchpointOptions.h"
8180
%}

lldb/bindings/interface/SBWatchpointOptionsDocstrings.i

Lines changed: 0 additions & 12 deletions
This file was deleted.

lldb/bindings/interfaces.swig

Lines changed: 0 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -80,7 +80,6 @@
8080
%include "./interface/SBValueListDocstrings.i"
8181
%include "./interface/SBVariablesOptionsDocstrings.i"
8282
%include "./interface/SBWatchpointDocstrings.i"
83-
%include "./interface/SBWatchpointOptionsDocstrings.i"
8483

8584
/* API headers */
8685
%include "lldb/API/SBAddress.h"
@@ -153,7 +152,6 @@
153152
%include "lldb/API/SBValueList.h"
154153
%include "lldb/API/SBVariablesOptions.h"
155154
%include "lldb/API/SBWatchpoint.h"
156-
%include "lldb/API/SBWatchpointOptions.h"
157155

158156
/* Extensions for SB classes */
159157
%include "./interface/SBAddressExtensions.i"

lldb/include/lldb/API/SBTarget.h

Lines changed: 1 addition & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -21,7 +21,6 @@
2121
#include "lldb/API/SBType.h"
2222
#include "lldb/API/SBValue.h"
2323
#include "lldb/API/SBWatchpoint.h"
24-
#include "lldb/API/SBWatchpointOptions.h"
2524

2625
namespace lldb_private {
2726
namespace python {
@@ -829,13 +828,8 @@ class LLDB_API SBTarget {
829828

830829
lldb::SBWatchpoint FindWatchpointByID(lldb::watch_id_t watch_id);
831830

832-
LLDB_DEPRECATED("WatchAddress deprecated, use WatchpointCreateByAddress")
833831
lldb::SBWatchpoint WatchAddress(lldb::addr_t addr, size_t size, bool read,
834-
bool modify, SBError &error);
835-
836-
lldb::SBWatchpoint
837-
WatchpointCreateByAddress(lldb::addr_t addr, size_t size,
838-
lldb::SBWatchpointOptions options, SBError &error);
832+
bool write, SBError &error);
839833

840834
bool EnableAllWatchpoints();
841835

lldb/include/lldb/API/SBWatchpointOptions.h

Lines changed: 0 additions & 43 deletions
This file was deleted.

lldb/include/lldb/Breakpoint/Watchpoint.h

Lines changed: 1 addition & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -76,14 +76,12 @@ class Watchpoint : public std::enable_shared_from_this<Watchpoint>,
7676

7777
bool WatchpointRead() const;
7878
bool WatchpointWrite() const;
79-
bool WatchpointModify() const;
8079
uint32_t GetIgnoreCount() const;
8180
void SetIgnoreCount(uint32_t n);
8281
void SetWatchpointType(uint32_t type, bool notify = true);
8382
void SetDeclInfo(const std::string &str);
8483
std::string GetWatchSpec();
8584
void SetWatchSpec(const std::string &str);
86-
bool WatchedValueReportable(const ExecutionContext &exe_ctx);
8785

8886
// Snapshot management interface.
8987
bool IsWatchVariable() const;
@@ -214,8 +212,7 @@ class Watchpoint : public std::enable_shared_from_this<Watchpoint>,
214212
// again, we check the count, if it is more than 1, it means the user-
215213
// supplied actions actually want the watchpoint to be disabled!
216214
uint32_t m_watch_read : 1, // 1 if we stop when the watched data is read from
217-
m_watch_write : 1, // 1 if we stop when the watched data is written to
218-
m_watch_modify : 1; // 1 if we stop when the watched data is changed
215+
m_watch_write : 1; // 1 if we stop when the watched data is written to
219216
uint32_t m_ignore_count; // Number of times to ignore this watchpoint
220217
std::string m_decl_str; // Declaration information, if any.
221218
std::string m_watch_spec_str; // Spec for the watchpoint.

lldb/include/lldb/Interpreter/OptionGroupWatchpoint.h

Lines changed: 3 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -30,15 +30,13 @@ class OptionGroupWatchpoint : public OptionGroup {
3030

3131
void OptionParsingStarting(ExecutionContext *execution_context) override;
3232

33-
/// eWatchRead == LLDB_WATCH_TYPE_READ
34-
/// eWatchWrite == LLDB_WATCH_TYPE_WRITE
35-
/// eWatchModify == LLDB_WATCH_TYPE_MODIFY
36-
/// eWatchReadWrite == LLDB_WATCH_TYPE_READ | LLDB_WATCH_TYPE_WRITE
33+
// Note:
34+
// eWatchRead == LLDB_WATCH_TYPE_READ; and
35+
// eWatchWrite == LLDB_WATCH_TYPE_WRITE
3736
enum WatchType {
3837
eWatchInvalid = 0,
3938
eWatchRead,
4039
eWatchWrite,
41-
eWatchModify,
4240
eWatchReadWrite
4341
};
4442

lldb/include/lldb/lldb-defines.h

Lines changed: 1 addition & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -44,10 +44,8 @@
4444
#define LLDB_WATCH_ID_IS_VALID(uid) ((uid) != (LLDB_INVALID_WATCH_ID))
4545
#define LLDB_WATCH_TYPE_READ (1u << 0)
4646
#define LLDB_WATCH_TYPE_WRITE (1u << 1)
47-
#define LLDB_WATCH_TYPE_MODIFY (1u << 2)
4847
#define LLDB_WATCH_TYPE_IS_VALID(type) \
49-
((type & LLDB_WATCH_TYPE_READ) || (type & LLDB_WATCH_TYPE_WRITE) || \
50-
(type & LLDB_WATCH_TYPE_MODIFY))
48+
((type & LLDB_WATCH_TYPE_READ) || (type & LLDB_WATCH_TYPE_WRITE))
5149

5250
// Generic Register Numbers
5351
#define LLDB_REGNUM_GENERIC_PC 0 // Program Counter

lldb/include/lldb/lldb-enumerations.h

Lines changed: 0 additions & 15 deletions
Original file line numberDiff line numberDiff line change
@@ -431,21 +431,6 @@ FLAGS_ENUM(WatchpointEventType){
431431
eWatchpointEventTypeThreadChanged = (1u << 11),
432432
eWatchpointEventTypeTypeChanged = (1u << 12)};
433433

434-
enum WatchpointWriteType {
435-
/// Don't stop when the watched memory region is written to.
436-
eWatchpointWriteTypeDisabled,
437-
/// Stop on any write access to the memory region, even if
438-
/// the value doesn't change. On some architectures, a write
439-
/// near the memory region may be falsely reported as a match,
440-
/// and notify this spurious stop as a watchpoint trap.
441-
eWatchpointWriteTypeAlways,
442-
/// Stop on a write to the memory region that changes its value.
443-
/// This is most likely the behavior a user expects, and is the
444-
/// behavior in gdb. lldb can silently ignore writes near the
445-
/// watched memory region that are reported as accesses to lldb.
446-
eWatchpointWriteTypeOnModify
447-
};
448-
449434
/// Programming language type.
450435
///
451436
/// These enumerations use the same language enumerations as the DWARF

lldb/include/lldb/lldb-forward.h

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -284,7 +284,6 @@ class VariableList;
284284
class Watchpoint;
285285
class WatchpointList;
286286
class WatchpointOptions;
287-
class WatchpointSetOptions;
288287
struct CompilerContext;
289288
struct LineEntry;
290289
struct PropertyDefinition;

0 commit comments

Comments
 (0)