mirror of
https://github.com/bminor/binutils-gdb.git
synced 2025-12-26 17:18:55 +00:00
* ax-gdb.c (gen_var_ref): Unconditionally call via computed ops,
if possible. * dwarf2read.c (read_func_scope): Remove old FIXME. * eval.c (evaluate_subexp_standard): Check SYMBOL_COMPUTED_OPS, not LOC_COMPUTED. * findvar.c (symbol_read_needs_frame, default_read_var_value): Unconditionally call via computed ops, if possible. * printcmd.c (address_info): Unconditionally call via computed ops, if possible. * stack.c (read_frame_arg): Unconditionally call via computed ops, if possible. * symtab.c (register_symbol_computed_impl): Sanity check 'ops'. * tracepoint.c (scope_info): Unconditionally call via computed ops, if possible.
This commit is contained in:
@@ -367,17 +367,15 @@ address_to_signed_pointer (struct gdbarch *gdbarch, struct type *type,
|
||||
int
|
||||
symbol_read_needs_frame (struct symbol *sym)
|
||||
{
|
||||
if (SYMBOL_COMPUTED_OPS (sym) != NULL)
|
||||
return SYMBOL_COMPUTED_OPS (sym)->read_needs_frame (sym);
|
||||
|
||||
switch (SYMBOL_CLASS (sym))
|
||||
{
|
||||
/* All cases listed explicitly so that gcc -Wall will detect it if
|
||||
we failed to consider one. */
|
||||
case LOC_COMPUTED:
|
||||
/* FIXME: cagney/2004-01-26: It should be possible to
|
||||
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. */
|
||||
return SYMBOL_COMPUTED_OPS (sym)->read_needs_frame (sym);
|
||||
gdb_assert_not_reached (_("LOC_COMPUTED variable missing a method"));
|
||||
|
||||
case LOC_REGISTER:
|
||||
case LOC_ARG:
|
||||
@@ -456,6 +454,9 @@ default_read_var_value (struct symbol *var, struct frame_info *frame)
|
||||
if (symbol_read_needs_frame (var))
|
||||
gdb_assert (frame);
|
||||
|
||||
if (SYMBOL_COMPUTED_OPS (var) != NULL)
|
||||
return SYMBOL_COMPUTED_OPS (var)->read_variable (var, frame);
|
||||
|
||||
switch (SYMBOL_CLASS (var))
|
||||
{
|
||||
case LOC_CONST:
|
||||
@@ -578,12 +579,7 @@ default_read_var_value (struct symbol *var, struct frame_info *frame)
|
||||
break;
|
||||
|
||||
case LOC_COMPUTED:
|
||||
/* FIXME: cagney/2004-01-26: It should be possible to
|
||||
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. */
|
||||
return SYMBOL_COMPUTED_OPS (var)->read_variable (var, frame);
|
||||
gdb_assert_not_reached (_("LOC_COMPUTED variable missing a method"));
|
||||
|
||||
case LOC_UNRESOLVED:
|
||||
{
|
||||
|
||||
Reference in New Issue
Block a user