summaryrefslogtreecommitdiffstats
path: root/lldb/source/Plugins/Process/gdb-remote
diff options
context:
space:
mode:
authorPavel Labath <labath@google.com>2015-05-15 10:14:51 +0000
committerPavel Labath <labath@google.com>2015-05-15 10:14:51 +0000
commit48fca3b982ba5a49bd382e61b011f4fc11327ebf (patch)
tree3a9cb7de12170b68da92fc6a072648c896c9cb8a /lldb/source/Plugins/Process/gdb-remote
parent69fc298a940515cc91307874ad795b3175154a24 (diff)
downloadbcm5719-llvm-48fca3b982ba5a49bd382e61b011f4fc11327ebf.tar.gz
bcm5719-llvm-48fca3b982ba5a49bd382e61b011f4fc11327ebf.zip
Fix StopInfoWatchpoint handling after r237411
r237411 exposed the following issue: ProcessGDBRemote used the description field in the stop-reply to set the description of the StopInfo. In the case of watchpoints, the packet description contains the raw address that got hit, which is not exactly the information we want to display to the user as the stop info. Therefore, I have changed the code to use the packet description only if the StopInfo does not already have a description. This makes the behavior equivalent to the pre-r237411 behavior as then the SetDecription call got ignored for watchpoints. llvm-svn: 237436
Diffstat (limited to 'lldb/source/Plugins/Process/gdb-remote')
-rw-r--r--lldb/source/Plugins/Process/gdb-remote/ProcessGDBRemote.cpp4
1 files changed, 3 insertions, 1 deletions
diff --git a/lldb/source/Plugins/Process/gdb-remote/ProcessGDBRemote.cpp b/lldb/source/Plugins/Process/gdb-remote/ProcessGDBRemote.cpp
index 1526b0911a1..9b8ccd21f72 100644
--- a/lldb/source/Plugins/Process/gdb-remote/ProcessGDBRemote.cpp
+++ b/lldb/source/Plugins/Process/gdb-remote/ProcessGDBRemote.cpp
@@ -2091,7 +2091,9 @@ ProcessGDBRemote::SetThreadStopInfo (StringExtractor& stop_packet)
lldb::StopInfoSP stop_info_sp (thread_sp->GetStopInfo ());
if (stop_info_sp)
{
- stop_info_sp->SetDescription (description.c_str());
+ const char *stop_info_desc = stop_info_sp->GetDescription();
+ if (!stop_info_desc || !stop_info_desc[0])
+ stop_info_sp->SetDescription (description.c_str());
}
else
{
OpenPOWER on IntegriCloud