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
This commit is contained in:
Pavel Labath 2015-05-15 10:14:51 +00:00
parent 69fc298a94
commit 48fca3b982
1 changed files with 3 additions and 1 deletions

View File

@ -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
{