Commit ab0e0b1f authored by hjk's avatar hjk
Browse files

debugger: fix startup of pdbengine

parent e15f07cb
......@@ -140,6 +140,7 @@ void PdbEngine::exitDebugger()
void PdbEngine::startDebugger()
{
setState(EngineStarting);
setState(AdapterStarting);
m_scriptFileName = QFileInfo(startParameters().executable).absoluteFilePath();
......@@ -151,11 +152,6 @@ void PdbEngine::startDebugger()
startFailed();
return;
}
setState(AdapterStarted);
setState(InferiorStarting);
setState(InferiorRunningRequested);
showStatusMessage(tr("Running requested..."), 5000);
m_pdbProc.disconnect(); // From any previous runs
m_pdb = _("/usr/bin/python");
......@@ -196,9 +192,6 @@ void PdbEngine::startDebugger()
startFailed();
return;
}
emit startSuccessful();
setState(InferiorRunning);
attemptBreakpointSynchronization();
showMessage(_("PDB STARTED, INITIALIZING IT"));
......@@ -206,6 +199,13 @@ void PdbEngine::startDebugger()
Core::ICore::instance()->resourcePath().toLocal8Bit() + "/gdbmacros/";
postCommand("execfile('" + dumperSourcePath + "pdumper.py')",
CB(handleLoadDumper));
setState(AdapterStarted);
setState(InferiorStarting);
setState(InferiorRunningRequested);
showStatusMessage(tr("Running requested..."), 5000);
emit startSuccessful();
}
void PdbEngine::runInferior()
......
......@@ -34,6 +34,7 @@
#include "breakhandler.h"
#include "debuggerconstants.h"
#include "debuggerdialogs.h"
#include "debuggerstringutils.h"
#include "moduleshandler.h"
#include "registerhandler.h"
#include "stackhandler.h"
......@@ -230,7 +231,7 @@ void ScriptEngine::exitDebugger()
void ScriptEngine::startDebugger()
{
qDebug() << "STARTING SCRIPT DEBUGGER";
showMessage(_("STARTING SCRIPT DEBUGGER"), LogMisc);
QTC_ASSERT(state() == DebuggerNotReady, setState(DebuggerNotReady));
setState(EngineStarting);
setState(AdapterStarting);
......@@ -251,7 +252,7 @@ void ScriptEngine::startDebugger()
setState(InferiorStarting);
m_scriptFileName = QFileInfo(startParameters().executable).absoluteFilePath();
qDebug() << "SCRIPT FILE: " << m_scriptFileName;
showMessage(_("SCRIPT FILE: ") + m_scriptFileName);
QFile scriptFile(m_scriptFileName);
if (!scriptFile.open(QIODevice::ReadOnly|QIODevice::Text)) {
showMessage(QString::fromLatin1("Cannot open %1: %2").
......
Markdown is supported
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment