qemu/gdbstub
Ilya Leoshkevich fccb744f41 gdbstub: Try unlinking the unix socket before binding
In case an emulated process execve()s another emulated process, bind()
will fail, because the socket already exists. So try deleting it. Use
the existing unix_listen() function which does this. Link qemu-user
with qemu-sockets.c and add the monitor_get_fd() stub.

Note that it is not possible to handle this in do_execv(): deleting
gdbserver_user_state.socket_path before safe_execve() is not correct,
because the latter may fail, and afterwards we may lose control.

Signed-off-by: Ilya Leoshkevich <iii@linux.ibm.com>
Reviewed-by: Alex Bennée <alex.bennee@linaro.org>
Message-Id: <20250117001542.8290-3-iii@linux.ibm.com>
Signed-off-by: Alex Bennée <alex.bennee@linaro.org>
Message-Id: <20250207153112.3939799-12-alex.bennee@linaro.org>
2025-02-10 13:47:58 +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: Try unlinking the unix socket before binding 2025-02-10 13:47:58 +00:00