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_API_SBSYMBOLCONTEXT_H
10#define LLDB_API_SBSYMBOLCONTEXT_H
11
12#include "lldb/API/SBBlock.h"
14#include "lldb/API/SBDefines.h"
15#include "lldb/API/SBFunction.h"
17#include "lldb/API/SBModule.h"
18#include "lldb/API/SBSymbol.h"
19
20namespace lldb_private {
21namespace python {
22class SWIGBridge;
23}
24} // namespace lldb_private
25
26namespace lldb {
27
29public:
31
33
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
61protected:
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
72
73 lldb_private::SymbolContext *operator->() const;
74
75 lldb_private::SymbolContext &operator*();
76
78
79 const lldb_private::SymbolContext &operator*() const;
80
81 lldb_private::SymbolContext *get() const;
82
83private:
84 std::unique_ptr<lldb_private::SymbolContext> m_opaque_up;
85};
86
87} // namespace lldb
88
89#endif // LLDB_API_SBSYMBOLCONTEXT_H
#define LLDB_API
Definition: SBDefines.h:28
std::unique_ptr< lldb_private::SymbolContext > m_opaque_up
Defines a symbol context baton that can be handed other debug core functions.
Definition: SymbolContext.h:34
A class that represents a running process on the host machine.
Definition: SBAddress.h:15