[Dwarf-Discuss] DWARF for DSP like processors with multiple memories

Michael Eager eager at eagercon.com
Tue Nov 25 08:56:22 PST 2008


Anthony Berent wrote:
> Hi David, 
> 
>> For 4:
>> There's only one DW_AT_frame_base. Would a callable expression for the
>> other stacks help ? I assume they each have their own stack
>> pointer/virtual frame pointer.
> 
> Actually I was looking more at the Call Frame Information than the
> DW_AT_frame_base; although that does lead me to ask how the two relate,
> since they both seem to be giving some of the same information. Does it ever
> make sense to have both?

I believe that GCC for PowerPC generates both DW_AT_frame_base and
CFI which gives partial register save info.  DW_AT_frame_base is used
to access args and local variables, if I recall correctly.

> The reason I am looking at Call Frame Information is that we want to
> describe how registers are saved on stacks during a call. Extending
> DW_AT_frame_base might help with finding variables on the stacks, but I
> think we need call frame style information to be able to do a full job of
> unwinding the stacks.

CFI should give you everything you need to describe registers
saved over a call.  You usually don't need complete CFI info to
unwind the stack.  Some implementations (like GCC-powerpc) only
provide the minimum needed to unwind, leaving the ABI (or guesswork)
to know where specific registers have been saved on the stack.

In general, it doesn't seem like a good idea to create a non-standard
extension to one part of DWARF (like DW_AT_frame_base) when another
part of the specification provides the desired description.


-- 
Michael Eager	 eager at eagercon.com
1960 Park Blvd., Palo Alto, CA 94306  650-325-8077



More information about the Dwarf-Discuss mailing list