Browse Source

i386/monitor: Support EGPRs in hmp_print

Add EGPRs in monitor_defs[] to allow HMP to access EGPRs.

For example,

(qemu) print $r16

Since monitor_defs[] is used for read-only case, no need to consider
xstate synchronization issues that might be caused by modifying EGPRs
(like what gdbstub did).

Suggested-by: Paolo Bonzini <pbonzini@redhat.com>
Tested-by: Xudong Hao <xudong.hao@intel.com>
Signed-off-by: Zhao Liu <zhao1.liu@intel.com>
Link: https://lore.kernel.org/r/20251211070942.3612547-7-zhao1.liu@intel.com
Signed-off-by: Paolo Bonzini <pbonzini@redhat.com>
pull/316/head
Zhao Liu 8 months ago
committed by Paolo Bonzini
parent
commit
103b49bc64
  1. 16
      target/i386/monitor.c

16
target/i386/monitor.c

@ -623,6 +623,22 @@ const MonitorDef monitor_defs[] = {
{ "r13", offsetof(CPUX86State, regs[13]) },
{ "r14", offsetof(CPUX86State, regs[14]) },
{ "r15", offsetof(CPUX86State, regs[15]) },
{ "r16", offsetof(CPUX86State, regs[16]) },
{ "r17", offsetof(CPUX86State, regs[17]) },
{ "r18", offsetof(CPUX86State, regs[18]) },
{ "r19", offsetof(CPUX86State, regs[19]) },
{ "r20", offsetof(CPUX86State, regs[20]) },
{ "r21", offsetof(CPUX86State, regs[21]) },
{ "r22", offsetof(CPUX86State, regs[22]) },
{ "r23", offsetof(CPUX86State, regs[23]) },
{ "r24", offsetof(CPUX86State, regs[24]) },
{ "r25", offsetof(CPUX86State, regs[25]) },
{ "r26", offsetof(CPUX86State, regs[26]) },
{ "r27", offsetof(CPUX86State, regs[27]) },
{ "r28", offsetof(CPUX86State, regs[28]) },
{ "r29", offsetof(CPUX86State, regs[29]) },
{ "r30", offsetof(CPUX86State, regs[30]) },
{ "r31", offsetof(CPUX86State, regs[31]) },
#endif
{ "eflags", offsetof(CPUX86State, eflags) },
{ "eip", offsetof(CPUX86State, eip) },

Loading…
Cancel
Save