LLVM: SBAddress.h Source File
Description: C++ source code API documentation for LLDB.
Keywords: LLDB,C++,doxygen,API,documentation

LLDB API Documentation

- Main Page
- Namespaces
- Classes
- Files

- File List

SBAddress.h
Go to the documentation of this file.
1 //===-- SBAddress.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_SBAddress_h_
11 #define LLDB_SBAddress_h_
12
13 #include "lldb/API/SBDefines.h"
14 #include "lldb/API/SBModule.h"
15
16 namespace lldb {
17
18 class LLDB_API SBAddress {
19 public:
20 SBAddress();
21
22 SBAddress(const lldb::SBAddress &rhs);
23
24 SBAddress(lldb::SBSection section, lldb::addr_t offset);
25
26 // Create an address by resolving a load address using the supplied target
27 SBAddress(lldb::addr_t load_addr, lldb::SBTarget &target);
28
29 ~SBAddress();
30
31 const lldb::SBAddress &operator=(const lldb::SBAddress &rhs);
32
33 bool IsValid() const;
34
35 void Clear();
36
37 addr_t GetFileAddress() const;
38
39 addr_t GetLoadAddress(const lldb::SBTarget &target) const;
40
41 void SetAddress(lldb::SBSection section, lldb::addr_t offset);
42
43 void SetLoadAddress(lldb::addr_t load_addr, lldb::SBTarget &target);
44 bool OffsetAddress(addr_t offset);
45
46 bool GetDescription(lldb::SBStream &description);
47
48 // The following queries can lookup symbol information for a given address.
49 // An address might refer to code or data from an existing module, or it
50 // might refer to something on the stack or heap. The following functions
51 // will only return valid values if the address has been resolved to a code
52 // or data address using "void SBAddress::SetLoadAddress(...)" or
53 // "lldb::SBAddress SBTarget::ResolveLoadAddress (...)".
54 lldb::SBSymbolContext GetSymbolContext(uint32_t resolve_scope);
55
56 // The following functions grab individual objects for a given address and
57 // are less efficient if you want more than one symbol related objects.
58 // Use one of the following when you want multiple debug symbol related
59 // objects for an address:
60 // lldb::SBSymbolContext SBAddress::GetSymbolContext (uint32_t
61 // resolve_scope);
62 // lldb::SBSymbolContext SBTarget::ResolveSymbolContextForAddress (const
63 // SBAddress &addr, uint32_t resolve_scope);
64 // One or more bits from the SymbolContextItem enumerations can be logically
65 // OR'ed together to more efficiently retrieve multiple symbol objects.
66
67 lldb::SBSection GetSection();
68
69 lldb::addr_t GetOffset();
70
71 lldb::SBModule GetModule();
72
73 lldb::SBCompileUnit GetCompileUnit();
74
75 lldb::SBFunction GetFunction();
76
77 lldb::SBBlock GetBlock();
78
79 lldb::SBSymbol GetSymbol();
80
81 lldb::SBLineEntry GetLineEntry();
82
83 lldb::AddressClass GetAddressClass();
84
85 protected:
86 friend class SBBlock;
87 friend class SBBreakpointLocation;
88 friend class SBFrame;
89 friend class SBFunction;
90 friend class SBLineEntry;
91 friend class SBInstruction;
92 friend class SBModule;
93 friend class SBSection;
94 friend class SBSymbol;
95 friend class SBSymbolContext;
96 friend class SBTarget;
97 friend class SBThread;
98 friend class SBThreadPlan;
99 friend class SBValue;
100 friend class SBQueueItem;
101
102 lldb_private::Address *operator->();
103
104 const lldb_private::Address *operator->() const;
105
106 lldb_private::Address *get();
107
108 lldb_private::Address &ref();
109
110 const lldb_private::Address &ref() const;
111
112 SBAddress(const lldb_private::Address *lldb_object_ptr);
113
114 void SetAddress(const lldb_private::Address *lldb_object_ptr);
115
116 private:
117 std::unique_ptr<lldb_private::Address> m_opaque_ap;
118 };
119
120 } // namespace lldb
121
122 #endif // LLDB_SBAddress_h_
lldb::SBThread
Definition: SBThread.h:21
lldb::SBSymbolContext
Definition: SBSymbolContext.h:23
lldb::SBFrame
Definition: SBFrame.h:18
SBDefines.h
lldb::SBSymbol
Definition: SBSymbol.h:20
SBModule.h
lldb::SBValue
Definition: SBValue.h:22
lldb::SBBlock
Definition: SBBlock.h:20
lldb::SBInstruction
Definition: SBInstruction.h:26
lldb::SBLineEntry
Definition: SBLineEntry.h:19
lldb::SBCompileUnit
Definition: SBCompileUnit.h:18
lldb::SBAddress
Definition: SBAddress.h:18
lldb::SBModule
Definition: SBModule.h:21
lldb::SBAddress
class LLDB_API SBAddress
Definition: SBDefines.h:31
lldb::SBFunction
Definition: SBFunction.h:19
lldb::SBQueueItem
Definition: SBQueueItem.h:18
lldb::SBThreadPlan
Definition: SBThreadPlan.h:19
lldb::SBSection
Definition: SBSection.h:18
lldb::SBStream
Definition: SBStream.h:19
lldb::SBBreakpointLocation
Definition: SBBreakpointLocation.h:18
lldb::SBTarget
Definition: SBTarget.h:34