diff options
author | Ilya Leoshkevich <iii@linux.ibm.com> | 2024-02-07 16:38:09 +0000 |
---|---|---|
committer | Alex Bennée <alex.bennee@linaro.org> | 2024-02-09 17:52:40 +0000 |
commit | 8b7fcb8ed159d1caeb0b6e5b753b539d65092282 (patch) | |
tree | e0e5cfa907a3fb4f8f751856e80b00eeb6ddcf77 /include/gdbstub/user.h | |
parent | 4aad096587a28ef967f319279bca78e2b216b7f3 (diff) |
gdbstub: Allow specifying a reason in stop packets
The upcoming syscall catchpoint support needs to send stop packets with
an associated reason to GDB. Add an extra parameter to gdb_handlesig()
for that, and rename it to gdb_handlesig_reason(). Provide a
compatibility wrapper with an old name.
Signed-off-by: Ilya Leoshkevich <iii@linux.ibm.com>
Message-Id: <20240202152506.279476-3-iii@linux.ibm.com>
Signed-off-by: Alex Bennée <alex.bennee@linaro.org>
Message-Id: <20240207163812.3231697-12-alex.bennee@linaro.org>
Diffstat (limited to 'include/gdbstub/user.h')
-rw-r--r-- | include/gdbstub/user.h | 16 |
1 files changed, 14 insertions, 2 deletions
diff --git a/include/gdbstub/user.h b/include/gdbstub/user.h index d392e510c5..1fc43e04af 100644 --- a/include/gdbstub/user.h +++ b/include/gdbstub/user.h @@ -10,9 +10,10 @@ #define GDBSTUB_USER_H /** - * gdb_handlesig() - yield control to gdb + * gdb_handlesig_reason() - yield control to gdb * @cpu: CPU * @sig: if non-zero, the signal number which caused us to stop + * @reason: stop reason for stop reply packet or NULL * * This function yields control to gdb, when a user-mode-only target * needs to stop execution. If @sig is non-zero, then we will send a @@ -24,7 +25,18 @@ * or 0 if no signal should be delivered, ie the signal that caused * us to stop should be ignored. */ -int gdb_handlesig(CPUState *, int); +int gdb_handlesig_reason(CPUState *, int, const char *); + +/** + * gdb_handlesig() - yield control to gdb + * @cpu CPU + * @sig: if non-zero, the signal number which caused us to stop + * @see gdb_handlesig_reason() + */ +static inline int gdb_handlesig(CPUState *cpu, int sig) +{ + return gdb_handlesig_reason(cpu, sig, NULL); +} /** * gdb_signalled() - inform remote gdb of sig exit |