aboutsummaryrefslogtreecommitdiff
path: root/lldb/source/Commands/CommandObjectWatchpoint.cpp
diff options
context:
space:
mode:
authorDavid Spickett <david.spickett@linaro.org>2023-09-21 09:22:57 +0000
committerDavid Spickett <david.spickett@linaro.org>2023-09-21 09:30:07 +0000
commita7b78cac9a77e3ef6bbbd8ab1a559891dc693401 (patch)
tree2965a2ccfecf1bfbf54e7581d58e365d23f460e4 /lldb/source/Commands/CommandObjectWatchpoint.cpp
parentfe87d62c9e0f0fbb64438e840ef35664c328c4f7 (diff)
downloadllvm-a7b78cac9a77e3ef6bbbd8ab1a559891dc693401.zip
llvm-a7b78cac9a77e3ef6bbbd8ab1a559891dc693401.tar.gz
llvm-a7b78cac9a77e3ef6bbbd8ab1a559891dc693401.tar.bz2
Revert "[lldb] Add 'modify' type watchpoints, make it default (#66308)"
This reverts commit 933ad5c897ee366759a54869b35b2d7285a92137. This caused 1 test failure and an unexpected pass on AArch64 Linux: https://lab.llvm.org/buildbot/#/builders/96/builds/45765 Wasn't reported because the bot was already red at the time.
Diffstat (limited to 'lldb/source/Commands/CommandObjectWatchpoint.cpp')
-rw-r--r--lldb/source/Commands/CommandObjectWatchpoint.cpp30
1 files changed, 7 insertions, 23 deletions
diff --git a/lldb/source/Commands/CommandObjectWatchpoint.cpp b/lldb/source/Commands/CommandObjectWatchpoint.cpp
index 83c2fb8..a4929ea 100644
--- a/lldb/source/Commands/CommandObjectWatchpoint.cpp
+++ b/lldb/source/Commands/CommandObjectWatchpoint.cpp
@@ -803,7 +803,7 @@ public:
"Set a watchpoint on a variable. "
"Use the '-w' option to specify the type of watchpoint and "
"the '-s' option to specify the byte size to watch for. "
- "If no '-w' option is specified, it defaults to modify. "
+ "If no '-w' option is specified, it defaults to write. "
"If no '-s' option is specified, it defaults to the variable's "
"byte size. "
"Note that there are limited hardware resources for watchpoints. "
@@ -878,9 +878,9 @@ protected:
return false;
}
- // If no '-w' is specified, default to '-w modify'.
+ // If no '-w' is specified, default to '-w write'.
if (!m_option_watchpoint.watch_type_specified) {
- m_option_watchpoint.watch_type = OptionGroupWatchpoint::eWatchModify;
+ m_option_watchpoint.watch_type = OptionGroupWatchpoint::eWatchWrite;
}
// We passed the sanity check for the command. Proceed to set the
@@ -947,23 +947,7 @@ protected:
}
// Now it's time to create the watchpoint.
- uint32_t watch_type = 0;
- switch (m_option_watchpoint.watch_type) {
- case OptionGroupWatchpoint::eWatchModify:
- watch_type |= LLDB_WATCH_TYPE_MODIFY;
- break;
- case OptionGroupWatchpoint::eWatchRead:
- watch_type |= LLDB_WATCH_TYPE_READ;
- break;
- case OptionGroupWatchpoint::eWatchReadWrite:
- watch_type |= LLDB_WATCH_TYPE_READ | LLDB_WATCH_TYPE_WRITE;
- break;
- case OptionGroupWatchpoint::eWatchWrite:
- watch_type |= LLDB_WATCH_TYPE_WRITE;
- break;
- case OptionGroupWatchpoint::eWatchInvalid:
- break;
- };
+ uint32_t watch_type = m_option_watchpoint.watch_type;
error.Clear();
WatchpointSP watch_sp =
@@ -1015,7 +999,7 @@ public:
"Use the '-l' option to specify the language of the expression. "
"Use the '-w' option to specify the type of watchpoint and "
"the '-s' option to specify the byte size to watch for. "
- "If no '-w' option is specified, it defaults to modify. "
+ "If no '-w' option is specified, it defaults to write. "
"If no '-s' option is specified, it defaults to the target's "
"pointer byte size. "
"Note that there are limited hardware resources for watchpoints. "
@@ -1029,7 +1013,7 @@ public:
R"(
Examples:
-(lldb) watchpoint set expression -w modify -s 1 -- foo + 32
+(lldb) watchpoint set expression -w write -s 1 -- foo + 32
Watches write access for the 1-byte region pointed to by the address 'foo + 32')");
@@ -1089,7 +1073,7 @@ protected:
// If no '-w' is specified, default to '-w write'.
if (!m_option_watchpoint.watch_type_specified) {
- m_option_watchpoint.watch_type = OptionGroupWatchpoint::eWatchModify;
+ m_option_watchpoint.watch_type = OptionGroupWatchpoint::eWatchWrite;
}
// We passed the sanity check for the command. Proceed to set the