summaryrefslogtreecommitdiffstats
path: root/libunwind/src/Unwind-EHABI.cpp
diff options
context:
space:
mode:
authorMartin Storsjo <martin@martin.st>2017-10-30 19:06:34 +0000
committerMartin Storsjo <martin@martin.st>2017-10-30 19:06:34 +0000
commitc18d5c05cbcc9fe7f8f741338bb835417108e17b (patch)
treea305c896949b6c2983452ddfcba9f3b8eaa9a85d /libunwind/src/Unwind-EHABI.cpp
parentddfdb32b302da2cf1b20d4c64444f9f58d5b8533 (diff)
downloadbcm5719-llvm-c18d5c05cbcc9fe7f8f741338bb835417108e17b.tar.gz
bcm5719-llvm-c18d5c05cbcc9fe7f8f741338bb835417108e17b.zip
Change unw_word_t to always have the same size as the pointer size
This matches the original libunwind API. This also unifies the type between ARM EHABI and the other configurations, and allows getting rid of a number of casts in log messages. The cursor size updates for ppc and or1k are untested, but unw_proc_info_t shrinks by 4 uint64_t units on i386 at least. Differential Revision: https://reviews.llvm.org/D39365 llvm-svn: 316942
Diffstat (limited to 'libunwind/src/Unwind-EHABI.cpp')
-rw-r--r--libunwind/src/Unwind-EHABI.cpp25
1 files changed, 13 insertions, 12 deletions
diff --git a/libunwind/src/Unwind-EHABI.cpp b/libunwind/src/Unwind-EHABI.cpp
index 109b27281eb..f37732c6ac8 100644
--- a/libunwind/src/Unwind-EHABI.cpp
+++ b/libunwind/src/Unwind-EHABI.cpp
@@ -14,6 +14,7 @@
#if defined(_LIBUNWIND_ARM_EHABI)
+#include <inttypes.h>
#include <stdbool.h>
#include <stdint.h>
#include <stdio.h>
@@ -468,11 +469,11 @@ unwind_phase1(unw_context_t *uc, unw_cursor_t *cursor, _Unwind_Exception *except
unw_word_t pc;
unw_get_reg(cursor, UNW_REG_IP, &pc);
_LIBUNWIND_TRACE_UNWINDING(
- "unwind_phase1(ex_ojb=%p): pc=0x%llX, start_ip=0x%llX, func=%s, "
- "lsda=0x%llX, personality=0x%llX",
- static_cast<void *>(exception_object), (long long)pc,
- (long long)frameInfo.start_ip, functionName,
- (long long)frameInfo.lsda, (long long)frameInfo.handler);
+ "unwind_phase1(ex_ojb=%p): pc=0x%" PRIxPTR ", start_ip=0x%" PRIxPTR ", func=%s, "
+ "lsda=0x%" PRIxPTR ", personality=0x%" PRIxPTR,
+ static_cast<void *>(exception_object), pc,
+ frameInfo.start_ip, functionName,
+ frameInfo.lsda, frameInfo.handler);
}
// If there is a personality routine, ask it if it will want to stop at
@@ -584,11 +585,11 @@ static _Unwind_Reason_Code unwind_phase2(unw_context_t *uc, unw_cursor_t *cursor
(frameInfo.start_ip + offset > frameInfo.end_ip))
functionName = ".anonymous.";
_LIBUNWIND_TRACE_UNWINDING(
- "unwind_phase2(ex_ojb=%p): start_ip=0x%llX, func=%s, sp=0x%llX, "
- "lsda=0x%llX, personality=0x%llX",
- static_cast<void *>(exception_object), (long long)frameInfo.start_ip,
- functionName, (long long)sp, (long long)frameInfo.lsda,
- (long long)frameInfo.handler);
+ "unwind_phase2(ex_ojb=%p): start_ip=0x%" PRIxPTR ", func=%s, sp=0x%" PRIxPTR ", "
+ "lsda=0x%" PRIxPTR ", personality=0x%" PRIxPTR "",
+ static_cast<void *>(exception_object), frameInfo.start_ip,
+ functionName, sp, frameInfo.lsda,
+ frameInfo.handler);
}
// If there is a personality routine, tell it we are unwinding.
@@ -627,9 +628,9 @@ static _Unwind_Reason_Code unwind_phase2(unw_context_t *uc, unw_cursor_t *cursor
unw_get_reg(cursor, UNW_REG_IP, &pc);
unw_get_reg(cursor, UNW_REG_SP, &sp);
_LIBUNWIND_TRACE_UNWINDING("unwind_phase2(ex_ojb=%p): re-entering "
- "user code with ip=0x%llX, sp=0x%llX",
+ "user code with ip=0x%" PRIxPTR ", sp=0x%" PRIxPTR,
static_cast<void *>(exception_object),
- (long long)pc, (long long)sp);
+ pc, sp);
}
{
OpenPOWER on IntegriCloud