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