diff options
-rw-r--r-- | libunwind/src/AddressSpace.hpp | 11 | ||||
-rw-r--r-- | libunwind/src/UnwindCursor.hpp | 3 |
2 files changed, 5 insertions, 9 deletions
diff --git a/libunwind/src/AddressSpace.hpp b/libunwind/src/AddressSpace.hpp index 2229de503e1..b15eb5c60be 100644 --- a/libunwind/src/AddressSpace.hpp +++ b/libunwind/src/AddressSpace.hpp @@ -35,15 +35,11 @@ namespace libunwind { #include "Registers.hpp" #if _LIBUNWIND_ARM_EHABI -struct EHTEntry { - uint32_t functionOffset; - uint32_t unwindOpcodes; -}; #if defined(_LIBUNWIND_IS_BAREMETAL) // When statically linked on bare-metal, the symbols for the EH table are looked // up without going through the dynamic loader. -extern EHTEntry __exidx_start; -extern EHTEntry __exidx_end; +extern char __exidx_start; +extern char __exidx_end; #else #include <link.h> #endif // !defined(_LIBUNWIND_IS_BAREMETAL) @@ -437,8 +433,7 @@ inline bool LocalAddressSpace::findUnwindSections(pint_t targetAddr, } else if (phdr->p_type == PT_ARM_EXIDX) { uintptr_t exidx_start = pinfo->dlpi_addr + phdr->p_vaddr; cbdata->sects->arm_section = exidx_start; - cbdata->sects->arm_section_length = phdr->p_memsz / - sizeof(EHTEntry); + cbdata->sects->arm_section_length = phdr->p_memsz; found_hdr = true; } } diff --git a/libunwind/src/UnwindCursor.hpp b/libunwind/src/UnwindCursor.hpp index 4ed5a6ec069..7a4f0774783 100644 --- a/libunwind/src/UnwindCursor.hpp +++ b/libunwind/src/UnwindCursor.hpp @@ -693,7 +693,8 @@ struct EHABISectionIterator { return _Self(addressSpace, sects, 0); } static _Self end(A& addressSpace, const UnwindInfoSections& sects) { - return _Self(addressSpace, sects, sects.arm_section_length); + return _Self(addressSpace, sects, + sects.arm_section_length / sizeof(EHABIIndexEntry)); } EHABISectionIterator(A& addressSpace, const UnwindInfoSections& sects, size_t i) |