diff options
author | Ulrich Weigand <uweigand@de.ibm.com> | 2009-06-04 12:28:39 +0000 |
---|---|---|
committer | Ulrich Weigand <uweigand@de.ibm.com> | 2009-06-04 12:28:39 +0000 |
commit | 768a979c31bbe51154e3363c1061c45aa9cd937f (patch) | |
tree | 8c5f21f3ae813fe4193b79e851fa6bef842f0d1c /gdb/coffread.c | |
parent | e36aef42209e57273a78919b81cc7ae62d32107a (diff) | |
download | gdb-768a979c31bbe51154e3363c1061c45aa9cd937f.zip gdb-768a979c31bbe51154e3363c1061c45aa9cd937f.tar.gz gdb-768a979c31bbe51154e3363c1061c45aa9cd937f.tar.bz2 |
* symtab.h: Rename SYMBOL_OPS to SYMBOL_COMPUTED_OPS.
* ax-gdb.c (gen_var_ref): Likewise.
* findvar.c (read_var_value, symbol_read_needs_frame): Likewise.
* printcmd.c (address_info): Likewise.
* dwarf2loc.c (dwarf_expr_frame_base): Likewise.
* dwarf2read.c (dwarf2_symbol_mark_computed): Likewise.
* symtab.h: Rename struct symbol_ops to struct symbol_computed_ops.
* dwarf2loc.h: Likewise.
* dwarf2loc.c (dwarf2_locexpr_funcs, dwarf2_loclist_funcs): Likewise.
* symtab.h: (struct symbol_register_ops): New struct definition.
(struct symbol): Make "ops" member a union of symbol_computed_ops and
symbol_register_ops callback pointers.
(SYMBOL_REGISTER_OPS): New macro.
* tracepoint.c: Include "objfiles.h".
(scope_info, collect_symbol): Use SYMBOL_REGISTER_OPS register_number
callback to retrieve register numbers.
* ax-gdb.c (gen_var_ref): Likewise.
* findvar.c (read_var_value): Likewise.
* printcmd.c (address_info): Likewise.
* coffread.c (coff_reg_to_regnum): New function.
(coff_register_funcs): New static variable.
(process_coff_symbol): Do not call gdbarch_sdb_reg_to_regnum.
Install SYMBOL_REGISTER_OPS callbacks.
* mdebugread.c (mdebug_reg_to_regnum): New function.
(mdebug_register_funcs): New static variable.
(parse_symbol): Do not call gdbarch_ecoff_reg_to_regnum.
Install SYMBOL_REGISTER_OPS callbacks.
* stabsread.c (stab_reg_to_regnum): New function.
(stab_register_funcs): New static variable.
(define_symbol): Do not call gdbarch_stab_reg_to_regnum.
Install SYMBOL_REGISTER_OPS callbacks.
Diffstat (limited to 'gdb/coffread.c')
-rw-r--r-- | gdb/coffread.c | 18 |
1 files changed, 14 insertions, 4 deletions
diff --git a/gdb/coffread.c b/gdb/coffread.c index 1e5cb56..201cfa2 100644 --- a/gdb/coffread.c +++ b/gdb/coffread.c @@ -1474,6 +1474,16 @@ patch_opaque_types (struct symtab *s) } } +static int +coff_reg_to_regnum (struct symbol *sym, struct gdbarch *gdbarch) +{ + return gdbarch_sdb_reg_to_regnum (gdbarch, SYMBOL_VALUE (sym)); +} + +static const struct symbol_register_ops coff_register_funcs = { + coff_reg_to_regnum +}; + static struct symbol * process_coff_symbol (struct coff_symbol *cs, union internal_auxent *aux, @@ -1554,8 +1564,8 @@ process_coff_symbol (struct coff_symbol *cs, #endif case C_REG: SYMBOL_CLASS (sym) = LOC_REGISTER; - SYMBOL_VALUE (sym) = gdbarch_sdb_reg_to_regnum - (current_gdbarch, cs->c_value); + SYMBOL_REGISTER_OPS (sym) = &coff_register_funcs; + SYMBOL_VALUE (sym) = cs->c_value; add_symbol_to_list (sym, &local_symbols); break; @@ -1571,9 +1581,9 @@ process_coff_symbol (struct coff_symbol *cs, case C_REGPARM: SYMBOL_CLASS (sym) = LOC_REGISTER; + SYMBOL_REGISTER_OPS (sym) = &coff_register_funcs; SYMBOL_IS_ARGUMENT (sym) = 1; - SYMBOL_VALUE (sym) = gdbarch_sdb_reg_to_regnum - (current_gdbarch, cs->c_value); + SYMBOL_VALUE (sym) = cs->c_value; add_symbol_to_list (sym, &local_symbols); break; |