mirror of
https://github.com/l0ng-ai/openidea.git
synced 2026-11-24 16:04:21 +00:00
* feat(dap): debug C/C++ with GDB's native DAP interpreter Fixes #2338 Native debugging was LLDB-only (lldb-dap, CodeLLDB), so toolchains and embedded setups that ship GDB (pretty printers, .gdbinit, gdbserver targets) had no debugger in the IDE. Adds a built-in "gdb" adapter: `gdb -i dap` over stdio, with an install hint. GDB's DAP interpreter shipped in GDB 14, so a launch with an older GDB is refused with the found and the required version in the message (prepare_gdb, a probe like debugpy's). C/C++ run configurations pick the debugger in the Debug adapter control - GDB is an explicit choice there, the default stays lldb-dap. The c-app fixture (C and C++ entry points) is debugged with GDB in the language smoke; real_adapters gains a gdb case that skips itself without a GDB 14+ on PATH. * fix(dap): start GDB 15 sessions with the launch after the configuration GDB 15 starts the program inside its launch request, so the launch-first order every other adapter uses races the breakpoint upload: the run can be past the breakpoints before setBreakpoints lands, and configurationDone is refused with notStopped while the program is off. GDB 14 runs the program at configurationDone and 16+ defers the whole launch there, so both are fine with launch-first; 15.x is the one version that needs the launch to go out after configurationDone. The order now follows a gdb --version probe (only for the gdb adapter); a fake adapter speaking GDB 15's wire behavior pins the ordering and the notStopped refusal. * fix(dap): harden GDB startup and expression evaluation --------- Co-authored-by: l0ng-ai <24760907+l0ng-ai@users.noreply.github.com>
19 lines
262 B
Makefile
19 lines
262 B
Makefile
CFLAGS = -g -O0 -std=c11
|
|
CXXFLAGS = -g -O0 -std=c++17
|
|
|
|
.PHONY: all app-c app-cpp clean
|
|
|
|
all: app-c app-cpp
|
|
|
|
app-c: bin
|
|
$(CC) $(CFLAGS) -o bin/app-c src/main.c
|
|
|
|
app-cpp: bin
|
|
$(CXX) $(CXXFLAGS) -o bin/app-cpp src/main.cpp
|
|
|
|
bin:
|
|
mkdir -p bin
|
|
|
|
clean:
|
|
rm -rf bin
|