blob: 58fa18251ecfb5508e433621aaba5305af4bd196 [file] [log] [blame]
Alexey Samsonove13f7752013-11-07 06:33:06 +00001//===-- 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,
Alexey Samsonovb3d93992013-11-07 07:28:33 +000019 uptr stack_bottom, bool request_fast_unwind) {
20 if (!WillUseFastUnwind(request_fast_unwind))
Alexey Samsonove13f7752013-11-07 06:33:06 +000021 SlowUnwindStack(pc, max_depth);
22 else
23 FastUnwindStack(pc, bp, stack_top, stack_bottom, max_depth);
Alexey Samsonov9ff45982013-11-13 14:46:58 +000024
25 top_frame_bp = size ? bp : 0;
Alexey Samsonove13f7752013-11-07 06:33:06 +000026}
27
28} // namespace __sanitizer