This is the mail archive of the
gdb@sourceware.org
mailing list for the GDB project.
Re: "optimized out" in spite of DWARF saying otherwise?
- From: Jan Kratochvil <jan dot kratochvil at redhat dot com>
- To: Michael Haupt <michael dot haupt at oracle dot com>
- Cc: "gdb at sourceware dot org" <gdb at sourceware dot org>
- Date: Thu, 21 Mar 2013 17:48:06 +0100
- Subject: Re: "optimized out" in spite of DWARF saying otherwise?
- References: <C3092A95-675A-4C3C-9CBF-48F37DAC9A50 at oracle dot com>
On Thu, 21 Mar 2013 17:39:26 +0100, Michael Haupt wrote:
> so I have this formal argument to a method, and my DWARF says
>
> 0x...e642 - 0x...e642: rdi
>
> (note start and end are the same). gdb, however, insists on the value being
> "<optimized out>", with the current address being 0x...e642. How is this?
That is correct. DWARF4:
2. An ending address offset. [...] It marks the first address past the end of
the address range over which the location is valid.
Such entry in fact does not say anything, it covers zero bytes.
(1) You should look on other entries in that location list (if any).
(2) This "weird" entry can be used for so-called "entry-values" resolving.
Try in GDB "set debug entry-values 1" (before stopping in this function)
to see more debug information why GDB failed to resolve the parameter.
I have to recomment FSF GDB HEAD (CVS/GIT) or the 7.6 pre-release, I made
recently there some entry-values resolving fixes.
Regards,
Jan