From 015f0c03cf544781f4ee932aac328854fe8c1bd4 Mon Sep 17 00:00:00 2001 From: hjk Date: Wed, 6 Sep 2017 17:11:42 +0200 Subject: [PATCH] Qnx: Fix debugging This apparently fell through the cracks in 89f02cba2. Task-number: QTCREATORBUG-18804 Change-Id: Ib00a5a074ec1df3292267a194e8e87a92d3c6dfc Reviewed-by: Dan Cape Reviewed-by: Christian Stenger --- src/plugins/qnx/qnxdebugsupport.cpp | 16 ++++++---------- src/plugins/qnx/qnxdebugsupport.h | 1 - src/plugins/qnx/slog2inforunner.cpp | 2 ++ 3 files changed, 8 insertions(+), 11 deletions(-) diff --git a/src/plugins/qnx/qnxdebugsupport.cpp b/src/plugins/qnx/qnxdebugsupport.cpp index e560ed285eb..0f3d527a15d 100644 --- a/src/plugins/qnx/qnxdebugsupport.cpp +++ b/src/plugins/qnx/qnxdebugsupport.cpp @@ -79,6 +79,8 @@ private: arguments.append(Utils::QtcProcess::splitArgs(r.commandLineArguments)); r.commandLineArguments = Utils::QtcProcess::joinArgs(arguments); + setRunnable(r); + SimpleTargetRunner::start(); } @@ -102,9 +104,9 @@ QnxDebugSupport::QnxDebugSupport(RunControl *runControl) debuggeeRunner->addStartDependency(m_portsGatherer); auto slog2InfoRunner = new Slog2InfoRunner(runControl); - slog2InfoRunner->addStartDependency(debuggeeRunner); + debuggeeRunner->addStartDependency(slog2InfoRunner); - addStartDependency(slog2InfoRunner); + addStartDependency(debuggeeRunner); } void QnxDebugSupport::start() @@ -135,15 +137,9 @@ void QnxDebugSupport::start() if (qtVersion) params.solibSearchPath = QnxUtils::searchPaths(qtVersion); - reportStarted(); -} + setStartParameters(params); -void QnxDebugSupport::stop() -{ - // We have to kill the inferior process, as invoking "kill" in - // gdb doesn't work on QNX gdb. - auto stdRunnable = runnable().as(); - device()->signalOperation()->killProcess(stdRunnable.executable); + DebuggerRunTool::start(); } } // namespace Internal diff --git a/src/plugins/qnx/qnxdebugsupport.h b/src/plugins/qnx/qnxdebugsupport.h index 452dc581562..4bc75283c44 100644 --- a/src/plugins/qnx/qnxdebugsupport.h +++ b/src/plugins/qnx/qnxdebugsupport.h @@ -39,7 +39,6 @@ public: private: void start() override; - void stop() override; Debugger::GdbServerPortsGatherer *m_portsGatherer; }; diff --git a/src/plugins/qnx/slog2inforunner.cpp b/src/plugins/qnx/slog2inforunner.cpp index ebcf5107992..b5075285b4c 100644 --- a/src/plugins/qnx/slog2inforunner.cpp +++ b/src/plugins/qnx/slog2inforunner.cpp @@ -76,6 +76,7 @@ void Slog2InfoRunner::start() StandardRunnable r; r.executable = QLatin1String("slog2info"); m_testProcess->start(r); + reportStarted(); } void Slog2InfoRunner::stop() @@ -87,6 +88,7 @@ void Slog2InfoRunner::stop() m_logProcess->kill(); processLog(true); } + reportStopped(); } bool Slog2InfoRunner::commandFound() const