Index: libunwind/trunk/include/__libunwind_config.h =================================================================== --- libunwind/trunk/include/__libunwind_config.h +++ libunwind/trunk/include/__libunwind_config.h @@ -63,7 +63,7 @@ # define _LIBUNWIND_TARGET_ARM 1 # if defined(__SEH__) # define _LIBUNWIND_CONTEXT_SIZE 42 -# define _LIBUNWIND_CURSOR_SIZE 85 +# define _LIBUNWIND_CURSOR_SIZE 80 # elif defined(__ARM_WMMX) # define _LIBUNWIND_CONTEXT_SIZE 61 # define _LIBUNWIND_CURSOR_SIZE 68 Index: libunwind/trunk/src/Unwind-seh.cpp =================================================================== --- libunwind/trunk/src/Unwind-seh.cpp +++ libunwind/trunk/src/Unwind-seh.cpp @@ -164,17 +164,22 @@ // This should never happen in phase 1. if (!IS_UNWINDING(ms_exc->ExceptionFlags)) _LIBUNWIND_ABORT("Personality installed context during phase 1!"); - exc->private_[2] = disp->TargetIp; #ifdef __x86_64__ + exc->private_[2] = disp->TargetIp; unw_get_reg(&cursor, UNW_X86_64_RAX, &retval); unw_get_reg(&cursor, UNW_X86_64_RDX, &exc->private_[3]); #elif defined(__arm__) + exc->private_[2] = disp->TargetPc; unw_get_reg(&cursor, UNW_ARM_R0, &retval); unw_get_reg(&cursor, UNW_ARM_R1, &exc->private_[3]); #endif unw_get_reg(&cursor, UNW_REG_IP, &target); ms_exc->ExceptionCode = STATUS_GCC_UNWIND; +#ifdef __x86_64__ ms_exc->ExceptionInformation[2] = disp->TargetIp; +#elif defined(__arm__) + ms_exc->ExceptionInformation[2] = disp->TargetPc; +#endif ms_exc->ExceptionInformation[3] = exc->private_[3]; // Give NTRTL some scratch space to keep track of the collided unwind. // Don't use the one that was passed in; we don't want to overwrite the Index: libunwind/trunk/src/UnwindCursor.hpp =================================================================== --- libunwind/trunk/src/UnwindCursor.hpp +++ libunwind/trunk/src/UnwindCursor.hpp @@ -606,14 +606,14 @@ _msContext.R12 = r.getRegister(UNW_ARM_R12); _msContext.Sp = r.getRegister(UNW_ARM_SP); _msContext.Lr = r.getRegister(UNW_ARM_LR); - _msContext.Pc = r.getRegister(UNW_ARM_PC); - for (int r = UNW_ARM_D0; r <= UNW_ARM_D31; ++r) { + _msContext.Pc = r.getRegister(UNW_ARM_IP); + for (int i = UNW_ARM_D0; i <= UNW_ARM_D31; ++i) { union { uint64_t w; double d; } d; - d.d = r.getFloatRegister(r); - _msContext.D[r - UNW_ARM_D0] = d.w; + d.d = r.getFloatRegister(i); + _msContext.D[i - UNW_ARM_D0] = d.w; } #endif } @@ -682,7 +682,7 @@ case UNW_ARM_SP: return _msContext.Sp; case UNW_ARM_LR: return _msContext.Lr; case UNW_REG_IP: - case UNW_ARM_PC: return _msContext.Pc; + case UNW_ARM_IP: return _msContext.Pc; #endif } _LIBUNWIND_ABORT("unsupported register"); @@ -728,7 +728,7 @@ case UNW_ARM_SP: _msContext.Sp = value; break; case UNW_ARM_LR: _msContext.Lr = value; break; case UNW_REG_IP: - case UNW_ARM_PC: _msContext.Pc = value; break; + case UNW_ARM_IP: _msContext.Pc = value; break; #endif default: _LIBUNWIND_ABORT("unsupported register"); @@ -842,7 +842,7 @@ case UNW_ARM_SP: return "sp"; case UNW_ARM_LR: return "lr"; case UNW_REG_IP: - case UNW_ARM_PC: return "pc"; + case UNW_ARM_IP: return "pc"; case UNW_ARM_S0: return "s0"; case UNW_ARM_S1: return "s1"; case UNW_ARM_S2: return "s2";