From: Jim Blandy <jimb@red-bean.com>
To: Randolph Chung <randolph@tausq.org>
Cc: gdb@sources.redhat.com
Subject: Re: Argument pointers, dwarf and prologue analysis
Date: Mon, 21 Nov 2005 07:42:00 -0000 [thread overview]
Message-ID: <8f2776cb0511202342k23a2e537pe3cbf569a94c3d03@mail.gmail.com> (raw)
In-Reply-To: <4381603E.1060500@tausq.org>
It seems to me that the real problem is that the Dwarf debugging info
doesn't accurately describe where the bar's arguments live after the
call to foo. That is, when you return from foo, since r20 is
caller-saved, its value is unknown, and it's incorrect for the
debugging info to claim that the debugger can find the variables
relative to its value.
I don't think that the wacky idea about recovering r20's value by
looking at the call site will work. I mean, if r20 is a scratch
register, you have no way of knowing that it hasn't been used for
something else since the function was entered, right? I admit I don't
really understand that.
But I think it's clear that the locations of the variables in the
debug info is incorrect. There's all kinds of heuristic crud in
gcc/dwarf2out.c where it tries to figure out the right register to use
as the base for variable locations (maybe I'm thinking of the way the
CFI code chooses a CFA register; I don't really remember), but it
seemed like it could be easily confused by the use of temporaries like
r20 in the example you posted.
next prev parent reply other threads:[~2005-11-21 7:42 UTC|newest]
Thread overview: 9+ messages / expand[flat|nested] mbox.gz Atom feed top
2005-11-21 5:50 Randolph Chung
2005-11-21 7:42 ` Jim Blandy [this message]
2005-11-21 10:32 ` Randolph Chung
2005-11-21 14:08 ` Daniel Jacobowitz
2005-11-21 15:11 ` Randolph Chung
2005-11-21 15:26 ` Daniel Jacobowitz
2005-11-22 0:07 ` Randolph Chung
2005-11-22 5:15 ` Jim Blandy
2005-11-22 6:39 ` Randolph Chung
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=8f2776cb0511202342k23a2e537pe3cbf569a94c3d03@mail.gmail.com \
--to=jimb@red-bean.com \
--cc=gdb@sources.redhat.com \
--cc=randolph@tausq.org \
/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