qemu-cr16/bsd-user
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
..
aarch64 user: Declare cpu_loop() once in 'user/cpu_loop.h' 2024-12-20 17:44:57 +01:00
arm user: Declare cpu_loop() once in 'user/cpu_loop.h' 2024-12-20 17:44:57 +01:00
freebsd bsd-user: Simplify the implementation of execve 2024-07-23 10:50:54 -06:00
host
i386 user: Declare cpu_loop() once in 'user/cpu_loop.h' 2024-12-20 17:44:57 +01:00
include
netbsd exec: Move [b]tswapl() declarations to 'exec/user/tswap-target.h' 2024-04-26 17:03:05 +02:00
openbsd exec: Move [b]tswapl() declarations to 'exec/user/tswap-target.h' 2024-04-26 17:03:05 +02:00
riscv user: Declare cpu_loop() once in 'user/cpu_loop.h' 2024-12-20 17:44:57 +01:00
x86_64 user: Declare cpu_loop() once in 'user/cpu_loop.h' 2024-12-20 17:44:57 +01:00
bsd-file.h
bsd-mem.c
bsd-mem.h accel/tcg: Move user-related declarations out of 'exec/cpu-all.h' (2/4) 2024-12-20 17:44:57 +01:00
bsd-proc.c
bsd-proc.h
bsdload.c
elfcore.c
elfload.c
errno_defs.h
main.c gdbstub: Allow late attachment 2025-02-10 13:47:59 +00:00
meson.build
mmap.c accel/tcg: Move user-related declarations out of 'exec/cpu-all.h' (1/4) 2024-12-20 17:44:57 +01:00
qemu-bsd.h
qemu.h user: Declare cpu_loop() once in 'user/cpu_loop.h' 2024-12-20 17:44:57 +01:00
signal-common.h user: Introduce user/signal.h 2025-02-10 13:47:59 +00:00
signal.c user: Introduce host_interrupt_signal 2025-02-10 13:47:59 +00:00
strace.c exec: Move [b]tswapl() declarations to 'exec/user/tswap-target.h' 2024-04-26 17:03:05 +02:00
syscall_defs.h
trace-events
trace.h
uaccess.c