qemu/gdbstub
Ilya Leoshkevich d156d5d1df gdbstub: Allow late attachment
Allow debugging individual processes in multi-process applications by
starting them with export QEMU_GDB=/tmp/qemu-%d.sock,suspend=n.
Currently one would have to attach to every process to ensure the app
makes progress.

In case suspend=n is not specified, the flow remains unchanged. If it
is specified, then accepting the client connection is delegated to a
thread. In the future this machinery may be reused for handling
reconnections and interruptions.

On accepting a connection, the thread schedules gdb_handlesig() on the
first CPU and wakes it up with host_interrupt_signal. Note that the
result of this gdb_handlesig() invocation is handled, as opposed to
many other existing call sites. These other call sites probably need to
be fixed separately.

Signed-off-by: Ilya Leoshkevich <iii@linux.ibm.com>
Message-Id: <20250117001542.8290-7-iii@linux.ibm.com>
Signed-off-by: Alex Bennée <alex.bennee@linaro.org>
Message-Id: <20250207153112.3939799-16-alex.bennee@linaro.org>
2025-02-10 13:47:59 +00:00
..
gdbstub.c include: Rename sysemu/ -> system/ 2024-12-20 17:44:56 +01:00
internals.h gdbstub: Make hex conversion function non-internal 2024-07-05 12:35:19 +01:00
meson.build meson: Drop the .fa library suffix 2024-07-03 18:41:26 +02:00
syscalls.c include: Rename sysemu/ -> system/ 2024-12-20 17:44:56 +01:00
system.c system: propagate Error to gdbserver_start (and other device setups) 2025-01-17 10:44:25 +00:00
trace-events gdbstub: Rename 'softmmu' -> 'system' 2023-10-07 19:02:59 +02:00
trace.h gdbstub: move into its own sub directory 2022-10-06 11:53:41 +01:00
user-target.c gdbstub/user-target: fix gdbserver int format (%d -> %x) 2025-01-30 13:01:22 +03:00
user.c gdbstub: Allow late attachment 2025-02-10 13:47:59 +00:00