File indexing completed on 2026-05-10 08:42:42
0001
0002
0003
0004
0005
0006
0007
0008
0009 #ifndef LLDB_API_SBSTRUCTUREDDATA_H
0010 #define LLDB_API_SBSTRUCTUREDDATA_H
0011
0012 #include "lldb/API/SBCommandReturnObject.h"
0013 #include "lldb/API/SBDefines.h"
0014 #include "lldb/API/SBModule.h"
0015 #include "lldb/API/SBScriptObject.h"
0016
0017 namespace lldb_private {
0018 namespace python {
0019 class SWIGBridge;
0020 }
0021 namespace lua {
0022 class SWIGBridge;
0023 }
0024 }
0025
0026 namespace lldb {
0027
0028 class SBStructuredData {
0029 public:
0030 SBStructuredData();
0031
0032 SBStructuredData(const lldb::SBStructuredData &rhs);
0033
0034 SBStructuredData(const lldb::SBScriptObject obj,
0035 const lldb::SBDebugger &debugger);
0036
0037 ~SBStructuredData();
0038
0039 lldb::SBStructuredData &operator=(const lldb::SBStructuredData &rhs);
0040
0041 explicit operator bool() const;
0042
0043 bool IsValid() const;
0044
0045 lldb::SBError SetFromJSON(lldb::SBStream &stream);
0046
0047 lldb::SBError SetFromJSON(const char *json);
0048
0049 void Clear();
0050
0051 lldb::SBError GetAsJSON(lldb::SBStream &stream) const;
0052
0053 lldb::SBError GetDescription(lldb::SBStream &stream) const;
0054
0055
0056 lldb::StructuredDataType GetType() const;
0057
0058
0059
0060
0061 size_t GetSize() const;
0062
0063
0064
0065 bool GetKeys(lldb::SBStringList &keys) const;
0066
0067
0068
0069 lldb::SBStructuredData GetValueForKey(const char *key) const;
0070
0071
0072
0073 lldb::SBStructuredData GetItemAtIndex(size_t idx) const;
0074
0075
0076 uint64_t GetUnsignedIntegerValue(uint64_t fail_value = 0) const;
0077
0078 int64_t GetSignedIntegerValue(int64_t fail_value = 0) const;
0079
0080 LLDB_DEPRECATED_FIXME(
0081 "Specify if the value is signed or unsigned",
0082 "uint64_t GetUnsignedIntegerValue(uint64_t fail_value = 0)")
0083 uint64_t GetIntegerValue(uint64_t fail_value = 0) const;
0084
0085
0086
0087 double GetFloatValue(double fail_value = 0.0) const;
0088
0089
0090 bool GetBooleanValue(bool fail_value = false) const;
0091
0092
0093
0094
0095
0096
0097
0098
0099
0100
0101
0102
0103
0104
0105
0106
0107 size_t GetStringValue(char *dst, size_t dst_len) const;
0108
0109
0110 lldb::SBScriptObject GetGenericValue() const;
0111
0112 protected:
0113 friend class SBAttachInfo;
0114 friend class SBCommandReturnObject;
0115 friend class SBLaunchInfo;
0116 friend class SBDebugger;
0117 friend class SBFrame;
0118 friend class SBError;
0119 friend class SBTarget;
0120 friend class SBProcess;
0121 friend class SBThread;
0122 friend class SBThreadPlan;
0123 friend class SBBreakpoint;
0124 friend class SBBreakpointLocation;
0125 friend class SBBreakpointName;
0126 friend class SBTrace;
0127 friend class lldb_private::python::SWIGBridge;
0128 friend class lldb_private::lua::SWIGBridge;
0129 friend class SBCommandInterpreter;
0130
0131 SBStructuredData(const lldb_private::StructuredDataImpl &impl);
0132
0133 SBStructuredData(const lldb::EventSP &event_sp);
0134
0135 StructuredDataImplUP m_impl_up;
0136 };
0137 }
0138
0139 #endif