summaryrefslogtreecommitdiff
path: root/lib/sanitizer_common/sanitizer_stacktrace_libcdep.cc
blob: a8e70c965645b1369ebbbfcd5db20718a324f9c9 (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
//===-- sanitizer_stacktrace_libcdep.cc -----------------------------------===//
//
//                     The LLVM Compiler Infrastructure
//
// This file is distributed under the University of Illinois Open Source
// License. See LICENSE.TXT for details.
//
//===----------------------------------------------------------------------===//
//
// This file is shared between AddressSanitizer and ThreadSanitizer
// run-time libraries.
//===----------------------------------------------------------------------===//

#include "sanitizer_stacktrace.h"

namespace __sanitizer {

void StackTrace::Unwind(uptr max_depth, uptr pc, uptr bp, uptr stack_top,
                        uptr stack_bottom, bool request_fast_unwind) {
  if (!WillUseFastUnwind(request_fast_unwind))
    SlowUnwindStack(pc, max_depth);
  else
    FastUnwindStack(pc, bp, stack_top, stack_bottom, max_depth);
}

}  // namespace __sanitizer