diff options
author | hjk <[email protected]> | 2017-10-19 14:23:43 +0200 |
---|---|---|
committer | hjk <[email protected]> | 2017-10-19 16:02:34 +0000 |
commit | f521b2428d91486dbf30b849387b124e5dcd13fa (patch) | |
tree | cac6265a46641e0234d8d7ec7e40a6b8fe70591d /src/plugins/debugger/debuggerplugin.cpp | |
parent | c99b8c2fd10281de93834fb0da9991bab1dd7e26 (diff) |
Debugger: Let the DebuggerRunTool optionally handle the PortsGatherer
Less code in the target implementations.
Change-Id: I759f082eba5eab7f4e8252c0d7b5ec64059ba860
Reviewed-by: Christian Kandeler <[email protected]>
Diffstat (limited to 'src/plugins/debugger/debuggerplugin.cpp')
-rw-r--r-- | src/plugins/debugger/debuggerplugin.cpp | 19 |
1 files changed, 4 insertions, 15 deletions
diff --git a/src/plugins/debugger/debuggerplugin.cpp b/src/plugins/debugger/debuggerplugin.cpp index d7108dcd800..23fed1f5e03 100644 --- a/src/plugins/debugger/debuggerplugin.cpp +++ b/src/plugins/debugger/debuggerplugin.cpp @@ -1988,15 +1988,12 @@ public: { IDevice::ConstPtr device = DeviceKitInformation::device(kit); setDisplayName("AttachToRunningProcess"); + setUsePortsGatherer(true, false); + portsGatherer()->setDevice(device); - portsGatherer = new GdbServerPortsGatherer(runControl); - portsGatherer->setUseGdbServer(true); - portsGatherer->setUseQmlServer(false); - portsGatherer->setDevice(device); - - auto gdbServer = new GdbServerRunner(runControl, portsGatherer); + auto gdbServer = new GdbServerRunner(runControl, portsGatherer()); gdbServer->setUseMulti(false); - gdbServer->addStartDependency(portsGatherer); + gdbServer->addStartDependency(portsGatherer()); gdbServer->setDevice(device); gdbServer->setAttachPid(ProcessHandle(pid)); @@ -2009,14 +2006,6 @@ public: setUseContinueInsteadOfRun(true); setContinueAfterAttach(false); } - - void start() final - { - setRemoteChannel(portsGatherer->gdbServerChannel()); - DebuggerRunTool::start(); - } - - GdbServerPortsGatherer *portsGatherer; }; void DebuggerPluginPrivate::attachToRunningApplication() |