libunwind-devel
[Top][All Lists]
Advanced

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: [libunwind] Dynamic unwinding docs


From: David Mosberger
Subject: Re: [libunwind] Dynamic unwinding docs
Date: Fri, 5 Dec 2003 09:33:46 -0800

>>>>> On Fri, 05 Dec 2003 14:40:00 +0100, Johan Walles <address@hidden> said:

  Johan> Hi!  What documentation (except for the header files and test
  Johan> programs) exist for libunwind's dynamic unwinding support?

I'm trying to guess what might pose the biggest difficulty in
understanding the dynamic unwind API, and I suspect it might be the
exact meaning of the op-codes (unw_dyn_operation_t).  The key to
understanding those is to realize that they map fairly directly to
corresponding static unwind directives.  The translation is done by
src/ia64/Gparser-ia64.c:parase_dynamic() and the mapping looks like
this:

  UNW_DYN_STOP:
        End of unwind-info list marker.
  UNW_DYN_SAVE_REG:
        Equivalent to .spillreg.p.
  UNW_DYN_SPILL_FP_REL:
        Equivalent to .spillpsp.p.
  UNW_DYN_SPILL_SP_REL:
        Equivalent to .spillsp.rsp
  UNW_DYN_ADD:
        Equivalent to .fframe.
  UNW_DYN_POP_FRAMES:
        Equivalent to ".restore sp".
  UNW_DYN_LABEL_STATE:
        Equivalent to .label_state.
  UNW_DYN_COPY_STATE:
        Equivalent to .copy_state.
  UNW_DYN_ALIAS:
        Says that the unwind info at this point is identical
        to that of instruction-pointer X.

Note that _all_ of these op-codes can be predicated (or you can
specify _U_QP_TRUE if the op-code is unconditional).

Another thing to note is that each unw_dyn_proc_info_t is treated like
a .prologue directive (there is no equivalent for .body, since it
isn't needed).

        --david


reply via email to

[Prev in Thread] Current Thread [Next in Thread]