From 062cea960199ea320a88e76844c276f64152f23b Mon Sep 17 00:00:00 2001 From: Jarek Kobus Date: Fri, 21 Jul 2023 15:27:01 +0200 Subject: [PATCH] DebuggerRunTool: Hide some methods in protected / private section Change-Id: I9ab5fb1b8661191080e270307a3be8723d7b6f7c Reviewed-by: hjk --- src/plugins/debugger/debuggerruncontrol.h | 49 ++++++++++++----------- src/plugins/qnx/qnxdebugsupport.cpp | 3 +- 2 files changed, 27 insertions(+), 25 deletions(-) diff --git a/src/plugins/debugger/debuggerruncontrol.h b/src/plugins/debugger/debuggerruncontrol.h index 69856f4cc01..c4fbb3110e8 100644 --- a/src/plugins/debugger/debuggerruncontrol.h +++ b/src/plugins/debugger/debuggerruncontrol.h @@ -32,19 +32,10 @@ public: void startRunControl(); - void showMessage(const QString &msg, int channel = LogDebug, int timeout = -1); - void start() override; void stop() override; - bool isCppDebugging() const; - bool isQmlDebugging() const; - - void setUsePortsGatherer(bool useCpp, bool useQml); - DebugServerPortsGatherer *portsGatherer() const; - void setSolibSearchPath(const Utils::FilePaths &list); - void addSolibSearchDir(const QString &str); static void setBreakOnMainNextTime(); @@ -53,12 +44,9 @@ public: void setInferiorEnvironment(const Utils::Environment &env); // Used by GammaRay plugin void setRunControlName(const QString &name); void setStartMessage(const QString &msg); - void addQmlServerInferiorCommandLineArgumentIfNeeded(); - void modifyDebuggerEnvironment(const Utils::EnvironmentItems &item); void setCrashParameter(const QString &event); void addExpectedSignal(const QString &signal); - void addSearchDirectory(const Utils::FilePath &dir); void setStartMode(DebuggerStartMode startMode); void setCloseMode(DebuggerCloseMode closeMode); @@ -68,18 +56,13 @@ public: void setSysRoot(const Utils::FilePath &sysRoot); void setSymbolFile(const Utils::FilePath &symbolFile); - void setLldbPlatform(const QString &platform); void setRemoteChannel(const QString &channel); void setRemoteChannel(const QString &host, int port); - void setRemoteChannel(const QUrl &url); QString remoteChannel() const; void setUseExtendedRemote(bool on); void setUseContinueInsteadOfRun(bool on); - void setUseTargetAsync(bool on); void setContinueAfterAttach(bool on); - void setSkipExecutableValidation(bool on); - void setUseCtrlCStub(bool on); void setBreakOnMain(bool on); void setUseTerminal(bool on); @@ -93,20 +76,40 @@ public: void setCoreFilePath(const Utils::FilePath &core, bool isSnapshot = false); - void setIosPlatform(const QString &platform); - void setDeviceSymbolsRoot(const QString &deviceSymbolsRoot); - void setTestCase(int testCase); void setOverrideStartScript(const Utils::FilePath &script); - void setAbi(const ProjectExplorer::Abi &abi); - Internal::TerminalRunner *terminalRunner() const; - DebuggerEngineType cppEngineType() const; Internal::DebuggerRunParameters &runParameters() { return m_runParameters; } +protected: + bool isCppDebugging() const; + bool isQmlDebugging() const; + + void setUsePortsGatherer(bool useCpp, bool useQml); + DebugServerPortsGatherer *portsGatherer() const; + + void addSolibSearchDir(const QString &str); + void addQmlServerInferiorCommandLineArgumentIfNeeded(); + void modifyDebuggerEnvironment(const Utils::EnvironmentItems &item); + void addSearchDirectory(const Utils::FilePath &dir); + + void setLldbPlatform(const QString &platform); + void setRemoteChannel(const QUrl &url); + void setUseTargetAsync(bool on); + void setSkipExecutableValidation(bool on); + void setUseCtrlCStub(bool on); + + void setIosPlatform(const QString &platform); + void setDeviceSymbolsRoot(const QString &deviceSymbolsRoot); + void setAbi(const ProjectExplorer::Abi &abi); + + DebuggerEngineType cppEngineType() const; + private: + void showMessage(const QString &msg, int channel = LogDebug, int timeout = -1); + bool fixupParameters(); void handleEngineStarted(Internal::DebuggerEngine *engine); void handleEngineFinished(Internal::DebuggerEngine *engine); diff --git a/src/plugins/qnx/qnxdebugsupport.cpp b/src/plugins/qnx/qnxdebugsupport.cpp index 5ad45f057aa..0d869d78673 100644 --- a/src/plugins/qnx/qnxdebugsupport.cpp +++ b/src/plugins/qnx/qnxdebugsupport.cpp @@ -195,8 +195,8 @@ public: : DebuggerRunTool(runControl) { setId("QnxAttachDebugSupport"); - setUsePortsGatherer(isCppDebugging(), isQmlDebugging()); + setUseCtrlCStub(true); if (isCppDebugging()) { auto pdebugRunner = new PDebugRunner(runControl, portsGatherer()); @@ -239,7 +239,6 @@ void showAttachToProcessDialog() debugger->setStartMode(AttachToRemoteServer); debugger->setCloseMode(DetachAtClose); debugger->setSymbolFile(localExecutable); - debugger->setUseCtrlCStub(true); debugger->setAttachPid(pid); // setRunControlName(Tr::tr("Remote: \"%1\" - Process %2").arg(remoteChannel).arg(m_process.pid)); debugger->setRunControlName(Tr::tr("Remote QNX process %1").arg(pid));