DAP: Separate CMake and Gdb logic in DAP engine

This commit refactors the Debug Adapter Protocol (DAP) engine
to separate the logic for CMake-based projects and Gdb-based
debugging.

- Moved CMake-specific code to a new CMakeDAPEngine class
- Moved Gdb-specific code to a new GdbDAPEngine class

Change-Id: Ia616e7b7ea2ff2071bcadd26b28b620f9aca6ac4
Reviewed-by: hjk <hjk@qt.io>
This commit is contained in:
Artem Sokolovskii
2023-08-08 15:37:39 +02:00
parent 8fcf3a695f
commit 1836b50f5d
8 changed files with 287 additions and 160 deletions

View File

@@ -50,12 +50,11 @@ class DapEngine : public DebuggerEngine
public:
DapEngine();
private:
protected:
void executeStepIn(bool) override;
void executeStepOut() override;
void executeStepOver(bool) override;
void setupEngine() override;
void shutdownInferior() override;
void shutdownEngine() override;
@@ -106,7 +105,7 @@ private:
void claimInitialBreakpoints();
void handleDapStarted();
virtual void handleDapStarted();
void handleDapLaunch();
void handleDapConfigurationDone();
@@ -122,6 +121,7 @@ private:
void handleResponse(const QString &ba);
void updateAll() override;
void updateLocals() override;
void connectDataGeneratorSignals();
QByteArray m_inbuffer;
std::unique_ptr<IDataProvider> m_dataGenerator = nullptr;