From: "Philippe Mathieu-Daudé" <philmd@linaro.org>
To: "Alex Bennée" <alex.bennee@linaro.org>, qemu-devel@nongnu.org
Cc: devel@lists.libvirt.org, "Jiaxun Yang" <jiaxun.yang@flygoat.com>,
"Daniel Henrique Barboza" <dbarboza@ventanamicro.com>,
"Chris Wulff" <crwulff@gmail.com>,
"Weiwei Li" <liwei1518@gmail.com>,
"Bin Meng" <bin.meng@windriver.com>,
"Thomas Huth" <thuth@redhat.com>,
qemu-riscv@nongnu.org, "Marek Vasut" <marex@denx.de>,
"Liu Zhiwei" <zhiwei_liu@linux.alibaba.com>,
"Aleksandar Rikalo" <aleksandar.rikalo@syrmia.com>,
"Marc-André Lureau" <marcandre.lureau@redhat.com>,
"Alistair Francis" <alistair.francis@wdc.com>,
"Warner Losh" <imp@bsdimp.com>,
"Paolo Bonzini" <pbonzini@redhat.com>,
"Aurelien Jarno" <aurelien@aurel32.net>,
"Beraldo Leal" <bleal@redhat.com>,
"Daniel P. Berrangé" <berrange@redhat.com>,
"Max Filippov" <jcmvbkbc@gmail.com>,
"Ed Maste" <emaste@freebsd.org>,
"Palmer Dabbelt" <palmer@dabbelt.com>,
"Li-Wen Hsu" <lwhsu@freebsd.org>,
"Laurent Vivier" <laurent@vivier.eu>,
"Kyle Evans" <kevans@freebsd.org>,
"Wainer dos Santos Moschetta" <wainersm@redhat.com>,
"Riku Voipio" <riku.voipio@iki.fi>,
"Ilya Leoshkevich" <iii@linux.ibm.com>,
"Anton Johansson" <anjo@rev.ng>
Subject: Re: [PATCH v2 10/14] gdbstub: Expose TARGET_SIGTRAP in a target-agnostic way
Date: Wed, 7 Feb 2024 21:05:52 +0100 [thread overview]
Message-ID: <3f911aae-542c-45ba-a8c6-eed0626baacd@linaro.org> (raw)
In-Reply-To: <20240207163812.3231697-11-alex.bennee@linaro.org>
On 7/2/24 17:38, Alex Bennée wrote:
> 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;
> +}
Reviewed-by: Philippe Mathieu-Daudé <philmd@linaro.org>
next prev parent reply other threads:[~2024-02-07 20:06 UTC|newest]
Thread overview: 19+ messages / expand[flat|nested] mbox.gz Atom feed top
2024-02-07 16:37 [PATCH v2 00/14] maintainer updates for 9.0 pre-PR (docker, plugin tests, deprecation, elf, semihosting, gdbstub) Alex Bennée
2024-02-07 16:37 ` [PATCH v2 01/14] tests/docker: Add sqlite3 module to openSUSE Leap container Alex Bennée
2024-02-07 16:38 ` [PATCH v2 02/14] docs: mark CRIS support as deprecated Alex Bennée
2024-02-07 16:38 ` [PATCH v2 03/14] configure: run plugin TCG tests again Alex Bennée
2024-02-07 16:38 ` [PATCH v2 04/14] Revert "hw/elf_ops: Ignore loadable segments with zero size" Alex Bennée
2024-02-07 16:38 ` [PATCH v2 05/14] tests/vm: Set UseDNS=no in the sshd configuration Alex Bennée
2024-02-07 16:38 ` [PATCH v2 06/14] tests/vm/freebsd: Reload " Alex Bennée
2024-02-07 19:58 ` Warner Losh
2024-02-07 16:38 ` [PATCH v2 07/14] test-util-filemonitor: Adapt to the FreeBSD inotify rename semantics Alex Bennée
2024-02-07 19:57 ` Warner Losh
2024-02-07 16:38 ` [PATCH v2 08/14] meson: Link with libinotify on FreeBSD Alex Bennée
2024-02-07 19:59 ` Warner Losh
2024-02-07 16:38 ` [PATCH v2 09/14] kconfig: use "select" to enable semihosting Alex Bennée
2024-02-07 16:38 ` [PATCH v2 10/14] gdbstub: Expose TARGET_SIGTRAP in a target-agnostic way Alex Bennée
2024-02-07 20:05 ` Philippe Mathieu-Daudé [this message]
2024-02-07 16:38 ` [PATCH v2 11/14] gdbstub: Allow specifying a reason in stop packets Alex Bennée
2024-02-07 16:38 ` [PATCH v2 12/14] gdbstub: Add syscall entry/return hooks Alex Bennée
2024-02-07 16:38 ` [PATCH v2 13/14] gdbstub: Implement catching syscalls Alex Bennée
2024-02-07 16:38 ` [PATCH v2 14/14] tests/tcg: Add the syscall catchpoint gdbstub test 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=3f911aae-542c-45ba-a8c6-eed0626baacd@linaro.org \
--to=philmd@linaro.org \
--cc=aleksandar.rikalo@syrmia.com \
--cc=alex.bennee@linaro.org \
--cc=alistair.francis@wdc.com \
--cc=anjo@rev.ng \
--cc=aurelien@aurel32.net \
--cc=berrange@redhat.com \
--cc=bin.meng@windriver.com \
--cc=bleal@redhat.com \
--cc=crwulff@gmail.com \
--cc=dbarboza@ventanamicro.com \
--cc=devel@lists.libvirt.org \
--cc=emaste@freebsd.org \
--cc=iii@linux.ibm.com \
--cc=imp@bsdimp.com \
--cc=jcmvbkbc@gmail.com \
--cc=jiaxun.yang@flygoat.com \
--cc=kevans@freebsd.org \
--cc=laurent@vivier.eu \
--cc=liwei1518@gmail.com \
--cc=lwhsu@freebsd.org \
--cc=marcandre.lureau@redhat.com \
--cc=marex@denx.de \
--cc=palmer@dabbelt.com \
--cc=pbonzini@redhat.com \
--cc=qemu-devel@nongnu.org \
--cc=qemu-riscv@nongnu.org \
--cc=riku.voipio@iki.fi \
--cc=thuth@redhat.com \
--cc=wainersm@redhat.com \
--cc=zhiwei_liu@linux.alibaba.com \
/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 read-only IMAP folder(s) and NNTP newsgroup(s).