forked from qt-creator/qt-creator
Debugger: Move setupPortsGatherer() into DebuggerRunParameters
Task-number: QTCREATORBUG-29168 Change-Id: I0ea10bc6e9e4ce0be1e6653559f11f750c0e5ce9 Reviewed-by: hjk <hjk@qt.io>
This commit is contained in:
@@ -90,8 +90,8 @@ public:
|
||||
setProducer([](RunControl *runControl) {
|
||||
DebuggerRunTool *debugger = new DebuggerRunTool(runControl);
|
||||
debugger->setId("AndroidDebugger");
|
||||
debugger->setupPortsGatherer();
|
||||
DebuggerRunParameters &rp = debugger->runParameters();
|
||||
rp.setupPortsGatherer(runControl);
|
||||
rp.setSkipDebugServer(true);
|
||||
rp.setLldbPlatform("remote-android");
|
||||
|
||||
|
@@ -117,7 +117,7 @@ public:
|
||||
worker->setId("QdbDeviceDebugSupport");
|
||||
|
||||
DebuggerRunParameters &rp = worker->runParameters();
|
||||
worker->setupPortsGatherer();
|
||||
rp.setupPortsGatherer(runControl);
|
||||
rp.setStartMode(Debugger::AttachToRemoteServer);
|
||||
rp.setCloseMode(KillAndExitMonitorAtClose);
|
||||
rp.setUseContinueInsteadOfRun(true);
|
||||
|
@@ -210,6 +210,14 @@ void DebuggerRunParameters::setBreakOnMainNextTime()
|
||||
breakOnMainNextTime = true;
|
||||
}
|
||||
|
||||
void DebuggerRunParameters::setupPortsGatherer(ProjectExplorer::RunControl *runControl) const
|
||||
{
|
||||
if (isCppDebugging())
|
||||
runControl->requestDebugChannel();
|
||||
if (isQmlDebugging())
|
||||
runControl->requestQmlChannel();
|
||||
}
|
||||
|
||||
Result<> DebuggerRunParameters::fixupParameters(ProjectExplorer::RunControl *runControl)
|
||||
{
|
||||
if (m_symbolFile.isEmpty())
|
||||
|
@@ -77,6 +77,8 @@ public:
|
||||
|
||||
static void setBreakOnMainNextTime();
|
||||
|
||||
void setupPortsGatherer(ProjectExplorer::RunControl *runControl) const;
|
||||
|
||||
Utils::Result<> fixupParameters(ProjectExplorer::RunControl *runControl);
|
||||
|
||||
void setStartMode(DebuggerStartMode startMode);
|
||||
|
@@ -791,15 +791,6 @@ void DebuggerRunTool::stop()
|
||||
emit canceled();
|
||||
}
|
||||
|
||||
void DebuggerRunTool::setupPortsGatherer()
|
||||
{
|
||||
if (d->m_runParameters.isCppDebugging())
|
||||
runControl()->requestDebugChannel();
|
||||
|
||||
if (d->m_runParameters.isQmlDebugging())
|
||||
runControl()->requestQmlChannel();
|
||||
}
|
||||
|
||||
DebuggerRunParameters &DebuggerRunTool::runParameters()
|
||||
{
|
||||
return d->m_runParameters;
|
||||
|
@@ -25,8 +25,6 @@ public:
|
||||
void start() final;
|
||||
void stop() final;
|
||||
|
||||
void setupPortsGatherer();
|
||||
|
||||
DebuggerRunParameters &runParameters();
|
||||
|
||||
signals:
|
||||
|
@@ -136,7 +136,7 @@ void showAttachToProcessDialog()
|
||||
auto debugger = new DebuggerRunTool(runControl);
|
||||
DebuggerRunParameters &rp = debugger->runParameters();
|
||||
debugger->setId("QnxAttachDebugSupport");
|
||||
debugger->setupPortsGatherer();
|
||||
rp.setupPortsGatherer(runControl);
|
||||
rp.setUseCtrlCStub(true);
|
||||
if (rp.isCppDebugging()) {
|
||||
const auto modifier = [runControl](Process &process) {
|
||||
@@ -173,8 +173,6 @@ public:
|
||||
debugger->setId("QnxDebugSupport");
|
||||
runControl->postMessage(Tr::tr("Preparing remote side..."), LogMessageFormat);
|
||||
|
||||
debugger->setupPortsGatherer();
|
||||
|
||||
const auto modifier = [runControl](Process &process) {
|
||||
CommandLine cmd = runControl->commandLine();
|
||||
QStringList arguments;
|
||||
@@ -199,6 +197,7 @@ public:
|
||||
Kit *k = runControl->kit();
|
||||
|
||||
DebuggerRunParameters &rp = debugger->runParameters();
|
||||
rp.setupPortsGatherer(runControl);
|
||||
rp.setStartMode(AttachToRemoteServer);
|
||||
rp.setCloseMode(KillAtClose);
|
||||
rp.setUseCtrlCStub(true);
|
||||
|
@@ -155,7 +155,6 @@ public:
|
||||
setProducer([](RunControl *runControl) {
|
||||
DebuggerRunTool *debugger = new DebuggerRunTool(runControl);
|
||||
debugger->setId("ApplicationManagerPlugin.Debug.Support");
|
||||
debugger->setupPortsGatherer();
|
||||
|
||||
auto debuggee = createInferiorRunner(runControl, QmlDebuggerServices);
|
||||
debugger->addStartDependency(debuggee);
|
||||
@@ -195,6 +194,7 @@ public:
|
||||
}
|
||||
|
||||
Debugger::DebuggerRunParameters &rp = debugger->runParameters();
|
||||
rp.setupPortsGatherer(runControl);
|
||||
rp.setStartMode(Debugger::AttachToRemoteServer);
|
||||
rp.setCloseMode(Debugger::KillAndExitMonitorAtClose);
|
||||
|
||||
|
@@ -52,7 +52,7 @@ public:
|
||||
auto debugger = new DebuggerRunTool(rc);
|
||||
DebuggerRunParameters &rp = debugger->runParameters();
|
||||
debugger->setId("RemoteLinuxDebugWorker");
|
||||
debugger->setupPortsGatherer();
|
||||
rp.setupPortsGatherer(rc);
|
||||
rp.setUseTerminal(false);
|
||||
rp.setAddQmlServerInferiorCmdArgIfNeeded(true);
|
||||
|
||||
|
Reference in New Issue
Block a user