forked from qt-creator/qt-creator
Fix setting breakpoints in running application.
It's a hack. More proper solution to come. Done-with: hjk
This commit is contained in:
@@ -2201,7 +2201,24 @@ void GdbEngine::attemptBreakpointSynchronization()
|
|||||||
// For best results, we rely on an up-to-date fullname mapping.
|
// For best results, we rely on an up-to-date fullname mapping.
|
||||||
// The listing completion will retrigger us, so no futher action is needed.
|
// The listing completion will retrigger us, so no futher action is needed.
|
||||||
if (m_sourcesListOutdated && theDebuggerBoolSetting(UsePreciseBreakpoints)) {
|
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();
|
reloadBreakListInternal();
|
||||||
return;
|
return;
|
||||||
}
|
}
|
||||||
|
|||||||
Reference in New Issue
Block a user