Files
qiling/tests
retrocpugeekandClaude Opus 4.8 c5a8a9b73e gdb: support async interrupt (ctrl-c) to break into a running guest
The stub drove continue by calling emu_start synchronously and only read
the socket again once the target stopped on its own, so the bare \x03 break
byte a client sends to pause a running target was never seen. A guest that
free-runs (e.g. an idle/event loop) could not be interrupted at all --
gdb/Ghidra reported 'Cannot execute this command while the target is running'.

Poll the client socket for the break byte from the per-instruction run hook
(dbg_hook), which does run on the emulation thread during emu_start:

- GdbSerialConn.poll_interrupt(): non-blocking select+recv, True on \x03.
- QlGdbUtils.dbg_hook: throttled (every INTR_POLL_INTERVAL insns) check of an
  installed check_interrupt callback; on a break, stop emulation and record it.
- handle_c: reply SIGINT when the stop was an interrupt rather than a
  breakpoint or normal exit.

Add a regression test that lets an infinite-loop guest free-run, sends the
bare break byte and asserts the stop-reply is 'S02' (SIGINT). Without the
fix no reply ever arrives, so the test stops the guest itself and fails
rather than hanging the run.

Also verified against a free-running MIPS64 BE guest: \x03 -> S02 in <1ms.

Co-Authored-By: Claude Opus 4.8 (1M context) <[email protected]>
2026-08-23 22:14:50 +10:00
..
2025-04-01 18:59:28 +03:00
2025-07-06 18:44:59 +03:00
2019-11-25 09:22:41 +08:00
2022-01-25 15:29:34 +02:00
2023-06-18 01:17:00 +03:00
2022-07-26 23:35:13 +03:00
2025-11-16 18:19:20 +00:00
2023-08-25 02:39:10 +03:00
2022-06-17 17:00:35 +08:00
2021-02-10 22:23:17 +08:00
2023-06-18 01:17:00 +03:00
2025-11-15 01:57:40 +00:00
2022-06-17 17:00:35 +08:00
2021-06-11 17:24:25 +08:00
2022-08-22 11:16:26 +03:00
2023-06-18 01:17:00 +03:00
2023-06-18 01:17:00 +03:00
2023-06-18 01:17:00 +03:00
2025-03-09 20:05:49 +02:00
2023-08-25 02:39:10 +03:00
2023-06-18 01:17:00 +03:00
2024-01-08 19:43:18 +08:00
2022-01-25 15:29:34 +02:00
2023-06-18 01:17:00 +03:00
2023-08-25 02:39:10 +03:00
2025-03-07 23:16:45 +08:00
2022-01-25 15:29:34 +02:00
2023-06-18 01:17:00 +03:00

This folder includes the testsuite for CI, such as Travis.