public inbox for gcc@gcc.gnu.org
 help / color / mirror / Atom feed
From: Richard Henderson <rth@redhat.com>
To: Max Asbock <masbock@us.ibm.com>
Cc: gcc@gcc.gnu.org
Subject: Re: problems parsing dwarf frame info on amd64 optimized code
Date: Thu, 11 Mar 2004 21:00:00 -0000	[thread overview]
Message-ID: <20040311210024.GA15635@redhat.com> (raw)
In-Reply-To: <200403111007.05459.masbock@us.ibm.com>

On Thu, Mar 11, 2004 at 10:07:36AM -0800, Max Asbock wrote:
> There is no rule for r7, so I was assuming r7 stays unchanged.

Ah hah.  I see what you're talking about now.

No, there's an implicit assumption that the CFA corresponds
to the stack pointer at the point of the call instruction.
This can be overridden by the actual CFI data if the target
wants to describe the old stack pointer value saved in some
register or in memory.

The normal case, the old stack pointer not saved anywhere
directly only as a known offset from a register, is not
representable in dwarf2/3.  There has been talk about adding
something for this case but nothing has materialized yet.

> From this I infer that the assumption I made about r7 remaining unchanged 
> when there is no rule for it is incorrect and what I really have to do is
> something
> like:
> Frame 1:
> cfa1 = r7 + offset1
> if (r7 unspecified)	r7 = cfa1
> Frame 2:
> cfa2 = r7 + offset2
> ....
> Is this the correct approach or are there cases where it would fail?

This is correct.


r~

      reply	other threads:[~2004-03-11 21:00 UTC|newest]

Thread overview: 5+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2004-03-08 19:18 Max Asbock
2004-03-10  2:18 ` Jim Wilson
2004-03-10 19:41 ` Richard Henderson
2004-03-11 18:45   ` Max Asbock
2004-03-11 21:00     ` Richard Henderson [this message]

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=20040311210024.GA15635@redhat.com \
    --to=rth@redhat.com \
    --cc=gcc@gcc.gnu.org \
    --cc=masbock@us.ibm.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;
as well as URLs for read-only IMAP folder(s) and NNTP newsgroup(s).