libunwind-devel
[Top][All Lists]
Advanced

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

[libunwind] parse_dynamic using dwarf


From: Max Asbock
Subject: [libunwind] parse_dynamic using dwarf
Date: Thu, 25 Mar 2004 12:35:13 -0800

Currently the parse_dynamic function in Gparser-dwarf.c is not
implemented. I am wondering how the various dynamic unwind info
operations would apply to the dwarf case. I am making a few wild guesses
as to how they could translate. I assume this would currently only apply
to x86 and x86-64.

Assume we have a unw_dyn_op_t op:

op->tag == UNW_DYN_SAVE_REG:     /* save register to another register */
this could do something like
set_reg (sr, op->reg, DWARF_WHERE_REG, op->val);

UNW_DYN_SPILL_FP_REL: /* frame-pointer-relative reg spill */
Where do we need this on x86 or x86-64?

UNW_DYN_SPILL_SP_REL: /* stack-pointer-relative reg spill */
How about:
set_reg (sr, op->reg, DWARF_WHERE_CFAREL, op->val);

UNW_DYN_ADD:          /* add constant value to a register */
I guess this only applies to the stack pointer
set_reg (sr, DWARF_CFA_OFF_COLUMN, 0, val);

UNW_DYN_POP_FRAMES:   /* drop one or more stack frames */
Where is this needed and would it represent a typical function epilogue
sequence, i.e leave; ret?            

UNW_DYN_LABEL_STATE:  /* name the current state */
???

UNW_DYN_COPY_STATE:   /* set the region's entry-state */
???

UNW_DYN_ALIAS:
this could do:
fetch_proc_info (c, op->val, 1);
return create_state_record_for (c, sr, op->val);

I hope this makes some sense and any input is appreciated.

regards,
max



reply via email to

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