1 | //===-- SBSymbolContext.h ---------------------------------------*- 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 | |
9 | #ifndef LLDB_API_SBSYMBOLCONTEXT_H |
10 | #define LLDB_API_SBSYMBOLCONTEXT_H |
11 | |
12 | #include "lldb/API/SBBlock.h" |
13 | #include "lldb/API/SBCompileUnit.h" |
14 | #include "lldb/API/SBDefines.h" |
15 | #include "lldb/API/SBFunction.h" |
16 | #include "lldb/API/SBLineEntry.h" |
17 | #include "lldb/API/SBModule.h" |
18 | #include "lldb/API/SBSymbol.h" |
19 | |
20 | namespace lldb_private { |
21 | namespace python { |
22 | class SWIGBridge; |
23 | } |
24 | } // namespace lldb_private |
25 | |
26 | namespace lldb { |
27 | |
28 | class LLDB_API SBSymbolContext { |
29 | public: |
30 | SBSymbolContext(); |
31 | |
32 | SBSymbolContext(const lldb::SBSymbolContext &rhs); |
33 | |
34 | ~SBSymbolContext(); |
35 | |
36 | explicit operator bool() const; |
37 | |
38 | bool IsValid() const; |
39 | |
40 | const lldb::SBSymbolContext &operator=(const lldb::SBSymbolContext &rhs); |
41 | |
42 | lldb::SBModule GetModule(); |
43 | lldb::SBCompileUnit GetCompileUnit(); |
44 | lldb::SBFunction GetFunction(); |
45 | lldb::SBBlock GetBlock(); |
46 | lldb::SBLineEntry GetLineEntry(); |
47 | lldb::SBSymbol GetSymbol(); |
48 | |
49 | void SetModule(lldb::SBModule module); |
50 | void SetCompileUnit(lldb::SBCompileUnit compile_unit); |
51 | void SetFunction(lldb::SBFunction function); |
52 | void SetBlock(lldb::SBBlock block); |
53 | void SetLineEntry(lldb::SBLineEntry line_entry); |
54 | void SetSymbol(lldb::SBSymbol symbol); |
55 | |
56 | SBSymbolContext GetParentOfInlinedScope(const SBAddress &curr_frame_pc, |
57 | SBAddress &parent_frame_addr) const; |
58 | |
59 | bool GetDescription(lldb::SBStream &description); |
60 | |
61 | protected: |
62 | friend class SBAddress; |
63 | friend class SBFrame; |
64 | friend class SBModule; |
65 | friend class SBThread; |
66 | friend class SBTarget; |
67 | friend class SBSymbolContextList; |
68 | |
69 | friend class lldb_private::python::SWIGBridge; |
70 | |
71 | SBSymbolContext(const lldb_private::SymbolContext &sc_ptr); |
72 | |
73 | lldb_private::SymbolContext *operator->() const; |
74 | |
75 | lldb_private::SymbolContext &operator*(); |
76 | |
77 | lldb_private::SymbolContext &ref(); |
78 | |
79 | const lldb_private::SymbolContext &operator*() const; |
80 | |
81 | lldb_private::SymbolContext *get() const; |
82 | |
83 | private: |
84 | std::unique_ptr<lldb_private::SymbolContext> m_opaque_up; |
85 | }; |
86 | |
87 | } // namespace lldb |
88 | |
89 | #endif // LLDB_API_SBSYMBOLCONTEXT_H |
90 |