Alexey Samsonov | e13f775 | 2013-11-07 06:33:06 +0000 | [diff] [blame] | 1 | //===-- sanitizer_stacktrace_libcdep.cc -----------------------------------===// |
| 2 | // |
| 3 | // The LLVM Compiler Infrastructure |
| 4 | // |
| 5 | // This file is distributed under the University of Illinois Open Source |
| 6 | // License. See LICENSE.TXT for details. |
| 7 | // |
| 8 | //===----------------------------------------------------------------------===// |
| 9 | // |
| 10 | // This file is shared between AddressSanitizer and ThreadSanitizer |
| 11 | // run-time libraries. |
| 12 | //===----------------------------------------------------------------------===// |
| 13 | |
| 14 | #include "sanitizer_stacktrace.h" |
| 15 | |
| 16 | namespace __sanitizer { |
| 17 | |
| 18 | void StackTrace::Unwind(uptr max_depth, uptr pc, uptr bp, uptr stack_top, |
Alexey Samsonov | b3d9399 | 2013-11-07 07:28:33 +0000 | [diff] [blame] | 19 | uptr stack_bottom, bool request_fast_unwind) { |
| 20 | if (!WillUseFastUnwind(request_fast_unwind)) |
Alexey Samsonov | e13f775 | 2013-11-07 06:33:06 +0000 | [diff] [blame] | 21 | SlowUnwindStack(pc, max_depth); |
| 22 | else |
| 23 | FastUnwindStack(pc, bp, stack_top, stack_bottom, max_depth); |
Alexey Samsonov | 9ff4598 | 2013-11-13 14:46:58 +0000 | [diff] [blame^] | 24 | |
| 25 | top_frame_bp = size ? bp : 0; |
Alexey Samsonov | e13f775 | 2013-11-07 06:33:06 +0000 | [diff] [blame] | 26 | } |
| 27 | |
| 28 | } // namespace __sanitizer |