mirror of
https://github.com/Motorhead1991/qemu.git
synced 2025-12-17 21:26:13 -07:00
gdbstub: Save target's siginfo
Save target's siginfo into gdbserver_state so it can be used later, for example, in any stub that requires the target's si_signo and si_code. This change affects only linux-user mode. Signed-off-by: Gustavo Romero <gustavo.romero@linaro.org> Suggested-by: Richard Henderson <richard.henderson@linaro.org> Message-Id: <20240309030901.1726211-4-gustavo.romero@linaro.org> Signed-off-by: Alex Bennée <alex.bennee@linaro.org> Reviewed-by: Richard Henderson <richard.henderson@linaro.org>
This commit is contained in:
parent
4d6d8a05a0
commit
f84e313e02
6 changed files with 34 additions and 9 deletions
|
|
@ -27,6 +27,9 @@
|
|||
#include "hw/core/tcg-cpu-ops.h"
|
||||
#include "host-signal.h"
|
||||
|
||||
/* target_siginfo_t must fit in gdbstub's siginfo save area. */
|
||||
QEMU_BUILD_BUG_ON(sizeof(target_siginfo_t) > MAX_SIGINFO_LENGTH);
|
||||
|
||||
static struct target_sigaction sigact_table[TARGET_NSIG];
|
||||
static void host_signal_handler(int host_sig, siginfo_t *info, void *puc);
|
||||
static void target_to_host_sigset_internal(sigset_t *d,
|
||||
|
|
@ -889,7 +892,7 @@ static void handle_pending_signal(CPUArchState *env, int sig,
|
|||
|
||||
k->pending = 0;
|
||||
|
||||
sig = gdb_handlesig(cpu, sig);
|
||||
sig = gdb_handlesig(cpu, sig, NULL, &k->info, sizeof(k->info));
|
||||
if (!sig) {
|
||||
sa = NULL;
|
||||
handler = TARGET_SIG_IGN;
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue