Hi On Fri, Oct 23, 2026 at 3:35 AM Dr. David Alan Gilbert <[email protected]> wrote: > > * Marc-André Lureau ([email protected]) 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 <[email protected]> > > <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.
The existing test doesn't really do much though, it just checks we don't crash basically. I can try addressing this as a followup > > How does this test work on S390 where 'info registers' shows > NIP but 'p $pc' works but 'p $nip' doesn't? I assume you are talking about gdb, since $pc doesn't work with HMP-S390. > > I assume gdb also has some concept of a 'pc' at it's end? GDB has extra synthetic pseudo-registers. We have a bunch in QEMU (and this series add more). We can add extra as necessary. But $pc for x86 is currently ill-defined, so we decided to drop it earlier. > 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 |_______/ >
