"optimized out" in spite of DWARF saying otherwise?

Jan Kratochvil jan.kratochvil@redhat.com
Thu Mar 21 16:48:00 GMT 2013


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



More information about the Gdb mailing list