TeamDebugger: When stopping after an image load...

...set a stop reason to indicate the responsible image.
This commit is contained in:
Rene Gollent 2013-07-07 12:56:30 -04:00
parent ea84db9e2f
commit 5d4ef3e417
1 changed files with 13 additions and 9 deletions

View File

@ -1576,21 +1576,25 @@ TeamDebugger::_HandleImageDebugInfoChanged(image_id imageID)
BReference<ThreadHandler> handlerReference(handler);
bool stop = true;
const BString& imageName = image->Name();
// only match on the image filename itself
const char* rawImageName = imageName.String()
+ imageName.FindLast('/') + 1;
if (fTeam->StopImageNameListEnabled()) {
const BStringList& nameList = fTeam->StopImageNames();
const BString& imageName = image->Name();
// only match on the image filename itself
const char* rawImageName = imageName.String()
+ imageName.FindLast('/') + 1;
stop = nameList.HasString(rawImageName);
}
locker.Unlock();
if (stop && handler != NULL) {
BString stopReason;
stopReason.SetToFormat("Image '%s' loaded.",
rawImageName);
locker.Unlock();
if (stop && handler != NULL
&& handler->HandleThreadDebugged(NULL)) {
return;
}
if (handler->HandleThreadDebugged(NULL, stopReason))
return;
} else
locker.Unlock();
} else
locker.Unlock();