1 //===-- tsan_stack_trace.h --------------------------------------*- C++ -*-===//
3 // The LLVM Compiler Infrastructure
5 // This file is distributed under the University of Illinois Open Source
6 // License. See LICENSE.TXT for details.
8 //===----------------------------------------------------------------------===//
10 // This file is a part of ThreadSanitizer (TSan), a race detector.
12 //===----------------------------------------------------------------------===//
13 #ifndef TSAN_STACK_TRACE_H
14 #define TSAN_STACK_TRACE_H
16 #include "sanitizer_common/sanitizer_stacktrace.h"
17 #include "tsan_defs.h"
21 // StackTrace which calls malloc/free to allocate the buffer for
22 // addresses in stack traces.
23 struct VarSizeStackTrace : public StackTrace {
24 uptr *trace_buffer; // Owned.
28 void Init(const uptr *pcs, uptr cnt, uptr extra_top_pc = 0);
30 // Reverses the current stack trace order, the top frame goes to the bottom,
31 // the last frame goes to the top.
35 void ResizeBuffer(uptr new_size);
37 VarSizeStackTrace(const VarSizeStackTrace &);
38 void operator=(const VarSizeStackTrace &);
43 #endif // TSAN_STACK_TRACE_H