LLDB API Documentation

- Main Page
- Namespaces
- Classes
- Files

- File List

SBError.h
Go to the documentation of this file.
1 //===-- SBError.h -----------------------------------------------*- 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 LLDB_SBError_h_
11 #define LLDB_SBError_h_
12
13 #include "lldb/API/SBDefines.h"
14
15 namespace lldb {
16
17 class LLDB_API SBError {
18 public:
19 SBError();
20
21 SBError(const lldb::SBError &rhs);
22
23 ~SBError();
24
25 const SBError &operator=(const lldb::SBError &rhs);
26
27 const char *GetCString() const;
28
29 void Clear();
30
31 bool Fail() const;
32
33 bool Success() const;
34
35 uint32_t GetError() const;
36
37 lldb::ErrorType GetType() const;
38
39 void SetError(uint32_t err, lldb::ErrorType type);
40
41 void SetErrorToErrno();
42
43 void SetErrorToGenericError();
44
45 void SetErrorString(const char *err_str);
46
47 int SetErrorStringWithFormat(const char *format, ...)
48 __attribute__((format(printf, 2, 3)));
49
50 bool IsValid() const;
51
52 bool GetDescription(lldb::SBStream &description);
53
54 protected:
55 friend class SBCommandReturnObject;
56 friend class SBData;
57 friend class SBDebugger;
58 friend class SBCommunication;
59 friend class SBHostOS;
60 friend class SBPlatform;
61 friend class SBProcess;
62 friend class SBStructuredData;
63 friend class SBThread;
64 friend class SBTarget;
65 friend class SBValue;
66 friend class SBWatchpoint;
67 friend class SBBreakpoint;
68 friend class SBBreakpointLocation;
69
70 lldb_private::Error *get();
71
72 lldb_private::Error *operator->();
73
74 const lldb_private::Error &operator*() const;
75
76 lldb_private::Error &ref();
77
78 void SetError(const lldb_private::Error &lldb_error);
79
80 private:
81 std::unique_ptr<lldb_private::Error> m_opaque_ap;
82
83 void CreateIfNeeded();
84 };
85
86 } // namespace lldb
87
88 #endif // LLDB_SBError_h_
lldb::SBCommunication
Definition: SBCommunication.h:18
lldb::SBThread
Definition: SBThread.h:21
lldb::SBBreakpoint
Definition: SBBreakpoint.h:17
lldb::SBData
Definition: SBData.h:17
lldb::SBHostOS
Definition: SBHostOS.h:18
lldb::SBError
class LLDB_API SBError
Definition: SBDefines.h:46
SBDefines.h
lldb::SBStructuredData
Definition: SBStructuredData.h:18
lldb::SBValue
Definition: SBValue.h:22
lldb::SBPlatform
Definition: SBPlatform.h:87
lldb::SBDebugger
Definition: SBDebugger.h:35
lldb::SBProcess
Definition: SBProcess.h:23
lldb::SBError
Definition: SBError.h:17
lldb::SBStream
Definition: SBStream.h:19
lldb::SBBreakpointLocation
Definition: SBBreakpointLocation.h:18
lldb::SBCommandReturnObject
Definition: SBCommandReturnObject.h:25
lldb::SBTarget
Definition: SBTarget.h:34
lldb::SBWatchpoint
Definition: SBWatchpoint.h:17