diff --git a/src/plugins/debugger/debuggerengine.cpp b/src/plugins/debugger/debuggerengine.cpp index 4bca46849aea47f88d7141cf0635599e9cb72b3c..61dcdf2b9459aa4080b28c060cc2667bd02c0939 100644 --- a/src/plugins/debugger/debuggerengine.cpp +++ b/src/plugins/debugger/debuggerengine.cpp @@ -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; diff --git a/src/plugins/debugger/debuggerengine.h b/src/plugins/debugger/debuggerengine.h index 551c5daf46b6ced8aaddf268198ca8ab2fd22399..bc6a57498e82d922391e5d28ebe2830fc5ffa871 100644 --- a/src/plugins/debugger/debuggerengine.h +++ b/src/plugins/debugger/debuggerengine.h @@ -85,6 +85,7 @@ public: QString remoteChannel; QString remoteArchitecture; QString symbolFileName; + bool useServerStartScript; QString serverStartScript; QString sysRoot; QByteArray remoteDumperLib; diff --git a/src/plugins/debugger/debuggerplugin.cpp b/src/plugins/debugger/debuggerplugin.cpp index 2a27a8a96225429437429c1d24f5623f2609dff1..e72e48090c97b49c60296538815589a1ceeb3809 100644 --- a/src/plugins/debugger/debuggerplugin.cpp +++ b/src/plugins/debugger/debuggerplugin.cpp @@ -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)); } diff --git a/src/plugins/debugger/gdb/remotegdbserveradapter.cpp b/src/plugins/debugger/gdb/remotegdbserveradapter.cpp index 0d5f73140392438eeb3dd9a835988ecc19bc2005..ef2c26e2345dcd85144be1cb0635086d85bf09d5 100644 --- a/src/plugins/debugger/gdb/remotegdbserveradapter.cpp +++ b/src/plugins/debugger/gdb/remotegdbserveradapter.cpp @@ -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();