From: Jan Kratochvil <jan.kratochvil@redhat.com>
To: Eli Zaretskii <eliz@gnu.org>
Cc: yao@codesourcery.com, gdb@sourceware.org
Subject: Re: Complex DWARF expressions
Date: Mon, 22 Sep 2014 18:44:00 -0000 [thread overview]
Message-ID: <20140922184412.GA23523@host2.jankratochvil.net> (raw)
In-Reply-To: <83a95ry0rp.fsf@gnu.org>
On Mon, 22 Sep 2014 20:21:14 +0200, Eli Zaretskii wrote:
> Why can't GDB apply all this, and show a value for a given PC?
There is some reason why GDB could not determine it, this is very normal
situation. It would be really great if GDB could always display all values
for -O2 -g code but that can never be possible (without reducing runtime code
peformance and size).
To find out why use: (gdb) set debug entry-values 1
For example the call site may not have matching DW_AT_GNU_call_site_value
because the value is just no longer computable at the caller frame from any
data at that point of execution. Entry values improved the number of cases
where the value is retrievable but it is still far from 100% retrievability.
One needs to use -O0 -g to get the values in 100% of cases. Debug info never
degrades inferior runtime code performance or size to get better debug info.
Besides that there may be GDB bug. And there is also at least one GCC bug:
entry-value: Missing DW_AT_linkage_name for C<->C++ calls
http://gcc.gnu.org/bugzilla/show_bug.cgi?id=56502
Jan
next prev parent reply other threads:[~2014-09-22 18:44 UTC|newest]
Thread overview: 7+ messages / expand[flat|nested] mbox.gz Atom feed top
2014-09-21 19:33 Eli Zaretskii
2014-09-22 6:03 ` Yao Qi
2014-09-22 6:17 ` Jan Kratochvil
2014-09-22 18:21 ` Eli Zaretskii
2014-09-22 18:44 ` Jan Kratochvil [this message]
2014-09-22 19:06 ` Eli Zaretskii
2014-09-22 19:21 ` 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=20140922184412.GA23523@host2.jankratochvil.net \
--to=jan.kratochvil@redhat.com \
--cc=eliz@gnu.org \
--cc=gdb@sourceware.org \
--cc=yao@codesourcery.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