summaryrefslogtreecommitdiffstats
path: root/lldb/source/Plugins/Process/gdb-remote/ProcessGDBRemote.cpp
diff options
context:
space:
mode:
authorJaydeep Patil <jaydeep.patil@imgtec.com>2015-08-13 03:46:01 +0000
committerJaydeep Patil <jaydeep.patil@imgtec.com>2015-08-13 03:46:01 +0000
commit725666cc65f136100b6cb28ed850a712fa1eac1d (patch)
treeed98df120ed26933efb41140fa0b523202012e06 /lldb/source/Plugins/Process/gdb-remote/ProcessGDBRemote.cpp
parent831435042e887d35876eba411a07082eb6f6a246 (diff)
downloadbcm5719-llvm-725666cc65f136100b6cb28ed850a712fa1eac1d.tar.gz
bcm5719-llvm-725666cc65f136100b6cb28ed850a712fa1eac1d.zip
[LLDB][MIPS] Support standard GDB remote stop reply packet for watchpoint
SUMMARY: The patch supports TAAwatch:addr packet. The patch also sets m_watchpoints_trigger_after_instruction to eLazyBoolNo when qHostInfo or qWatchpointSupportInfo is not supported by the target. Reviewers: jingham, clayborg Subscribers: nitesh.jain, mohit.bhakkad, sagar, bhushan and lldb-commits Differential Revision: http://reviews.llvm.org/D11747 llvm-svn: 244865
Diffstat (limited to 'lldb/source/Plugins/Process/gdb-remote/ProcessGDBRemote.cpp')
-rw-r--r--lldb/source/Plugins/Process/gdb-remote/ProcessGDBRemote.cpp17
1 files changed, 16 insertions, 1 deletions
diff --git a/lldb/source/Plugins/Process/gdb-remote/ProcessGDBRemote.cpp b/lldb/source/Plugins/Process/gdb-remote/ProcessGDBRemote.cpp
index 4a9e285d2c2..d4d653d3533 100644
--- a/lldb/source/Plugins/Process/gdb-remote/ProcessGDBRemote.cpp
+++ b/lldb/source/Plugins/Process/gdb-remote/ProcessGDBRemote.cpp
@@ -2484,6 +2484,21 @@ ProcessGDBRemote::SetThreadStopInfo (StringExtractor& stop_packet)
}
}
}
+ else if (key.compare("watch") == 0 || key.compare("rwatch") == 0 || key.compare("awatch") == 0)
+ {
+ // Support standard GDB remote stop reply packet 'TAAwatch:addr'
+ lldb::addr_t wp_addr = StringConvert::ToUInt64 (value.c_str(), LLDB_INVALID_ADDRESS, 16);
+ WatchpointSP wp_sp = GetTarget().GetWatchpointList().FindByAddress(wp_addr);
+ uint32_t wp_index = LLDB_INVALID_INDEX32;
+
+ if (wp_sp)
+ wp_index = wp_sp->GetHardwareIndex();
+
+ reason = "watchpoint";
+ StreamString ostr;
+ ostr.Printf("%" PRIu64 " %" PRIu32, wp_addr, wp_index);
+ description = ostr.GetString().c_str();
+ }
else if (key.size() == 2 && ::isxdigit(key[0]) && ::isxdigit(key[1]))
{
uint32_t reg = StringConvert::ToUInt32 (key.c_str(), UINT32_MAX, 16);
@@ -3085,7 +3100,7 @@ ProcessGDBRemote::GetWatchpointSupportInfo (uint32_t &num)
Error
ProcessGDBRemote::GetWatchpointSupportInfo (uint32_t &num, bool& after)
{
- Error error (m_gdb_comm.GetWatchpointSupportInfo (num, after));
+ Error error (m_gdb_comm.GetWatchpointSupportInfo (num, after, GetTarget().GetArchitecture()));
return error;
}
OpenPOWER on IntegriCloud