From eae1b66c1b4421c7e1ce67bc0cfeb6e61bffae1d Mon Sep 17 00:00:00 2001 From: Saleem Abdulrasool Date: Sat, 21 Jan 2017 16:22:46 +0000 Subject: [PATCH] rename OtherAddressSpace to RemoteAddressSpace; NFC llvm-svn: 292719 --- libunwind/src/AddressSpace.hpp | 33 +++++++++++++++++---------------- libunwind/src/libunwind.cpp | 12 ++++++------ 2 files changed, 23 insertions(+), 22 deletions(-) diff --git a/libunwind/src/AddressSpace.hpp b/libunwind/src/AddressSpace.hpp index 67aa664..f0091fc 100644 --- a/libunwind/src/AddressSpace.hpp +++ b/libunwind/src/AddressSpace.hpp @@ -485,14 +485,14 @@ inline bool LocalAddressSpace::findFunctionName(pint_t addr, char *buf, #ifdef UNW_REMOTE -/// OtherAddressSpace is used as a template parameter to UnwindCursor when +/// RemoteAddressSpace is used as a template parameter to UnwindCursor when /// unwinding a thread in the another process. The other process can be a /// different endianness and a different pointer size which is handled by /// the P template parameter. template -class OtherAddressSpace { +class RemoteAddressSpace { public: - OtherAddressSpace(task_t task) : fTask(task) {} + RemoteAddressSpace(task_t task) : fTask(task) {} typedef typename P::uint_t pint_t; @@ -515,29 +515,29 @@ private: task_t fTask; }; -template uint8_t OtherAddressSpace

::get8(pint_t addr) { +template uint8_t RemoteAddressSpace

::get8(pint_t addr) { return *((uint8_t *)localCopy(addr)); } -template uint16_t OtherAddressSpace

::get16(pint_t addr) { +template uint16_t RemoteAddressSpace

::get16(pint_t addr) { return P::E::get16(*(uint16_t *)localCopy(addr)); } -template uint32_t OtherAddressSpace

::get32(pint_t addr) { +template uint32_t RemoteAddressSpace

::get32(pint_t addr) { return P::E::get32(*(uint32_t *)localCopy(addr)); } -template uint64_t OtherAddressSpace

::get64(pint_t addr) { +template uint64_t RemoteAddressSpace

::get64(pint_t addr) { return P::E::get64(*(uint64_t *)localCopy(addr)); } template -typename P::uint_t OtherAddressSpace

::getP(pint_t addr) { +typename P::uint_t RemoteAddressSpace

::getP(pint_t addr) { return P::getP(*(uint64_t *)localCopy(addr)); } template -uint64_t OtherAddressSpace

::getULEB128(pint_t &addr, pint_t end) { +uint64_t RemoteAddressSpace

::getULEB128(pint_t &addr, pint_t end) { uintptr_t size = (end - addr); LocalAddressSpace::pint_t laddr = (LocalAddressSpace::pint_t) localCopy(addr); LocalAddressSpace::pint_t sladdr = laddr; @@ -547,7 +547,7 @@ uint64_t OtherAddressSpace

::getULEB128(pint_t &addr, pint_t end) { } template -int64_t OtherAddressSpace

::getSLEB128(pint_t &addr, pint_t end) { +int64_t RemoteAddressSpace

::getSLEB128(pint_t &addr, pint_t end) { uintptr_t size = (end - addr); LocalAddressSpace::pint_t laddr = (LocalAddressSpace::pint_t) localCopy(addr); LocalAddressSpace::pint_t sladdr = laddr; @@ -556,13 +556,14 @@ int64_t OtherAddressSpace

::getSLEB128(pint_t &addr, pint_t end) { return result; } -template void *OtherAddressSpace

::localCopy(pint_t addr) { +template void *RemoteAddressSpace

::localCopy(pint_t addr) { // FIX ME } template -bool OtherAddressSpace

::findFunctionName(pint_t addr, char *buf, - size_t bufLen, unw_word_t *offset) { +bool RemoteAddressSpace

::findFunctionName(pint_t addr, char *buf, + size_t bufLen, + unw_word_t *offset) { // FIX ME } @@ -578,7 +579,7 @@ struct unw_addr_space { /// a 32-bit intel process. struct unw_addr_space_i386 : public unw_addr_space { unw_addr_space_i386(task_t task) : oas(task) {} - OtherAddressSpace > oas; + RemoteAddressSpace> oas; }; /// unw_addr_space_x86_64 is the concrete instance that a unw_addr_space_t @@ -586,7 +587,7 @@ struct unw_addr_space_i386 : public unw_addr_space { /// a 64-bit intel process. struct unw_addr_space_x86_64 : public unw_addr_space { unw_addr_space_x86_64(task_t task) : oas(task) {} - OtherAddressSpace > oas; + RemoteAddressSpace> oas; }; /// unw_addr_space_ppc is the concrete instance that a unw_addr_space_t points @@ -594,7 +595,7 @@ struct unw_addr_space_x86_64 : public unw_addr_space { /// a 32-bit PowerPC process. struct unw_addr_space_ppc : public unw_addr_space { unw_addr_space_ppc(task_t task) : oas(task) {} - OtherAddressSpace > oas; + RemoteAddressSpace> oas; }; #endif // UNW_REMOTE diff --git a/libunwind/src/libunwind.cpp b/libunwind/src/libunwind.cpp index bbb829e..6035449 100644 --- a/libunwind/src/libunwind.cpp +++ b/libunwind/src/libunwind.cpp @@ -85,18 +85,18 @@ _LIBUNWIND_EXPORT int unw_init_remote_thread(unw_cursor_t *cursor, switch (as->cpuType) { case CPU_TYPE_I386: new ((void *)cursor) - UnwindCursor >, + UnwindCursor>, Registers_x86>(((unw_addr_space_i386 *)as)->oas, arg); break; case CPU_TYPE_X86_64: - new ((void *)cursor) UnwindCursor< - OtherAddressSpace >, Registers_x86_64>( - ((unw_addr_space_x86_64 *)as)->oas, arg); + new ((void *)cursor) + UnwindCursor>, + Registers_x86_64>(((unw_addr_space_x86_64 *)as)->oas, arg); break; case CPU_TYPE_POWERPC: new ((void *)cursor) - UnwindCursor >, Registers_ppc>( - ((unw_addr_space_ppc *)as)->oas, arg); + UnwindCursor>, + Registers_ppc>(((unw_addr_space_ppc *)as)->oas, arg); break; default: return UNW_EUNSPEC; -- 2.7.4