sanitizer_stacktrace_libcdep.cc revision 1b17f5b79d58c5aff291dde05727ad0b215b81c6
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
16namespace __sanitizer {
17
18void StackTrace::Unwind(uptr max_depth, uptr pc, uptr bp, uptr stack_top,
19                        uptr stack_bottom, bool request_fast_unwind) {
20  if (!WillUseFastUnwind(request_fast_unwind))
21    SlowUnwindStack(pc, max_depth);
22  else
23    FastUnwindStack(pc, bp, stack_top, stack_bottom, max_depth);
24
25  top_frame_bp = size ? bp : 0;
26}
27
28}  // namespace __sanitizer
29