void AndroidRunner::handleRemoteDebuggerRunning() { if (m_useCppDebugger) { QTemporaryFile tmp(_("pingpong")); tmp.open(); QProcess process; process.start(m_adb, selector() << _("push") << tmp.fileName() << m_pongFile); process.waitForFinished(); QTC_CHECK(m_processPID != -1); } emit remoteProcessStarted(m_localGdbServerPort, m_qmlPort); }
void MaemoDebugSupport::startExecution() { if (m_state == Inactive) return; ASSERT_STATE(StartingRunner); if (!useGdb() && m_debuggingType != RemoteLinuxRunConfiguration::DebugQmlOnly) { if (!setPort(m_gdbServerPort)) return; } if (m_debuggingType != RemoteLinuxRunConfiguration::DebugCppOnly) { if (!setPort(m_qmlPort)) return; } if (useGdb()) { handleAdapterSetupDone(); return; } setState(StartingRemoteProcess); m_gdbserverOutput.clear(); connect(m_runner, SIGNAL(remoteErrorOutput(QByteArray)), this, SLOT(handleRemoteErrorOutput(QByteArray))); connect(m_runner, SIGNAL(remoteOutput(QByteArray)), this, SLOT(handleRemoteOutput(QByteArray))); if (m_debuggingType == RemoteLinuxRunConfiguration::DebugQmlOnly) { connect(m_runner, SIGNAL(remoteProcessStarted()), SLOT(handleRemoteProcessStarted())); } const QString &remoteExe = m_runner->remoteExecutable(); QString args = m_runner->arguments(); if (m_debuggingType != RemoteLinuxRunConfiguration::DebugCppOnly) { args += QString(QLatin1String(" -qmljsdebugger=port:%1,block")) .arg(m_qmlPort); } const QString remoteCommandLine = m_debuggingType == RemoteLinuxRunConfiguration::DebugQmlOnly ? QString::fromLocal8Bit("%1 %2 %3").arg(m_runner->commandPrefix()).arg(remoteExe).arg(args) : QString::fromLocal8Bit("%1 gdbserver :%2 %3 %4").arg(m_runner->commandPrefix()) .arg(m_gdbServerPort).arg(remoteExe).arg(args); connect(m_runner, SIGNAL(remoteProcessFinished(qint64)), SLOT(handleRemoteProcessFinished(qint64))); m_runner->startExecution(remoteCommandLine.toUtf8()); }