X-Git-Url: http://drtracing.org/?a=blobdiff_plain;f=gdbserver%2Flinux-ppc-low.cc;h=fe63e7bf07b767479bdf9547e88e60e469633563;hb=aa8d21c9bb43baaa35f456a3d371942a26cdce4e;hp=f3837e4796048e86965518dbe5de4f1643db4fb4;hpb=a5863204fb1b9c03627edc3bb447c5958ef96458;p=deliverable%2Fbinutils-gdb.git diff --git a/gdbserver/linux-ppc-low.cc b/gdbserver/linux-ppc-low.cc index f3837e4796..fe63e7bf07 100644 --- a/gdbserver/linux-ppc-low.cc +++ b/gdbserver/linux-ppc-low.cc @@ -44,6 +44,23 @@ #define PPC_LI(insn) (PPC_SEXT (PPC_FIELD (insn, 6, 24), 24) << 2) #define PPC_BD(insn) (PPC_SEXT (PPC_FIELD (insn, 16, 14), 14) << 2) +/* Linux target op definitions for the PowerPC architecture. */ + +class ppc_target : public linux_process_target +{ +public: + + const regs_info *get_regs_info () override; + +protected: + + void low_arch_setup () override; +}; + +/* The singleton target ops object. */ + +static ppc_target the_ppc_target; + /* Holds the AT_HWCAP auxv entry. */ static unsigned long ppc_hwcap; @@ -791,21 +808,21 @@ static struct regsets_info ppc_regsets_info = NULL, /* disabled_regsets */ }; -static struct regs_info regs_info = +static struct regs_info myregs_info = { NULL, /* regset_bitmap */ &ppc_usrregs_info, &ppc_regsets_info }; -static const struct regs_info * -ppc_regs_info (void) +const regs_info * +ppc_target::get_regs_info () { - return ®s_info; + return &myregs_info; } -static void -ppc_arch_setup (void) +void +ppc_target::low_arch_setup () { const struct target_desc *tdesc; struct regset_info *regset; @@ -3371,8 +3388,6 @@ ppc_get_ipa_tdesc_idx (void) } struct linux_target_ops the_low_target = { - ppc_arch_setup, - ppc_regs_info, ppc_cannot_fetch_register, ppc_cannot_store_register, NULL, /* fetch_register */ @@ -3410,6 +3425,10 @@ struct linux_target_ops the_low_target = { ppc_get_ipa_tdesc_idx, }; +/* The linux target ops object. */ + +linux_process_target *the_linux_target = &the_ppc_target; + void initialize_low_arch (void) {