forked from qt-creator/qt-creator
debugger: simplify parameter guessing
With profiles we have more reliable information, no need for some of the guessing anymore. Change-Id: I1818fbb112d44c99ef96c8643256432805a1b97b Reviewed-by: Joerg Bornemann <joerg.bornemann@nokia.com> Reviewed-by: hjk <qthjk@ovi.com>
This commit is contained in:
@@ -35,6 +35,7 @@
|
||||
#include "debuggerplugin.h"
|
||||
#include "debuggerprofileinformation.h"
|
||||
#include "debuggerrunner.h"
|
||||
#include "debuggerruncontrolfactory.h"
|
||||
#include "debuggerstartparameters.h"
|
||||
|
||||
#include <coreplugin/icore.h>
|
||||
@@ -205,22 +206,15 @@ void GdbServerStarter::attach(int port)
|
||||
return;
|
||||
}
|
||||
|
||||
QString channel = QString("%1:%2").arg(d->device->sshParameters().host).arg(port);
|
||||
|
||||
DebuggerStartParameters sp;
|
||||
sp.displayName = tr("Remote: \"%1\"").arg(channel);
|
||||
sp.remoteChannel = channel;
|
||||
fillParameters(&sp, d->profile->id());
|
||||
sp.masterEngineType = GdbEngineType;
|
||||
sp.connParams.port = port;
|
||||
sp.displayName = tr("Remote: \"%1:%2\"").arg(sp.connParams.host).arg(port);
|
||||
sp.executable = localExecutable;
|
||||
sp.startMode = AttachToRemoteServer;
|
||||
sp.closeMode = KillAtClose;
|
||||
sp.sysRoot = SysRootProfileInformation::sysRoot(d->profile).toString();
|
||||
sp.debuggerCommand = DebuggerProfileInformation::debuggerCommand(d->profile).toString();
|
||||
sp.connParams = d->device->sshParameters();
|
||||
if (ToolChain *tc = ToolChainProfileInformation::toolChain(d->profile))
|
||||
sp.toolChainAbi = tc->targetAbi();
|
||||
|
||||
if (RunControl *rc = DebuggerPlugin::createDebugger(sp))
|
||||
DebuggerPlugin::startDebugger(rc);
|
||||
DebuggerRunControlFactory::createAndScheduleRun(sp);
|
||||
}
|
||||
|
||||
void GdbServerStarter::handleProcessClosed(int status)
|
||||
|
||||
Reference in New Issue
Block a user