From: "Dr. David Alan Gilbert" <dave@treblig.org>
To: "Marc-André Lureau" <marcandre.lureau@redhat.com>
Cc: qemu-devel@nongnu.org, "Alex Bennée" <alex.bennee@linaro.org>,
"Philippe Mathieu-Daudé" <philmd@oss.qualcomm.com>,
"Zhao Liu" <zhao1.liu@intel.com>,
"Peter Maydell" <peter.maydell@linaro.org>,
"Chinmay Rath" <rathc@linux.ibm.com>,
"Nicholas Piggin" <npiggin@gmail.com>,
"Glenn Miles" <milesg@linux.ibm.com>,
"Harsh Prateek Bora" <harshpb@linux.ibm.com>,
"Palmer Dabbelt" <palmer@dabbelt.com>,
"Alistair Francis" <alistair.francis@wdc.com>,
"Weiwei Li" <liwei1518@gmail.com>,
"Daniel Henrique Barboza" <daniel.barboza@oss.qualcomm.com>,
"Liu Zhiwei" <zhiwei_liu@linux.alibaba.com>,
"Chao Liu" <chao.liu@processmission.com>,
"Max Filippov" <jcmvbkbc@gmail.com>,
qemu-arm@nongnu.org, qemu-ppc@nongnu.org, qemu-riscv@nongnu.org,
"Paolo Bonzini" <pbonzini@redhat.com>,
"Laurent Vivier" <laurent@vivier.eu>,
"Mark Cave-Ayland" <mark.cave-ayland@ilande.co.uk>,
"Artyom Tarasenko" <atar4qemu@gmail.com>,
"Helge Deller" <deller@gmx.de>,
"Pierrick Bouvier" <pierrick.bouvier@oss.qualcomm.com>,
"Warner Losh" <imp@bsdimp.com>, "Kyle Evans" <kevans@freebsd.org>,
"Fabiano Rosas" <farosas@suse.de>,
"Laurent Vivier" <lvivier@redhat.com>
Subject: Re: [PATCH v3 11/18] target/i386: drop HMP $pc
Date: Thu, 22 Oct 2026 23:34:24 +0000 [thread overview]
Message-ID: <atqdgESEVhYYsz5e@gallifrey> (raw)
In-Reply-To: <20261022-query-reg-v3-11-7ad902b9a7cf@redhat.com>
* Marc-André Lureau (marcandre.lureau@redhat.com) wrote:
> The to be deprecated MonitorDef provided a synthetic $pc alias on
> x86 (which begin as an $eip alias). Preserving it requires x86-specific
> semantics (CPUClass::get_pc() omits the historical truncation).
> Use $eip or $rip instead, adding $cs.base as required.
>
> It was never a documented feature, HMP is not a stable API, x86-only,
> and the replacement ($rip/$eip + $cs.base) is arguably more correct.
> Nobody asked for a deprecation window on ML either.
>
> Signed-off-by: Marc-André Lureau <marcandre.lureau@redhat.com>
<snip>
> diff --git a/tests/qtest/test-hmp.c b/tests/qtest/test-hmp.c
> index a523dbb446ce..b3f8fd58612d 100644
> --- a/tests/qtest/test-hmp.c
> +++ b/tests/qtest/test-hmp.c
> @@ -58,7 +58,6 @@ static const char *hmp_cmds[] = {
> "object_del mem1",
> "one-insn-per-tb on",
> "pmemsave 0 4096 \"/dev/null\"",
> - "p $pc + 8",
That leaves us with no test of the 'p' command, and no test of reading
a register.
Given how much you're changing accessing the registers you
should still have a basic test by the end.
How does this test work on S390 where 'info registers' shows
NIP but 'p $pc' works but 'p $nip' doesn't?
I assume gdb also has some concept of a 'pc' at it's end?
Dave
> "qom-list /",
> "qom-set /machine initrd test",
> "qom-get /machine initrd",
>
> --
> 2.56.0.116.g6de20f6092dc
>
--
-----Open up your eyes, open up your mind, open up your code -------
/ Dr. David Alan Gilbert | Running GNU/Linux | Happy \
\ dave @ treblig.org | | In Hex /
\ _________________________|_____ http://www.treblig.org |_______/
next prev parent reply other threads:[~2026-10-22 23:35 UTC|newest]
Thread overview: 31+ messages / expand[flat|nested] mbox.gz Atom feed top
2026-10-22 10:56 [PATCH v3 00/18] monitor/hmp: replace MonitorDef with GDB registers Marc-André Lureau
2026-10-22 10:56 ` [PATCH v3 01/18] hmp: don't crash on invalid register Marc-André Lureau
2026-10-22 10:56 ` [PATCH v3 02/18] gdbstub: fix next register base after register gaps Marc-André Lureau
2026-10-22 10:56 ` [PATCH v3 03/18] gdbstub: set feature->base_reg for dynamic features Marc-André Lureau
2026-10-22 10:56 ` [PATCH v3 04/18] gdbstub: add gdb_register_internal_coprocessor() Marc-André Lureau
2026-10-22 21:51 ` Pierrick Bouvier
2026-10-22 10:56 ` [PATCH v3 05/18] MAINTAINERS: cover x86 GDB XML files Marc-André Lureau
2026-10-22 20:44 ` Pierrick Bouvier
2026-10-22 10:56 ` [PATCH v3 06/18] target/i386: expose segment limits register to monitors via gdbstub Marc-André Lureau
2026-10-22 10:56 ` [PATCH v3 07/18] target/i386: fix FPU tag word in GDB register read Marc-André Lureau
2026-10-22 10:56 ` [PATCH v3 08/18] target/i386: split SSE registers into separate GDB feature Marc-André Lureau
2026-10-22 10:56 ` [PATCH v3 09/18] target/i386: expose system registers to monitors via gdbstub Marc-André Lureau
2026-10-22 10:56 ` [PATCH v3 10/18] target/i386: expose AVX/AVX-512 registers to GDB Marc-André Lureau
2026-10-22 10:56 ` [PATCH v3 11/18] target/i386: drop HMP $pc Marc-André Lureau
2026-10-22 23:34 ` Dr. David Alan Gilbert [this message]
2026-10-23 20:45 ` Marc-André Lureau
2026-10-23 22:51 ` Dr. David Alan Gilbert
2026-10-22 10:56 ` [PATCH v3 12/18] MAINTAINERS: cover m68k GDB XML files Marc-André Lureau
2026-10-22 21:51 ` Pierrick Bouvier
2026-10-22 10:56 ` [PATCH v3 13/18] target/m68k: expose system registers to monitors via gdbstub Marc-André Lureau
2026-10-22 10:56 ` [PATCH v3 14/18] target/sparc64: " Marc-André Lureau
2026-10-22 10:56 ` [PATCH v3 15/18] target/riscv: bypass smstateen check in debugger mode Marc-André Lureau
2026-10-22 10:56 ` [PATCH v3 16/18] MAINTAINERS: cover riscv GDB XML files Marc-André Lureau
2026-10-22 21:51 ` Pierrick Bouvier
2026-10-22 10:56 ` [PATCH v3 17/18] target/riscv: expose register aliases to monitors via gdbstub Marc-André Lureau
2026-10-23 19:50 ` Daniel Henrique Barboza
2026-10-22 10:56 ` [PATCH v3 18/18] monitor/hmp: remove legacy MonitorDef infrastructure Marc-André Lureau
2026-10-22 21:52 ` Pierrick Bouvier
2026-10-24 15:51 ` [PATCH v3 00/18] monitor/hmp: replace MonitorDef with GDB registers Dr. David Alan Gilbert
2026-10-25 8:26 ` Marc-André Lureau
2026-10-25 16:06 ` Dr. David Alan Gilbert
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=atqdgESEVhYYsz5e@gallifrey \
--to=dave@treblig.org \
--cc=alex.bennee@linaro.org \
--cc=alistair.francis@wdc.com \
--cc=atar4qemu@gmail.com \
--cc=chao.liu@processmission.com \
--cc=daniel.barboza@oss.qualcomm.com \
--cc=deller@gmx.de \
--cc=farosas@suse.de \
--cc=harshpb@linux.ibm.com \
--cc=imp@bsdimp.com \
--cc=jcmvbkbc@gmail.com \
--cc=kevans@freebsd.org \
--cc=laurent@vivier.eu \
--cc=liwei1518@gmail.com \
--cc=lvivier@redhat.com \
--cc=marcandre.lureau@redhat.com \
--cc=mark.cave-ayland@ilande.co.uk \
--cc=milesg@linux.ibm.com \
--cc=npiggin@gmail.com \
--cc=palmer@dabbelt.com \
--cc=pbonzini@redhat.com \
--cc=peter.maydell@linaro.org \
--cc=philmd@oss.qualcomm.com \
--cc=pierrick.bouvier@oss.qualcomm.com \
--cc=qemu-arm@nongnu.org \
--cc=qemu-devel@nongnu.org \
--cc=qemu-ppc@nongnu.org \
--cc=qemu-riscv@nongnu.org \
--cc=rathc@linux.ibm.com \
--cc=zhao1.liu@intel.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 an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.