#include <coreplugin/progressmanager/progressmanager.h>
#include <coreplugin/progressmanager/futureprogress.h>
+#include <projectexplorer/toolchain.h>
#include <projectexplorer/toolchaintype.h>
#include <texteditor/itexteditor.h>
#include <QtGui/QMessageBox>
using namespace Core;
-using namespace Debugger;
using namespace Debugger::Internal;
using namespace ProjectExplorer;
using namespace TextEditor;
executableUid(0)
{}
-void DebuggerStartParameters::clear()
+QString DebuggerStartParameters::toolChainName() const
{
- *this = DebuggerStartParameters();
+ return ToolChain::toolChainName(ProjectExplorer::ToolChainType(toolChainType));
}
QDebug operator<<(QDebug d, DebuggerState state)
{
public:
DebuggerStartParameters();
- void clear();
+ QString toolChainName() const;
QString executable;
QString displayName;
qint64 attachPID;
bool useTerminal;
bool breakAtMain;
- QString crashParameter; // for AttachCrashedExternal
- // for qml debugging
+ // Used by AttachCrashedExternal.
+ QString crashParameter;
+
+ // Used by Qml debugging.
QString qmlServerAddress;
quint16 qmlServerPort;
QString projectBuildDir;
QString projectDir;
- // for cpp+qml debugging
+
+ // Used by combined cpp+qml debugging.
DebuggerEngineType cppEngineType;
- // for remote debugging
+ // Used by remote debugging.
QString remoteChannel;
QString remoteArchitecture;
QString gnuTarget;
void DebuggerPluginPrivate::runControlStarted(DebuggerRunControl *runControl)
{
activateDebugMode();
- const QString message = runControl->idString();
+ DebuggerEngine *engine = runControl->engine();
+ const QString message = tr("Starting debugger '%1' for tool chain '%2'...")
+ .arg(engine->objectName())
+ .arg(engine->startParameters().toolChainName());
showMessage(message, StatusBar);
showMessage(m_debuggerSettings->dump(), LogDebug);
m_snapshotHandler->appendSnapshot(runControl);
- connectEngine(runControl->engine());
+ connectEngine(engine);
}
void DebuggerPluginPrivate::runControlFinished(DebuggerRunControl *runControl)
using namespace Debugger::Internal;
namespace Debugger {
+
+namespace Cdb {
+DebuggerEngine *createCdbEngine(const DebuggerStartParameters &, QString *error);
+bool isCdbEngineEnabled(); // Check the configuration page
+}
+
+/*
+static QString toolChainName(int toolChainType)
+{
+ return ToolChain::toolChainName(ProjectExplorer::ToolChainType(toolChainType));
+}
+*/
+
+
namespace Internal {
DebuggerEngine *createGdbEngine(const DebuggerStartParameters &);
#endif
-} // namespace Internal
-
-
-namespace Cdb {
-DebuggerEngine *createCdbEngine(const DebuggerStartParameters &, QString *error);
-bool isCdbEngineEnabled(); // Check the configuration page
-}
-
-static QString toolChainName(int toolChainType)
-{
- return ToolChain::toolChainName(ProjectExplorer::ToolChainType(toolChainType));
-}
-
-
////////////////////////////////////////////////////////////////////////
//
// DebuggerRunControlFactory
return 0;
}
-
////////////////////////////////////////////////////////////////////////
//
// DebuggerRunControlPrivate
return engine->gdbAdapter();
}
+} // namespace Internal
+
+
////////////////////////////////////////////////////////////////////////
//
// DebuggerRunControl
debuggingFinished();
// Create Message box with possibility to go to settings.
const QString msg = tr("Cannot debug '%1' (tool chain: '%2'): %3")
- .arg(sp.executable, toolChainName(sp.toolChainType), d->m_errorMessage);
+ .arg(sp.executable, sp.toolChainName(), d->m_errorMessage);
Core::ICore::instance()->showWarningWithOptions(tr("Warning"),
msg, QString(), QLatin1String(Constants::DEBUGGER_SETTINGS_CATEGORY),
d->m_settingsIdHint);
}
}
-QString DebuggerRunControl::idString() const
-{
- return tr("Starting debugger '%1' for tool chain '%2'...")
- .arg(d->m_engine->objectName())
- .arg(toolChainName(d->m_engine->startParameters().toolChainType));
-}
-
void DebuggerRunControl::startFailed()
{
emit addToOutputWindowInline(this, tr("Debugging has failed"), false);
namespace Debugger {
class DebuggerEngine;
class DebuggerRunControl;
-class DebuggerRunControlPrivate;
class DebuggerStartParameters;
+namespace Internal {
+
+class DebuggerRunControlPrivate;
+
class DebuggerRunControlFactory
: public ProjectExplorer::IRunControlFactory
{
unsigned m_enabledEngines;
};
+} // namespace Internal
+
// This is a job description containing all data "local" to the jobs, including
// the models of the individual debugger views.
QString *errorMessage,
QString *settingsCategory = 0,
QString *settingsPage = 0);
- QString idString() const;
-
signals:
void engineRequestSetup();
const DebuggerStartParameters &startParameters() const;
private:
- QScopedPointer<DebuggerRunControlPrivate> d;
+ QScopedPointer<Internal::DebuggerRunControlPrivate> d;
};
} // namespace Debugger