diff options
author | Johnny Chen <johnny.chen@apple.com> | 2012-05-23 21:09:52 +0000 |
---|---|---|
committer | Johnny Chen <johnny.chen@apple.com> | 2012-05-23 21:09:52 +0000 |
commit | 64637205051bb9789436cc4546ac9d8507a0c9d0 (patch) | |
tree | a1be9ce810e598ca64e02609fa2e2ed666c6583b /lldb/source/Commands/CommandObjectWatchpoint.cpp | |
parent | afc2edbedca7a0226aadee4d45480b44e2329733 (diff) | |
download | bcm5719-llvm-64637205051bb9789436cc4546ac9d8507a0c9d0.tar.gz bcm5719-llvm-64637205051bb9789436cc4546ac9d8507a0c9d0.zip |
Add the capability to display the number of supported hardware watchpoints to the "watchpoint list" command.
Add default Process::GetWatchpointSupportInfo() impl which returns an error of "not supported".
Add "qWatchpointSupportInfo" packet to the gdb communication layer to support this, and modify TestWatchpointCommands.py to test it.
llvm-svn: 157345
Diffstat (limited to 'lldb/source/Commands/CommandObjectWatchpoint.cpp')
-rw-r--r-- | lldb/source/Commands/CommandObjectWatchpoint.cpp | 9 |
1 files changed, 9 insertions, 0 deletions
diff --git a/lldb/source/Commands/CommandObjectWatchpoint.cpp b/lldb/source/Commands/CommandObjectWatchpoint.cpp index 8387cb638e3..56b95abefdc 100644 --- a/lldb/source/Commands/CommandObjectWatchpoint.cpp +++ b/lldb/source/Commands/CommandObjectWatchpoint.cpp @@ -290,6 +290,15 @@ CommandObjectWatchpointList::Execute(Args& args, CommandReturnObject &result) return true; } + if (target->GetProcessSP() && target->GetProcessSP()->IsAlive()) + { + uint32_t num_supported_hardware_watchpoints; + Error error = target->GetProcessSP()->GetWatchpointSupportInfo(num_supported_hardware_watchpoints); + if (error.Success()) + result.AppendMessageWithFormat("Number of supported hardware watchpoints: %u\n", + num_supported_hardware_watchpoints); + } + const WatchpointList &watchpoints = target->GetWatchpointList(); Mutex::Locker locker; target->GetWatchpointList().GetListMutex(locker); |