aboutsummaryrefslogtreecommitdiff
path: root/gdb/dwarf2loc.c
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 /gdb/dwarf2loc.c
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.
Diffstat (limited to 'gdb/dwarf2loc.c')
-rw-r--r--gdb/dwarf2loc.c15
1 files changed, 7 insertions, 8 deletions
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));