aboutsummaryrefslogtreecommitdiff
path: root/gdb/ax-gdb.c
diff options
context:
space:
mode:
authorUlrich Weigand <uweigand@de.ibm.com>2009-06-04 12:28:39 +0000
committerUlrich Weigand <uweigand@de.ibm.com>2009-06-04 12:28:39 +0000
commit768a979c31bbe51154e3363c1061c45aa9cd937f (patch)
tree8c5f21f3ae813fe4193b79e851fa6bef842f0d1c /gdb/ax-gdb.c
parente36aef42209e57273a78919b81cc7ae62d32107a (diff)
downloadgdb-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/ax-gdb.c')
-rw-r--r--gdb/ax-gdb.c8
1 files changed, 4 insertions, 4 deletions
diff --git a/gdb/ax-gdb.c b/gdb/ax-gdb.c
index 46a88e2..0572899 100644
--- a/gdb/ax-gdb.c
+++ b/gdb/ax-gdb.c
@@ -592,7 +592,7 @@ gen_var_ref (struct gdbarch *gdbarch, struct agent_expr *ax,
this as an lvalue or rvalue, the caller will generate the
right code. */
value->kind = axs_lvalue_register;
- value->u.reg = SYMBOL_VALUE (var);
+ value->u.reg = SYMBOL_REGISTER_OPS (var)->register_number (var, gdbarch);
break;
/* A lot like LOC_REF_ARG, but the pointer lives directly in a
@@ -600,7 +600,7 @@ gen_var_ref (struct gdbarch *gdbarch, struct agent_expr *ax,
because it's just like any other case where the thing
has a real address. */
case LOC_REGPARM_ADDR:
- ax_reg (ax, SYMBOL_VALUE (var));
+ ax_reg (ax, SYMBOL_REGISTER_OPS (var)->register_number (var, gdbarch));
value->kind = axs_lvalue_memory;
break;
@@ -619,11 +619,11 @@ gen_var_ref (struct gdbarch *gdbarch, struct agent_expr *ax,
case LOC_COMPUTED:
/* FIXME: cagney/2004-01-26: It should be possible to
- unconditionally call the SYMBOL_OPS method when available.
+ unconditionally call the SYMBOL_COMPUTED_OPS method when available.
Unfortunately DWARF 2 stores the frame-base (instead of the
function) location in a function's symbol. Oops! For the
moment enable this when/where applicable. */
- SYMBOL_OPS (var)->tracepoint_var_ref (var, ax, value);
+ SYMBOL_COMPUTED_OPS (var)->tracepoint_var_ref (var, ax, value);
break;
case LOC_OPTIMIZED_OUT: