aboutsummaryrefslogtreecommitdiff
path: root/libsanitizer/include
diff options
context:
space:
mode:
authorH.J. Lu <hongjiu.lu@intel.com>2012-11-16 12:02:29 +0000
committerH.J. Lu <hjl@gcc.gnu.org>2012-11-16 04:02:29 -0800
commitd1caed1484bef4846406d7c42f9e5bbfb7c58710 (patch)
treec820b9a2e4796f64daf0e40ac9e60c9dc6588120 /libsanitizer/include
parent8108af84a5783a1c7e328a8be2eef8330517c224 (diff)
downloadgcc-d1caed1484bef4846406d7c42f9e5bbfb7c58710.zip
gcc-d1caed1484bef4846406d7c42f9e5bbfb7c58710.tar.gz
gcc-d1caed1484bef4846406d7c42f9e5bbfb7c58710.tar.bz2
Define/use hardware pointer type for stack unwind
PR other/55333 * include/sanitizer/common_interface_defs.h (uhwptr): New type for hardware pointer. * sanitizer_common/sanitizer_stacktrace.cc (StackTrace::FastUnwindStack): Replace uptr with uhwptr for stack unwind. From-SVN: r193557
Diffstat (limited to 'libsanitizer/include')
-rw-r--r--libsanitizer/include/sanitizer/common_interface_defs.h7
1 files changed, 7 insertions, 0 deletions
diff --git a/libsanitizer/include/sanitizer/common_interface_defs.h b/libsanitizer/include/sanitizer/common_interface_defs.h
index 4ac7609..d78d280 100644
--- a/libsanitizer/include/sanitizer/common_interface_defs.h
+++ b/libsanitizer/include/sanitizer/common_interface_defs.h
@@ -46,6 +46,13 @@ typedef signed long long sptr; // NOLINT
typedef unsigned long uptr; // NOLINT
typedef signed long sptr; // NOLINT
#endif // defined(_WIN64)
+#if defined(__x86_64__)
+// Since x32 uses ILP32 data model in 64-bit hardware mode, we must use
+// 64-bit pointer to unwind stack frame.
+typedef unsigned long long uhwptr; // NOLINT
+#else
+typedef uptr uhwptr; // NOLINT
+#endif
typedef unsigned char u8;
typedef unsigned short u16; // NOLINT
typedef unsigned int u32;