summaryrefslogtreecommitdiff
path: root/lib/asan/asan_stack.h
diff options
context:
space:
mode:
authorKostya Serebryany <kcc@google.com>2012-05-31 14:35:53 +0000
committerKostya Serebryany <kcc@google.com>2012-05-31 14:35:53 +0000
commit3f4c3875c42078e22c7e5356c5746fd18756d958 (patch)
tree5eb54d08f73ecc05f51f038ab7d9920c8e380b48 /lib/asan/asan_stack.h
parenta13749bd7b3629a3498e765960729a8ade5db7cf (diff)
downloadcompiler-rt-3f4c3875c42078e22c7e5356c5746fd18756d958.tar.gz
compiler-rt-3f4c3875c42078e22c7e5356c5746fd18756d958.tar.bz2
compiler-rt-3f4c3875c42078e22c7e5356c5746fd18756d958.tar.xz
[asan] more renaming
git-svn-id: https://llvm.org/svn/llvm-project/compiler-rt/trunk@157746 91177308-0d34-0410-b5e6-96231b3b80d8
Diffstat (limited to 'lib/asan/asan_stack.h')
-rw-r--r--lib/asan/asan_stack.h48
1 files changed, 24 insertions, 24 deletions
diff --git a/lib/asan/asan_stack.h b/lib/asan/asan_stack.h
index 252df93c..a754515c 100644
--- a/lib/asan/asan_stack.h
+++ b/lib/asan/asan_stack.h
@@ -18,41 +18,41 @@
namespace __asan {
-static const size_t kStackTraceMax = 64;
+static const uptr kStackTraceMax = 64;
struct AsanStackTrace {
- size_t size;
- size_t max_size;
- uintptr_t trace[kStackTraceMax];
- static void PrintStack(uintptr_t *addr, size_t size);
+ uptr size;
+ uptr max_size;
+ uptr trace[kStackTraceMax];
+ static void PrintStack(uptr *addr, uptr size);
void PrintStack() {
PrintStack(this->trace, this->size);
}
- void CopyTo(uintptr_t *dst, size_t dst_size) {
- for (size_t i = 0; i < size && i < dst_size; i++)
+ void CopyTo(uptr *dst, uptr dst_size) {
+ for (uptr i = 0; i < size && i < dst_size; i++)
dst[i] = trace[i];
- for (size_t i = size; i < dst_size; i++)
+ for (uptr i = size; i < dst_size; i++)
dst[i] = 0;
}
- void CopyFrom(uintptr_t *src, size_t src_size) {
+ void CopyFrom(uptr *src, uptr src_size) {
size = src_size;
if (size > kStackTraceMax) size = kStackTraceMax;
- for (size_t i = 0; i < size; i++) {
+ for (uptr i = 0; i < size; i++) {
trace[i] = src[i];
}
}
- void GetStackTrace(size_t max_s, uintptr_t pc, uintptr_t bp);
+ void GetStackTrace(uptr max_s, uptr pc, uptr bp);
- void FastUnwindStack(uintptr_t pc, uintptr_t bp);
+ void FastUnwindStack(uptr pc, uptr bp);
- static uintptr_t GetCurrentPc();
+ static uptr GetCurrentPc();
- static size_t CompressStack(AsanStackTrace *stack,
- uint32_t *compressed, size_t size);
+ static uptr CompressStack(AsanStackTrace *stack,
+ uint32_t *compressed, uptr size);
static void UncompressStack(AsanStackTrace *stack,
- uint32_t *compressed, size_t size);
+ uint32_t *compressed, uptr size);
};
} // namespace __asan
@@ -60,18 +60,18 @@ struct AsanStackTrace {
// Use this macro if you want to print stack trace with the caller
// of the current function in the top frame.
#define GET_CALLER_PC_BP_SP \
- uintptr_t bp = GET_CURRENT_FRAME(); \
- uintptr_t pc = GET_CALLER_PC(); \
- uintptr_t local_stack; \
- uintptr_t sp = (uintptr_t)&local_stack;
+ uptr bp = GET_CURRENT_FRAME(); \
+ uptr pc = GET_CALLER_PC(); \
+ uptr local_stack; \
+ uptr sp = (uptr)&local_stack;
// Use this macro if you want to print stack trace with the current
// function in the top frame.
#define GET_CURRENT_PC_BP_SP \
- uintptr_t bp = GET_CURRENT_FRAME(); \
- uintptr_t pc = AsanStackTrace::GetCurrentPc(); \
- uintptr_t local_stack; \
- uintptr_t sp = (uintptr_t)&local_stack;
+ uptr bp = GET_CURRENT_FRAME(); \
+ uptr pc = AsanStackTrace::GetCurrentPc(); \
+ uptr local_stack; \
+ uptr sp = (uptr)&local_stack;
// Get the stack trace with the given pc and bp.
// The pc will be in the position 0 of the resulting stack trace.