PATCH: error reading variable: value has been optimized out

Eli Zaretskii eliz@gnu.org
Fri Aug 31 09:59:00 GMT 2012


> From: Tom Tromey <tromey@redhat.com>
> Cc: Andrew Burgess <aburgess@broadcom.com>,        "gdb-patches\@sourceware.org" <gdb-patches@sourceware.org>
> Date: Mon, 27 Aug 2012 09:46:12 -0600
> 
> 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.

IMO, any enhancements that allow better support for optimized-out
variables are important.  Having GDB refuse to show a value of a
variable, letting you go hunt for it via disassembly and register
sniffing, is among the worst user-experiences I have debugging
optimized programs.



More information about the Gdb-patches mailing list