forked from qt-creator/qt-creator
Boot2Qt: Inline QdbDeviceDebugSupport
Task-number: QTCREATORBUG-29168 Change-Id: I94432f6b54c05c763ea5c16f3bfc278a995a3ce5 Reviewed-by: hjk <hjk@qt.io>
This commit is contained in:
@@ -84,43 +84,6 @@ static RunWorker *createQdbDeviceInferiorWorker(RunControl *runControl,
|
|||||||
return worker;
|
return worker;
|
||||||
}
|
}
|
||||||
|
|
||||||
// QdbDeviceDebugSupport
|
|
||||||
|
|
||||||
class QdbDeviceDebugSupport final : public Debugger::DebuggerRunTool
|
|
||||||
{
|
|
||||||
public:
|
|
||||||
explicit QdbDeviceDebugSupport(RunControl *runControl);
|
|
||||||
|
|
||||||
private:
|
|
||||||
void start() override;
|
|
||||||
};
|
|
||||||
|
|
||||||
QdbDeviceDebugSupport::QdbDeviceDebugSupport(RunControl *runControl)
|
|
||||||
: Debugger::DebuggerRunTool(runControl)
|
|
||||||
{
|
|
||||||
setId("QdbDeviceDebugSupport");
|
|
||||||
|
|
||||||
if (isCppDebugging())
|
|
||||||
runControl->requestDebugChannel();
|
|
||||||
if (isQmlDebugging())
|
|
||||||
runControl->requestQmlChannel();
|
|
||||||
|
|
||||||
auto debuggee = createQdbDeviceInferiorWorker(runControl, QmlDebuggerServices);
|
|
||||||
addStartDependency(debuggee);
|
|
||||||
|
|
||||||
debuggee->addStopDependency(this);
|
|
||||||
}
|
|
||||||
|
|
||||||
void QdbDeviceDebugSupport::start()
|
|
||||||
{
|
|
||||||
setStartMode(Debugger::AttachToRemoteServer);
|
|
||||||
setCloseMode(KillAndExitMonitorAtClose);
|
|
||||||
setUseContinueInsteadOfRun(true);
|
|
||||||
setContinueAfterAttach(true);
|
|
||||||
addSolibSearchDir("%{sysroot}/system/lib");
|
|
||||||
DebuggerRunTool::start();
|
|
||||||
}
|
|
||||||
|
|
||||||
class QdbRunWorkerFactory final : public RunWorkerFactory
|
class QdbRunWorkerFactory final : public RunWorkerFactory
|
||||||
{
|
{
|
||||||
public:
|
public:
|
||||||
@@ -150,7 +113,23 @@ class QdbDebugWorkerFactory final : public RunWorkerFactory
|
|||||||
public:
|
public:
|
||||||
QdbDebugWorkerFactory()
|
QdbDebugWorkerFactory()
|
||||||
{
|
{
|
||||||
setProduct<QdbDeviceDebugSupport>();
|
setProducer([](RunControl *runControl) {
|
||||||
|
auto worker = new DebuggerRunTool(runControl);
|
||||||
|
worker->setId("QdbDeviceDebugSupport");
|
||||||
|
|
||||||
|
worker->setupPortsGatherer();
|
||||||
|
worker->setStartMode(Debugger::AttachToRemoteServer);
|
||||||
|
worker->setCloseMode(KillAndExitMonitorAtClose);
|
||||||
|
worker->setUseContinueInsteadOfRun(true);
|
||||||
|
worker->setContinueAfterAttach(true);
|
||||||
|
worker->addSolibSearchDir("%{sysroot}/system/lib");
|
||||||
|
|
||||||
|
auto debuggee = createQdbDeviceInferiorWorker(runControl, QmlDebuggerServices);
|
||||||
|
worker->addStartDependency(debuggee);
|
||||||
|
debuggee->addStopDependency(worker);
|
||||||
|
|
||||||
|
return worker;
|
||||||
|
});
|
||||||
addSupportedRunMode(ProjectExplorer::Constants::DEBUG_RUN_MODE);
|
addSupportedRunMode(ProjectExplorer::Constants::DEBUG_RUN_MODE);
|
||||||
addSupportedRunConfig(Constants::QdbRunConfigurationId);
|
addSupportedRunConfig(Constants::QdbRunConfigurationId);
|
||||||
addSupportedRunConfig(QmlProjectManager::Constants::QML_RUNCONFIG_ID);
|
addSupportedRunConfig(QmlProjectManager::Constants::QML_RUNCONFIG_ID);
|
||||||
|
Reference in New Issue
Block a user