diff options
-rw-r--r-- | gdb/ChangeLog | 29 | ||||
-rw-r--r-- | gdb/amd64-tdep.c | 2 | ||||
-rw-r--r-- | gdb/arch-utils.c | 2 | ||||
-rw-r--r-- | gdb/arch-utils.h | 2 | ||||
-rw-r--r-- | gdb/arm-tdep.c | 2 | ||||
-rw-r--r-- | gdb/cris-tdep.c | 2 | ||||
-rw-r--r-- | gdb/gdbarch.c | 20 | ||||
-rw-r--r-- | gdb/gdbarch.h | 10 | ||||
-rwxr-xr-x | gdb/gdbarch.sh | 10 | ||||
-rw-r--r-- | gdb/h8300-tdep.c | 4 | ||||
-rw-r--r-- | gdb/hppa-tdep.c | 2 | ||||
-rw-r--r-- | gdb/i386-tdep.c | 12 | ||||
-rw-r--r-- | gdb/ia64-tdep.c | 2 | ||||
-rw-r--r-- | gdb/m32c-tdep.c | 4 | ||||
-rw-r--r-- | gdb/m68k-tdep.c | 7 | ||||
-rw-r--r-- | gdb/mep-tdep.c | 2 | ||||
-rw-r--r-- | gdb/mips-tdep.c | 26 | ||||
-rw-r--r-- | gdb/rs6000-tdep.c | 8 | ||||
-rw-r--r-- | gdb/s390-tdep.c | 2 | ||||
-rw-r--r-- | gdb/xtensa-tdep.c | 9 |
20 files changed, 90 insertions, 67 deletions
diff --git a/gdb/ChangeLog b/gdb/ChangeLog index 739b286..deed0a2 100644 --- a/gdb/ChangeLog +++ b/gdb/ChangeLog @@ -1,3 +1,32 @@ +2007-12-06 Markus Deuling <deuling@de.ibm.com> + + * gdbarch.sh (stab_reg_to_regnum, dwarf_reg_to_regnum) + ( dwarf2_reg_to_regnum, sdb_reg_to_regnum, ecoff_reg_to_regnum): Add + gdbarch as parameter. + * gdbarch.{c,h}: Regenerate. + + * xtensa-tdep.c (xtensa_reg_to_regnum): Add gdbarch as parameter. + Replace current_gdbarch by gdbarch. + * s390-tdep.c (s390_dwarf_reg_to_regnum): Likewise. + * rs6000-tdep.c (rs6000_stab_reg_to_regnum) + (rs6000_dwarf2_reg_to_regnum): Likewise. + * mips-tdep.c (mips_stab_reg_to_regnum) + (mips_dwarf_dwarf2_ecoff_reg_to_regnum): Likewise. + * mep-tdep.c (mep_debug_reg_to_regnum): Likewise. + * m32c-tdep.c (m32c_debug_info_reg_to_regnum): Likewise. + * i386-tdep.c (i386_dbx_reg_to_regnum) + (i386_svr4_reg_to_regnum): Likewise + * h8300-tdep.c (h8300s_dbg_reg_to_regnum) + (h8300_dbg_reg_to_regnum): Likewise. + * amd64-tdep.c (amd64_dwarf_reg_to_regnum): Likewise. + * arch-utils.c (no_op_reg_to_regnum): Likewise. + * arch-utils.h (no_op_reg_to_regnum): Likewise. + * arm-tdep.c (arm_dwarf_reg_to_regnum): Likewise. + * cris-tdep.c (cris_dwarf2_reg_to_regnum): Likewise. + * hppa-tdep.c (hppa64_dwarf_reg_to_regnum): Likewise. + * ia64-tdep.c (ia64_dwarf_reg_to_regnum): Likewise. + * m68k-tdep.c (m68k_dwarf_reg_to_regnum): Likewise. + 2007-12-06 Vladimir Prus <vladimir@codesourcery.com> Localize infrun use of remove_breakpoints. diff --git a/gdb/amd64-tdep.c b/gdb/amd64-tdep.c index b03320e..213f2d9 100644 --- a/gdb/amd64-tdep.c +++ b/gdb/amd64-tdep.c @@ -187,7 +187,7 @@ static const int amd64_dwarf_regmap_len = number used by GDB. */ static int -amd64_dwarf_reg_to_regnum (int reg) +amd64_dwarf_reg_to_regnum (struct gdbarch *gdbarch, int reg) { int regnum = -1; diff --git a/gdb/arch-utils.c b/gdb/arch-utils.c index 17d3ee7..eb6fb60 100644 --- a/gdb/arch-utils.c +++ b/gdb/arch-utils.c @@ -107,7 +107,7 @@ convert_from_func_ptr_addr_identity (struct gdbarch *gdbarch, CORE_ADDR addr, } int -no_op_reg_to_regnum (int reg) +no_op_reg_to_regnum (struct gdbarch *gdbarch, int reg) { return reg; } diff --git a/gdb/arch-utils.h b/gdb/arch-utils.h index 0cb3c1e..e7d29e0 100644 --- a/gdb/arch-utils.h +++ b/gdb/arch-utils.h @@ -41,7 +41,7 @@ extern gdbarch_convert_from_func_ptr_addr_ftype convert_from_func_ptr_addr_ident /* No-op conversion of reg to regnum. */ -extern int no_op_reg_to_regnum (int reg); +extern int no_op_reg_to_regnum (struct gdbarch *gdbarch, int reg); /* Do nothing version of elf_make_msymbol_special. */ diff --git a/gdb/arm-tdep.c b/gdb/arm-tdep.c index 1321dfc..db68a31 100644 --- a/gdb/arm-tdep.c +++ b/gdb/arm-tdep.c @@ -1430,7 +1430,7 @@ arm_register_type (struct gdbarch *gdbarch, int regnum) number. */ static int -arm_dwarf_reg_to_regnum (int reg) +arm_dwarf_reg_to_regnum (struct gdbarch *gdbarch, int reg) { /* Core integer regs. */ if (reg >= 0 && reg <= 15) diff --git a/gdb/cris-tdep.c b/gdb/cris-tdep.c index 9e560cf..c0b814c 100644 --- a/gdb/cris-tdep.c +++ b/gdb/cris-tdep.c @@ -1847,7 +1847,7 @@ crisv32_register_name (struct gdbarch *gdbarch, int regno) number used by GDB. */ static int -cris_dwarf2_reg_to_regnum (int reg) +cris_dwarf2_reg_to_regnum (struct gdbarch *gdbarch, int reg) { /* We need to re-map a couple of registers (SRP is 16 in Dwarf-2 register numbering, MOF is 18). diff --git a/gdb/gdbarch.c b/gdb/gdbarch.c index bfde685..1f3afdd 100644 --- a/gdb/gdbarch.c +++ b/gdb/gdbarch.c @@ -275,11 +275,11 @@ struct gdbarch startup_gdbarch = -1, /* pc_regnum */ -1, /* ps_regnum */ 0, /* fp0_regnum */ - 0, /* stab_reg_to_regnum */ - 0, /* ecoff_reg_to_regnum */ - 0, /* dwarf_reg_to_regnum */ - 0, /* sdb_reg_to_regnum */ - 0, /* dwarf2_reg_to_regnum */ + no_op_reg_to_regnum, /* stab_reg_to_regnum */ + no_op_reg_to_regnum, /* ecoff_reg_to_regnum */ + no_op_reg_to_regnum, /* dwarf_reg_to_regnum */ + no_op_reg_to_regnum, /* sdb_reg_to_regnum */ + no_op_reg_to_regnum, /* dwarf2_reg_to_regnum */ 0, /* register_name */ 0, /* register_type */ 0, /* unwind_dummy_id */ @@ -1502,7 +1502,7 @@ gdbarch_stab_reg_to_regnum (struct gdbarch *gdbarch, int stab_regnr) gdb_assert (gdbarch->stab_reg_to_regnum != NULL); if (gdbarch_debug >= 2) fprintf_unfiltered (gdb_stdlog, "gdbarch_stab_reg_to_regnum called\n"); - return gdbarch->stab_reg_to_regnum (stab_regnr); + return gdbarch->stab_reg_to_regnum (gdbarch, stab_regnr); } void @@ -1519,7 +1519,7 @@ gdbarch_ecoff_reg_to_regnum (struct gdbarch *gdbarch, int ecoff_regnr) gdb_assert (gdbarch->ecoff_reg_to_regnum != NULL); if (gdbarch_debug >= 2) fprintf_unfiltered (gdb_stdlog, "gdbarch_ecoff_reg_to_regnum called\n"); - return gdbarch->ecoff_reg_to_regnum (ecoff_regnr); + return gdbarch->ecoff_reg_to_regnum (gdbarch, ecoff_regnr); } void @@ -1536,7 +1536,7 @@ gdbarch_dwarf_reg_to_regnum (struct gdbarch *gdbarch, int dwarf_regnr) gdb_assert (gdbarch->dwarf_reg_to_regnum != NULL); if (gdbarch_debug >= 2) fprintf_unfiltered (gdb_stdlog, "gdbarch_dwarf_reg_to_regnum called\n"); - return gdbarch->dwarf_reg_to_regnum (dwarf_regnr); + return gdbarch->dwarf_reg_to_regnum (gdbarch, dwarf_regnr); } void @@ -1553,7 +1553,7 @@ gdbarch_sdb_reg_to_regnum (struct gdbarch *gdbarch, int sdb_regnr) gdb_assert (gdbarch->sdb_reg_to_regnum != NULL); if (gdbarch_debug >= 2) fprintf_unfiltered (gdb_stdlog, "gdbarch_sdb_reg_to_regnum called\n"); - return gdbarch->sdb_reg_to_regnum (sdb_regnr); + return gdbarch->sdb_reg_to_regnum (gdbarch, sdb_regnr); } void @@ -1570,7 +1570,7 @@ gdbarch_dwarf2_reg_to_regnum (struct gdbarch *gdbarch, int dwarf2_regnr) gdb_assert (gdbarch->dwarf2_reg_to_regnum != NULL); if (gdbarch_debug >= 2) fprintf_unfiltered (gdb_stdlog, "gdbarch_dwarf2_reg_to_regnum called\n"); - return gdbarch->dwarf2_reg_to_regnum (dwarf2_regnr); + return gdbarch->dwarf2_reg_to_regnum (gdbarch, dwarf2_regnr); } void diff --git a/gdb/gdbarch.h b/gdb/gdbarch.h index 0a62bfc..da5d617 100644 --- a/gdb/gdbarch.h +++ b/gdb/gdbarch.h @@ -206,29 +206,29 @@ extern void set_gdbarch_fp0_regnum (struct gdbarch *gdbarch, int fp0_regnum); /* Convert stab register number (from `r' declaration) to a gdb REGNUM. */ -typedef int (gdbarch_stab_reg_to_regnum_ftype) (int stab_regnr); +typedef int (gdbarch_stab_reg_to_regnum_ftype) (struct gdbarch *gdbarch, int stab_regnr); extern int gdbarch_stab_reg_to_regnum (struct gdbarch *gdbarch, int stab_regnr); extern void set_gdbarch_stab_reg_to_regnum (struct gdbarch *gdbarch, gdbarch_stab_reg_to_regnum_ftype *stab_reg_to_regnum); /* Provide a default mapping from a ecoff register number to a gdb REGNUM. */ -typedef int (gdbarch_ecoff_reg_to_regnum_ftype) (int ecoff_regnr); +typedef int (gdbarch_ecoff_reg_to_regnum_ftype) (struct gdbarch *gdbarch, int ecoff_regnr); extern int gdbarch_ecoff_reg_to_regnum (struct gdbarch *gdbarch, int ecoff_regnr); extern void set_gdbarch_ecoff_reg_to_regnum (struct gdbarch *gdbarch, gdbarch_ecoff_reg_to_regnum_ftype *ecoff_reg_to_regnum); /* Provide a default mapping from a DWARF register number to a gdb REGNUM. */ -typedef int (gdbarch_dwarf_reg_to_regnum_ftype) (int dwarf_regnr); +typedef int (gdbarch_dwarf_reg_to_regnum_ftype) (struct gdbarch *gdbarch, int dwarf_regnr); extern int gdbarch_dwarf_reg_to_regnum (struct gdbarch *gdbarch, int dwarf_regnr); extern void set_gdbarch_dwarf_reg_to_regnum (struct gdbarch *gdbarch, gdbarch_dwarf_reg_to_regnum_ftype *dwarf_reg_to_regnum); /* Convert from an sdb register number to an internal gdb register number. */ -typedef int (gdbarch_sdb_reg_to_regnum_ftype) (int sdb_regnr); +typedef int (gdbarch_sdb_reg_to_regnum_ftype) (struct gdbarch *gdbarch, int sdb_regnr); extern int gdbarch_sdb_reg_to_regnum (struct gdbarch *gdbarch, int sdb_regnr); extern void set_gdbarch_sdb_reg_to_regnum (struct gdbarch *gdbarch, gdbarch_sdb_reg_to_regnum_ftype *sdb_reg_to_regnum); -typedef int (gdbarch_dwarf2_reg_to_regnum_ftype) (int dwarf2_regnr); +typedef int (gdbarch_dwarf2_reg_to_regnum_ftype) (struct gdbarch *gdbarch, int dwarf2_regnr); extern int gdbarch_dwarf2_reg_to_regnum (struct gdbarch *gdbarch, int dwarf2_regnr); extern void set_gdbarch_dwarf2_reg_to_regnum (struct gdbarch *gdbarch, gdbarch_dwarf2_reg_to_regnum_ftype *dwarf2_reg_to_regnum); diff --git a/gdb/gdbarch.sh b/gdb/gdbarch.sh index a241675..75a5359 100755 --- a/gdb/gdbarch.sh +++ b/gdb/gdbarch.sh @@ -413,14 +413,14 @@ v:int:pc_regnum:::-1:-1::0 v:int:ps_regnum:::-1:-1::0 v:int:fp0_regnum:::0:-1::0 # Convert stab register number (from \`r\' declaration) to a gdb REGNUM. -f:int:stab_reg_to_regnum:int stab_regnr:stab_regnr::no_op_reg_to_regnum::0 +m:int:stab_reg_to_regnum:int stab_regnr:stab_regnr::no_op_reg_to_regnum::0 # Provide a default mapping from a ecoff register number to a gdb REGNUM. -f:int:ecoff_reg_to_regnum:int ecoff_regnr:ecoff_regnr::no_op_reg_to_regnum::0 +m:int:ecoff_reg_to_regnum:int ecoff_regnr:ecoff_regnr::no_op_reg_to_regnum::0 # Provide a default mapping from a DWARF register number to a gdb REGNUM. -f:int:dwarf_reg_to_regnum:int dwarf_regnr:dwarf_regnr::no_op_reg_to_regnum::0 +m:int:dwarf_reg_to_regnum:int dwarf_regnr:dwarf_regnr::no_op_reg_to_regnum::0 # Convert from an sdb register number to an internal gdb register number. -f:int:sdb_reg_to_regnum:int sdb_regnr:sdb_regnr::no_op_reg_to_regnum::0 -f:int:dwarf2_reg_to_regnum:int dwarf2_regnr:dwarf2_regnr::no_op_reg_to_regnum::0 +m:int:sdb_reg_to_regnum:int sdb_regnr:sdb_regnr::no_op_reg_to_regnum::0 +m:int:dwarf2_reg_to_regnum:int dwarf2_regnr:dwarf2_regnr::no_op_reg_to_regnum::0 m:const char *:register_name:int regnr:regnr::0 # Return the type of a register specified by the architecture. Only diff --git a/gdb/h8300-tdep.c b/gdb/h8300-tdep.c index b83994a..cbef625 100644 --- a/gdb/h8300-tdep.c +++ b/gdb/h8300-tdep.c @@ -1175,7 +1175,7 @@ h8300_pseudo_register_write (struct gdbarch *gdbarch, } static int -h8300_dbg_reg_to_regnum (int regno) +h8300_dbg_reg_to_regnum (struct gdbarch *gdbarch, int regno) { if (regno == E_CCR_REGNUM) return E_PSEUDO_CCR_REGNUM; @@ -1183,7 +1183,7 @@ h8300_dbg_reg_to_regnum (int regno) } static int -h8300s_dbg_reg_to_regnum (int regno) +h8300s_dbg_reg_to_regnum (struct gdbarch *gdbarch, int regno) { if (regno == E_CCR_REGNUM) return E_PSEUDO_CCR_REGNUM; diff --git a/gdb/hppa-tdep.c b/gdb/hppa-tdep.c index a484ac8..f6bc4fc 100644 --- a/gdb/hppa-tdep.c +++ b/gdb/hppa-tdep.c @@ -659,7 +659,7 @@ hppa64_register_name (struct gdbarch *gdbarch, int i) } static int -hppa64_dwarf_reg_to_regnum (int reg) +hppa64_dwarf_reg_to_regnum (struct gdbarch *gdbarch, int reg) { /* r0-r31 and sar map one-to-one. */ if (reg <= 32) diff --git a/gdb/i386-tdep.c b/gdb/i386-tdep.c index 710a01b..d1b43d3 100644 --- a/gdb/i386-tdep.c +++ b/gdb/i386-tdep.c @@ -167,7 +167,7 @@ i386_register_name (struct gdbarch *gdbarch, int regnum) number used by GDB. */ static int -i386_dbx_reg_to_regnum (int reg) +i386_dbx_reg_to_regnum (struct gdbarch *gdbarch, int reg) { /* This implements what GCC calls the "default" register map (dbx_register_map[]). */ @@ -199,15 +199,14 @@ i386_dbx_reg_to_regnum (int reg) } /* This will hopefully provoke a warning. */ - return gdbarch_num_regs (current_gdbarch) - + gdbarch_num_pseudo_regs (current_gdbarch); + return gdbarch_num_regs (gdbarch) + gdbarch_num_pseudo_regs (gdbarch); } /* Convert SVR4 register number REG to the appropriate register number used by GDB. */ static int -i386_svr4_reg_to_regnum (int reg) +i386_svr4_reg_to_regnum (struct gdbarch *gdbarch, int reg) { /* This implements the GCC register map that tries to be compatible with the SVR4 C compiler for DWARF (svr4_dbx_register_map[]). */ @@ -227,7 +226,7 @@ i386_svr4_reg_to_regnum (int reg) else if (reg >= 21 && reg <= 36) { /* The SSE and MMX registers have the same numbers as with dbx. */ - return i386_dbx_reg_to_regnum (reg); + return i386_dbx_reg_to_regnum (gdbarch, reg); } switch (reg) @@ -244,8 +243,7 @@ i386_svr4_reg_to_regnum (int reg) } /* This will hopefully provoke a warning. */ - return gdbarch_num_regs (current_gdbarch) - + gdbarch_num_pseudo_regs (current_gdbarch); + return gdbarch_num_regs (gdbarch) + gdbarch_num_pseudo_regs (gdbarch); } #undef I387_ST0_REGNUM diff --git a/gdb/ia64-tdep.c b/gdb/ia64-tdep.c index 1d6743a..dd36ade 100644 --- a/gdb/ia64-tdep.c +++ b/gdb/ia64-tdep.c @@ -313,7 +313,7 @@ ia64_register_type (struct gdbarch *arch, int reg) } static int -ia64_dwarf_reg_to_regnum (int reg) +ia64_dwarf_reg_to_regnum (struct gdbarch *gdbarch, int reg) { if (reg >= IA64_GR32_REGNUM && reg <= IA64_GR127_REGNUM) return V32_REGNUM + (reg - IA64_GR32_REGNUM); diff --git a/gdb/m32c-tdep.c b/gdb/m32c-tdep.c index 4c8e60e..f8fce63 100644 --- a/gdb/m32c-tdep.c +++ b/gdb/m32c-tdep.c @@ -248,9 +248,9 @@ m32c_register_sim_regno (struct gdbarch *gdbarch, int reg_nr) static int -m32c_debug_info_reg_to_regnum (int reg_nr) +m32c_debug_info_reg_to_regnum (struct gdbarch *gdbarch, int reg_nr) { - struct gdbarch_tdep *tdep = gdbarch_tdep (current_gdbarch); + struct gdbarch_tdep *tdep = gdbarch_tdep (gdbarch); if (0 <= reg_nr && reg_nr <= M32C_MAX_DWARF_REGNUM && tdep->dwarf_regs[reg_nr]) return tdep->dwarf_regs[reg_nr]->num; diff --git a/gdb/m68k-tdep.c b/gdb/m68k-tdep.c index 39b70c5..0fd40bf 100644 --- a/gdb/m68k-tdep.c +++ b/gdb/m68k-tdep.c @@ -527,7 +527,7 @@ m68k_push_dummy_call (struct gdbarch *gdbarch, struct value *function, /* Convert a dwarf or dwarf2 regnumber to a GDB regnum. */ static int -m68k_dwarf_reg_to_regnum (int num) +m68k_dwarf_reg_to_regnum (struct gdbarch *gdbarch, int num) { if (num < 8) /* d0..7 */ @@ -535,15 +535,14 @@ m68k_dwarf_reg_to_regnum (int num) else if (num < 16) /* a0..7 */ return (num - 8) + M68K_A0_REGNUM; - else if (num < 24 && gdbarch_tdep (current_gdbarch)->fpregs_present) + else if (num < 24 && gdbarch_tdep (gdbarch)->fpregs_present) /* fp0..7 */ return (num - 16) + M68K_FP0_REGNUM; else if (num == 25) /* pc */ return M68K_PC_REGNUM; else - return gdbarch_num_regs (current_gdbarch) - + gdbarch_num_pseudo_regs (current_gdbarch); + return gdbarch_num_regs (gdbarch) + gdbarch_num_pseudo_regs (gdbarch); } diff --git a/gdb/mep-tdep.c b/gdb/mep-tdep.c index b6038cc..5e0528c 100644 --- a/gdb/mep-tdep.c +++ b/gdb/mep-tdep.c @@ -785,7 +785,7 @@ mep_init_pseudoregister_maps (void) static int -mep_debug_reg_to_regnum (int debug_reg) +mep_debug_reg_to_regnum (struct gdbarch *gdbarch, int debug_reg) { /* The debug info uses the raw register numbers. */ return mep_raw_to_pseudo[debug_reg]; diff --git a/gdb/mips-tdep.c b/gdb/mips-tdep.c index 8be42fe..d1f360d 100644 --- a/gdb/mips-tdep.c +++ b/gdb/mips-tdep.c @@ -5040,23 +5040,22 @@ mips_skip_trampoline_code (struct frame_info *frame, CORE_ADDR pc) [1 * gdbarch_num_regs .. 2 * gdbarch_num_regs) REGNUM. */ static int -mips_stab_reg_to_regnum (int num) +mips_stab_reg_to_regnum (struct gdbarch *gdbarch, int num) { int regnum; if (num >= 0 && num < 32) regnum = num; else if (num >= 38 && num < 70) - regnum = num + mips_regnum (current_gdbarch)->fp0 - 38; + regnum = num + mips_regnum (gdbarch)->fp0 - 38; else if (num == 70) - regnum = mips_regnum (current_gdbarch)->hi; + regnum = mips_regnum (gdbarch)->hi; else if (num == 71) - regnum = mips_regnum (current_gdbarch)->lo; + regnum = mips_regnum (gdbarch)->lo; else /* This will hopefully (eventually) provoke a warning. Should we be calling complaint() here? */ - return gdbarch_num_regs (current_gdbarch) - + gdbarch_num_pseudo_regs (current_gdbarch); - return gdbarch_num_regs (current_gdbarch) + regnum; + return gdbarch_num_regs (gdbarch) + gdbarch_num_pseudo_regs (gdbarch); + return gdbarch_num_regs (gdbarch) + regnum; } @@ -5064,23 +5063,22 @@ mips_stab_reg_to_regnum (int num) gdbarch_num_regs .. 2 * gdbarch_num_regs) REGNUM. */ static int -mips_dwarf_dwarf2_ecoff_reg_to_regnum (int num) +mips_dwarf_dwarf2_ecoff_reg_to_regnum (struct gdbarch *gdbarch, int num) { int regnum; if (num >= 0 && num < 32) regnum = num; else if (num >= 32 && num < 64) - regnum = num + mips_regnum (current_gdbarch)->fp0 - 32; + regnum = num + mips_regnum (gdbarch)->fp0 - 32; else if (num == 64) - regnum = mips_regnum (current_gdbarch)->hi; + regnum = mips_regnum (gdbarch)->hi; else if (num == 65) - regnum = mips_regnum (current_gdbarch)->lo; + regnum = mips_regnum (gdbarch)->lo; else /* This will hopefully (eventually) provoke a warning. Should we be calling complaint() here? */ - return gdbarch_num_regs (current_gdbarch) - + gdbarch_num_pseudo_regs (current_gdbarch); - return gdbarch_num_regs (current_gdbarch) + regnum; + return gdbarch_num_regs (gdbarch) + gdbarch_num_pseudo_regs (gdbarch); + return gdbarch_num_regs (gdbarch) + regnum; } static int diff --git a/gdb/rs6000-tdep.c b/gdb/rs6000-tdep.c index 2d91825..1f4a6d0 100644 --- a/gdb/rs6000-tdep.c +++ b/gdb/rs6000-tdep.c @@ -2557,9 +2557,9 @@ e500_pseudo_register_write (struct gdbarch *gdbarch, struct regcache *regcache, /* Convert a DBX STABS register number to a GDB register number. */ static int -rs6000_stab_reg_to_regnum (int num) +rs6000_stab_reg_to_regnum (struct gdbarch *gdbarch, int num) { - struct gdbarch_tdep *tdep = gdbarch_tdep (current_gdbarch); + struct gdbarch_tdep *tdep = gdbarch_tdep (gdbarch); if (0 <= num && num <= 31) return tdep->ppc_gp0_regnum + num; @@ -2599,9 +2599,9 @@ rs6000_stab_reg_to_regnum (int num) /* Convert a Dwarf 2 register number to a GDB register number. */ static int -rs6000_dwarf2_reg_to_regnum (int num) +rs6000_dwarf2_reg_to_regnum (struct gdbarch *gdbarch, int num) { - struct gdbarch_tdep *tdep = gdbarch_tdep (current_gdbarch); + struct gdbarch_tdep *tdep = gdbarch_tdep (gdbarch); if (0 <= num && num <= 31) return tdep->ppc_gp0_regnum + num; diff --git a/gdb/s390-tdep.c b/gdb/s390-tdep.c index f8d5ac7..2fed6c0 100644 --- a/gdb/s390-tdep.c +++ b/gdb/s390-tdep.c @@ -147,7 +147,7 @@ static int s390_dwarf_regmap[] = /* Convert DWARF register number REG to the appropriate register number used by GDB. */ static int -s390_dwarf_reg_to_regnum (int reg) +s390_dwarf_reg_to_regnum (struct gdbarch *gdbarch, int reg) { int regnum = -1; diff --git a/gdb/xtensa-tdep.c b/gdb/xtensa-tdep.c index 5b5fdaa..ae62be0 100644 --- a/gdb/xtensa-tdep.c +++ b/gdb/xtensa-tdep.c @@ -303,18 +303,17 @@ xtensa_register_type (struct gdbarch *gdbarch, int regnum) to n for An. So, we only have to add the base number for A0. */ static int -xtensa_reg_to_regnum (int regnum) +xtensa_reg_to_regnum (struct gdbarch *gdbarch, int regnum) { int i; if (regnum >= 0 && regnum < 16) - return gdbarch_tdep (current_gdbarch)->a0_base + regnum; + return gdbarch_tdep (gdbarch)->a0_base + regnum; for (i = 0; - i < gdbarch_num_regs (current_gdbarch) - + gdbarch_num_pseudo_regs (current_gdbarch); + i < gdbarch_num_regs (gdbarch) + gdbarch_num_pseudo_regs (gdbarch); i++) - if (regnum == gdbarch_tdep (current_gdbarch)->regmap[i].target_number) + if (regnum == gdbarch_tdep (gdbarch)->regmap[i].target_number) return i; internal_error (__FILE__, __LINE__, |