debugger: fix remote adapter startup

This commit is contained in:
hjk
2010-09-06 11:33:07 +02:00
parent 053f36c45d
commit 0e2a7608f2
4 changed files with 10 additions and 3 deletions

View File

@@ -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;

View File

@@ -85,6 +85,7 @@ public:
QString remoteChannel;
QString remoteArchitecture;
QString symbolFileName;
bool useServerStartScript;
QString serverStartScript;
QString sysRoot;
QByteArray remoteDumperLib;

View File

@@ -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,7 +1844,7 @@ void DebuggerPluginPrivate::startRemoteApplication()
if (!sp.debuggerCommand.isEmpty())
sp.toolChainType = ToolChain::INVALID;
sp.startMode = AttachToRemote;
if (dlg.useServerStartScript())
sp.useServerStartScript = dlg.useServerStartScript();
sp.serverStartScript = dlg.serverStartScript();
sp.sysRoot = dlg.sysRoot();
startDebugger(createDebugger(sp));

View File

@@ -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();