aboutsummaryrefslogtreecommitdiff
path: root/gdb/printcmd.c
diff options
context:
space:
mode:
authorStan Shebs <shebs@codesourcery.com>2010-04-20 18:52:59 +0000
committerStan Shebs <shebs@codesourcery.com>2010-04-20 18:52:59 +0000
commit08922a10505b89e293906fbbd94d403b29f7aed9 (patch)
tree3663dcc9b7fb391ff59f67c19ec9092f528f7114 /gdb/printcmd.c
parent2dc7f7b33b425c6c19078f29e4e8c9e0ddca41e6 (diff)
downloadgdb-08922a10505b89e293906fbbd94d403b29f7aed9.zip
gdb-08922a10505b89e293906fbbd94d403b29f7aed9.tar.gz
gdb-08922a10505b89e293906fbbd94d403b29f7aed9.tar.bz2
2010-04-20 Stan Shebs <stan@codesourcery.com>
Nathan Sidwell <nathan@codesourcery.com> * dwarf2loc.c (struct axs_var_loc): New struct. (dwarf2_tracepoint_var_loc): New function. (dwarf2_tracepoint_var_access): New function. (dwarf2_tracepoint_var_ref): Use dwarf2_tracepoint_var_loc, deal with DW_OP_piece. (locexpr_describe_location_piece): New function. (locexpr_describe_location_1): New function. (locexpr_describe_location): Call it, update signature. (loclist_describe_location): Rewrite to loop over locations, update signature. * symtab.h (struct symbol_computed_ops): Add address to describe_location arguments, return void. * printcmd.c (address_info): Get context PC, pass to computed location description. * tracepoint.c (scope_info): Ditto. * ax-gdb.c (trace_kludge): Export.
Diffstat (limited to 'gdb/printcmd.c')
-rw-r--r--gdb/printcmd.c7
1 files changed, 4 insertions, 3 deletions
diff --git a/gdb/printcmd.c b/gdb/printcmd.c
index bfe8479..c2468d0 100644
--- a/gdb/printcmd.c
+++ b/gdb/printcmd.c
@@ -1148,20 +1148,21 @@ sym_info (char *arg, int from_tty)
static void
address_info (char *exp, int from_tty)
{
+ struct block *block;
struct gdbarch *gdbarch;
int regno;
struct symbol *sym;
struct minimal_symbol *msymbol;
long val;
struct obj_section *section;
- CORE_ADDR load_addr;
+ CORE_ADDR load_addr, context_pc = 0;
int is_a_field_of_this; /* C++: lookup_symbol sets this to nonzero
if exp is a field of `this'. */
if (exp == 0)
error (_("Argument required."));
- sym = lookup_symbol (exp, get_selected_block (0), VAR_DOMAIN,
+ sym = lookup_symbol (exp, get_selected_block (&context_pc), VAR_DOMAIN,
&is_a_field_of_this);
if (sym == NULL)
{
@@ -1242,7 +1243,7 @@ address_info (char *exp, int from_tty)
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, gdb_stdout);
+ SYMBOL_COMPUTED_OPS (sym)->describe_location (sym, context_pc, gdb_stdout);
break;
case LOC_REGISTER: