[libcxxabi][PATCH] unwinder

Nick Kledzik kledzik at apple.com
Tue Oct 8 15:02:18 PDT 2013


On Oct 8, 2013, at 2:00 PM, Jean-Daniel Dupas <devlists at shadowlab.org> wrote:

> 
> Le 8 oct. 2013 à 20:22, David Fang <fang at csl.cornell.edu> a écrit :
> 
>> Nick,
>> 
>>> On Oct 7, 2013, at 7:38 PM, David Fang wrote:
>>>> Hi Nick,
>>>> 	Thanks for the libunwind commit!
>>>> 	Would it be possible to also include "mach-o/dyld_priv.h" as well? It is referenced by src/Unwind/AddressSpace.hpp.  I have a copy of that header from a 2009 distribution of cctools.
>>>> 	(I'm still building on powerpc-darwin8.)
>> 
>>> Having that header is not going to help.  The header declarations a function in libSystem.dylib which the unwinder calls to get the address of the __eh_frame for a given pc.  That function is not in the darwin8 libSystem.  We'll need to write an equivalent using dladdr() and getsectiondata() for older MacOSX versions.
>> 
>> 	What is the name of that function (where it is available)?  Would something like this be available somewhere in LLVM?
>> 
> 
> It is _dyld_find_unwind_sections() used to find __eh_frame and _dyld_register_func_for_remove_image() used to track unloaded libraries and prune the cache accordingly.
> 
> But even if you manage to fix the dyld dependency, it will just get you to an other missing private header error (pthread_machdep.h from libc) which provides direct access to thread local variables (maybe that one can be replaced by a __thread var though).
The use of pthread_machdep.h is for SJLJ based exceptions (arm) and not ppc.  I’ve just committed a change that conditionalizes that include so it is not needed for powerpc.

-Nick





More information about the cfe-commits mailing list