SBTraceOptions.h 1.6 KB

1234567891011121314151617181920212223242526272829303132333435363738394041424344454647484950515253545556575859
  1. //===-- SBTraceOptions ------------------------------------------*- C++ -*-===//
  2. //
  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
  6. //
  7. //===----------------------------------------------------------------------===//
  8. #ifndef LLDB_API_SBTRACEOPTIONS_H
  9. #define LLDB_API_SBTRACEOPTIONS_H
  10. #include "lldb/API/SBDefines.h"
  11. namespace lldb {
  12. class LLDB_API SBTraceOptions {
  13. public:
  14. SBTraceOptions();
  15. lldb::TraceType getType() const;
  16. uint64_t getTraceBufferSize() const;
  17. /// The trace parameters consist of any custom parameters
  18. /// apart from the generic parameters such as
  19. /// TraceType, trace_buffer_size and meta_data_buffer_size.
  20. /// The returned parameters would be formatted as a JSON Dictionary.
  21. lldb::SBStructuredData getTraceParams(lldb::SBError &error);
  22. uint64_t getMetaDataBufferSize() const;
  23. /// SBStructuredData is meant to hold any custom parameters
  24. /// apart from meta buffer size and trace size. They should
  25. /// be formatted as a JSON Dictionary.
  26. void setTraceParams(lldb::SBStructuredData &params);
  27. void setType(lldb::TraceType type);
  28. void setTraceBufferSize(uint64_t size);
  29. void setMetaDataBufferSize(uint64_t size);
  30. void setThreadID(lldb::tid_t thread_id);
  31. lldb::tid_t getThreadID();
  32. explicit operator bool() const;
  33. bool IsValid();
  34. protected:
  35. friend class SBProcess;
  36. friend class SBTrace;
  37. lldb::TraceOptionsSP m_traceoptions_sp;
  38. };
  39. }
  40. #endif // LLDB_API_SBTRACEOPTIONS_H