aboutsummaryrefslogtreecommitdiff
path: root/gdb/printcmd.c
diff options
context:
space:
mode:
authorTom Tromey <tromey@redhat.com>2013-03-20 18:35:22 +0000
committerTom Tromey <tromey@redhat.com>2013-03-20 18:35:22 +0000
commit24d6c2a0bb797940d1f6f16ce8be8c80b1eab4db (patch)
tree42cd80a9c77a045aac4d4682a264effba7e5a358 /gdb/printcmd.c
parentf1e6e0721c5115e2e6c60359c9afbdfe927f0431 (diff)
downloadgdb-24d6c2a0bb797940d1f6f16ce8be8c80b1eab4db.zip
gdb-24d6c2a0bb797940d1f6f16ce8be8c80b1eab4db.tar.gz
gdb-24d6c2a0bb797940d1f6f16ce8be8c80b1eab4db.tar.bz2
* 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.
Diffstat (limited to 'gdb/printcmd.c')
-rw-r--r--gdb/printcmd.c17
1 files changed, 9 insertions, 8 deletions
diff --git a/gdb/printcmd.c b/gdb/printcmd.c
index 3e1d026..7decc39 100644
--- a/gdb/printcmd.c
+++ b/gdb/printcmd.c
@@ -1251,6 +1251,14 @@ address_info (char *exp, int from_tty)
section = SYMBOL_OBJ_SECTION (sym);
gdbarch = get_objfile_arch (SYMBOL_SYMTAB (sym)->objfile);
+ if (SYMBOL_COMPUTED_OPS (sym) != NULL)
+ {
+ SYMBOL_COMPUTED_OPS (sym)->describe_location (sym, context_pc,
+ gdb_stdout);
+ printf_filtered (".\n");
+ return;
+ }
+
switch (SYMBOL_CLASS (sym))
{
case LOC_CONST:
@@ -1273,14 +1281,7 @@ address_info (char *exp, int from_tty)
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. */
- SYMBOL_COMPUTED_OPS (sym)->describe_location (sym, context_pc,
- gdb_stdout);
- break;
+ gdb_assert_not_reached (_("LOC_COMPUTED variable missing a method"));
case LOC_REGISTER:
/* GDBARCH is the architecture associated with the objfile the symbol