sanitizer_stacktrace_libcdep.cc revision f16dc4234098a22a9d0d56f0198d87905481e7fd
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
26}  // namespace __sanitizer
27