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 | 6dc154019d5f0997d7df1d9e9f3ba1425396dcd8 (patch) | |
tree | 55a89e0bef38154d24b4ec26ab2f8aafa3dd0267 | |
parent | 3dbb334d7ac5a00381bd9a37c1ca0e4f83a2b893 (diff) | |
download | libcxxabi_35a-6dc154019d5f0997d7df1d9e9f3ba1425396dcd8.tar.gz |
[unwind] Fix unw_init_remote_thread() use to void* instead of thread_t for parameter to match other implementations
git-svn-id: https://llvm.org/svn/llvm-project/libcxxabi/trunk@192248 91177308-0d34-0410-b5e6-96231b3b80d8
-rw-r--r-- | src/Unwind/UnwindCursor.hpp | 11 | ||||
-rw-r--r-- | src/Unwind/libunwind.cpp | 8 |
2 files changed, 12 insertions, 7 deletions
diff --git a/src/Unwind/UnwindCursor.hpp b/src/Unwind/UnwindCursor.hpp index bb1e10e..256a72d 100644 --- a/src/Unwind/UnwindCursor.hpp +++ b/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/src/Unwind/libunwind.cpp b/src/Unwind/libunwind.cpp index 58d3ea9..2043ac2 100644 --- a/src/Unwind/libunwind.cpp +++ b/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; |