mirror of
https://github.com/Motorhead1991/qemu.git
synced 2025-08-02 15:23:53 -06:00
gdbstub: Add Xfer:siginfo:read stub
Add stub to handle Xfer:siginfo:read packet query that requests the machine's siginfo data. This is used when GDB user executes 'print $_siginfo' and when the machine stops due to a signal, for instance, on SIGSEGV. The information in siginfo allows GDB to determiner further details on the signal, like the fault address/insn when the SIGSEGV is caught. Signed-off-by: Gustavo Romero <gustavo.romero@linaro.org> Message-Id: <20240309030901.1726211-5-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
f84e313e02
commit
9ae5801d35
3 changed files with 32 additions and 0 deletions
|
@ -1664,6 +1664,8 @@ static void handle_query_supported(GArray *params, void *user_ctx)
|
|||
g_string_append(gdbserver_state.str_buf, ";qXfer:auxv:read+");
|
||||
}
|
||||
g_string_append(gdbserver_state.str_buf, ";QCatchSyscalls+");
|
||||
|
||||
g_string_append(gdbserver_state.str_buf, ";qXfer:siginfo:read+");
|
||||
#endif
|
||||
g_string_append(gdbserver_state.str_buf, ";qXfer:exec-file:read+");
|
||||
#endif
|
||||
|
@ -1818,6 +1820,12 @@ static const GdbCmdParseEntry gdb_gen_query_table[] = {
|
|||
.cmd_startswith = 1,
|
||||
.schema = "l,l0"
|
||||
},
|
||||
{
|
||||
.handler = gdb_handle_query_xfer_siginfo,
|
||||
.cmd = "Xfer:siginfo:read::",
|
||||
.cmd_startswith = 1,
|
||||
.schema = "l,l0"
|
||||
},
|
||||
#endif
|
||||
{
|
||||
.handler = gdb_handle_query_xfer_exec_file,
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue