;
}
- QTimer::singleShot(0, this, SLOT(attemptBreakpointSynchronization()));
+void GdbEngine::handleAqcuiredInferior()
+{
+ #if defined(Q_OS_WIN)
+ sendCommand("info thread", GdbInfoThreads);
+ #endif
+ #if defined(Q_OS_LINUX)
+ sendCommand("info proc", GdbInfoProc);
+ #endif
+ #if defined(Q_OS_MAC)
+ sendCommand("info pid", GdbInfoProc, QVariant(), NeedsStop);
+ #endif
+ reloadSourceFiles();
+ tryLoadCustomDumpers();
+
+ // intentionally after tryLoadCustomDumpers(),
+ // otherwise we'd interupt solib loading.
+ if (qq->wantsAllPluginBreakpoints()) {
+ sendCommand("set auto-solib-add on");
+ sendCommand("set stop-on-solib-events 0");
+ sendCommand("sharedlibrary .*");
+ } else if (qq->wantsSelectedPluginBreakpoints()) {
+ sendCommand("set auto-solib-add on");
+ sendCommand("set stop-on-solib-events 1");
+ sendCommand("sharedlibrary " + qq->selectedPluginBreakpointsPattern());
+ } else if (qq->wantsNoPluginBreakpoints()) {
+ // should be like that already
+ sendCommand("set auto-solib-add off");
+ sendCommand("set stop-on-solib-events 0");
+ }
+ // nicer to see a bit of the world we live in
+ reloadModules();
++ attemptBreakpointSynchronization();
+}
+
void GdbEngine::handleAsyncOutput(const GdbMi &data)
{
const QString reason = data.findChild("reason").data();
qq->notifyInferiorStopped();
m_waitingForFirstBreakpointToBeHit = false;
- //
- // that's the "early stop"
- //
- #if defined(Q_OS_WIN)
- sendCommand("info thread", GdbInfoThreads);
- #endif
- #if defined(Q_OS_LINUX)
- sendCommand("info proc", GdbInfoProc);
- #endif
- #if defined(Q_OS_MAC)
- sendCommand("info pid", GdbInfoProc);
- #endif
- reloadSourceFiles();
- tryLoadCustomDumpers();
-
- #ifndef Q_OS_MAC
- // intentionally after tryLoadCustomDumpers(),
- // otherwise we'd interupt solib loading.
- if (qq->wantsAllPluginBreakpoints()) {
- sendCommand("set auto-solib-add on");
- sendCommand("set stop-on-solib-events 0");
- sendCommand("sharedlibrary .*");
- } else if (qq->wantsSelectedPluginBreakpoints()) {
- sendCommand("set auto-solib-add on");
- sendCommand("set stop-on-solib-events 1");
- sendCommand("sharedlibrary "+qq->selectedPluginBreakpointsPattern());
- } else if (qq->wantsNoPluginBreakpoints()) {
- // should be like that already
- sendCommand("set auto-solib-add off");
- sendCommand("set stop-on-solib-events 0");
- }
- #endif
- // nicer to see a bit of the world we live in
- reloadModules();
+ // this will "continue" if done
+ m_waitingForBreakpointSynchronizationToContinue = true;
- //QTimer::singleShot(0, this, SLOT(attemptBreakpointSynchronization()));
- attemptBreakpointSynchronization();
+ //
+ // that's the "early stop"
+ //
+ handleAqcuiredInferior();
- // this will "continue" if done
- m_waitingForBreakpointSynchronizationToContinue = true;
return;
}
#ifdef Q_OS_MAC
sendCommand("sharedlibrary apply-load-rules all");
#endif
- //setTokenBarrier();
if (!q->m_processArgs.isEmpty())
sendCommand("-exec-arguments " + q->m_processArgs.join(" "));
+ #ifndef Q_OS_MAC
sendCommand("set auto-solib-add off");
- sendCommand("x/2i " + startSymbolName(), GdbStart);
+ #endif
+ sendCommand("info target", GdbStart);
}
// set all to "pending"