[PATCH 11/11] target/ppc: Remove MonitorDef register entries available via gdbstub

Philippe Mathieu-Daudé posted 11 patches 1 month, 3 weeks ago
Maintainers: Laurent Vivier <laurent@vivier.eu>, Pierrick Bouvier <pierrick.bouvier@linaro.org>, "Alex Bennée" <alex.bennee@linaro.org>, "Philippe Mathieu-Daudé" <philmd@linaro.org>, "Dr. David Alan Gilbert" <dave@treblig.org>, Paolo Bonzini <pbonzini@redhat.com>, Zhao Liu <zhao1.liu@intel.com>, Nicholas Piggin <npiggin@gmail.com>, Chinmay Rath <rathc@linux.ibm.com>, Mark Cave-Ayland <mark.cave-ayland@ilande.co.uk>, Artyom Tarasenko <atar4qemu@gmail.com>
[PATCH 11/11] target/ppc: Remove MonitorDef register entries available via gdbstub
Posted by Philippe Mathieu-Daudé 1 month, 3 weeks ago
All these registers are already provided by via gdbstub parsed XML
and handler by the gdb_get_register() helper in the monitor/hmp.c
file. Remove as now unreachable code.

Signed-off-by: Philippe Mathieu-Daudé <philmd@linaro.org>
---
 target/ppc/ppc-qmp-cmds.c | 5 -----
 1 file changed, 5 deletions(-)

diff --git a/target/ppc/ppc-qmp-cmds.c b/target/ppc/ppc-qmp-cmds.c
index 7022564604f..7dfa78c2e0d 100644
--- a/target/ppc/ppc-qmp-cmds.c
+++ b/target/ppc/ppc-qmp-cmds.c
@@ -93,16 +93,11 @@ void hmp_info_tlb(Monitor *mon, const QDict *qdict)
 }
 
 const MonitorDef monitor_defs[] = {
-    { "fpscr", offsetof(CPUPPCState, fpscr) },
     /* Next instruction pointer */
-    { "nip|pc", offsetof(CPUPPCState, nip) },
-    { "lr", offsetof(CPUPPCState, lr) },
-    { "ctr", offsetof(CPUPPCState, ctr) },
     { "decr", 0, &monitor_get_decr, },
     { "ccr|cr", 0, &monitor_get_ccr, },
     /* Machine state register */
     { "xer", 0, &monitor_get_xer },
-    { "msr", offsetof(CPUPPCState, msr) },
     { "tbu", 0, &monitor_get_tbu, },
 #if defined(TARGET_PPC64)
     { "tb", 0, &monitor_get_tbl, },
-- 
2.52.0


Re: [PATCH 11/11] target/ppc: Remove MonitorDef register entries available via gdbstub
Posted by BALATON Zoltan 1 month, 3 weeks ago
On Mon, 16 Feb 2026, Philippe Mathieu-Daudé wrote:
> All these registers are already provided by via gdbstub parsed XML
> and handler by the gdb_get_register() helper in the monitor/hmp.c
> file. Remove as now unreachable code.
>
> Signed-off-by: Philippe Mathieu-Daudé <philmd@linaro.org>
> ---
> target/ppc/ppc-qmp-cmds.c | 5 -----
> 1 file changed, 5 deletions(-)
>
> diff --git a/target/ppc/ppc-qmp-cmds.c b/target/ppc/ppc-qmp-cmds.c
> index 7022564604f..7dfa78c2e0d 100644
> --- a/target/ppc/ppc-qmp-cmds.c
> +++ b/target/ppc/ppc-qmp-cmds.c
> @@ -93,16 +93,11 @@ void hmp_info_tlb(Monitor *mon, const QDict *qdict)
> }
>
> const MonitorDef monitor_defs[] = {
> -    { "fpscr", offsetof(CPUPPCState, fpscr) },
>     /* Next instruction pointer */

This comment should also go as it's for nip removed (nipped? :-) ) from 
next line.

Regards,
BALATON Zoltan

> -    { "nip|pc", offsetof(CPUPPCState, nip) },
> -    { "lr", offsetof(CPUPPCState, lr) },
> -    { "ctr", offsetof(CPUPPCState, ctr) },
>     { "decr", 0, &monitor_get_decr, },
>     { "ccr|cr", 0, &monitor_get_ccr, },
>     /* Machine state register */
>     { "xer", 0, &monitor_get_xer },
> -    { "msr", offsetof(CPUPPCState, msr) },
>     { "tbu", 0, &monitor_get_tbu, },
> #if defined(TARGET_PPC64)
>     { "tb", 0, &monitor_get_tbl, },
>