aboutsummaryrefslogtreecommitdiff
path: root/gdb/sh3-rom.c
diff options
context:
space:
mode:
authorElena Zannoni <ezannoni@kwikemart.cygnus.com>2000-07-19 14:11:42 +0000
committerElena Zannoni <ezannoni@kwikemart.cygnus.com>2000-07-19 14:11:42 +0000
commitcc17453a58ec28aaf09575e2554f41221ea160ca (patch)
treef0e508fae551a1fb50759fc70ea13bb46046e914 /gdb/sh3-rom.c
parent25a8b2508dbb81c6302063d379cbcb336d4d4fb5 (diff)
downloadgdb-cc17453a58ec28aaf09575e2554f41221ea160ca.zip
gdb-cc17453a58ec28aaf09575e2554f41221ea160ca.tar.gz
gdb-cc17453a58ec28aaf09575e2554f41221ea160ca.tar.bz2
2000-07-19 Elena Zannoni <ezannoni@kwikemart.cygnus.com>
Multiarch the sh target. * sh-tdep.c: (sh_generic_reg_names, sh_reg_names,sh3_reg_names, sh3e_reg_names, sh_dsp_reg_names, sh3_dsp_reg_names, sh_processor_type_table): Remove. (XMALLOC): Define. (struct frame_extra_info): Define. (sh_register_raw_size, sh_register_virtual_size, sh_register_virtual_type, sh_register_byte, sh_breakpoint_from_pc, sh_frame_saved_pc, sh_skip_prologue, sh_nofp_frame_init_saved_regs, sh_fp_frame_init_saved_regs, sh_extract_struct_value_address, sh_use_struct_convention, sh_store_struct_return, sh_push_arguments, sh_push_return_address, sh_saved_pc_after_call, sh_generic_register_name, sh_sh_register_name, sh_sh3_register_name, sh_sh3e_register_name, sh_sh_dsp_register_name, sh_sh3_dsp_register_name, sh_frame_args_address, sh_frame_locals_address, sh_coerce_float_to_double, sh_default_store_return_value, sh3e_sh4_store_return_value, sh_generic_show_regs, sh3_show_regs,sh3e_show_regs, sh3_dsp_show_regs, sh4_show_regs, sh_dsp_show_regs, sh_register_byte, sh_register_raw_size, sh_register_virtual_size, sh_sh3e_register_virtual_type, sh_default_register_virtual_type, sh_gdbarch_init): New functions. (sh_target_architecture_hook, sh_frame_find_saved_regs, sh_show_regs): Delete functions. (sh_frame_chain, sh_find_callers_reg, sh_init_extra_frame_info, sh_pop_frame, sh_extract_return_value): Update * config/sh/tm-sh.h (GDB_MULTI_ARCH): Define to 1. (struct gdbarch_tdep): Define. Remove all unnecessary defines. * remote-e7000.c ({PR,GBR,SR,MACL,VBR,MACH}_REGNUM): Define to -1, for h8300 case. (want_sh,want_nopc_sh,want_nopc_sh3): Make nomenclature consistent. (e7000_fetch_registers): Remove ifdef GDB_TARGET_IS_SH, use runtime check instead. (e7000_wait): Ditto. * sh3-rom.c (sh3_supply_register): Use gdbarch_tdep to get the SSR and SPC register numbers. (sh3_regnames, sh3e_regnames): Don't specify a size. * config/h8300/tm-h8300.h: Add comment.
Diffstat (limited to 'gdb/sh3-rom.c')
-rw-r--r--gdb/sh3-rom.c8
1 files changed, 4 insertions, 4 deletions
diff --git a/gdb/sh3-rom.c b/gdb/sh3-rom.c
index 030452c..825f8e9 100644
--- a/gdb/sh3-rom.c
+++ b/gdb/sh3-rom.c
@@ -76,9 +76,9 @@ sh3_supply_register (regname, regnamelen, val, vallen)
break;
case 'S':
if (regname[1] == 'S' && regname[2] == 'R')
- regno = SSR_REGNUM;
+ regno = gdbarch_tdep (current_gdbarch)->SSR_REGNUM;
else if (regname[1] == 'P' && regname[2] == 'C')
- regno = SPC_REGNUM;
+ regno = gdbarch_tdep (current_gdbarch)->SPC_REGNUM;
break;
}
}
@@ -153,7 +153,7 @@ sh3_load (desc, file, hashmark)
than does GDB, and don't necessarily support all the registers
either. So, typing "info reg sp" becomes a "r30". */
-static char *sh3_regnames[NUM_REGS] =
+static char *sh3_regnames[] =
{
"R0", "R1", "R2", "R3", "R4", "R5", "R6", "R7",
"R8", "R9", "R10", "R11", "R12", "R13", "R14", "R15",
@@ -168,7 +168,7 @@ static char *sh3_regnames[NUM_REGS] =
"R4_BANK1", "R5_BANK1", "R6_BANK1", "R7_BANK1"
};
-static char *sh3e_regnames[NUM_REGS] =
+static char *sh3e_regnames[] =
{
"R0", "R1", "R2", "R3", "R4", "R5", "R6", "R7",
"R8", "R9", "R10", "R11", "R12", "R13", "R14", "R15",