Commit 0e2a7608 authored by hjk's avatar hjk
Browse files

debugger: fix remote adapter startup

parent 053f36c4
......@@ -111,6 +111,7 @@ DebuggerStartParameters::DebuggerStartParameters()
breakAtMain(false),
qmlServerAddress("127.0.0.1"),
qmlServerPort(0),
useServerStartScript(false),
toolChainType(ToolChain::UNKNOWN),
startMode(NoStartMode),
executableUid(0)
......@@ -144,6 +145,7 @@ QDebug operator<<(QDebug str, const DebuggerStartParameters &sp)
<< " remoteChannel=" << sp.remoteChannel
<< " remoteArchitecture=" << sp.remoteArchitecture
<< " symbolFileName=" << sp.symbolFileName
<< " useServerStartScript=" << sp.useServerStartScript
<< " serverStartScript=" << sp.serverStartScript
<< " toolchain=" << sp.toolChainType << '\n';
return str;
......
......@@ -85,6 +85,7 @@ public:
QString remoteChannel;
QString remoteArchitecture;
QString symbolFileName;
bool useServerStartScript;
QString serverStartScript;
QString sysRoot;
QByteArray remoteDumperLib;
......
......@@ -1764,7 +1764,7 @@ void DebuggerPluginPrivate::attachExternalApplication
sp.displayName = tr("Process %1").arg(pid);
sp.executable = binary;
sp.crashParameter = crashParameter;
sp.startMode = crashParameter.isEmpty() ? AttachExternal:AttachCrashedExternal;
sp.startMode = crashParameter.isEmpty() ? AttachExternal : AttachCrashedExternal;
DebuggerRunControl *rc = createDebugger(sp);
startDebugger(rc);
}
......@@ -1844,8 +1844,8 @@ void DebuggerPluginPrivate::startRemoteApplication()
if (!sp.debuggerCommand.isEmpty())
sp.toolChainType = ToolChain::INVALID;
sp.startMode = AttachToRemote;
if (dlg.useServerStartScript())
sp.serverStartScript = dlg.serverStartScript();
sp.useServerStartScript = dlg.useServerStartScript();
sp.serverStartScript = dlg.serverStartScript();
sp.sysRoot = dlg.sysRoot();
startDebugger(createDebugger(sp));
}
......
......@@ -88,6 +88,10 @@ void RemoteGdbServerAdapter::startAdapter()
{
QTC_ASSERT(state() == EngineSetupRequested, qDebug() << state());
showMessage(_("TRYING TO START ADAPTER"));
if (!startParameters().useServerStartScript) {
handleSetupDone();
return;
}
if (startParameters().serverStartScript.isEmpty()) {
showMessage(_("No server start script given. "), StatusBar);
emit requestSetup();
......
Markdown is supported
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment