1 //===-- tsan_stack_trace.h --------------------------------------*- C++ -*-===//
3 // This file is distributed under the University of Illinois Open Source
4 // License. See LICENSE.TXT for details.
6 //===----------------------------------------------------------------------===//
8 // This file is a part of ThreadSanitizer (TSan), a race detector.
10 //===----------------------------------------------------------------------===//
11 #ifndef TSAN_STACK_TRACE_H
12 #define TSAN_STACK_TRACE_H
14 //#include "sanitizer_common/sanitizer_atomic.h"
15 //#include "sanitizer_common/sanitizer_common.h"
16 //#include "sanitizer_common/sanitizer_deadlock_detector_interface.h"
17 #include "tsan_defs.h"
18 //#include "tsan_clock.h"
19 //#include "tsan_mutex.h"
20 //#include "tsan_dense_alloc.h"
27 // Initialized the object in "static mode",
28 // in this mode it never calls malloc/free but uses the provided buffer.
29 StackTrace(uptr
*buf
, uptr cnt
);
33 void Init(const uptr
*pcs
, uptr cnt
);
34 void ObtainCurrent(ThreadState
*thr
, uptr toppc
);
37 uptr
Get(uptr i
) const;
38 const uptr
*Begin() const;
39 void CopyFrom(const StackTrace
& other
);
46 StackTrace(const StackTrace
&);
47 void operator = (const StackTrace
&);
52 #endif // TSAN_STACK_TRACE_H