From: Ilya Leoshkevich <iii@linux.ibm.com>
To: "Alex Bennée" <alex.bennee@linaro.org>,
"Riku Voipio" <riku.voipio@iki.fi>
Cc: "Philippe Mathieu-Daudé" <philmd@linaro.org>,
qemu-devel@nongnu.org, "Ilya Leoshkevich" <iii@linux.ibm.com>
Subject: [PATCH v3 1/5] gdbstub: Expose TARGET_SIGTRAP in a target-agnostic way
Date: Fri, 2 Feb 2024 16:23:43 +0100 [thread overview]
Message-ID: <20240202152506.279476-2-iii@linux.ibm.com> (raw)
In-Reply-To: <20240202152506.279476-1-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>
---
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.43.0
next prev parent reply other threads:[~2024-02-02 15:26 UTC|newest]
Thread overview: 7+ messages / expand[flat|nested] mbox.gz Atom feed top
2024-02-02 15:23 [PATCH v3 0/5] gdbstub: Implement catching syscalls Ilya Leoshkevich
2024-02-02 15:23 ` Ilya Leoshkevich [this message]
2024-02-02 15:23 ` [PATCH v3 2/5] gdbstub: Allow specifying a reason in stop packets Ilya Leoshkevich
2024-02-02 15:23 ` [PATCH v3 3/5] gdbstub: Add syscall entry/return hooks Ilya Leoshkevich
2024-02-02 15:23 ` [PATCH v3 4/5] gdbstub: Implement catching syscalls Ilya Leoshkevich
2024-02-02 15:23 ` [PATCH v3 5/5] tests/tcg: Add the syscall catchpoint gdbstub test Ilya Leoshkevich
2024-02-02 23:13 ` [PATCH v3 0/5] gdbstub: Implement catching syscalls Alex Bennée
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
Avoid top-posting and favor interleaved quoting:
https://en.wikipedia.org/wiki/Posting_style#Interleaved_style
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=20240202152506.279476-2-iii@linux.ibm.com \
--to=iii@linux.ibm.com \
--cc=alex.bennee@linaro.org \
--cc=philmd@linaro.org \
--cc=qemu-devel@nongnu.org \
--cc=riku.voipio@iki.fi \
/path/to/YOUR_REPLY
https://kernel.org/pub/software/scm/git/docs/git-send-email.html
* If your mail client supports setting the In-Reply-To header
via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line
before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).