blob: f8ebc8234bbae3d398a7344fd17a79e2f18f4353 [file] [log] [blame]
Alexey Samsonove5f58952012-06-04 13:50:10 +00001//===-- asan_stack.cc -----------------------------------------------------===//
Kostya Serebryany1e172b42011-11-30 01:07:02 +00002//
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 a part of AddressSanitizer, an address sanity checker.
11//
12// Code for ASan stack trace.
13//===----------------------------------------------------------------------===//
Kostya Serebryany1b5ea8f2012-08-28 14:11:57 +000014#include "asan_flags.h"
Kostya Serebryany1e172b42011-11-30 01:07:02 +000015#include "asan_stack.h"
Chandler Carruthd865fec2012-08-29 02:27:54 +000016#include "sanitizer/asan_interface.h"
Alexey Samsonov5f2fe372012-06-04 11:20:17 +000017
Kostya Serebryany1e172b42011-11-30 01:07:02 +000018namespace __asan {
19
Alexey Samsonovc93d3e22012-08-22 13:31:37 +000020static __asan_symbolize_callback symbolize_callback;
21
Kostya Serebryanycc347222012-08-28 13:49:49 +000022void PrintStack(StackTrace *stack) {
23 stack->PrintStack(stack->trace, stack->size, flags()->symbolize,
24 flags()->strip_path_prefix, symbolize_callback);
25}
26
27
Kostya Serebryany1e172b42011-11-30 01:07:02 +000028} // namespace __asan
Alexey Samsonovc93d3e22012-08-22 13:31:37 +000029
30// ------------------ Interface -------------- {{{1
31using namespace __asan; // NOLINT
32
33void NOINLINE __asan_set_symbolize_callback(
34 __asan_symbolize_callback callback) {
35 symbolize_callback = callback;
36}