Fix setting breakpoints in running application.

It's a hack. More proper solution to come.

Done-with: hjk
This commit is contained in:
con
2010-01-28 18:26:06 +01:00
parent 0ff51c1932
commit 6a05f778af

View File

@@ -2201,7 +2201,24 @@ void GdbEngine::attemptBreakpointSynchronization()
// For best results, we rely on an up-to-date fullname mapping.
// The listing completion will retrigger us, so no futher action is needed.
if (m_sourcesListOutdated && theDebuggerBoolSetting(UsePreciseBreakpoints)) {
reloadSourceFilesInternal();
if (state() == InferiorRunning) {
// FIXME: this is a hack
// The hack solves the problem that we want both commands
// (reloadSourceFiles and reloadBreakList) to be executed
// within the same stop-executecommand-continue cycle.
// Just calling reloadSourceFiles and reloadBreakList doesn't work
// in this case, because a) stopping the executable is asyncronous,
// b) we wouldn't want to stop-exec-continue twice
m_sourcesListUpdating = true;
GdbCommand cmd;
cmd.command = "-file-list-exec-source-files";
cmd.flags = NoFlags;
cmd.callback = &GdbEngine::handleQuerySources;
cmd.callbackName = "";
m_commandsToRunOnTemporaryBreak.append(cmd);
} else {
reloadSourceFilesInternal();
}
reloadBreakListInternal();
return;
}