diff options
| author | Nick Kledzik <kledzik@apple.com> | 2013-10-08 22:59:34 +0000 |
|---|---|---|
| committer | Nick Kledzik <kledzik@apple.com> | 2013-10-08 22:59:34 +0000 |
| commit | 95a975bc608623148b1e679de98322bdc42cb3f4 (patch) | |
| tree | fc6fb41a22cecccd29c6d0f73c7837498aa95be2 | |
| parent | 07ab3c381cd3eab6df88b3a52401632cbf6757d1 (diff) | |
| download | bcm5719-llvm-95a975bc608623148b1e679de98322bdc42cb3f4.tar.gz bcm5719-llvm-95a975bc608623148b1e679de98322bdc42cb3f4.zip | |
[unwind] Fix unw_init_remote_thread() use to void* instead of thread_t for parameter to match other implementations
llvm-svn: 192248
| -rw-r--r-- | libcxxabi/src/Unwind/UnwindCursor.hpp | 11 | ||||
| -rw-r--r-- | libcxxabi/src/Unwind/libunwind.cpp | 8 |
2 files changed, 12 insertions, 7 deletions
diff --git a/libcxxabi/src/Unwind/UnwindCursor.hpp b/libcxxabi/src/Unwind/UnwindCursor.hpp index bb1e10ea926..256a72da677 100644 --- a/libcxxabi/src/Unwind/UnwindCursor.hpp +++ b/libcxxabi/src/Unwind/UnwindCursor.hpp @@ -17,6 +17,10 @@ #include <stdlib.h> #include <pthread.h> +#if __APPLE__ + #include <mach-o/dyld.h> +#endif + #include "libunwind.h" #include "AddressSpace.hpp" @@ -382,7 +386,7 @@ class UnwindCursor : public AbstractUnwindCursor{ typedef typename A::pint_t pint_t; public: UnwindCursor(unw_context_t *context, A &as); - UnwindCursor(A &as, thread_t thread); + UnwindCursor(A &as, void *threadArg); virtual ~UnwindCursor() {} virtual bool validReg(int); virtual unw_word_t getReg(int); @@ -522,13 +526,14 @@ UnwindCursor<A, R>::UnwindCursor(unw_context_t *context, A &as) } template <typename A, typename R> -UnwindCursor<A, R>::UnwindCursor(A &as, thread_t ) +UnwindCursor<A, R>::UnwindCursor(A &as, void *) : _addressSpace(as), _unwindInfoMissing(false), _isSignalFrame(false) { bzero(&_info, sizeof(_info)); // FIXME - // fill in _registers from thread + // fill in _registers from thread arg } + template <typename A, typename R> bool UnwindCursor<A, R>::validReg(int regNum) { return _registers.validRegister(regNum); diff --git a/libcxxabi/src/Unwind/libunwind.cpp b/libcxxabi/src/Unwind/libunwind.cpp index 58d3ea90ba8..2043ac23ed2 100644 --- a/libcxxabi/src/Unwind/libunwind.cpp +++ b/libcxxabi/src/Unwind/libunwind.cpp @@ -65,7 +65,7 @@ _LIBUNWIND_EXPORT unw_addr_space_t unw_local_addr_space = /// Create a cursor into a thread in another process. _LIBUNWIND_EXPORT int unw_init_remote_thread(unw_cursor_t *cursor, unw_addr_space_t as, - thread_t thread) { + void *arg) { // special case: unw_init_remote(xx, unw_local_addr_space, xx) if (as == (unw_addr_space_t) & sThisAddressSpace) return unw_init_local(cursor, NULL); //FIXME @@ -75,17 +75,17 @@ _LIBUNWIND_EXPORT int unw_init_remote_thread(unw_cursor_t *cursor, case CPU_TYPE_I386: new ((void *)cursor) UnwindCursor<OtherAddressSpace<Pointer32<LittleEndian> >, - Registers_x86>(((unw_addr_space_i386 *)as)->oas, thread); + Registers_x86>(((unw_addr_space_i386 *)as)->oas, arg); break; case CPU_TYPE_X86_64: new ((void *)cursor) UnwindCursor< OtherAddressSpace<Pointer64<LittleEndian> >, Registers_x86_64>( - ((unw_addr_space_x86_64 *)as)->oas, thread); + ((unw_addr_space_x86_64 *)as)->oas, arg); break; case CPU_TYPE_POWERPC: new ((void *)cursor) UnwindCursor<OtherAddressSpace<Pointer32<BigEndian> >, Registers_ppc>( - ((unw_addr_space_ppc *)as)->oas, thread); + ((unw_addr_space_ppc *)as)->oas, arg); break; default: return UNW_EUNSPEC; |

