]> CyberLeo.Net >> Repos - FreeBSD/FreeBSD.git/blob - contrib/llvm/tools/lldb/include/lldb/API/SBTraceOptions.h
Merge llvm, clang, lld, lldb, compiler-rt and libc++ r301441, and update
[FreeBSD/FreeBSD.git] / contrib / llvm / tools / lldb / include / lldb / API / SBTraceOptions.h
1 //===-- SBTraceOptions ------------------------------------------*- C++ -*-===//
2 //
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 #ifndef SBTRACEOPTIONS_H_
11 #define SBTRACEOPTIONS_H_
12
13 #include "lldb/API/SBDefines.h"
14
15 namespace lldb {
16
17 class LLDB_API SBTraceOptions {
18 public:
19   SBTraceOptions();
20
21   lldb::TraceType getType() const;
22
23   uint64_t getTraceBufferSize() const;
24
25   /// The trace parameters consist of any custom parameters
26   /// apart from the generic parameters such as
27   /// TraceType, trace_buffer_size and meta_data_buffer_size.
28   /// The returned parameters would be formatted as a JSON Dictionary.
29   lldb::SBStructuredData getTraceParams(lldb::SBError &error);
30
31   uint64_t getMetaDataBufferSize() const;
32
33   /// SBStructuredData is meant to hold any custom parameters
34   /// apart from meta buffer size and trace size. They should
35   /// be formatted as a JSON Dictionary.
36   void setTraceParams(lldb::SBStructuredData &params);
37
38   void setType(lldb::TraceType type);
39
40   void setTraceBufferSize(uint64_t size);
41
42   void setMetaDataBufferSize(uint64_t size);
43
44   void setThreadID(lldb::tid_t thread_id);
45
46   lldb::tid_t getThreadID();
47
48   bool IsValid();
49
50 protected:
51   friend class SBProcess;
52   friend class SBTrace;
53
54   lldb::TraceOptionsSP m_traceoptions_sp;
55 };
56 }
57
58 #endif /* SBTRACEOPTIONS_H_ */