Update LOCAL_PATCHES after libsanitizer merge.
[official-gcc.git] / libsanitizer / tsan / tsan_stack_trace.h
blobbc4468f4405ea0bf2693668b5a80562456b69716
1 //===-- tsan_stack_trace.h --------------------------------------*- C++ -*-===//
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 ThreadSanitizer (TSan), a race detector.
9 //
10 //===----------------------------------------------------------------------===//
11 #ifndef TSAN_STACK_TRACE_H
12 #define TSAN_STACK_TRACE_H
14 #include "sanitizer_common/sanitizer_stacktrace.h"
15 #include "tsan_defs.h"
17 namespace __tsan {
19 // StackTrace which calls malloc/free to allocate the buffer for
20 // addresses in stack traces.
21 struct VarSizeStackTrace : public StackTrace {
22 uptr *trace_buffer; // Owned.
24 VarSizeStackTrace();
25 ~VarSizeStackTrace();
26 void Init(const uptr *pcs, uptr cnt, uptr extra_top_pc = 0);
28 // Reverses the current stack trace order, the top frame goes to the bottom,
29 // the last frame goes to the top.
30 void ReverseOrder();
32 private:
33 void ResizeBuffer(uptr new_size);
35 VarSizeStackTrace(const VarSizeStackTrace &);
36 void operator=(const VarSizeStackTrace &);
39 } // namespace __tsan
41 #endif // TSAN_STACK_TRACE_H