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 <artem.sokolovskii@qt.io>
Reviewed-by: hjk <hjk@qt.io>
Reviewed-by: Qt CI Bot <qt_ci_bot@qt-project.org>
This commit is contained in:
hjk
2023-01-03 15:12:43 +01:00
parent 45c2e3fe58
commit 46b9cd952a
9 changed files with 855 additions and 0 deletions

View File

@@ -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: