Commit Graph
5 Commits
Author SHA1 Message Date
cnmcdee e6678e13b8 Debugger: fix Step Out in main, Stop on GUI apps, Run target switch, temp main bp persistence
(c) step_out() refused in the outermost frame instead of sending
    -exec-finish: new can_step_out() (frames>1, fallback on the stop
    frame level); the UI now shows a status-line note, no modal.
(d) gdb runs in synchronous mode by default, so -exec-interrupt sat
    unread while the target ran: enable mi-async at spawn, and
    interrupt() falls back to SIGINT then SIGSTOP on the inferior pid.
    Interrupt of a target in gtk_main now lands in ~0.1s (was a 5s
    timeout, timed out waiting for gdb reply).
(e) new restart_or_start(exe, args): same target restarts, a changed
    Target/Args kills the old target (via gdb kill, so it is reaped
    at once) and starts the new one. kill_target() uses gdb kill as
    primary; raw SIGKILL left a dead-but-unreaped inferior that made
    -file-exec-and-symbols fail. Failed breakpoint re-applies stay
    staged (id 0) so they come back when switching back.
(f) break-on-main breakpoint is now marked temporary: never written
    to debugger_bps.conf, never duplicated on the next session, and
    load dedupes stale duplicate main lines. add_breakpoint and the
    refresh merge preserve the temporary flag.
Tests: harness 37-41 console (step_out refused, can_step_out in a
call, break-on-main not persisted, restart_or_start switches target,
interrupt stops a running target) + gtkspin target and GTK test 37
(interrupt_gtkapp_in_gtk_main). Console 42/42, GTK 8/8.
2026-12-02 10:46:12 +00:00
cnmcdee 800883b024 Rename FDesigner/cfree to LightGUI (binary lightgui, all docs) 2026-11-29 03:35:48 +00:00
Muse fb125d0b28 Fix: persisted breakpoints split file:line so the code-view gutter shows them 2026-11-25 12:58:03 -05:00
root b71ba03d79 Add multiple breakpoint handlers: conditional, ignore-count, logpoint
Backend (src/debugger.h/.cpp): Breakpoint gains kind (plain/conditional/
logpoint), condition (-break-condition), ignore_count (-break-after),
log_message and group. Logpoints are gdb dprintf breakpoints created via
-interpreter-exec console; the message template supports {expr} (%d),
{s:expr} (%s), {f:expr} (%f), {x:expr} (%#x), {p:expr} (%p) via
logpoint_to_printf(). New API: stage/add_breakpoint_opts(),
update_breakpoint() (live: delete + re-insert, new id in out; staged:
in place). refresh_breakpoints() reads type/cond/ignore/times from
-break-list and merges the log template/group back from our records;
start() re-applies saved breakpoints with full handler options. Bad
conditions are rejected and the breakpoint rolled back. Persistence
format extends to location|enabled|kind|condition|ignore|log_message|
group with backslash escaping; old two-field lines still load as plain.

UI (src/debugger_ui.cpp): breakpoint list shows Type, Condition,
Ignore and Message columns; Add... / Edit... open a handler dialog
(type, condition, ignore spin, log message, group); staged entries
are toggled/removed/edited by list position (they share id 0).

Tests (tests/debugger/dbg_harness.cpp): console 31 -> 37
(conditional fires only at i==2 with hits==1; ignore=2 skips to i==2
with hits==3; logpoint prints LOG i=0/1/2 and never stops; template
conversion incl. % escaping and bad-template rejection; live
plain->conditional update; persistence round-trip incl. | escaping
and old-format load; bad condition rejected with no bp left).
GTK 5 -> 7 (logpoint in callback prints, never stops; conditional
in callback fires). Full debugger_tests.sh ALL PASS, matrix 20/1
(chart-pro-render known Xvfb pixel flake), self-test 29 PASS.
2026-11-25 11:58:31 -05:00
Muse 671293e68f Add GDB stepping debugger with breakpoints, variable inspection, settings
Separate debugger window (Debug menu) driving real gdb over the MI
protocol: breakpoints (file:line / function, enable/disable/list,
persisted), step over/into/out, continue/run/stop/kill/restart,
locals + watch expressions + stack frames, target stdout/stderr pane.
Settings button and Debug > Debugger sub-menu (gdb path, break on
main, stop on entry, pretty-print) persisted to
~/.config/fdesigner/debugger.conf. Tests: tests/debugger_tests.sh —
31 console + 5 GTK headless cases plus a GUI smoke test, all passing.
2026-11-25 03:29:12 -05:00