LLDB  mainline
SBSymbolContext.h
Go to the documentation of this file.
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_SBSymbolContext_h_
10 #define LLDB_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 {
21 
23 public:
25 
27 
29 
30  ~SBSymbolContext();
31 
32  explicit operator bool() const;
33 
34  bool IsValid() const;
35 
36  const lldb::SBSymbolContext &operator=(const lldb::SBSymbolContext &rhs);
37 
38  lldb::SBModule GetModule();
39  lldb::SBCompileUnit GetCompileUnit();
40  lldb::SBFunction GetFunction();
41  lldb::SBBlock GetBlock();
42  lldb::SBLineEntry GetLineEntry();
43  lldb::SBSymbol GetSymbol();
44 
45  void SetModule(lldb::SBModule module);
46  void SetCompileUnit(lldb::SBCompileUnit compile_unit);
47  void SetFunction(lldb::SBFunction function);
48  void SetBlock(lldb::SBBlock block);
49  void SetLineEntry(lldb::SBLineEntry line_entry);
50  void SetSymbol(lldb::SBSymbol symbol);
51 
52  SBSymbolContext GetParentOfInlinedScope(const SBAddress &curr_frame_pc,
53  SBAddress &parent_frame_addr) const;
54 
55  bool GetDescription(lldb::SBStream &description);
56 
57 protected:
58  friend class SBAddress;
59  friend class SBFrame;
60  friend class SBModule;
61  friend class SBThread;
62  friend class SBTarget;
63  friend class SBSymbolContextList;
64 
65  lldb_private::SymbolContext *operator->() const;
66 
68 
70 
72 
73  lldb_private::SymbolContext *get() const;
74 
75  void SetSymbolContext(const lldb_private::SymbolContext *sc_ptr);
76 
77 private:
78  std::unique_ptr<lldb_private::SymbolContext> m_opaque_up;
79 };
80 
81 } // namespace lldb
82 
83 #endif // LLDB_SBSymbolContext_h_
Defines a symbol context baton that can be handed other debug core functions.
Definition: SymbolContext.h:33
const Scalar operator*(const Scalar &lhs, const Scalar &rhs)
Definition: Scalar.cpp:2161
class LLDB_API SBSymbolContext
Definition: SBDefines.h:70
#define LLDB_API
Definition: lldb-defines.h:23
Definition: SBAddress.h:15