aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorUlrich Weigand <uweigand@de.ibm.com>2007-06-12 16:59:43 +0000
committerUlrich Weigand <uweigand@de.ibm.com>2007-06-12 16:59:43 +0000
commit055d23b8abcdb4b33bf0b2f7d0a8ef49b066f060 (patch)
treeef5c37e32b2ae0d817e967593f927cb3204a24c8
parent260edbc2caedd55298a64621088983551dfd208c (diff)
downloadgdb-055d23b8abcdb4b33bf0b2f7d0a8ef49b066f060.zip
gdb-055d23b8abcdb4b33bf0b2f7d0a8ef49b066f060.tar.gz
gdb-055d23b8abcdb4b33bf0b2f7d0a8ef49b066f060.tar.bz2
2007-06-12 Markus Deuling <deuling@de.ibm.com>
* gdbarch.sh (STAB_REG_TO_REGNUM): Replace by gdbarch_stab_reg_to_regnum. * stabsread.c (define_symbol): Likewise. * gdbarch.sh (ECOFF_REG_TO_REGNUM): Replace by gdbarch_ecoff_reg_to_regnum. * mdebugread.c (parse_symbol): Likewise. * i386-tdep.c (i386_gdbarch_init): Likewise (comment). * gdbarch.sh (DWARF_REG_TO_REGNUM): Replace by gdbarch_dwarf_reg_to_regnum. * gdbarch.sh (SDB_REG_TO_REGNUM): Replace by gdbarch_sdb_reg_to_regnum. * coffread.c (process_coff_symbol): Likewise. * gdbarch.sh (DWARF2_REG_TO_REGNUM): Replace by gdbarch_dwarf2_reg_to_regnum. * dwarf2loc.c (dwarf_expr_read_reg,dwarf2_evaluate_loc_desc) (locexpr_describe_location): Likewise. * dwarf2-frame.c (read_reg,execute_cfa_program,dwarf2_frame_cache) (dwarf2_frame_prev_register,dwarf2_signal_frame_this_id): Likewise. * dwarf2loc.c (DWARF2_REG_TO_REGNUM): Remove macro. * dwarf2read.c (DWARF2_REG_TO_REGNUM): Remove macro. * gdbarch.c, gdbarch.h: Regenerate.
-rw-r--r--gdb/ChangeLog23
-rw-r--r--gdb/coffread.c6
-rw-r--r--gdb/dwarf2-frame.c18
-rw-r--r--gdb/dwarf2loc.c15
-rw-r--r--gdb/dwarf2read.c4
-rw-r--r--gdb/gdbarch.c30
-rw-r--r--gdb/gdbarch.h30
-rwxr-xr-xgdb/gdbarch.sh10
-rw-r--r--gdb/i386-tdep.c2
-rw-r--r--gdb/mdebugread.c6
-rw-r--r--gdb/stabsread.c6
11 files changed, 57 insertions, 93 deletions
diff --git a/gdb/ChangeLog b/gdb/ChangeLog
index 63cf287..2409316 100644
--- a/gdb/ChangeLog
+++ b/gdb/ChangeLog
@@ -1,5 +1,28 @@
2007-06-12 Markus Deuling <deuling@de.ibm.com>
+ * gdbarch.sh (STAB_REG_TO_REGNUM): Replace by
+ gdbarch_stab_reg_to_regnum.
+ * stabsread.c (define_symbol): Likewise.
+ * gdbarch.sh (ECOFF_REG_TO_REGNUM): Replace by
+ gdbarch_ecoff_reg_to_regnum.
+ * mdebugread.c (parse_symbol): Likewise.
+ * i386-tdep.c (i386_gdbarch_init): Likewise (comment).
+ * gdbarch.sh (DWARF_REG_TO_REGNUM): Replace by
+ gdbarch_dwarf_reg_to_regnum.
+ * gdbarch.sh (SDB_REG_TO_REGNUM): Replace by gdbarch_sdb_reg_to_regnum.
+ * coffread.c (process_coff_symbol): Likewise.
+ * gdbarch.sh (DWARF2_REG_TO_REGNUM): Replace by
+ gdbarch_dwarf2_reg_to_regnum.
+ * dwarf2loc.c (dwarf_expr_read_reg,dwarf2_evaluate_loc_desc)
+ (locexpr_describe_location): Likewise.
+ * dwarf2-frame.c (read_reg,execute_cfa_program,dwarf2_frame_cache)
+ (dwarf2_frame_prev_register,dwarf2_signal_frame_this_id): Likewise.
+ * dwarf2loc.c (DWARF2_REG_TO_REGNUM): Remove macro.
+ * dwarf2read.c (DWARF2_REG_TO_REGNUM): Remove macro.
+ * gdbarch.c, gdbarch.h: Regenerate.
+
+2007-06-12 Markus Deuling <deuling@de.ibm.com>
+
* gdbarch.sh (SMASH_TEXT_ADDRESS): Replace by
gdbarch_smash_text_address.
* somread.c (som_symtab_read): Likewise.
diff --git a/gdb/coffread.c b/gdb/coffread.c
index b6f1fea..7ff53b7 100644
--- a/gdb/coffread.c
+++ b/gdb/coffread.c
@@ -1549,7 +1549,8 @@ process_coff_symbol (struct coff_symbol *cs,
#endif
case C_REG:
SYMBOL_CLASS (sym) = LOC_REGISTER;
- SYMBOL_VALUE (sym) = SDB_REG_TO_REGNUM (cs->c_value);
+ SYMBOL_VALUE (sym) = gdbarch_sdb_reg_to_regnum
+ (current_gdbarch, cs->c_value);
add_symbol_to_list (sym, &local_symbols);
break;
@@ -1583,7 +1584,8 @@ process_coff_symbol (struct coff_symbol *cs,
case C_REGPARM:
SYMBOL_CLASS (sym) = LOC_REGPARM;
- SYMBOL_VALUE (sym) = SDB_REG_TO_REGNUM (cs->c_value);
+ SYMBOL_VALUE (sym) = gdbarch_sdb_reg_to_regnum
+ (current_gdbarch, cs->c_value);
add_symbol_to_list (sym, &local_symbols);
#if !defined (BELIEVE_PCC_PROMOTION)
/* FIXME: This should retain the current type, since it's just
diff --git a/gdb/dwarf2-frame.c b/gdb/dwarf2-frame.c
index 1bee52f..d2770cb 100644
--- a/gdb/dwarf2-frame.c
+++ b/gdb/dwarf2-frame.c
@@ -237,7 +237,7 @@ read_reg (void *baton, int reg)
int regnum;
gdb_byte *buf;
- regnum = DWARF2_REG_TO_REGNUM (reg);
+ regnum = gdbarch_dwarf2_reg_to_regnum (current_gdbarch, reg);
buf = alloca (register_size (gdbarch, regnum));
frame_unwind_register (next_frame, regnum, buf);
@@ -340,8 +340,10 @@ execute_cfa_program (gdb_byte *insn_ptr, gdb_byte *insn_end,
incomplete CFI data; DW_CFA_restore unspecified\n\
register %s (#%d) at 0x%s"),
gdbarch_register_name
- (current_gdbarch, DWARF2_REG_TO_REGNUM(reg)),
- DWARF2_REG_TO_REGNUM(reg), paddr (fs->pc));
+ (current_gdbarch, gdbarch_dwarf2_reg_to_regnum
+ (current_gdbarch, reg)),
+ gdbarch_dwarf2_reg_to_regnum (current_gdbarch, reg),
+ paddr (fs->pc));
}
else
{
@@ -901,7 +903,7 @@ dwarf2_frame_cache (struct frame_info *next_frame, void **this_cache)
return address column; it's perfectly all right for it to
correspond to a real register. If it doesn't correspond to a
real register, or if we shouldn't treat it as such,
- DWARF2_REG_TO_REGNUM should be defined to return a number outside
+ gdbarch_dwarf2_reg_to_regnum should be defined to return a number outside
the range [0, gdbarch_num_regs). */
{
int column; /* CFI speak for "register number". */
@@ -909,7 +911,7 @@ dwarf2_frame_cache (struct frame_info *next_frame, void **this_cache)
for (column = 0; column < fs->regs.num_regs; column++)
{
/* Use the GDB register number as the destination index. */
- int regnum = DWARF2_REG_TO_REGNUM (column);
+ int regnum = gdbarch_dwarf2_reg_to_regnum (current_gdbarch, column);
/* If there's no corresponding GDB register, ignore it. */
if (regnum < 0 || regnum >= num_regs)
@@ -1067,7 +1069,8 @@ dwarf2_frame_prev_register (struct frame_info *next_frame, void **this_cache,
*optimizedp = 0;
*lvalp = lval_register;
*addrp = 0;
- *realnump = DWARF2_REG_TO_REGNUM (cache->reg[regnum].loc.reg);
+ *realnump = gdbarch_dwarf2_reg_to_regnum
+ (current_gdbarch, cache->reg[regnum].loc.reg);
if (valuep)
frame_unwind_register (next_frame, (*realnump), valuep);
break;
@@ -1161,7 +1164,8 @@ dwarf2_frame_prev_register (struct frame_info *next_frame, void **this_cache,
{
CORE_ADDR pc = cache->reg[regnum].loc.offset;
- regnum = DWARF2_REG_TO_REGNUM (cache->retaddr_reg.loc.reg);
+ regnum = gdbarch_dwarf2_reg_to_regnum
+ (current_gdbarch, cache->retaddr_reg.loc.reg);
pc += frame_unwind_register_unsigned (next_frame, regnum);
pack_long (valuep, register_type (gdbarch, regnum), pc);
}
diff --git a/gdb/dwarf2loc.c b/gdb/dwarf2loc.c
index 79e120b..320da9f 100644
--- a/gdb/dwarf2loc.c
+++ b/gdb/dwarf2loc.c
@@ -40,10 +40,6 @@
#include "gdb_string.h"
-#ifndef DWARF2_REG_TO_REGNUM
-#define DWARF2_REG_TO_REGNUM(REG) (REG)
-#endif
-
/* A helper function for dealing with location lists. Given a
symbol baton (BATON) and a pc value (PC), find the appropriate
location expression, set *LOCEXPR_LENGTH, and return a pointer
@@ -123,7 +119,7 @@ dwarf_expr_read_reg (void *baton, int dwarf_regnum)
CORE_ADDR result;
int regnum;
- regnum = DWARF2_REG_TO_REGNUM (dwarf_regnum);
+ regnum = gdbarch_dwarf2_reg_to_regnum (current_gdbarch, dwarf_regnum);
result = address_from_register (builtin_type_void_data_ptr,
regnum, debaton->frame);
return result;
@@ -229,7 +225,8 @@ dwarf2_evaluate_loc_desc (struct symbol *var, struct frame_info *frame,
if (p->in_reg)
{
bfd_byte regval[MAX_REGISTER_SIZE];
- int gdb_regnum = DWARF2_REG_TO_REGNUM (p->value);
+ int gdb_regnum = gdbarch_dwarf2_reg_to_regnum
+ (current_gdbarch, p->value);
get_frame_register (frame, gdb_regnum, regval);
memcpy (contents + offset, regval, p->size);
}
@@ -243,7 +240,8 @@ dwarf2_evaluate_loc_desc (struct symbol *var, struct frame_info *frame,
else if (ctx->in_reg)
{
CORE_ADDR dwarf_regnum = dwarf_expr_fetch (ctx, 0);
- int gdb_regnum = DWARF2_REG_TO_REGNUM (dwarf_regnum);
+ int gdb_regnum = gdbarch_dwarf2_reg_to_regnum
+ (current_gdbarch, dwarf_regnum);
retval = value_from_register (SYMBOL_TYPE (var), gdb_regnum, frame);
}
else
@@ -451,7 +449,8 @@ locexpr_describe_location (struct symbol *symbol, struct ui_file *stream)
&& dlbaton->data[0] >= DW_OP_reg0
&& dlbaton->data[0] <= DW_OP_reg31)
{
- int regno = DWARF2_REG_TO_REGNUM (dlbaton->data[0] - DW_OP_reg0);
+ int regno = gdbarch_dwarf2_reg_to_regnum
+ (current_gdbarch, dlbaton->data[0] - DW_OP_reg0);
fprintf_filtered (stream,
"a variable in register %s",
gdbarch_register_name (current_gdbarch, regno));
diff --git a/gdb/dwarf2read.c b/gdb/dwarf2read.c
index 42e50cf..87ef4aa 100644
--- a/gdb/dwarf2read.c
+++ b/gdb/dwarf2read.c
@@ -67,10 +67,6 @@
can be used for any other data associated to the objfile (symbol
names, type names, location expressions to name a few). */
-#ifndef DWARF2_REG_TO_REGNUM
-#define DWARF2_REG_TO_REGNUM(REG) (REG)
-#endif
-
#if 0
/* .debug_info header for a compilation unit
Because of alignment constraints, this structure has padding and cannot
diff --git a/gdb/gdbarch.c b/gdb/gdbarch.c
index bfd1d00..772f0ad 100644
--- a/gdb/gdbarch.c
+++ b/gdb/gdbarch.c
@@ -850,30 +850,12 @@ gdbarch_dump (struct gdbarch *current_gdbarch, struct ui_file *file)
fprintf_unfiltered (file,
"gdbarch_dump: double_format = %s\n",
pformat (current_gdbarch->double_format));
-#ifdef DWARF2_REG_TO_REGNUM
- fprintf_unfiltered (file,
- "gdbarch_dump: %s # %s\n",
- "DWARF2_REG_TO_REGNUM(dwarf2_regnr)",
- XSTRING (DWARF2_REG_TO_REGNUM (dwarf2_regnr)));
-#endif
fprintf_unfiltered (file,
"gdbarch_dump: dwarf2_reg_to_regnum = <0x%lx>\n",
(long) current_gdbarch->dwarf2_reg_to_regnum);
-#ifdef DWARF_REG_TO_REGNUM
- fprintf_unfiltered (file,
- "gdbarch_dump: %s # %s\n",
- "DWARF_REG_TO_REGNUM(dwarf_regnr)",
- XSTRING (DWARF_REG_TO_REGNUM (dwarf_regnr)));
-#endif
fprintf_unfiltered (file,
"gdbarch_dump: dwarf_reg_to_regnum = <0x%lx>\n",
(long) current_gdbarch->dwarf_reg_to_regnum);
-#ifdef ECOFF_REG_TO_REGNUM
- fprintf_unfiltered (file,
- "gdbarch_dump: %s # %s\n",
- "ECOFF_REG_TO_REGNUM(ecoff_regnr)",
- XSTRING (ECOFF_REG_TO_REGNUM (ecoff_regnr)));
-#endif
fprintf_unfiltered (file,
"gdbarch_dump: ecoff_reg_to_regnum = <0x%lx>\n",
(long) current_gdbarch->ecoff_reg_to_regnum);
@@ -1122,12 +1104,6 @@ gdbarch_dump (struct gdbarch *current_gdbarch, struct ui_file *file)
fprintf_unfiltered (file,
"gdbarch_dump: return_value = <0x%lx>\n",
(long) current_gdbarch->return_value);
-#ifdef SDB_REG_TO_REGNUM
- fprintf_unfiltered (file,
- "gdbarch_dump: %s # %s\n",
- "SDB_REG_TO_REGNUM(sdb_regnr)",
- XSTRING (SDB_REG_TO_REGNUM (sdb_regnr)));
-#endif
fprintf_unfiltered (file,
"gdbarch_dump: sdb_reg_to_regnum = <0x%lx>\n",
(long) current_gdbarch->sdb_reg_to_regnum);
@@ -1184,12 +1160,6 @@ gdbarch_dump (struct gdbarch *current_gdbarch, struct ui_file *file)
fprintf_unfiltered (file,
"gdbarch_dump: sp_regnum = %s\n",
paddr_d (current_gdbarch->sp_regnum));
-#ifdef STAB_REG_TO_REGNUM
- fprintf_unfiltered (file,
- "gdbarch_dump: %s # %s\n",
- "STAB_REG_TO_REGNUM(stab_regnr)",
- XSTRING (STAB_REG_TO_REGNUM (stab_regnr)));
-#endif
fprintf_unfiltered (file,
"gdbarch_dump: stab_reg_to_regnum = <0x%lx>\n",
(long) current_gdbarch->stab_reg_to_regnum);
diff --git a/gdb/gdbarch.h b/gdb/gdbarch.h
index b0a6bde..ef60ead 100644
--- a/gdb/gdbarch.h
+++ b/gdb/gdbarch.h
@@ -287,58 +287,28 @@ extern void set_gdbarch_fp0_regnum (struct gdbarch *gdbarch, int fp0_regnum);
typedef int (gdbarch_stab_reg_to_regnum_ftype) (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);
-#if !defined (GDB_TM_FILE) && defined (STAB_REG_TO_REGNUM)
-#error "Non multi-arch definition of STAB_REG_TO_REGNUM"
-#endif
-#if !defined (STAB_REG_TO_REGNUM)
-#define STAB_REG_TO_REGNUM(stab_regnr) (gdbarch_stab_reg_to_regnum (current_gdbarch, stab_regnr))
-#endif
/* Provide a default mapping from a ecoff register number to a gdb REGNUM. */
typedef int (gdbarch_ecoff_reg_to_regnum_ftype) (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);
-#if !defined (GDB_TM_FILE) && defined (ECOFF_REG_TO_REGNUM)
-#error "Non multi-arch definition of ECOFF_REG_TO_REGNUM"
-#endif
-#if !defined (ECOFF_REG_TO_REGNUM)
-#define ECOFF_REG_TO_REGNUM(ecoff_regnr) (gdbarch_ecoff_reg_to_regnum (current_gdbarch, ecoff_regnr))
-#endif
/* Provide a default mapping from a DWARF register number to a gdb REGNUM. */
typedef int (gdbarch_dwarf_reg_to_regnum_ftype) (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);
-#if !defined (GDB_TM_FILE) && defined (DWARF_REG_TO_REGNUM)
-#error "Non multi-arch definition of DWARF_REG_TO_REGNUM"
-#endif
-#if !defined (DWARF_REG_TO_REGNUM)
-#define DWARF_REG_TO_REGNUM(dwarf_regnr) (gdbarch_dwarf_reg_to_regnum (current_gdbarch, dwarf_regnr))
-#endif
/* Convert from an sdb register number to an internal gdb register number. */
typedef int (gdbarch_sdb_reg_to_regnum_ftype) (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);
-#if !defined (GDB_TM_FILE) && defined (SDB_REG_TO_REGNUM)
-#error "Non multi-arch definition of SDB_REG_TO_REGNUM"
-#endif
-#if !defined (SDB_REG_TO_REGNUM)
-#define SDB_REG_TO_REGNUM(sdb_regnr) (gdbarch_sdb_reg_to_regnum (current_gdbarch, sdb_regnr))
-#endif
typedef int (gdbarch_dwarf2_reg_to_regnum_ftype) (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);
-#if !defined (GDB_TM_FILE) && defined (DWARF2_REG_TO_REGNUM)
-#error "Non multi-arch definition of DWARF2_REG_TO_REGNUM"
-#endif
-#if !defined (DWARF2_REG_TO_REGNUM)
-#define DWARF2_REG_TO_REGNUM(dwarf2_regnr) (gdbarch_dwarf2_reg_to_regnum (current_gdbarch, dwarf2_regnr))
-#endif
typedef const char * (gdbarch_register_name_ftype) (int regnr);
extern const char * gdbarch_register_name (struct gdbarch *gdbarch, int regnr);
diff --git a/gdb/gdbarch.sh b/gdb/gdbarch.sh
index 425c32c..f4d4a78 100755
--- a/gdb/gdbarch.sh
+++ b/gdb/gdbarch.sh
@@ -446,14 +446,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
+f::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
+f::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
+f::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
+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
f::const char *:register_name:int regnr:regnr
# Return the type of a register specified by the architecture. Only
diff --git a/gdb/i386-tdep.c b/gdb/i386-tdep.c
index c55d840..456a2ea 100644
--- a/gdb/i386-tdep.c
+++ b/gdb/i386-tdep.c
@@ -2382,7 +2382,7 @@ i386_gdbarch_init (struct gdbarch_info info, struct gdbarch_list *arches)
set_gdbarch_dwarf_reg_to_regnum (gdbarch, i386_svr4_reg_to_regnum);
set_gdbarch_dwarf2_reg_to_regnum (gdbarch, i386_svr4_reg_to_regnum);
- /* We don't define ECOFF_REG_TO_REGNUM, since ECOFF doesn't seem to
+ /* We don't set gdbarch_stab_reg_to_regnum, since ECOFF doesn't seem to
be in use on any of the supported i386 targets. */
set_gdbarch_print_float_info (gdbarch, i387_print_float_info);
diff --git a/gdb/mdebugread.c b/gdb/mdebugread.c
index 67c49e5..8fade1e 100644
--- a/gdb/mdebugread.c
+++ b/gdb/mdebugread.c
@@ -644,7 +644,7 @@ parse_symbol (SYMR *sh, union aux_ext *ax, char *ext_sh, int bigend,
if (sh->sc == scRegister)
{
class = LOC_REGISTER;
- svalue = ECOFF_REG_TO_REGNUM (svalue);
+ svalue = gdbarch_ecoff_reg_to_regnum (current_gdbarch, svalue);
}
else
class = LOC_LOCAL;
@@ -682,7 +682,7 @@ parse_symbol (SYMR *sh, union aux_ext *ax, char *ext_sh, int bigend,
case scRegister:
/* Pass by value in register. */
SYMBOL_CLASS (s) = LOC_REGPARM;
- svalue = ECOFF_REG_TO_REGNUM (svalue);
+ svalue = gdbarch_ecoff_reg_to_regnum (current_gdbarch, svalue);
break;
case scVar:
/* Pass by reference on stack. */
@@ -691,7 +691,7 @@ parse_symbol (SYMR *sh, union aux_ext *ax, char *ext_sh, int bigend,
case scVarRegister:
/* Pass by reference in register. */
SYMBOL_CLASS (s) = LOC_REGPARM_ADDR;
- svalue = ECOFF_REG_TO_REGNUM (svalue);
+ svalue = gdbarch_ecoff_reg_to_regnum (current_gdbarch, svalue);
break;
default:
/* Pass by value on stack. */
diff --git a/gdb/stabsread.c b/gdb/stabsread.c
index 75bb5f0..79d4acc 100644
--- a/gdb/stabsread.c
+++ b/gdb/stabsread.c
@@ -1022,7 +1022,7 @@ define_symbol (CORE_ADDR valu, char *string, int desc, int type,
/* Parameter which is in a register. */
SYMBOL_TYPE (sym) = read_type (&p, objfile);
SYMBOL_CLASS (sym) = LOC_REGPARM;
- SYMBOL_VALUE (sym) = STAB_REG_TO_REGNUM (valu);
+ SYMBOL_VALUE (sym) = gdbarch_stab_reg_to_regnum (current_gdbarch, valu);
if (SYMBOL_VALUE (sym) >= gdbarch_num_regs (current_gdbarch)
+ gdbarch_num_pseudo_regs (current_gdbarch))
{
@@ -1040,7 +1040,7 @@ define_symbol (CORE_ADDR valu, char *string, int desc, int type,
/* Register variable (either global or local). */
SYMBOL_TYPE (sym) = read_type (&p, objfile);
SYMBOL_CLASS (sym) = LOC_REGISTER;
- SYMBOL_VALUE (sym) = STAB_REG_TO_REGNUM (valu);
+ SYMBOL_VALUE (sym) = gdbarch_stab_reg_to_regnum (current_gdbarch, valu);
if (SYMBOL_VALUE (sym) >= gdbarch_num_regs (current_gdbarch)
+ gdbarch_num_pseudo_regs (current_gdbarch))
{
@@ -1314,7 +1314,7 @@ define_symbol (CORE_ADDR valu, char *string, int desc, int type,
/* Reference parameter which is in a register. */
SYMBOL_TYPE (sym) = read_type (&p, objfile);
SYMBOL_CLASS (sym) = LOC_REGPARM_ADDR;
- SYMBOL_VALUE (sym) = STAB_REG_TO_REGNUM (valu);
+ SYMBOL_VALUE (sym) = gdbarch_stab_reg_to_regnum (current_gdbarch, valu);
if (SYMBOL_VALUE (sym) >= gdbarch_num_regs (current_gdbarch)
+ gdbarch_num_pseudo_regs (current_gdbarch))
{