1 //===-- SBAddress.h ---------------------------------------------*- C++ -*-===//
3 // The LLVM Compiler Infrastructure
5 // This file is distributed under the University of Illinois Open Source
6 // License. See LICENSE.TXT for details.
8 //===----------------------------------------------------------------------===//
10 #ifndef LLDB_SBAddress_h_
11 #define LLDB_SBAddress_h_
13 #include "lldb/API/SBDefines.h"
14 #include "lldb/API/SBModule.h"
24 SBAddress (const lldb::SBAddress &rhs);
26 SBAddress (lldb::SBSection section, lldb::addr_t offset);
28 // Create an address by resolving a load address using the supplied target
29 SBAddress (lldb::addr_t load_addr, lldb::SBTarget &target);
33 const lldb::SBAddress &
34 operator = (const lldb::SBAddress &rhs);
43 GetFileAddress () const;
46 GetLoadAddress (const lldb::SBTarget &target) const;
49 SetAddress (lldb::SBSection section, lldb::addr_t offset);
52 SetLoadAddress (lldb::addr_t load_addr,
53 lldb::SBTarget &target);
55 OffsetAddress (addr_t offset);
58 GetDescription (lldb::SBStream &description);
60 // The following queries can lookup symbol information for a given address.
61 // An address might refer to code or data from an existing module, or it
62 // might refer to something on the stack or heap. The following functions
63 // will only return valid values if the address has been resolved to a code
64 // or data address using "void SBAddress::SetLoadAddress(...)" or
65 // "lldb::SBAddress SBTarget::ResolveLoadAddress (...)".
67 GetSymbolContext (uint32_t resolve_scope);
70 // The following functions grab individual objects for a given address and
71 // are less efficient if you want more than one symbol related objects.
72 // Use one of the following when you want multiple debug symbol related
73 // objects for an address:
74 // lldb::SBSymbolContext SBAddress::GetSymbolContext (uint32_t resolve_scope);
75 // lldb::SBSymbolContext SBTarget::ResolveSymbolContextForAddress (const SBAddress &addr, uint32_t resolve_scope);
76 // One or more bits from the SymbolContextItem enumerations can be logically
77 // OR'ed together to more efficiently retrieve multiple symbol objects.
108 friend class SBBlock;
109 friend class SBBreakpointLocation;
110 friend class SBFrame;
111 friend class SBFunction;
112 friend class SBLineEntry;
113 friend class SBInstruction;
114 friend class SBModule;
115 friend class SBSection;
116 friend class SBSymbol;
117 friend class SBSymbolContext;
118 friend class SBTarget;
119 friend class SBThread;
120 friend class SBValue;
122 lldb_private::Address *
125 const lldb_private::Address *
128 lldb_private::Address *
131 lldb_private::Address &
134 const lldb_private::Address &
137 SBAddress (const lldb_private::Address *lldb_object_ptr);
140 SetAddress (const lldb_private::Address *lldb_object_ptr);
144 std::unique_ptr<lldb_private::Address> m_opaque_ap;
150 #endif // LLDB_SBAddress_h_