From df22ae6c533349d91161f0a5f3db20b83dc7342a Mon Sep 17 00:00:00 2001 From: hjk <qtc-committer@nokia.com> Date: Thu, 1 Oct 2009 14:51:48 +0200 Subject: [PATCH] debugger: replace hack to select trk adapter and pass parameters by a new one Now .pro files can be used as project description as usual. To make the debugger pick up the "on device" part a magic commandline is needed: "@sym@ c:\sys\bin\your.exe /path/to/your.sym" If the project is not compilable, remove the Make and QMake buildsteps and add a new Custom step that's only calling /bin/true. --- src/plugins/debugger/gdb/gdbengine.cpp | 2 +- src/plugins/debugger/gdb/trkgdbadapter.cpp | 6 +++--- 2 files changed, 4 insertions(+), 4 deletions(-) diff --git a/src/plugins/debugger/gdb/gdbengine.cpp b/src/plugins/debugger/gdb/gdbengine.cpp index 3a1d9fe019a..48e2d2e559b 100644 --- a/src/plugins/debugger/gdb/gdbengine.cpp +++ b/src/plugins/debugger/gdb/gdbengine.cpp @@ -1475,7 +1475,7 @@ AbstractGdbAdapter *GdbEngine::determineAdapter(const DebuggerStartParametersPtr break; } // @todo: remove testing hack - if (sp->executable.endsWith(_(".sym"))) + if (sp->processArgs.at(0) == _("@sym@")) return m_trkAdapter; switch (sp->startMode) { case AttachCore: diff --git a/src/plugins/debugger/gdb/trkgdbadapter.cpp b/src/plugins/debugger/gdb/trkgdbadapter.cpp index e9518469c3c..a49fe31f345 100644 --- a/src/plugins/debugger/gdb/trkgdbadapter.cpp +++ b/src/plugins/debugger/gdb/trkgdbadapter.cpp @@ -1424,9 +1424,9 @@ void TrkGdbAdapter::startAdapter() m_remoteExecutable = parameters.executable; m_symbolFile = parameters.symbolFileName; // FIXME: testing hack, remove! - if (m_remoteExecutable.endsWith(_(".sym"))) { - m_symbolFile = m_remoteExecutable; - m_remoteExecutable = parameters.processArgs.join(_(" ")); + if (parameters.processArgs.at(0) == _("@sym@")) { + m_remoteExecutable = parameters.processArgs.at(1); + m_symbolFile = parameters.processArgs.at(2); } // Start QTC_ASSERT(state() == EngineStarting, qDebug() << state()); -- GitLab