This is the mail archive of the 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

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.

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.

> 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.


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