[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
[PATCH v2 10/14] gdbstub: Expose TARGET_SIGTRAP in a target-agnostic way
From: |
Alex Bennée |
Subject: |
[PATCH v2 10/14] gdbstub: Expose TARGET_SIGTRAP in a target-agnostic way |
Date: |
Wed, 7 Feb 2024 16:38:08 +0000 |
From: Ilya Leoshkevich <iii@linux.ibm.com>
The upcoming syscall catchpoint support needs to send SIGTRAP stop
packets to GDB. Being able to compile this support only once for all
targets is a good thing, and it requires hiding TARGET_SIGTRAP behind
a function call.
Signed-off-by: Ilya Leoshkevich <iii@linux.ibm.com>
Message-Id: <20240202152506.279476-2-iii@linux.ibm.com>
Signed-off-by: Alex Bennée <alex.bennee@linaro.org>
---
gdbstub/internals.h | 1 +
gdbstub/user-target.c | 5 +++++
2 files changed, 6 insertions(+)
diff --git a/gdbstub/internals.h b/gdbstub/internals.h
index 5c0c725e54c..aeb0d9b5377 100644
--- a/gdbstub/internals.h
+++ b/gdbstub/internals.h
@@ -136,6 +136,7 @@ void gdb_append_thread_id(CPUState *cpu, GString *buf);
int gdb_get_cpu_index(CPUState *cpu);
unsigned int gdb_get_max_cpus(void); /* both */
bool gdb_can_reverse(void); /* softmmu, stub for user */
+int gdb_target_sigtrap(void); /* user */
void gdb_create_default_process(GDBState *s);
diff --git a/gdbstub/user-target.c b/gdbstub/user-target.c
index c4bba4c72c7..b7d4c37cd81 100644
--- a/gdbstub/user-target.c
+++ b/gdbstub/user-target.c
@@ -418,3 +418,8 @@ void gdb_handle_query_xfer_exec_file(GArray *params, void
*user_ctx)
ts->bprm->filename + offset);
gdb_put_strbuf();
}
+
+int gdb_target_sigtrap(void)
+{
+ return TARGET_SIGTRAP;
+}
--
2.39.2
- [PATCH v2 04/14] Revert "hw/elf_ops: Ignore loadable segments with zero size", (continued)
- [PATCH v2 04/14] Revert "hw/elf_ops: Ignore loadable segments with zero size", Alex Bennée, 2024/02/07
- [PATCH v2 03/14] configure: run plugin TCG tests again, Alex Bennée, 2024/02/07
- [PATCH v2 05/14] tests/vm: Set UseDNS=no in the sshd configuration, Alex Bennée, 2024/02/07
- [PATCH v2 08/14] meson: Link with libinotify on FreeBSD, Alex Bennée, 2024/02/07
- [PATCH v2 07/14] test-util-filemonitor: Adapt to the FreeBSD inotify rename semantics, Alex Bennée, 2024/02/07
- [PATCH v2 09/14] kconfig: use "select" to enable semihosting, Alex Bennée, 2024/02/07
- [PATCH v2 06/14] tests/vm/freebsd: Reload the sshd configuration, Alex Bennée, 2024/02/07
- [PATCH v2 10/14] gdbstub: Expose TARGET_SIGTRAP in a target-agnostic way,
Alex Bennée <=
- [PATCH v2 12/14] gdbstub: Add syscall entry/return hooks, Alex Bennée, 2024/02/07
- [PATCH v2 11/14] gdbstub: Allow specifying a reason in stop packets, Alex Bennée, 2024/02/07
- [PATCH v2 13/14] gdbstub: Implement catching syscalls, Alex Bennée, 2024/02/07
- [PATCH v2 14/14] tests/tcg: Add the syscall catchpoint gdbstub test, Alex Bennée, 2024/02/07