summaryrefslogtreecommitdiff
path: root/gdb/ppc-tdep.h
diff options
context:
space:
mode:
authorElena Zannoni <ezannoni@kwikemart.cygnus.com>2001-12-09 21:39:53 +0000
committerElena Zannoni <ezannoni@kwikemart.cygnus.com>2001-12-09 21:39:53 +0000
commit22d86365d7450230aad6e3fd4745133a59041632 (patch)
treee277051316e311c818d591fa2cd6442b1aca7fb7 /gdb/ppc-tdep.h
parentfc3b534a176ed7566332e592dd454a9345d47c22 (diff)
downloadgdb-22d86365d7450230aad6e3fd4745133a59041632.tar.gz
2001-12-09 Elena Zannoni <ezannoni@redhat.com>
* config/rs6000/tm-rs6000.h (STAB_REG_TO_REGNUM): Remove definition, it is now multiarched. * ppc-tdep.h (struct gdbarch_tdep): Move from rs6000-tdep.c. Add fields for special register numbers. * rs6000-tdep.c (rs6000_gdbarch_init): Initialize new tdep special regnum fields. (rs6000_saved_pc_after_call): Use gdbarch_tdep registers fields instead of hardcoded macros. (branch_dest, rs6000_pop_frame, rs6000_fix_call_dummy, ppc_push_return_address, rs6000_frame_saved_pc, frame_get_saved_regs, rs6000_frame_chain, rs6000_store_return_value): Ditto. (rs6000_stab_reg_to_regnum): New function. * ppcnbsd-nat.c (fetch_inferior_registers, store_inferior_registers, fetch_core_registers): Ditto. * ppc-linux-tdep.c (ppc_linux_in_sigtramp, ppc_linux_frame_init_saved_regs): Ditto. * ppc-linux-nat.c (ppc_register_u_addr, supply_gregset, fill_gregset): Ditto. * ppc-bdm.c (bdm_ppc_fetch_registers, bdm_ppc_store_registers): Ditto.
Diffstat (limited to 'gdb/ppc-tdep.h')
-rw-r--r--gdb/ppc-tdep.h29
1 files changed, 18 insertions, 11 deletions
diff --git a/gdb/ppc-tdep.h b/gdb/ppc-tdep.h
index 9ed1567c260..8745cb0685f 100644
--- a/gdb/ppc-tdep.h
+++ b/gdb/ppc-tdep.h
@@ -44,16 +44,23 @@ int rs6000_frameless_function_invocation (struct frame_info *);
void rs6000_frame_init_saved_regs (struct frame_info *);
CORE_ADDR rs6000_frame_chain (struct frame_info *);
-/* Some important register numbers. */
-
-#define PPC_GP0_REGNUM 0 /* GPR register 0 */
-#define PPC_GPLAST_REGNUM 31 /* GPR register 31 */
-#define PPC_TOC_REGNUM 2 /* TOC register */
-#define PPC_PS_REGNUM 65 /* Processor (or machine) status (%msr) */
-#define PPC_CR_REGNUM 66 /* Condition register */
-#define PPC_LR_REGNUM 67 /* Link register */
-#define PPC_CTR_REGNUM 68 /* Count register */
-#define PPC_XER_REGNUM 69 /* Integer exception register */
-#define PPC_MQ_REGNUM 70 /* Multiply/Divide extension register */
+/* Private data that this module attaches to struct gdbarch. */
+
+struct gdbarch_tdep
+ {
+ int wordsize; /* size in bytes of fixed-point word */
+ int osabi; /* OS / ABI from ELF header */
+ int *regoff; /* byte offsets in register arrays */
+ const struct reg *regs; /* from current variant */
+ int ppc_gp0_regnum; /* GPR register 0 */
+ int ppc_gplast_regnum; /* GPR register 31 */
+ int ppc_toc_regnum; /* TOC register */
+ int ppc_ps_regnum; /* Processor (or machine) status (%msr) */
+ int ppc_cr_regnum; /* Condition register */
+ int ppc_lr_regnum; /* Link register */
+ int ppc_ctr_regnum; /* Count register */
+ int ppc_xer_regnum; /* Integer exception register */
+ int ppc_mq_regnum; /* Multiply/Divide extension register */
+};
#endif