This is the mail archive of the frysk@sources.redhat.com mailing list for the frysk project.


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]
Other format: [Raw text]

Re: About the porting of libunwind


Quoting Richard Henderson <rth@redhat.com>:

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.

Richard,


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!


Regards
- Wu Zhou


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]