* configure.ac: Change target-libasan to target-libsanitizer.
[official-gcc.git] / libsanitizer / asan / asan_stack.cc
blob2531a7f9df800193ca7c90b6b1094d360e7e77c0
1 //===-- asan_stack.cc -----------------------------------------------------===//
2 //
3 // This file is distributed under the University of Illinois Open Source
4 // License. See LICENSE.TXT for details.
5 //
6 //===----------------------------------------------------------------------===//
7 //
8 // This file is a part of AddressSanitizer, an address sanity checker.
9 //
10 // Code for ASan stack trace.
11 //===----------------------------------------------------------------------===//
12 #include "asan_flags.h"
13 #include "asan_stack.h"
14 #include "sanitizer/asan_interface.h"
16 namespace __asan {
18 void PrintStack(StackTrace *stack) {
19 stack->PrintStack(stack->trace, stack->size, flags()->symbolize,
20 flags()->strip_path_prefix, __asan_symbolize);
23 } // namespace __asan
25 // ------------------ Interface -------------- {{{1
27 // Provide default implementation of __asan_symbolize that does nothing
28 // and may be overriden by user if he wants to use his own symbolization.
29 // ASan on Windows has its own implementation of this.
30 #ifndef _WIN32
31 SANITIZER_WEAK_ATTRIBUTE SANITIZER_INTERFACE_ATTRIBUTE NOINLINE
32 bool __asan_symbolize(const void *pc, char *out_buffer, int out_size) {
33 return false;
35 #endif