From 617d93761e895f908bb766dfc03a32c4aca73a3f Mon Sep 17 00:00:00 2001 From: Alexander Drozdov Date: Thu, 30 Mar 2023 16:50:20 +1000 Subject: [PATCH] BareMetal: add ability to connect to already running GdbServer Allow GenericGdbServerProvider connect via TCP to the already running GdbServers. Useful for the remote debugging for BareMetal devices like Xilinx UltraScape+ PSU: Xilinx provide his closed hw_server component that allow a Gdb connections. Change-Id: Ifd3af542a83d3357db366d6842461c2b2e49c4e5 Reviewed-by: Reviewed-by: hjk --- src/plugins/baremetal/debugservers/gdb/gdbserverprovider.h | 2 +- .../baremetal/debugservers/gdb/genericgdbserverprovider.h | 5 +++++ 2 files changed, 6 insertions(+), 1 deletion(-) diff --git a/src/plugins/baremetal/debugservers/gdb/gdbserverprovider.h b/src/plugins/baremetal/debugservers/gdb/gdbserverprovider.h index eac2ca6e68a..1c23d499957 100644 --- a/src/plugins/baremetal/debugservers/gdb/gdbserverprovider.h +++ b/src/plugins/baremetal/debugservers/gdb/gdbserverprovider.h @@ -40,7 +40,7 @@ public: bool aboutToRun(Debugger::DebuggerRunTool *runTool, QString &errorMessage) const final; ProjectExplorer::RunWorker *targetRunner( - ProjectExplorer::RunControl *runControl) const final; + ProjectExplorer::RunControl *runControl) const override; bool isValid() const override; virtual QSet supportedStartupModes() const = 0; diff --git a/src/plugins/baremetal/debugservers/gdb/genericgdbserverprovider.h b/src/plugins/baremetal/debugservers/gdb/genericgdbserverprovider.h index 2754a3d91a2..7a89877bebf 100644 --- a/src/plugins/baremetal/debugservers/gdb/genericgdbserverprovider.h +++ b/src/plugins/baremetal/debugservers/gdb/genericgdbserverprovider.h @@ -19,6 +19,11 @@ class GenericGdbServerProvider final : public GdbServerProvider private: GenericGdbServerProvider(); QSet supportedStartupModes() const final; + ProjectExplorer::RunWorker *targetRunner( + ProjectExplorer::RunControl *runControl) const final { + // Generic Runner assumes GDB Server already running + return nullptr; + } friend class GenericGdbServerProviderConfigWidget; friend class GenericGdbServerProviderFactory;