diff options
author | Stan Shebs <shebs@codesourcery.com> | 2010-03-17 22:04:43 +0000 |
---|---|---|
committer | Stan Shebs <shebs@codesourcery.com> | 2010-03-17 22:04:43 +0000 |
commit | 400c6af0377b41453355299e9393a52263f4a834 (patch) | |
tree | 82355d6b37f45abf19392712a0c747cf989c4f6e /gdb/dwarf2loc.c | |
parent | a3b2a86bb7263eafa4f11a3b7cc0fb3adcfe1d39 (diff) | |
download | gdb-400c6af0377b41453355299e9393a52263f4a834.zip gdb-400c6af0377b41453355299e9393a52263f4a834.tar.gz gdb-400c6af0377b41453355299e9393a52263f4a834.tar.bz2 |
2010-03-17 Stan Shebs <stan@codesourcery.com>
* ax-gdb.h (struct axs_value): New field optimized_out.
(gen_trace_for_var): Add gdbarch argument.
* ax-gdb.c (gen_trace_static_fields): New function.
(gen_traced_pop): Call it, add gdbarch argument.
(gen_trace_for_expr): Update call to it.
(gen_trace_for_var): Ditto, and report optimized-out variables.
(gen_struct_ref_recursive): Check for optimized-out value.
(gen_struct_elt_for_reference): Ditto.
(gen_static_field): Pass gdbarch instead of expression, assume
optimization if field not found.
(gen_var_ref): Set the optimized_out flag.
(gen_expr): Error on optimized-out variable.
* tracepoint.c (collect_symbol): Handle struct-valued vars as
expressions, skip optimized-out variables with computed locations.
* dwarf2loc.c (dwarf2_tracepoint_var_ref): Flag instead of
erroring out if location expression missing.
(loclist_tracepoint_var_ref): Don't error out here.
Diffstat (limited to 'gdb/dwarf2loc.c')
-rw-r--r-- | gdb/dwarf2loc.c | 12 |
1 files changed, 5 insertions, 7 deletions
diff --git a/gdb/dwarf2loc.c b/gdb/dwarf2loc.c index 20ede3e..ed7dfb9 100644 --- a/gdb/dwarf2loc.c +++ b/gdb/dwarf2loc.c @@ -619,11 +619,11 @@ dwarf2_tracepoint_var_ref (struct symbol *symbol, struct gdbarch *gdbarch, struct agent_expr *ax, struct axs_value *value, gdb_byte *data, int size) { - if (size == 0) - error (_("Symbol \"%s\" has been optimized out."), - SYMBOL_PRINT_NAME (symbol)); - - if (size == 1 + if (!data || size == 0) + { + value->optimized_out = 1; + } + else if (size == 1 && data[0] >= DW_OP_reg0 && data[0] <= DW_OP_reg31) { @@ -883,8 +883,6 @@ loclist_tracepoint_var_ref (struct symbol *symbol, struct gdbarch *gdbarch, size_t size; data = find_location_expression (dlbaton, &size, ax->scope); - if (data == NULL) - error (_("Variable \"%s\" is not available."), SYMBOL_NATURAL_NAME (symbol)); dwarf2_tracepoint_var_ref (symbol, gdbarch, ax, value, data, size); } |