This is the mail archive of the
gdb-patches@sourceware.org
mailing list for the GDB project.
Re: PATCH: error reading variable: value has been optimized out
- From: Jan Kratochvil <jan dot kratochvil at redhat dot com>
- To: Tom Tromey <tromey at redhat dot com>
- Cc: Andrew Burgess <aburgess at broadcom dot com>, "gdb-patches at sourceware dot org" <gdb-patches at sourceware dot org>
- Date: Mon, 3 Sep 2012 17:06:48 +0200
- Subject: Re: PATCH: error reading variable: value has been optimized out
- References: <50376F3B.1080407@broadcom.com> <20120826171840.GA21205@host2.jankratochvil.net> <871uisibi3.fsf@fleche.redhat.com>
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