[Lldb-commits] [lldb] r237436 - Fix StopInfoWatchpoint handling after r237411
Pavel Labath
labath at google.com
Fri May 15 03:14:51 PDT 2015
Author: labath
Date: Fri May 15 05:14:51 2015
New Revision: 237436
URL: http://llvm.org/viewvc/llvm-project?rev=237436&view=rev
Log:
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.
Modified:
lldb/trunk/source/Plugins/Process/gdb-remote/ProcessGDBRemote.cpp
Modified: lldb/trunk/source/Plugins/Process/gdb-remote/ProcessGDBRemote.cpp
URL: http://llvm.org/viewvc/llvm-project/lldb/trunk/source/Plugins/Process/gdb-remote/ProcessGDBRemote.cpp?rev=237436&r1=237435&r2=237436&view=diff
==============================================================================
--- lldb/trunk/source/Plugins/Process/gdb-remote/ProcessGDBRemote.cpp (original)
+++ lldb/trunk/source/Plugins/Process/gdb-remote/ProcessGDBRemote.cpp Fri May 15 05:14:51 2015
@@ -2091,7 +2091,9 @@ ProcessGDBRemote::SetThreadStopInfo (Str
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
{
More information about the lldb-commits
mailing list