Skip to content

Commit 48fca3b

Browse files
committed
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
1 parent 69fc298 commit 48fca3b

File tree

1 file changed

+3
-1
lines changed

1 file changed

+3
-1
lines changed

lldb/source/Plugins/Process/gdb-remote/ProcessGDBRemote.cpp

Lines changed: 3 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -2091,7 +2091,9 @@ ProcessGDBRemote::SetThreadStopInfo (StringExtractor& stop_packet)
20912091
lldb::StopInfoSP stop_info_sp (thread_sp->GetStopInfo ());
20922092
if (stop_info_sp)
20932093
{
2094-
stop_info_sp->SetDescription (description.c_str());
2094+
const char *stop_info_desc = stop_info_sp->GetDescription();
2095+
if (!stop_info_desc || !stop_info_desc[0])
2096+
stop_info_sp->SetDescription (description.c_str());
20952097
}
20962098
else
20972099
{

0 commit comments

Comments
 (0)