From: Jan Kratochvil <jan.kratochvil@redhat.com>
To: Michael Haupt <michael.haupt@oracle.com>
Cc: "gdb@sourceware.org" <gdb@sourceware.org>
Subject: Re: "optimized out" in spite of DWARF saying otherwise?
Date: Thu, 21 Mar 2013 16:48:00 -0000 [thread overview]
Message-ID: <20130321164806.GA19532@host2.jankratochvil.net> (raw)
In-Reply-To: <C3092A95-675A-4C3C-9CBF-48F37DAC9A50@oracle.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
next prev parent reply other threads:[~2013-03-21 16:48 UTC|newest]
Thread overview: 4+ messages / expand[flat|nested] mbox.gz Atom feed top
2013-03-21 16:39 Michael Haupt
2013-03-21 16:48 ` Jan Kratochvil [this message]
2013-03-21 20:15 ` Michael Haupt
2013-03-22 7:37 ` Jan Kratochvil
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
Avoid top-posting and favor interleaved quoting:
https://en.wikipedia.org/wiki/Posting_style#Interleaved_style
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=20130321164806.GA19532@host2.jankratochvil.net \
--to=jan.kratochvil@redhat.com \
--cc=gdb@sourceware.org \
--cc=michael.haupt@oracle.com \
/path/to/YOUR_REPLY
https://kernel.org/pub/software/scm/git/docs/git-send-email.html
* If your mail client supports setting the In-Reply-To header
via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line
before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox