This is the mail archive of the
frysk@sources.redhat.com
mailing list for the frysk project.
About the porting of libunwind
- From: Wu Zhou <woodzltc at cn dot ibm dot com>
- To: frysk at sources dot redhat dot com
- Date: Sun, 23 Jul 2006 11:39:50 -0400
- Subject: About the porting of libunwind
Hello all,
We are looking into how to port libunwind to ppc64. We had done some
investigation work. It seems much like what is available on x86 and
x86-64. So we want to see if any of you can give us some pointers on
how to do that on a new platform like ppc64. If you can share us with
how you do that (it is ok to be very general ) on x86 and x86-64, that
will be highly appreciated.
As far as I read the code on x86, libunwind is using getcontext in
glibc to get the context for unwinding. And it also need to use dwarf
CFI information to know how to unwind the stack step by step. So good
understanding about these two topics will be very helpful for
libunwind porting. Any directions on these kind of high-level topic?
There are also some nasty details too. For example, the user context
and dwarf CFI are both complex data structure. Both of them have some
important information about the registers. The context contain the
value of each registers at some point. And the CFI tells how to save
and restore registers when one function call another. How to get these
register values? How are these registers ordered? The numbering
sequence? How to map the register in context structure to these in
CFI information? All these should be in the questions to be answered.
How do you do all these for x86 and x86_64?
In fact, any information about how do you port libunwind to x86/x86_64
intests me. All are welcomed!
Regards
- Wu Zhou