Mirror of the gdb mailing list
 help / color / mirror / Atom feed
* Dwarf 2 Stack pointer unwind.
@ 2005-02-01 17:20 Con Bradley
  2005-02-01 17:25 ` Daniel Jacobowitz
  0 siblings, 1 reply; 2+ messages in thread
From: Con Bradley @ 2005-02-01 17:20 UTC (permalink / raw)
  To: gdb

Hi,
   We have an ABI where the stack pointer is never saved to the stack
on a function call and there is NO frame pointer. Instead the stack is
maintained by stack pointer increments and decrements.
How does one describe this in Dwarf Call Frame Instructions? The only
rules available for register operations are to save on the stack or to
copy to another register. No rules to describe plus or negative
register adjustments.

  I find it difficult to understand why there is no support for this
in Dwarf 2 or Dwarf 3 as this must be a common idiom.

When we adjust the stack pointer we issue CFA_CFA_def_cfa operations
to describe the new rule to access the CFA, effectively issuing a CFA
rule to compensate for the stack pointer being changed. This is
sufficient to allow stack unwind to work. However, when we look up the
values of automatics in upper stack frames this fails. The reason
being that the address of these variables (in location expressions) is given
as an offset from the stack pointer but there appear to be no unwind
rules for the stack pointer register.

More correctly we'd like to say that the address of an automatic was
CFA plus offset but there doesn't appear to be any support for this.

How does one describe stack pointer changes which do not involve
saving on the stack or use of a frame pointer.

  Con Bradley.



^ permalink raw reply	[flat|nested] 2+ messages in thread

end of thread, other threads:[~2005-02-01 17:25 UTC | newest]

Thread overview: 2+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2005-02-01 17:20 Dwarf 2 Stack pointer unwind Con Bradley
2005-02-01 17:25 ` Daniel Jacobowitz

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox