summaryrefslogtreecommitdiffstats
path: root/lldb/source/Interpreter
diff options
context:
space:
mode:
authorJohnny Chen <johnny.chen@apple.com>2012-06-04 20:08:23 +0000
committerJohnny Chen <johnny.chen@apple.com>2012-06-04 20:08:23 +0000
commit3cb41e82cbeb686af5c5feda1d5acdb4bf931945 (patch)
treee8480a8daa9451272f330073c4bf3ae813ef506e /lldb/source/Interpreter
parent8d4688718b3754a87a968c89f0ea0a45256efdc1 (diff)
downloadbcm5719-llvm-3cb41e82cbeb686af5c5feda1d5acdb4bf931945.tar.gz
bcm5719-llvm-3cb41e82cbeb686af5c5feda1d5acdb4bf931945.zip
Give more explicit error messages when watchpoint creation command (watchpoint set) fails,
like number of supported hardware watchpoints reached or the watch size is not allowed. llvm-svn: 157948
Diffstat (limited to 'lldb/source/Interpreter')
-rw-r--r--lldb/source/Interpreter/OptionGroupWatchpoint.cpp13
1 files changed, 13 insertions, 0 deletions
diff --git a/lldb/source/Interpreter/OptionGroupWatchpoint.cpp b/lldb/source/Interpreter/OptionGroupWatchpoint.cpp
index e041620ff5b..aa5b0001c02 100644
--- a/lldb/source/Interpreter/OptionGroupWatchpoint.cpp
+++ b/lldb/source/Interpreter/OptionGroupWatchpoint.cpp
@@ -45,6 +45,19 @@ g_option_table[] =
};
+bool
+OptionGroupWatchpoint::IsWatchSizeSupported(uint32_t watch_size)
+{
+ for (uint32_t i = 0; i < llvm::array_lengthof(g_watch_size); ++i)
+ {
+ if (g_watch_size[i].value == 0)
+ break;
+ if (watch_size == g_watch_size[i].value)
+ return true;
+ }
+ return false;
+}
+
OptionGroupWatchpoint::OptionGroupWatchpoint () :
OptionGroup()
{
OpenPOWER on IntegriCloud