From 46b9cd952a93b98335dfb5761025d7ca27f40d44 Mon Sep 17 00:00:00 2001 From: hjk Date: Tue, 3 Jan 2023 15:12:43 +0100 Subject: Debugger: Add skeleton for a debugger adapter protocol using engine - Support the launch of an application - Support continue/pause an application - Support add breakpoint only after an app is launched (I.e. preset breakpoints won't work) - Support stop the debug session - "Remove one break breakpoint" works but removes all breakpoints ToDo: - Polish the transition between stages - Fix breakpoints handling - Add support "Step in", "Step out" and "Step Over" Task-number: QTCREATORBUG-27279 Change-Id: I5c32ce713f5a0f19cc3b9d995cbbadd8adf6a413 Reviewed-by: Artem Sokolovskii Reviewed-by: hjk Reviewed-by: Qt CI Bot --- src/plugins/debugger/debuggeritem.cpp | 7 +++++++ 1 file changed, 7 insertions(+) (limited to 'src/plugins/debugger/debuggeritem.cpp') diff --git a/src/plugins/debugger/debuggeritem.cpp b/src/plugins/debugger/debuggeritem.cpp index 0769d293de..a6daacd16d 100644 --- a/src/plugins/debugger/debuggeritem.cpp +++ b/src/plugins/debugger/debuggeritem.cpp @@ -174,8 +174,12 @@ void DebuggerItem::reinitializeFromFile(QString *error, Utils::Environment *cust return; } m_abis.clear(); + if (output.contains("gdb")) { m_engineType = GdbEngineType; + // FIXME: HACK while introducing DAP support + if (m_command.fileName().endsWith("-dap")) + m_engineType = DapEngineType; // Version bool isMacGdb, isQnxGdb; @@ -211,6 +215,7 @@ void DebuggerItem::reinitializeFromFile(QString *error, Utils::Environment *cust //! \note If unable to determine the GDB ABI, no ABI is appended to m_abis here. return; } + if (output.contains("lldb") || output.startsWith("LLDB")) { m_engineType = LldbEngineType; m_abis = Abi::abisOfBinary(m_command); @@ -278,6 +283,8 @@ QString DebuggerItem::engineTypeName() const return QLatin1String("CDB"); case LldbEngineType: return QLatin1String("LLDB"); + case DapEngineType: + return QLatin1String("DAP"); case UvscEngineType: return QLatin1String("UVSC"); default: -- cgit v1.2.1