>
> +
>
>
+void ppc_cpu_gdb_init(CPUState *cs, PowerPCCPUClass *pcc)
>
> +{
>
>
+
>
> + if (pcc->insns_flags & PPC_FLOAT) {
>
>
+ gdb_register_coprocessor(cs, gdb_get_float_reg, gdb_set_float_reg,
>
> + 33, "power-fpu.xml", 0);
>
> + }
>
>
+ if (pcc->insns_flags & PPC_ALTIVEC) {
>
> + gdb_register_coprocessor(cs, gdb_get_avr_reg, gdb_set_avr_reg,
>
>
+ 34, "power-altivec.xml", 0);
>
> + }
>
>
+ if (pcc->insns_flags & PPC_SPE) {
>
> + gdb_register_coprocessor(cs, gdb_get_spe_reg, gdb_set_spe_reg,
>
>
+ 34, "power-spe.xml", 0);
>
> + }
>
>
+ if (pcc->insns_flags2 & PPC2_VSX) {
>
> + gdb_register_coprocessor(cs, gdb_get_vsx_reg, gdb_set_vsx_reg,
>
>
+ 32, "power-vsx.xml", 0);
>
> + }
> >
+#ifndef CONFIG_USER_ONLY
> > + gdb_register_coprocessor(cs, gdb_get_spr_reg, gdb_set_spr_reg,
> > + pcc->gdb_num_sprs, "power-spr.xml", 0);
> > +#endif
> > +}
>
>
Same here.
This function was actually created by me, wasn't in the translate_init.c.inc. Since we're moving gdb fuinctions to gdbstub.c, I thought it made sense to hide the logic behind how
to register coprocessors correctly as well. that's why there is no removal of this function on the diff. Should I move it back to ppc_cpu_realize or is this a good plan?