This is the mail archive of the gcc@gcc.gnu.org mailing list for the GCC project.


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]
Other format: [Raw text]

Re: problems parsing dwarf frame info on amd64 optimized code


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~


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]