1 //===-- sanitizer_stacktrace_libcdep.cc -----------------------------------===//
3 // This file is distributed under the University of Illinois Open Source
4 // License. See LICENSE.TXT for details.
6 //===----------------------------------------------------------------------===//
8 // This file is shared between AddressSanitizer and ThreadSanitizer
10 //===----------------------------------------------------------------------===//
12 #include "sanitizer_stacktrace.h"
14 namespace __sanitizer
{
16 void StackTrace::Unwind(uptr max_depth
, uptr pc
, uptr bp
, uptr stack_top
,
17 uptr stack_bottom
, bool request_fast_unwind
) {
18 if (!WillUseFastUnwind(request_fast_unwind
))
19 SlowUnwindStack(pc
, max_depth
);
21 FastUnwindStack(pc
, bp
, stack_top
, stack_bottom
, max_depth
);
23 top_frame_bp
= size
? bp
: 0;
26 } // namespace __sanitizer