QNX: Enable QML debugging for pure QNX devices

This includes fixing the application arguments when launching
the application through gdb. As the application is launched by
passing it as an argument to -exec-run (or run), the application arguments
needs to go in the same command. -exec-run won't care about
arguments set with -exec-arguments when being passed the application
binary.

Change-Id: I869acbedd2593a931bf5c3d88559ea2bda2c3ff1
Reviewed-by: hjk <hjk121@nokiamail.com>
Reviewed-by: Andreas Holzammer <andreas.holzammer@kdab.com>
Reviewed-by: Aurindam Jana <aurindam.jana@digia.com>
This commit is contained in:
Andreas Holzammer
2013-03-28 08:14:09 +01:00
committed by Tobias Nätterlund
parent 2a8a411b21
commit bd4105def7
4 changed files with 78 additions and 15 deletions

View File

@@ -397,8 +397,13 @@ void GdbRemoteServerEngine::runEngine()
if (!remoteExecutable.isEmpty()) {
// Cannot use -exec-run for QNX gdb 7.4 as it does not support path parameter for the MI call
const bool useRun = m_isQnxGdb && m_gdbVersion > 70300;
const QByteArray command = useRun ? "run" : "-exec-run";
postCommand(command + " " + remoteExecutable.toLocal8Bit(), GdbEngine::RunRequest, CB(handleExecRun));
QByteArray command = useRun ? "run" : "-exec-run";
command += " " + remoteExecutable.toLocal8Bit();
const QByteArray arguments = isMasterEngine() ? startParameters().processArgs.toLocal8Bit() : masterEngine()->startParameters().processArgs.toLocal8Bit();
command += " " + arguments;
postCommand(command, GdbEngine::RunRequest, CB(handleExecRun));
} else {
notifyEngineRunAndInferiorStopOk();
continueInferiorInternal();