debugger: gdb: Provide server start script with information

The start script needs information about the environment to be
really useful.
Provide this information by arguments.

Change-Id: I9e08c2a8785758caecbbcbc3ea4f97014ff1e281
Signed-off-by: Marcus Folkesson <marcus.folkesson@gmail.com>
Reviewed-by: hjk <qthjk@ovi.com>
This commit is contained in:
Marcus Folkesson
2012-11-06 08:20:42 +01:00
committed by hjk
parent 41eff78e87
commit ae07238c78

View File

@@ -39,6 +39,7 @@
#include <utils/hostosinfo.h> #include <utils/hostosinfo.h>
#include <utils/qtcassert.h> #include <utils/qtcassert.h>
#include <utils/fancymainwindow.h> #include <utils/fancymainwindow.h>
#include <utils/qtcprocess.h>
#include <projectexplorer/abi.h> #include <projectexplorer/abi.h>
#include <QFileInfo> #include <QFileInfo>
@@ -85,7 +86,14 @@ void GdbRemoteServerEngine::setupEngine()
QTC_ASSERT(state() == EngineSetupRequested, qDebug() << state()); QTC_ASSERT(state() == EngineSetupRequested, qDebug() << state());
showMessage(_("TRYING TO START ADAPTER")); showMessage(_("TRYING TO START ADAPTER"));
if (!startParameters().serverStartScript.isEmpty()) { if (!startParameters().serverStartScript.isEmpty()) {
m_uploadProc.start(_("/bin/sh ") + startParameters().serverStartScript);
// Provide script information about the environment
QString arglist;
Utils::QtcProcess::addArg(&arglist, startParameters().serverStartScript);
Utils::QtcProcess::addArg(&arglist, startParameters().executable);
Utils::QtcProcess::addArg(&arglist, startParameters().remoteChannel);
m_uploadProc.start(_("/bin/sh ") + arglist);
m_uploadProc.waitForStarted(); m_uploadProc.waitForStarted();
} }
if (startParameters().remoteSetupNeeded) if (startParameters().remoteSetupNeeded)