PATCH: error reading variable: value has been optimized out
Jan Kratochvil
jan.kratochvil@redhat.com
Mon Sep 3 15:07:00 GMT 2012
On Mon, 27 Aug 2012 17:46:12 +0200, Tom Tromey wrote:
> I'm not sure whether I'm understanding your comment correctly, but gdb
> does support partially optimized out values. However, these are only
> supported for lval_computed values. See lval_funcs::check_validity and
> check_any_valid.
value_bits_valid leads to val_print_optimized_out - <optimized out>
vs.
value_bytes_available leads to val_print_unavailable - <unavailable>
> Offhand it seems as though read_frame_register_value could create an
> lval_computed value if any register it needs is optimized out. I don't
> know whether this is worth the effort.
dwarf2_evaluate_loc_desc_full 'ctx->num_pieces > 0' block looka as a nice
guide to it.
Thanks,
Jan
More information about the Gdb-patches
mailing list