This is the mail archive of the
mailing list for the frysk project.
Re: About the porting of libunwind
- From: Wu Zhou <woodzltc at cn dot ibm dot com>
- To: Richard Henderson <rth at redhat dot com>
- Cc: frysk at sources dot redhat dot com
- Date: Wed, 26 Jul 2006 00:21:13 -0400
- Subject: Re: About the porting of libunwind
Quoting Richard Henderson <firstname.lastname@example.org>:
On Sun, Jul 23, 2006 at 11:39:50AM -0400, Wu Zhou wrote:
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.
I've been working on doing just this thing, porting to ppc32/64.
Very happy to know that you are working on this. Whatever I can help
in this effort, please tell me. Surely we can help test your code on
various platforms, including but not limited to ppc32/ppc64 platforms.
Unfortunately, libunwind is very poorly arranged for such cases,
where two ports can share the bulk of the code. So I've been
rearranging it. What I have is currently in an intermediate
state that does not compile, but as soon as I have something, I
will check it in to the frysk repository.
Would you please talk something about your re-arrangement work? What
changes are you planning to add into the current code base? Do you
think that I can be of some help in your re-arranging work?
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?
What is needed here is familiarity with the dwarf3 spec, and the
ELF spec for ppc64. There is existing code in gcc to perform the
same operations, but only within the local process. But it is
still helpful for understanding.
Thanks for these information. I ever had some experiences in DWARF and
ELF. and I am also looking at these documents right now to refresh
them. But I am not that familar with gcc code (ever submitted one
patch for generating better debuginfo support for Fortran main entry,
don't got much feedback though. :-( ). Can you give me some pointer
on which files are involved in performing these operations? The
source file names are ok. Thanks a lot!
- Wu Zhou