forked from qt-creator/qt-creator
debugger: start 'runcontrol-ification' of the debugger plugin.
This replaces most uses of DebuggerStartParameters by DebuggerRunControl which is a simple RunControl with a DebuggerStartParameters member. Plan is to move all global state to the run controls, and possibly introduce specialized ones for core debugging etc.
This commit is contained in:
@@ -386,8 +386,9 @@ void CdbDebugEngine::startupChecks()
|
||||
syncDebuggerPaths();
|
||||
}
|
||||
|
||||
void CdbDebugEngine::startDebugger(const QSharedPointer<DebuggerStartParameters> &sp)
|
||||
void CdbDebugEngine::startDebugger(const DebuggerRunControl *runControl)
|
||||
{
|
||||
DebuggerStartParameters *sp = &runControl->sp();
|
||||
if (debugCDBExecution)
|
||||
qDebug() << "startDebugger" << *sp;
|
||||
CdbCore::BreakPoint::clearNormalizeFileNameCache();
|
||||
|
@@ -63,7 +63,7 @@ public:
|
||||
|
||||
virtual void shutdown();
|
||||
virtual void setToolTipExpression(const QPoint &mousePos, TextEditor::ITextEditor *editor, int cursorPos);
|
||||
virtual void startDebugger(const QSharedPointer<DebuggerStartParameters> &startParameters);
|
||||
virtual void startDebugger(const DebuggerRunControl *runControl);
|
||||
virtual void exitDebugger();
|
||||
virtual void detachDebugger();
|
||||
virtual void updateWatchData(const WatchData &data);
|
||||
|
@@ -269,7 +269,7 @@ struct DebuggerManagerPrivate
|
||||
const QIcon m_locationMarkIcon;
|
||||
|
||||
// FIXME: Remove engine-specific state
|
||||
DebuggerStartParametersPtr m_startParameters;
|
||||
const DebuggerRunControl *m_runControl;
|
||||
qint64 m_inferiorPid;
|
||||
|
||||
/// Views
|
||||
@@ -328,7 +328,6 @@ DebuggerManagerPrivate::DebuggerManagerPrivate(DebuggerManager *manager) :
|
||||
m_stopIcon(QLatin1String(":/debugger/images/debugger_stop_small.png")),
|
||||
m_interruptIcon(QLatin1String(":/debugger/images/debugger_interrupt_small.png")),
|
||||
m_locationMarkIcon(QLatin1String(":/debugger/images/location_16.png")),
|
||||
m_startParameters(new DebuggerStartParameters),
|
||||
m_inferiorPid(0),
|
||||
m_disassemblerViewAgent(manager),
|
||||
m_engine(0)
|
||||
@@ -1061,11 +1060,12 @@ static IDebuggerEngine *debuggerEngineForMode(DebuggerStartMode startMode, QStri
|
||||
#endif
|
||||
}
|
||||
|
||||
void DebuggerManager::startNewDebugger(const DebuggerStartParametersPtr &sp)
|
||||
void DebuggerManager::startNewDebugger(const DebuggerRunControl *runControl)
|
||||
{
|
||||
if (d->m_state != DebuggerNotReady)
|
||||
return;
|
||||
d->m_startParameters = sp;
|
||||
d->m_runControl = runControl;
|
||||
const DebuggerStartParameters *sp = &runControl->sp();
|
||||
d->m_inferiorPid = sp->attachPID > 0 ? sp->attachPID : 0;
|
||||
const QString toolChainName = ProjectExplorer::ToolChain::toolChainName(
|
||||
ProjectExplorer::ToolChain::ToolChainType(sp->toolChainType));
|
||||
@@ -1113,7 +1113,7 @@ void DebuggerManager::startNewDebugger(const DebuggerStartParametersPtr &sp)
|
||||
setBusyCursor(false);
|
||||
setState(EngineStarting);
|
||||
connect(d->m_engine, SIGNAL(startFailed()), this, SLOT(startFailed()));
|
||||
d->m_engine->startDebugger(sp);
|
||||
d->m_engine->startDebugger(runControl);
|
||||
|
||||
const unsigned engineCapabilities = d->m_engine->debuggerCapabilities();
|
||||
theDebuggerAction(OperateByInstruction)
|
||||
@@ -1174,11 +1174,6 @@ void DebuggerManager::abortDebugger()
|
||||
d->m_codeModelSnapshot = CPlusPlus::Snapshot();
|
||||
}
|
||||
|
||||
DebuggerStartParametersPtr DebuggerManager::startParameters() const
|
||||
{
|
||||
return d->m_startParameters;
|
||||
}
|
||||
|
||||
qint64 DebuggerManager::inferiorPid() const
|
||||
{
|
||||
return d->m_inferiorPid;
|
||||
@@ -1316,7 +1311,7 @@ void DebuggerManager::aboutToUnloadSession()
|
||||
// Note that at startup, session switches may occur, which interfer
|
||||
// with command-line debugging startup.
|
||||
if (d->m_engine && state() != DebuggerNotReady
|
||||
&& d->m_startParameters->startMode == StartInternal)
|
||||
&& runControl()->sp().startMode == StartInternal)
|
||||
d->m_engine->shutdown();
|
||||
}
|
||||
|
||||
@@ -1651,7 +1646,7 @@ QString DebuggerManager::qtDumperLibraryName() const
|
||||
{
|
||||
if (theDebuggerAction(UseCustomDebuggingHelperLocation)->value().toBool())
|
||||
return theDebuggerAction(CustomDebuggingHelperLocation)->value().toString();
|
||||
return d->m_startParameters->dumperLibrary;
|
||||
return runControl()->sp().dumperLibrary;
|
||||
}
|
||||
|
||||
QStringList DebuggerManager::qtDumperLibraryLocations() const
|
||||
@@ -1663,7 +1658,7 @@ QStringList DebuggerManager::qtDumperLibraryLocations() const
|
||||
tr("%1 (explicitly set in the Debugger Options)").arg(customLocation);
|
||||
return QStringList(location);
|
||||
}
|
||||
return d->m_startParameters->dumperLibraryLocations;
|
||||
return runControl()->sp().dumperLibraryLocations;
|
||||
}
|
||||
|
||||
void DebuggerManager::showQtDumperLibraryWarning(const QString &details)
|
||||
@@ -2033,6 +2028,11 @@ void DebuggerManager::openTextEditor(const QString &titlePattern,
|
||||
d->m_plugin->openTextEditor(titlePattern, contents);
|
||||
}
|
||||
|
||||
DebuggerRunControl *DebuggerManager::runControl() const
|
||||
{
|
||||
return const_cast<DebuggerRunControl *>(d->m_runControl);
|
||||
}
|
||||
|
||||
//////////////////////////////////////////////////////////////////////
|
||||
//
|
||||
// AbstractDebuggerEngine
|
||||
@@ -2060,6 +2060,7 @@ void IDebuggerEngine::setState(DebuggerState state, bool forced)
|
||||
//
|
||||
//////////////////////////////////////////////////////////////////////
|
||||
|
||||
/*
|
||||
void DebuggerManager::runTest(const QString &fileName)
|
||||
{
|
||||
d->m_startParameters->executable = fileName;
|
||||
@@ -2067,6 +2068,7 @@ void DebuggerManager::runTest(const QString &fileName)
|
||||
d->m_startParameters->workingDirectory.clear();
|
||||
//startNewDebugger(StartInternal);
|
||||
}
|
||||
*/
|
||||
|
||||
} // namespace Debugger
|
||||
|
||||
|
@@ -156,7 +156,7 @@ public:
|
||||
QLabel *statusLabel() const;
|
||||
Internal::IDebuggerEngine *currentEngine() const;
|
||||
|
||||
DebuggerStartParametersPtr startParameters() const;
|
||||
DebuggerRunControl *runControl() const;
|
||||
qint64 inferiorPid() const;
|
||||
|
||||
QMessageBox *showMessageBox(int icon, const QString &title, const QString &text,
|
||||
@@ -177,7 +177,7 @@ public:
|
||||
static DebuggerManager *instance();
|
||||
|
||||
public slots:
|
||||
void startNewDebugger(const DebuggerStartParametersPtr &sp);
|
||||
void startNewDebugger(const DebuggerRunControl *runControl);
|
||||
void exitDebugger();
|
||||
void abortDebugger();
|
||||
|
||||
|
@@ -1369,7 +1369,7 @@ void DebuggerPlugin::handleStateChanged(int state)
|
||||
//const bool running = state == InferiorRunning;
|
||||
|
||||
const bool detachable = state == InferiorStopped
|
||||
&& m_manager->startParameters()->startMode != AttachCore;
|
||||
&& m_manager->runControl()->sp().startMode != AttachCore;
|
||||
|
||||
m_startExternalAction->setEnabled(!started && !starting);
|
||||
m_attachExternalAction->setEnabled(!started && !starting);
|
||||
@@ -1445,7 +1445,7 @@ void DebuggerPlugin::showSettingsDialog()
|
||||
|
||||
void DebuggerPlugin::startExternalApplication()
|
||||
{
|
||||
const DebuggerStartParametersPtr sp(new DebuggerStartParameters);
|
||||
DebuggerStartParameters sp;
|
||||
StartExternalDialog dlg(m_uiSwitcher->mainWindow());
|
||||
dlg.setExecutableFile(
|
||||
configValue(_("LastExternalExecutableFile")).toString());
|
||||
@@ -1462,11 +1462,11 @@ void DebuggerPlugin::startExternalApplication()
|
||||
dlg.executableArguments());
|
||||
setConfigValue(_("LastExternalWorkingDirectory"),
|
||||
dlg.workingDirectory());
|
||||
sp->executable = dlg.executableFile();
|
||||
sp->startMode = StartExternal;
|
||||
sp->workingDirectory = dlg.workingDirectory();
|
||||
sp.executable = dlg.executableFile();
|
||||
sp.startMode = StartExternal;
|
||||
sp.workingDirectory = dlg.workingDirectory();
|
||||
if (!dlg.executableArguments().isEmpty())
|
||||
sp->processArgs = dlg.executableArguments().split(QLatin1Char(' '));
|
||||
sp.processArgs = dlg.executableArguments().split(QLatin1Char(' '));
|
||||
|
||||
if (dlg.breakAtMain())
|
||||
m_manager->breakByFunctionMain();
|
||||
@@ -1491,11 +1491,11 @@ void DebuggerPlugin::attachExternalApplication(qint64 pid,
|
||||
tr("Cannot attach to PID 0"));
|
||||
return;
|
||||
}
|
||||
const DebuggerStartParametersPtr sp(new DebuggerStartParameters);
|
||||
sp->attachPID = pid;
|
||||
sp->executable = binary;
|
||||
sp->crashParameter = crashParameter;
|
||||
sp->startMode = crashParameter.isEmpty() ? AttachExternal : AttachCrashedExternal;
|
||||
DebuggerStartParameters sp;
|
||||
sp.attachPID = pid;
|
||||
sp.executable = binary;
|
||||
sp.crashParameter = crashParameter;
|
||||
sp.startMode = crashParameter.isEmpty() ? AttachExternal : AttachCrashedExternal;
|
||||
if (RunControl *runControl = m_debuggerRunControlFactory->create(sp))
|
||||
ProjectExplorerPlugin::instance()->startRunControl(runControl, PE::DEBUGMODE);
|
||||
}
|
||||
@@ -1518,11 +1518,11 @@ void DebuggerPlugin::attachCore()
|
||||
|
||||
void DebuggerPlugin::attachCore(const QString &core, const QString &exe)
|
||||
{
|
||||
const DebuggerStartParametersPtr sp(new DebuggerStartParameters);
|
||||
sp->executable = exe;
|
||||
sp->coreFile = core;
|
||||
sp->displayName = tr("Core file: \"%1\"").arg(core);
|
||||
sp->startMode = AttachCore;
|
||||
DebuggerStartParameters sp;
|
||||
sp.executable = exe;
|
||||
sp.coreFile = core;
|
||||
sp.displayName = tr("Core file: \"%1\"").arg(core);
|
||||
sp.startMode = AttachCore;
|
||||
if (RunControl *runControl = m_debuggerRunControlFactory->create(sp))
|
||||
ProjectExplorerPlugin::instance()->
|
||||
startRunControl(runControl, PE::DEBUGMODE);
|
||||
@@ -1530,7 +1530,7 @@ void DebuggerPlugin::attachCore(const QString &core, const QString &exe)
|
||||
|
||||
void DebuggerPlugin::startRemoteApplication()
|
||||
{
|
||||
const DebuggerStartParametersPtr sp(new DebuggerStartParameters);
|
||||
DebuggerStartParameters sp;
|
||||
StartRemoteDialog dlg(m_uiSwitcher->mainWindow());
|
||||
QStringList arches;
|
||||
arches.append(_("i386:x86-64:intel"));
|
||||
@@ -1559,17 +1559,17 @@ void DebuggerPlugin::startRemoteApplication()
|
||||
setConfigValue(_("LastServerStartScript"), dlg.serverStartScript());
|
||||
setConfigValue(_("LastUseServerStartScript"), dlg.useServerStartScript());
|
||||
setConfigValue(_("LastSysroot"), dlg.sysRoot());
|
||||
sp->remoteChannel = dlg.remoteChannel();
|
||||
sp->remoteArchitecture = dlg.remoteArchitecture();
|
||||
sp->executable = dlg.localExecutable();
|
||||
sp->displayName = dlg.localExecutable();
|
||||
sp->debuggerCommand = dlg.debugger(); // Override toolchain-detection.
|
||||
if (!sp->debuggerCommand.isEmpty())
|
||||
sp->toolChainType = ProjectExplorer::ToolChain::INVALID;
|
||||
sp->startMode = AttachToRemote;
|
||||
sp.remoteChannel = dlg.remoteChannel();
|
||||
sp.remoteArchitecture = dlg.remoteArchitecture();
|
||||
sp.executable = dlg.localExecutable();
|
||||
sp.displayName = dlg.localExecutable();
|
||||
sp.debuggerCommand = dlg.debugger(); // Override toolchain-detection.
|
||||
if (!sp.debuggerCommand.isEmpty())
|
||||
sp.toolChainType = ProjectExplorer::ToolChain::INVALID;
|
||||
sp.startMode = AttachToRemote;
|
||||
if (dlg.useServerStartScript())
|
||||
sp->serverStartScript = dlg.serverStartScript();
|
||||
sp->sysRoot = dlg.sysRoot();
|
||||
sp.serverStartScript = dlg.serverStartScript();
|
||||
sp.sysRoot = dlg.sysRoot();
|
||||
|
||||
if (RunControl *runControl = m_debuggerRunControlFactory->create(sp))
|
||||
ProjectExplorerPlugin::instance()
|
||||
@@ -1586,7 +1586,7 @@ void DebuggerPlugin::enableReverseDebuggingTriggered(const QVariant &value)
|
||||
|
||||
void DebuggerPlugin::attachRemoteTcf()
|
||||
{
|
||||
const DebuggerStartParametersPtr sp(new DebuggerStartParameters);
|
||||
DebuggerStartParameters sp;
|
||||
AttachTcfDialog dlg(m_uiSwitcher->mainWindow());
|
||||
QStringList arches;
|
||||
arches.append(_("i386:x86-64:intel"));
|
||||
@@ -1605,12 +1605,12 @@ void DebuggerPlugin::attachRemoteTcf()
|
||||
setConfigValue(_("LastTcfRemoteArchitecture"), dlg.remoteArchitecture());
|
||||
setConfigValue(_("LastTcfServerStartScript"), dlg.serverStartScript());
|
||||
setConfigValue(_("LastTcfUseServerStartScript"), dlg.useServerStartScript());
|
||||
sp->remoteChannel = dlg.remoteChannel();
|
||||
sp->remoteArchitecture = dlg.remoteArchitecture();
|
||||
sp->serverStartScript = dlg.serverStartScript();
|
||||
sp->startMode = AttachTcf;
|
||||
sp.remoteChannel = dlg.remoteChannel();
|
||||
sp.remoteArchitecture = dlg.remoteArchitecture();
|
||||
sp.serverStartScript = dlg.serverStartScript();
|
||||
sp.startMode = AttachTcf;
|
||||
if (dlg.useServerStartScript())
|
||||
sp->serverStartScript = dlg.serverStartScript();
|
||||
sp.serverStartScript = dlg.serverStartScript();
|
||||
|
||||
if (RunControl *runControl = m_debuggerRunControlFactory->create(sp))
|
||||
ProjectExplorerPlugin::instance()
|
||||
|
@@ -57,11 +57,11 @@ namespace Debugger {
|
||||
|
||||
class DebuggerManager;
|
||||
class DebuggerUISwitcher;
|
||||
class DebuggerRunControlFactory;
|
||||
|
||||
namespace Internal {
|
||||
|
||||
class BreakpointData;
|
||||
class DebuggerRunControlFactory;
|
||||
class DebugMode;
|
||||
|
||||
class DebuggerPlugin : public ExtensionSystem::IPlugin
|
||||
|
@@ -50,7 +50,6 @@
|
||||
using namespace ProjectExplorer;
|
||||
|
||||
namespace Debugger {
|
||||
namespace Internal {
|
||||
|
||||
////////////////////////////////////////////////////////////////////////
|
||||
//
|
||||
@@ -75,24 +74,24 @@ QString DebuggerRunControlFactory::displayName() const
|
||||
return tr("Debug");
|
||||
}
|
||||
|
||||
static DebuggerStartParametersPtr localStartParameters(RunConfiguration *runConfiguration)
|
||||
static DebuggerStartParameters localStartParameters(RunConfiguration *runConfiguration)
|
||||
{
|
||||
DebuggerStartParametersPtr sp(new DebuggerStartParameters());
|
||||
DebuggerStartParameters sp;
|
||||
QTC_ASSERT(runConfiguration, return sp);
|
||||
LocalApplicationRunConfiguration *rc =
|
||||
qobject_cast<LocalApplicationRunConfiguration *>(runConfiguration);
|
||||
QTC_ASSERT(rc, return sp);
|
||||
|
||||
sp->startMode = StartInternal;
|
||||
sp->executable = rc->executable();
|
||||
sp->environment = rc->environment().toStringList();
|
||||
sp->workingDirectory = rc->workingDirectory();
|
||||
sp->processArgs = rc->commandLineArguments();
|
||||
sp->toolChainType = rc->toolChainType();
|
||||
sp->useTerminal = rc->runMode() == LocalApplicationRunConfiguration::Console;
|
||||
sp->dumperLibrary = rc->dumperLibrary();
|
||||
sp->dumperLibraryLocations = rc->dumperLibraryLocations();
|
||||
sp->displayName = rc->displayName();
|
||||
sp.startMode = StartInternal;
|
||||
sp.executable = rc->executable();
|
||||
sp.environment = rc->environment().toStringList();
|
||||
sp.workingDirectory = rc->workingDirectory();
|
||||
sp.processArgs = rc->commandLineArguments();
|
||||
sp.toolChainType = rc->toolChainType();
|
||||
sp.useTerminal = rc->runMode() == LocalApplicationRunConfiguration::Console;
|
||||
sp.dumperLibrary = rc->dumperLibrary();
|
||||
sp.dumperLibraryLocations = rc->dumperLibraryLocations();
|
||||
sp.displayName = rc->displayName();
|
||||
|
||||
// Find qtInstallPath.
|
||||
QString qmakePath = DebuggingHelperLibrary::findSystemQt(rc->environment());
|
||||
@@ -105,7 +104,7 @@ static DebuggerStartParametersPtr localStartParameters(RunConfiguration *runConf
|
||||
proc.waitForFinished();
|
||||
QByteArray ba = proc.readAllStandardOutput().trimmed();
|
||||
QFileInfo fi(QString::fromLocal8Bit(ba) + "/..");
|
||||
sp->qtInstallPath = fi.absoluteFilePath();
|
||||
sp.qtInstallPath = fi.absoluteFilePath();
|
||||
}
|
||||
return sp;
|
||||
}
|
||||
@@ -114,11 +113,11 @@ RunControl *DebuggerRunControlFactory::create(RunConfiguration *runConfiguration
|
||||
const QString &mode)
|
||||
{
|
||||
QTC_ASSERT(mode == ProjectExplorer::Constants::DEBUGMODE, return 0);
|
||||
DebuggerStartParametersPtr sp = localStartParameters(runConfiguration);
|
||||
DebuggerStartParameters sp = localStartParameters(runConfiguration);
|
||||
return new DebuggerRunControl(m_manager, sp);
|
||||
}
|
||||
|
||||
RunControl *DebuggerRunControlFactory::create(const DebuggerStartParametersPtr &sp)
|
||||
RunControl *DebuggerRunControlFactory::create(const DebuggerStartParameters &sp)
|
||||
{
|
||||
return new DebuggerRunControl(m_manager, sp);
|
||||
}
|
||||
@@ -139,7 +138,7 @@ QWidget *DebuggerRunControlFactory::createConfigurationWidget(RunConfiguration *
|
||||
////////////////////////////////////////////////////////////////////////
|
||||
|
||||
DebuggerRunControl::DebuggerRunControl(DebuggerManager *manager,
|
||||
const DebuggerStartParametersPtr &startParameters)
|
||||
const DebuggerStartParameters &startParameters)
|
||||
: RunControl(0, ProjectExplorer::Constants::DEBUGMODE),
|
||||
m_startParameters(startParameters),
|
||||
m_manager(manager),
|
||||
@@ -159,19 +158,19 @@ DebuggerRunControl::DebuggerRunControl(DebuggerManager *manager,
|
||||
connect(this, SIGNAL(stopRequested()),
|
||||
m_manager, SLOT(exitDebugger()));
|
||||
|
||||
if (m_startParameters->environment.empty())
|
||||
m_startParameters->environment = ProjectExplorer::Environment().toStringList();
|
||||
m_startParameters->useTerminal = false;
|
||||
if (m_startParameters.environment.empty())
|
||||
m_startParameters.environment = ProjectExplorer::Environment().toStringList();
|
||||
m_startParameters.useTerminal = false;
|
||||
}
|
||||
|
||||
QString DebuggerRunControl::displayName() const
|
||||
{
|
||||
return m_startParameters->displayName;
|
||||
return m_startParameters.displayName;
|
||||
}
|
||||
|
||||
void DebuggerRunControl::setCustomEnvironment(ProjectExplorer::Environment env)
|
||||
{
|
||||
m_startParameters->environment = env.toStringList();
|
||||
m_startParameters.environment = env.toStringList();
|
||||
}
|
||||
|
||||
void DebuggerRunControl::init()
|
||||
@@ -184,9 +183,9 @@ void DebuggerRunControl::start()
|
||||
QString errorMessage;
|
||||
QString settingsCategory;
|
||||
QString settingsPage;
|
||||
if (m_manager->checkDebugConfiguration(m_startParameters->toolChainType, &errorMessage,
|
||||
if (m_manager->checkDebugConfiguration(m_startParameters.toolChainType, &errorMessage,
|
||||
&settingsCategory, &settingsPage)) {
|
||||
m_manager->startNewDebugger(m_startParameters);
|
||||
m_manager->startNewDebugger(this);
|
||||
emit started();
|
||||
} else {
|
||||
appendMessage(this, errorMessage, true);
|
||||
@@ -225,5 +224,4 @@ bool DebuggerRunControl::isRunning() const
|
||||
return m_running;
|
||||
}
|
||||
|
||||
} // namespace Internal
|
||||
} // namespace Debugger
|
||||
|
@@ -78,12 +78,8 @@ public:
|
||||
DebuggerStartMode startMode;
|
||||
};
|
||||
|
||||
typedef QSharedPointer<DebuggerStartParameters> DebuggerStartParametersPtr;
|
||||
|
||||
//DEBUGGER_EXPORT QDebug operator<<(QDebug str, const DebuggerStartParameters &);
|
||||
|
||||
namespace Internal {
|
||||
|
||||
class DEBUGGER_EXPORT DebuggerRunControlFactory
|
||||
: public ProjectExplorer::IRunControlFactory
|
||||
{
|
||||
@@ -102,7 +98,7 @@ public:
|
||||
|
||||
|
||||
// This is used by the "Non-Standard" scenarios, e.g. Attach to Core.
|
||||
ProjectExplorer::RunControl *create(const DebuggerStartParametersPtr &sp);
|
||||
ProjectExplorer::RunControl *create(const DebuggerStartParameters &sp);
|
||||
|
||||
private:
|
||||
DebuggerManager *m_manager;
|
||||
@@ -116,7 +112,7 @@ class DEBUGGER_EXPORT DebuggerRunControl
|
||||
|
||||
public:
|
||||
DebuggerRunControl(DebuggerManager *manager,
|
||||
const DebuggerStartParametersPtr &startParameters);
|
||||
const DebuggerStartParameters &startParameters);
|
||||
|
||||
void setCustomEnvironment(ProjectExplorer::Environment env);
|
||||
|
||||
@@ -128,6 +124,8 @@ public:
|
||||
|
||||
Q_SLOT void debuggingFinished();
|
||||
|
||||
const DebuggerStartParameters &sp() const { return m_startParameters; }
|
||||
|
||||
signals:
|
||||
void stopRequested();
|
||||
|
||||
@@ -137,12 +135,11 @@ private slots:
|
||||
|
||||
private:
|
||||
void init();
|
||||
DebuggerStartParametersPtr m_startParameters;
|
||||
DebuggerManager *m_manager;
|
||||
DebuggerStartParameters m_startParameters;
|
||||
bool m_running;
|
||||
};
|
||||
|
||||
} // namespace Internal
|
||||
} // namespace Debugger
|
||||
|
||||
#endif // DEBUGGERRUNNER_H
|
||||
|
@@ -107,6 +107,8 @@ protected:
|
||||
{ m_engine->setState(state); }
|
||||
const DebuggerStartParameters &startParameters() const
|
||||
{ return m_engine->startParameters(); }
|
||||
const DebuggerRunControl *runControl() const
|
||||
{ return m_engine->runControl(); }
|
||||
void debugMessage(const QString &msg) const
|
||||
{ m_engine->debugMessage(msg); }
|
||||
void showStatusMessage(const QString &msg) const
|
||||
|
@@ -514,9 +514,9 @@ void GdbEngine::tryLoadDebuggingHelpersClassic()
|
||||
|
||||
m_debuggingHelperState = DebuggingHelperLoadTried;
|
||||
QByteArray dlopenLib;
|
||||
if (startParameters().startMode == AttachToRemote
|
||||
|| startParameters().startMode == StartRemoteGdb)
|
||||
dlopenLib = startParameters().remoteDumperLib;
|
||||
if (runControl()->sp().startMode == AttachToRemote
|
||||
|| runControl()->sp().startMode == StartRemoteGdb)
|
||||
dlopenLib = runControl()->sp().remoteDumperLib;
|
||||
else
|
||||
dlopenLib = manager()->qtDumperLibraryName().toLocal8Bit();
|
||||
|
||||
|
@@ -211,8 +211,8 @@ void GdbEngine::disconnectDebuggingHelperActions()
|
||||
|
||||
DebuggerStartMode GdbEngine::startMode() const
|
||||
{
|
||||
QTC_ASSERT(!m_startParameters.isNull(), return NoStartMode);
|
||||
return m_startParameters->startMode;
|
||||
QTC_ASSERT(m_runControl, return NoStartMode);
|
||||
return startParameters().startMode;
|
||||
}
|
||||
|
||||
QMainWindow *GdbEngine::mainWindow() const
|
||||
@@ -1355,7 +1355,7 @@ void GdbEngine::handleStopResponse(const GdbMi &data)
|
||||
&& reason == "signal-received") {
|
||||
QByteArray name = data.findChild("signal-name").data();
|
||||
if (name != STOP_SIGNAL
|
||||
&& (startParameters().startMode != AttachToRemote
|
||||
&& (runControl()->sp().startMode != AttachToRemote
|
||||
|| name != CROSS_STOP_SIGNAL))
|
||||
initHelpers = false;
|
||||
}
|
||||
@@ -1434,7 +1434,7 @@ void GdbEngine::handleStop1(const GdbMi &data)
|
||||
// Ignore these as they are showing up regularly when
|
||||
// stopping debugging.
|
||||
if (name != STOP_SIGNAL
|
||||
&& (startParameters().startMode != AttachToRemote
|
||||
&& (runControl()->sp().startMode != AttachToRemote
|
||||
|| name != CROSS_STOP_SIGNAL)) {
|
||||
QString msg = tr("<p>The inferior stopped because it received a "
|
||||
"signal from the Operating System.<p>"
|
||||
@@ -1536,8 +1536,8 @@ void GdbEngine::handleHasPython(const GdbResponse &response)
|
||||
QByteArray cmd = "set environment ";
|
||||
cmd += Debugger::Constants::Internal::LD_PRELOAD_ENV_VAR;
|
||||
cmd += ' ';
|
||||
cmd += startParameters().startMode == StartRemoteGdb
|
||||
? startParameters().remoteDumperLib
|
||||
cmd += runControl()->sp().startMode == StartRemoteGdb
|
||||
? runControl()->sp().remoteDumperLib
|
||||
: cmd += manager()->qtDumperLibraryName().toLocal8Bit();
|
||||
postCommand(cmd);
|
||||
m_debuggingHelperState = DebuggingHelperLoadTried;
|
||||
@@ -1737,8 +1737,9 @@ bool GdbEngine::checkConfiguration(int toolChain, QString *errorMessage, QString
|
||||
return true;
|
||||
}
|
||||
|
||||
AbstractGdbAdapter *GdbEngine::createAdapter(const DebuggerStartParametersPtr &sp)
|
||||
AbstractGdbAdapter *GdbEngine::createAdapter(const DebuggerRunControl *runControl)
|
||||
{
|
||||
const DebuggerStartParameters *sp = &runControl->sp();
|
||||
switch (sp->toolChainType) {
|
||||
case ProjectExplorer::ToolChain::WINSCW: // S60
|
||||
case ProjectExplorer::ToolChain::GCCE:
|
||||
@@ -1769,7 +1770,7 @@ AbstractGdbAdapter *GdbEngine::createAdapter(const DebuggerStartParametersPtr &s
|
||||
}
|
||||
}
|
||||
|
||||
void GdbEngine::startDebugger(const DebuggerStartParametersPtr &sp)
|
||||
void GdbEngine::startDebugger(const DebuggerRunControl *runControl)
|
||||
{
|
||||
QTC_ASSERT(state() == EngineStarting, qDebug() << state());
|
||||
// This should be set by the constructor or in exitDebugger()
|
||||
@@ -1787,10 +1788,10 @@ void GdbEngine::startDebugger(const DebuggerStartParametersPtr &sp)
|
||||
fp->setKeepOnFinish(false);
|
||||
m_progress->reportStarted();
|
||||
|
||||
m_startParameters = sp;
|
||||
m_runControl = runControl;
|
||||
|
||||
delete m_gdbAdapter;
|
||||
m_gdbAdapter = createAdapter(sp);
|
||||
m_gdbAdapter = createAdapter(m_runControl);
|
||||
connectAdapter();
|
||||
|
||||
if (m_gdbAdapter->dumperHandling() != AbstractGdbAdapter::DumperNotAvailable)
|
||||
@@ -3036,8 +3037,10 @@ void GdbEngine::handleMakeSnapshot(const GdbResponse &response)
|
||||
void GdbEngine::activateSnapshot(int index)
|
||||
{
|
||||
SnapshotData snapshot = m_manager->snapshotHandler()->setCurrentIndex(index);
|
||||
m_startParameters->startMode = AttachCore;
|
||||
m_startParameters->coreFile = snapshot.location();
|
||||
|
||||
DebuggerStartParameters &sp = const_cast<DebuggerStartParameters &>(m_runControl->sp());
|
||||
sp.startMode = AttachCore;
|
||||
sp.coreFile = snapshot.location();
|
||||
|
||||
if (state() == InferiorUnrunnable) {
|
||||
// All is well. We are looking at another core file.
|
||||
@@ -3055,7 +3058,7 @@ void GdbEngine::activateSnapshot(int index)
|
||||
return;
|
||||
debugMessage(_("KILLING DEBUGGER AS REQUESTED BY USER"));
|
||||
delete m_gdbAdapter;
|
||||
m_gdbAdapter = createAdapter(m_startParameters);
|
||||
m_gdbAdapter = createAdapter(m_runControl);
|
||||
postCommand("kill", NeedsStop, CB(handleActivateSnapshot));
|
||||
} else {
|
||||
activateSnapshot2();
|
||||
@@ -4002,11 +4005,11 @@ bool GdbEngine::startGdb(const QStringList &args, const QString &gdb, const QStr
|
||||
|
||||
m_gdb = QString::fromLatin1(qgetenv("QTC_DEBUGGER_PATH"));
|
||||
if (m_gdb.isEmpty())
|
||||
m_gdb = m_gdbBinaryToolChainMap->key(m_startParameters->toolChainType);
|
||||
m_gdb = m_gdbBinaryToolChainMap->key(m_runControl->sp().toolChainType);
|
||||
if (m_gdb.isEmpty())
|
||||
m_gdb = gdb;
|
||||
if (m_gdb.isEmpty()) {
|
||||
handleAdapterStartFailed(msgNoBinaryForToolChain(m_startParameters->toolChainType),
|
||||
handleAdapterStartFailed(msgNoBinaryForToolChain(m_runControl->sp().toolChainType),
|
||||
GdbOptionsPage::settingsId());
|
||||
return false;
|
||||
}
|
||||
@@ -4241,7 +4244,7 @@ void GdbEngine::handleAdapterStarted()
|
||||
|
||||
void GdbEngine::handleInferiorPrepared()
|
||||
{
|
||||
const QByteArray qtInstallPath = m_startParameters->qtInstallPath.toLocal8Bit();
|
||||
const QByteArray qtInstallPath = m_runControl->sp().qtInstallPath.toLocal8Bit();
|
||||
if (!qtInstallPath.isEmpty()) {
|
||||
QByteArray qtBuildPath;
|
||||
#if defined(Q_OS_WIN)
|
||||
|
@@ -111,7 +111,7 @@ private: ////////// General Interface //////////
|
||||
|
||||
virtual bool checkConfiguration(int toolChain, QString *errorMessage,
|
||||
QString *settingsPage = 0) const;
|
||||
virtual void startDebugger(const DebuggerStartParametersPtr &sp);
|
||||
virtual void startDebugger(const DebuggerRunControl *runControl);
|
||||
virtual unsigned debuggerCapabilities() const;
|
||||
virtual void exitDebugger();
|
||||
virtual void abortDebugger();
|
||||
@@ -125,16 +125,16 @@ private: ////////// General State //////////
|
||||
|
||||
void initializeVariables();
|
||||
DebuggerStartMode startMode() const;
|
||||
const DebuggerStartParameters &startParameters() const
|
||||
{ return *m_startParameters; }
|
||||
const DebuggerRunControl *runControl() const { return m_runControl; }
|
||||
const DebuggerStartParameters &startParameters() const { return m_runControl->sp(); }
|
||||
Q_SLOT void setAutoDerefPointers(const QVariant &on);
|
||||
|
||||
DebuggerStartParametersPtr m_startParameters;
|
||||
const DebuggerRunControl *m_runControl;
|
||||
bool m_registerNamesListed;
|
||||
|
||||
private: ////////// Gdb Process Management //////////
|
||||
|
||||
AbstractGdbAdapter *createAdapter(const DebuggerStartParametersPtr &dp);
|
||||
AbstractGdbAdapter *createAdapter(const DebuggerRunControl *runControl);
|
||||
void connectAdapter();
|
||||
bool startGdb(const QStringList &args = QStringList(),
|
||||
const QString &gdb = QString(),
|
||||
|
@@ -50,8 +50,10 @@ class IOptionsPage;
|
||||
}
|
||||
|
||||
namespace Debugger {
|
||||
|
||||
class DebuggerManager;
|
||||
class DebuggerStartParameters;
|
||||
class DebuggerRunControl;
|
||||
|
||||
namespace Internal {
|
||||
|
||||
class DisassemblerViewAgent;
|
||||
@@ -64,15 +66,13 @@ class IDebuggerEngine : public QObject
|
||||
Q_OBJECT
|
||||
|
||||
public:
|
||||
typedef QSharedPointer<DebuggerStartParameters> DebuggerStartParametersPtr;
|
||||
|
||||
IDebuggerEngine(DebuggerManager *manager, QObject *parent = 0)
|
||||
: QObject(parent), m_manager(manager)
|
||||
{}
|
||||
|
||||
virtual void shutdown() = 0;
|
||||
virtual void setToolTipExpression(const QPoint &mousePos, TextEditor::ITextEditor *editor, int cursorPos) = 0;
|
||||
virtual void startDebugger(const DebuggerStartParametersPtr &startParameters) = 0;
|
||||
virtual void startDebugger(const DebuggerRunControl *runControl) = 0;
|
||||
virtual void exitDebugger() = 0;
|
||||
virtual void abortDebugger() { exitDebugger(); }
|
||||
virtual void detachDebugger() {}
|
||||
|
@@ -136,11 +136,11 @@ void PdbEngine::exitDebugger()
|
||||
setState(DebuggerNotReady);
|
||||
}
|
||||
|
||||
void PdbEngine::startDebugger(const DebuggerStartParametersPtr &sp)
|
||||
void PdbEngine::startDebugger(const DebuggerRunControl *runControl)
|
||||
{
|
||||
setState(AdapterStarting);
|
||||
|
||||
m_scriptFileName = QFileInfo(sp->executable).absoluteFilePath();
|
||||
m_scriptFileName = QFileInfo(runControl->sp().executable).absoluteFilePath();
|
||||
QFile scriptFile(m_scriptFileName);
|
||||
if (!scriptFile.open(QIODevice::ReadOnly|QIODevice::Text)) {
|
||||
//debugMessage("STARTING " +m_scriptFileName + "FAILED");
|
||||
|
@@ -72,7 +72,7 @@ private:
|
||||
void shutdown();
|
||||
void setToolTipExpression(const QPoint &mousePos,
|
||||
TextEditor::ITextEditor *editor, int cursorPos);
|
||||
void startDebugger(const DebuggerStartParametersPtr &sp);
|
||||
void startDebugger(const DebuggerRunControl *runControl);
|
||||
|
||||
void exitDebugger();
|
||||
|
||||
|
@@ -201,14 +201,14 @@ void QmlEngine::exitDebugger()
|
||||
manager()->notifyInferiorExited();
|
||||
}
|
||||
|
||||
void QmlEngine::startDebugger(const DebuggerStartParametersPtr &sp)
|
||||
void QmlEngine::startDebugger(const DebuggerRunControl *runControl)
|
||||
{
|
||||
qDebug() << "STARTING QML ENGINE";
|
||||
setState(InferiorRunningRequested);
|
||||
showStatusMessage(tr("Running requested..."), 5000);
|
||||
const int pos = sp->remoteChannel.indexOf(QLatin1Char(':'));
|
||||
const QString host = sp->remoteChannel.left(pos);
|
||||
const quint16 port = sp->remoteChannel.mid(pos + 1).toInt();
|
||||
const int pos = runControl->sp().remoteChannel.indexOf(QLatin1Char(':'));
|
||||
const QString host = runControl->sp().remoteChannel.left(pos);
|
||||
const quint16 port = runControl->sp().remoteChannel.mid(pos + 1).toInt();
|
||||
//QTimer::singleShot(0, this, SLOT(runInferior()));
|
||||
m_socket->connectToHost(host, port);
|
||||
emit startSuccessful();
|
||||
|
@@ -75,7 +75,7 @@ private:
|
||||
|
||||
void shutdown();
|
||||
void setToolTipExpression(const QPoint &mousePos, TextEditor::ITextEditor *editor, int cursorPos);
|
||||
void startDebugger(const DebuggerStartParametersPtr &sp);
|
||||
void startDebugger(const DebuggerRunControl *runControl);
|
||||
void exitDebugger();
|
||||
|
||||
void continueInferior();
|
||||
|
@@ -228,7 +228,7 @@ void ScriptEngine::exitDebugger()
|
||||
setState(DebuggerNotReady);
|
||||
}
|
||||
|
||||
void ScriptEngine::startDebugger(const DebuggerStartParametersPtr &sp)
|
||||
void ScriptEngine::startDebugger(const DebuggerRunControl *runControl)
|
||||
{
|
||||
setState(AdapterStarting);
|
||||
if (m_scriptEngine.isNull())
|
||||
@@ -247,7 +247,7 @@ void ScriptEngine::startDebugger(const DebuggerStartParametersPtr &sp)
|
||||
setState(AdapterStarted);
|
||||
setState(InferiorStarting);
|
||||
|
||||
m_scriptFileName = QFileInfo (sp->executable).absoluteFilePath();
|
||||
m_scriptFileName = QFileInfo(runControl->sp().executable).absoluteFilePath();
|
||||
QFile scriptFile(m_scriptFileName);
|
||||
if (!scriptFile.open(QIODevice::ReadOnly|QIODevice::Text)) {
|
||||
manager()->showDebuggerOutput(LogError, QString::fromLatin1("Cannot open %1: %2").
|
||||
|
@@ -71,7 +71,7 @@ private:
|
||||
void shutdown();
|
||||
void setToolTipExpression(const QPoint &mousePos,
|
||||
TextEditor::ITextEditor *editor, int cursorPos);
|
||||
void startDebugger(const DebuggerStartParametersPtr &sp);
|
||||
void startDebugger(const DebuggerRunControl *runControl);
|
||||
|
||||
void exitDebugger();
|
||||
|
||||
|
@@ -203,13 +203,13 @@ void TcfEngine::exitDebugger()
|
||||
manager()->notifyInferiorExited();
|
||||
}
|
||||
|
||||
void TcfEngine::startDebugger(const DebuggerStartParametersPtr &sp)
|
||||
void TcfEngine::startDebugger(const DebuggerRunControl *runControl)
|
||||
{
|
||||
setState(InferiorRunningRequested);
|
||||
showStatusMessage(tr("Running requested..."), 5000);
|
||||
const int pos = sp->remoteChannel.indexOf(QLatin1Char(':'));
|
||||
const QString host = sp->remoteChannel.left(pos);
|
||||
const quint16 port = sp->remoteChannel.mid(pos + 1).toInt();
|
||||
const int pos = runControl->sp().remoteChannel.indexOf(QLatin1Char(':'));
|
||||
const QString host = runControl->sp().remoteChannel.left(pos);
|
||||
const quint16 port = runControl->sp().remoteChannel.mid(pos + 1).toInt();
|
||||
//QTimer::singleShot(0, this, SLOT(runInferior()));
|
||||
m_socket->connectToHost(host, port);
|
||||
emit startSuccessful();
|
||||
|
@@ -75,7 +75,7 @@ private:
|
||||
|
||||
void shutdown();
|
||||
void setToolTipExpression(const QPoint &mousePos, TextEditor::ITextEditor *editor, int cursorPos);
|
||||
void startDebugger(const DebuggerStartParametersPtr &sp);
|
||||
void startDebugger(const DebuggerRunControl *runControl);
|
||||
void exitDebugger();
|
||||
|
||||
void continueInferior();
|
||||
|
@@ -38,8 +38,9 @@
|
||||
#include "components/expressionquerywidget.h"
|
||||
#include "components/objectpropertiesview.h"
|
||||
|
||||
#include <debugger/debuggerrunner.h>
|
||||
#include <debugger/debuggermanager.h>
|
||||
#include <debugger/debuggermainwindow.h>
|
||||
#include <debugger/debuggerrunner.h>
|
||||
#include <debugger/debuggeruiswitcher.h>
|
||||
#include <debugger/debuggerconstants.h>
|
||||
|
||||
@@ -539,8 +540,8 @@ QString QmlInspector::attachToQmlViewerAsExternalApp(ProjectExplorer::Project *p
|
||||
ProjectExplorer::Environment customEnv = ProjectExplorer::Environment::systemEnvironment(); // empty env by default
|
||||
customEnv.set(QmlProjectManager::Constants::E_QML_DEBUG_SERVER_PORT, QString::number(m_settings.externalPort()));
|
||||
|
||||
Debugger::Internal::DebuggerRunControl *debuggableRunControl = createDebuggerRunControl(runConfig,
|
||||
dlg.qmlViewerPath(), dlg.qmlViewerArguments());
|
||||
Debugger::DebuggerRunControl *debuggableRunControl =
|
||||
createDebuggerRunControl(runConfig, dlg.qmlViewerPath(), dlg.qmlViewerArguments());
|
||||
|
||||
return executeDebuggerRunControl(debuggableRunControl, &customEnv);
|
||||
}
|
||||
@@ -575,11 +576,11 @@ QString QmlInspector::attachToExternalCppAppWithQml(ProjectExplorer::Project *pr
|
||||
|
||||
ProjectExplorer::Environment customEnv = runConfig->environment();
|
||||
customEnv.set(QmlProjectManager::Constants::E_QML_DEBUG_SERVER_PORT, QString::number(m_settings.externalPort()));
|
||||
Debugger::Internal::DebuggerRunControl *debuggableRunControl = createDebuggerRunControl(runConfig);
|
||||
Debugger::DebuggerRunControl *debuggableRunControl = createDebuggerRunControl(runConfig);
|
||||
return executeDebuggerRunControl(debuggableRunControl, &customEnv);
|
||||
}
|
||||
|
||||
QString QmlInspector::executeDebuggerRunControl(Debugger::Internal::DebuggerRunControl *debuggableRunControl, ProjectExplorer::Environment *environment)
|
||||
QString QmlInspector::executeDebuggerRunControl(Debugger::DebuggerRunControl *debuggableRunControl, ProjectExplorer::Environment *environment)
|
||||
{
|
||||
ProjectExplorer::ProjectExplorerPlugin *pex = ProjectExplorer::ProjectExplorerPlugin::instance();
|
||||
|
||||
@@ -597,26 +598,26 @@ QString QmlInspector::executeDebuggerRunControl(Debugger::Internal::DebuggerRunC
|
||||
return QString(tr("A valid run control was not registered in Qt Creator for this project run configuration."));;
|
||||
}
|
||||
|
||||
Debugger::Internal::DebuggerRunControl *QmlInspector::createDebuggerRunControl(ProjectExplorer::RunConfiguration *runConfig,
|
||||
const QString &executableFile, const QString &executableArguments)
|
||||
Debugger::DebuggerRunControl *QmlInspector::createDebuggerRunControl(ProjectExplorer::RunConfiguration *runConfig,
|
||||
const QString &executableFile, const QString &executableArguments)
|
||||
{
|
||||
ExtensionSystem::PluginManager *pm = ExtensionSystem::PluginManager::instance();
|
||||
const QList<Debugger::Internal::DebuggerRunControlFactory *> factories = pm->getObjects<Debugger::Internal::DebuggerRunControlFactory>();
|
||||
const QList<Debugger::DebuggerRunControlFactory *> factories = pm->getObjects<Debugger::DebuggerRunControlFactory>();
|
||||
ProjectExplorer::RunControl *runControl = 0;
|
||||
|
||||
if (m_debugMode == QmlProjectWithCppPlugins) {
|
||||
|
||||
const Debugger::DebuggerStartParametersPtr sp(new Debugger::DebuggerStartParameters);
|
||||
sp->startMode = Debugger::StartExternal;
|
||||
sp->executable = executableFile;
|
||||
sp->processArgs = executableArguments.split(QLatin1Char(' '));
|
||||
|
||||
Debugger::DebuggerStartParameters sp;
|
||||
sp.startMode = Debugger::StartExternal;
|
||||
sp.executable = executableFile;
|
||||
sp.processArgs = executableArguments.split(QLatin1Char(' '));
|
||||
runControl = factories.first()->create(sp);
|
||||
return qobject_cast<Debugger::Internal::DebuggerRunControl *>(runControl);
|
||||
return qobject_cast<Debugger::DebuggerRunControl *>(runControl);
|
||||
}
|
||||
|
||||
} else if (m_debugMode == CppProjectWithQmlEngines) {
|
||||
if (m_debugMode == CppProjectWithQmlEngines) {
|
||||
if (factories.length() && factories.first()->canRun(runConfig, ProjectExplorer::Constants::DEBUGMODE)) {
|
||||
runControl = factories.first()->create(runConfig, ProjectExplorer::Constants::DEBUGMODE);
|
||||
return qobject_cast<Debugger::Internal::DebuggerRunControl *>(runControl);
|
||||
return qobject_cast<Debugger::DebuggerRunControl *>(runControl);
|
||||
}
|
||||
}
|
||||
|
||||
|
@@ -62,11 +62,10 @@ namespace ProjectExplorer {
|
||||
namespace Core {
|
||||
class IContext;
|
||||
}
|
||||
|
||||
namespace Debugger {
|
||||
namespace Internal {
|
||||
class DebuggerRunControl;
|
||||
} // Internal
|
||||
} // Debugger
|
||||
}
|
||||
|
||||
namespace Qml {
|
||||
|
||||
@@ -136,10 +135,10 @@ private slots:
|
||||
|
||||
private:
|
||||
void updateMenuActions();
|
||||
Debugger::Internal::DebuggerRunControl *createDebuggerRunControl(ProjectExplorer::RunConfiguration *runConfig,
|
||||
const QString &executableFile = QString(),
|
||||
const QString &executableArguments = QString());
|
||||
QString executeDebuggerRunControl(Debugger::Internal::DebuggerRunControl *debuggableRunControl, ProjectExplorer::Environment *environment);
|
||||
Debugger::DebuggerRunControl *createDebuggerRunControl(ProjectExplorer::RunConfiguration *runConfig,
|
||||
const QString &executableFile = QString(),
|
||||
const QString &executableArguments = QString());
|
||||
QString executeDebuggerRunControl(Debugger::DebuggerRunControl *debuggableRunControl, ProjectExplorer::Environment *environment);
|
||||
QString attachToQmlViewerAsExternalApp(ProjectExplorer::Project *project);
|
||||
QString attachToExternalCppAppWithQml(ProjectExplorer::Project *project);
|
||||
|
||||
|
@@ -42,6 +42,7 @@
|
||||
#include <coreplugin/icore.h>
|
||||
#include <coreplugin/progressmanager/progressmanager.h>
|
||||
#include <debugger/debuggermanager.h>
|
||||
#include <debugger/debuggerrunner.h>
|
||||
#include <extensionsystem/pluginmanager.h>
|
||||
#include <projectexplorer/toolchain.h>
|
||||
#include <utils/qtcassert.h>
|
||||
@@ -459,7 +460,9 @@ void MaemoDebugRunControl::handleRemoteOutput(const QString &output)
|
||||
|
||||
void MaemoDebugRunControl::startDebugging()
|
||||
{
|
||||
m_debuggerManager->startNewDebugger(m_startParams);
|
||||
Debugger::DebuggerRunControl *runControl =
|
||||
new Debugger::DebuggerRunControl(m_debuggerManager, *m_startParams.data());
|
||||
m_debuggerManager->startNewDebugger(runControl);
|
||||
}
|
||||
|
||||
void MaemoDebugRunControl::stopInternal()
|
||||
|
@@ -52,6 +52,7 @@
|
||||
#include <projectexplorer/buildconfiguration.h>
|
||||
|
||||
#include <debugger/debuggermanager.h>
|
||||
#include <debugger/debuggerrunner.h>
|
||||
|
||||
#include <QtGui/QMessageBox>
|
||||
#include <QtGui/QMainWindow>
|
||||
@@ -944,7 +945,10 @@ void S60DeviceDebugRunControl::initLauncher(const QString &executable, trk::Laun
|
||||
void S60DeviceDebugRunControl::handleLauncherFinished()
|
||||
{
|
||||
emit appendMessage(this, tr("Launching debugger..."), false);
|
||||
Debugger::DebuggerManager::instance()->startNewDebugger(m_startParams);
|
||||
Debugger::DebuggerManager *dm = Debugger::DebuggerManager::instance();
|
||||
Debugger::DebuggerRunControl *runControl =
|
||||
new Debugger::DebuggerRunControl(dm, *m_startParams.data());
|
||||
dm->startNewDebugger(runControl);
|
||||
}
|
||||
|
||||
void S60DeviceDebugRunControl::debuggingFinished()
|
||||
|
Reference in New Issue
Block a user