On 10/22/2026 3:56 AM, Marc-André Lureau wrote: > Add support for registering coprocessor features that are only visible > to QEMU's internal APIs (HMP monitor $register expressions, plugins) but > hidden from GDB's target description XML. > > When a feature is registered as internal: > - It is excluded from the target.xml sent to GDB > - Its XML is not served via qXfer:features:read > - 'p'/'P' packets for internal register numbers return E14 > > This is useful for exposing system registers to the HMP monitor without > affecting GDB's register namespace. Exposing aliases or synthetic > registers through GDB's target description can cause problems: name > collisions with GDB's pseudo-registers, independent register caching, > and missing DWARF unwind rules. > > Internal features must be registered after all GDB-visible features to > keep remote register numbering consistent. This ordering is enforced > with an assertion. > > Signed-off-by: Marc-André Lureau <[email protected]> > --- > gdbstub/gdbstub.c | 71 > ++++++++++++++++++++++++++++++++++++++++++++------ > include/exec/gdbstub.h | 21 +++++++++++++++ > 2 files changed, 84 insertions(+), 8 deletions(-) >
Reviewed-by: Pierrick Bouvier <[email protected]>
