mirror of
https://github.com/bminor/binutils-gdb.git
synced 2025-12-25 16:57:52 +00:00
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.
This commit is contained in:
@@ -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);
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user