(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.
- code_window_tests.sh and debugger_tests.sh launch a spin binary
(loops forever for the step debugger) and never killed it; two
spins were left at ~100% CPU each, 80+ minutes after their tests
finished.
- kill_spin() (path-scoped to the test's own WORK/spin, via
/proc/<pid>/exe, so an unrelated spin is never touched) kills the
spin, waits for its gdb parent to exit, and kills the gdb if it
lingers. Wired into kill_app() and the EXIT trap, plus a pre-test
cleanup that kills stale spins from aborted runs.
- Verified: code_window_tests.sh run twice, ALL PASS both times, no
spin/gdb/lightgui/Xvfb left afterwards; the 41-minute stale spin
from the earlier run was cleaned up by the pre-test cleanup.
- debugger_tests.sh ALL PASS, no spin/gdb left.