setObjectName(QLatin1String("GdbEngine"));
qRegisterMetaType<WatchData>("WatchData");
- m_commandTimer.setSingleShot(true);
- connect(&m_commandTimer, SIGNAL(timeout()), SLOT(commandTimeout()));
-
- // Needs no resetting in initializeVariables()
m_busy = false;
- initializeVariables();
+ m_gdbAdapter = 0;
+ m_debuggingHelperState = DebuggingHelperUninitialized;
+ m_gdbVersion = 100;
+ m_gdbBuildVersion = -1;
+ m_isMacGdb = false;
+ m_hasPython = false;
+ m_registerNamesListed = false;
+ m_hasInferiorThreadList = false;
+ m_sourcesListUpdating = false;
+ m_oldestAcceptableToken = -1;
+ m_outputCodec = QTextCodec::codecForLocale();
+ m_pendingWatchRequests = 0;
+ m_pendingBreakpointRequests = 0;
+ m_commandsDoneCallback = 0;
+ invalidateSourcesList();
+
m_gdbAdapter = createAdapter();
+ m_commandTimer.setSingleShot(true);
+ connect(&m_commandTimer, SIGNAL(timeout()), SLOT(commandTimeout()));
+
connect(debuggerCore()->action(AutoDerefPointers), SIGNAL(valueChanged(QVariant)),
SLOT(reloadLocals()));
connect(debuggerCore()->action(SortStructMembers), SIGNAL(valueChanged(QVariant)),
m_gdbAdapter = 0;
}
-void GdbEngine::initializeVariables()
-{
- m_debuggingHelperState = DebuggingHelperUninitialized;
- m_gdbVersion = 100;
- m_gdbBuildVersion = -1;
- m_isMacGdb = false;
- m_hasPython = false;
- m_registerNamesListed = false;
- m_hasInferiorThreadList = false;
-
- m_fullToShortName.clear();
- m_shortToFullName.clear();
-
- invalidateSourcesList();
- m_sourcesListUpdating = false;
- m_oldestAcceptableToken = -1;
- m_outputCodec = QTextCodec::codecForLocale();
- m_pendingWatchRequests = 0;
- m_pendingBreakpointRequests = 0;
- m_commandsDoneCallback = 0;
- m_commandsToRunOnTemporaryBreak.clear();
- m_cookieForToken.clear();
-
- m_pendingConsoleStreamOutput.clear();
- m_pendingLogStreamOutput.clear();
-
- m_inbuffer.clear();
- m_resultVarName.clear();
-
- m_commandTimer.stop();
-
- // ConverterState has no reset() function.
- m_outputCodecState.~ConverterState();
- new (&m_outputCodecState) QTextCodec::ConverterState();
-
- m_currentFunctionArgs.clear();
- m_currentFrame.clear();
- m_dumperHelper.clear();
-#ifdef Q_OS_LINUX
- m_entryPoint.clear();
-#endif
-}
-
QString GdbEngine::errorMessage(QProcess::ProcessError error)
{
switch (error) {
showStatusMessage(msg);
//m_gdbAdapter->shutdownEngine();
}
- initializeVariables();
*/
switch (state()) {
case EngineShutdownRequested:
tr("The gdb process crashed.") :
tr("The gdb process exited unexpectedly (code %1)").arg(code);
showMessageBox(QMessageBox::Critical, tr("Unexpected Gdb Exit"), msg);
- }
break;
}
+ }
}
void GdbEngine::handleAdapterStartFailed(const QString &msg, const QString &settingsIdHint)