1 //===-- SBTraceOptions ------------------------------------------*- C++ -*-===//
3 // Part of the LLVM Project, under the Apache License v2.0 with LLVM Exceptions.
4 // See https://llvm.org/LICENSE.txt for license information.
5 // SPDX-License-Identifier: Apache-2.0 WITH LLVM-exception
7 //===----------------------------------------------------------------------===//
9 #ifndef SBTRACEOPTIONS_H_
10 #define SBTRACEOPTIONS_H_
12 #include "lldb/API/SBDefines.h"
16 class LLDB_API SBTraceOptions {
20 lldb::TraceType getType() const;
22 uint64_t getTraceBufferSize() const;
24 /// The trace parameters consist of any custom parameters
25 /// apart from the generic parameters such as
26 /// TraceType, trace_buffer_size and meta_data_buffer_size.
27 /// The returned parameters would be formatted as a JSON Dictionary.
28 lldb::SBStructuredData getTraceParams(lldb::SBError &error);
30 uint64_t getMetaDataBufferSize() const;
32 /// SBStructuredData is meant to hold any custom parameters
33 /// apart from meta buffer size and trace size. They should
34 /// be formatted as a JSON Dictionary.
35 void setTraceParams(lldb::SBStructuredData ¶ms);
37 void setType(lldb::TraceType type);
39 void setTraceBufferSize(uint64_t size);
41 void setMetaDataBufferSize(uint64_t size);
43 void setThreadID(lldb::tid_t thread_id);
45 lldb::tid_t getThreadID();
47 explicit operator bool() const;
52 friend class SBProcess;
55 lldb::TraceOptionsSP m_traceoptions_sp;
59 #endif /* SBTRACEOPTIONS_H_ */