aboutsummaryrefslogtreecommitdiff
path: root/lldb/source/Commands/CommandObjectWatchpoint.cpp
diff options
context:
space:
mode:
Diffstat (limited to 'lldb/source/Commands/CommandObjectWatchpoint.cpp')
-rw-r--r--lldb/source/Commands/CommandObjectWatchpoint.cpp18
1 files changed, 17 insertions, 1 deletions
diff --git a/lldb/source/Commands/CommandObjectWatchpoint.cpp b/lldb/source/Commands/CommandObjectWatchpoint.cpp
index 83c2fb8..dc5be0d 100644
--- a/lldb/source/Commands/CommandObjectWatchpoint.cpp
+++ b/lldb/source/Commands/CommandObjectWatchpoint.cpp
@@ -1133,7 +1133,23 @@ protected:
size = target->GetArchitecture().GetAddressByteSize();
// Now it's time to create the watchpoint.
- uint32_t watch_type = m_option_watchpoint.watch_type;
+ uint32_t watch_type;
+ switch (m_option_watchpoint.watch_type) {
+ case OptionGroupWatchpoint::eWatchRead:
+ watch_type = LLDB_WATCH_TYPE_READ;
+ break;
+ case OptionGroupWatchpoint::eWatchWrite:
+ watch_type = LLDB_WATCH_TYPE_WRITE;
+ break;
+ case OptionGroupWatchpoint::eWatchModify:
+ watch_type = LLDB_WATCH_TYPE_MODIFY;
+ break;
+ case OptionGroupWatchpoint::eWatchReadWrite:
+ watch_type = LLDB_WATCH_TYPE_READ | LLDB_WATCH_TYPE_WRITE;
+ break;
+ default:
+ watch_type = LLDB_WATCH_TYPE_MODIFY;
+ }
// Fetch the type from the value object, the type of the watched object is
// the pointee type