Re: [PATCH v2 10/12] [PowerPC] Add support for EBB and PMU registers

Ulrich Weigand
2018-08-10T14:44:14Z

Pedro Franco de Carvalho wrote:

> YYYY-MM-DD Edjunior Barbosa Machado <emachado@linux.vnet.ibm.com>
> Pedro Franco de Carvalho <pedromfc@linux.ibm.com>
>
> * arch/ppc-linux-common.h (PPC_LINUX_SIZEOF_EBBREGSET)
> (PPC_LINUX_SIZEOF_PMUREGSET): Declare.
> * nat/ppc-linux.h (PPC_FEATURE2_EBB, NT_PPC_EBB, NT_PPC_PMU):
> Define if not already defined.
> * features/rs6000/power-ebb.xml: New file.
> * features/rs6000/power-linux-pmu.xml: New file.
> * features/rs6000/powerpc-isa207-vsx32l.xml: Include ebb and pmu
> features.
> * features/rs6000/powerpc-isa207-vsx64l.xml: Likewise.
> * features/rs6000/powerpc-isa207-vsx32l.c: Re-generate.
> * features/rs6000/powerpc-isa207-vsx64l.c: Re-generate.
> * regformats/rs6000/powerpc-isa207-vsx32l.dat: Re-generate.
> * regformats/rs6000/powerpc-isa207-vsx64l.dat: Re-generate.
> * ppc-linux-nat.c (fetch_register, fetch_ppc_registers): Call
> fetch_regset with ebb and pmu regsets.
> (ppc_linux_regset_available_p): New function.
> (store_register, store_ppc_registers): Call store_regset with ebb
> and pmu regsets.
> (ppc_linux_nat_target::read_description): Set isa207 field in the
> features struct if ebb and pmu are avaiable.
> * ppc-linux-tdep.c (ppc32_regmap_ebb, ppc32_regmap_pmu)
> (ppc32_linux_ebbregset, ppc32_linux_pmuregset): New globals.
> (ppc_linux_iterate_over_regset_sections): Call back with the ebb
> and pmu regsets.
> (ppc_linux_core_read_description): Check if the pmu section is
> present and set isa207 in the features struct.
> * ppc-linux-tdep.h (ppc32_linux_ebbregset)
> (ppc32_linux_pmuregset): Declare.
> * ppc-tdep.h (struct gdbarch_tdep) <ppc_mmcr0_regnum>: New field.
> <ppc_mmcr2_regnum, ppc_siar_regnum, ppc_sdar_regnum>: New fields.
> <ppc_sier_regnum>: New field.
> (enum): <PPC_BESCR_REGNUM, PPC_EBBHR_REGNUM, PPC_EBBRR_REGNUM>:
> New enum values.
> <PPC_MMCR0_REGNUM, PPC_MMCR2_REGNUM, PPC_SIAR_REGNUM>: New enum
> values.
> <PPC_SDAR_REGNUM, PPC_SIER_REGNUM>: New enum values.
> (PPC_IS_EBB_REGNUM, PPC_IS_PMU_REGNUM): Define.
> * rs6000-tdep.c (rs6000_gdbarch_init): Look for and validate the
> ebb and pmu features.
>
> gdb/gdbserver/ChangeLog:
> YYYY-MM-DD Pedro Franco de Carvalho <pedromfc@linux.ibm.com>
>
> * configure.srv (powerpc*-*-linux*): Add rs6000/power-ebb.xml and
> rs6000/power-linux-pmu.xml to srv_xmlfiles.
> * linux-ppc-low.c (ppc_store_ebbregset, ppc_fill_pmuregset)
> (ppc_store_pmuregset): New functions.
> (ppc_regsets): Add entries for ebb and pmu regsets.
> (ppc_arch_setup): Set isa207 in features struct if the ebb and
> pmu regsets are available. Set sizes for these regsets.
>
> gdb/doc/ChangeLog:
> YYYY-MM-DD Pedro Franco de Carvalho <pedromfc@linux.ibm.com>
>
> * gdb.texinfo (PowerPC Features): Describe new features
> "org.gnu.gdb.power.ebb" and "org.gnu.gdb.power.linux.pmu".

This is OK.

Thanks,
Ulrich

--
Dr. Ulrich Weigand
GNU/Linux compilers and toolchain
Ulrich.Weigand@de.ibm.com