blob: 6444a006c0ff4365d20b3657d9a4c02f76e93853 [file] [log] [blame]
Raphael Isemann80814282020-01-24 08:23:27 +01001//===-- SBAddress.cpp -----------------------------------------------------===//
Chris Lattner30fdc8d2010-06-08 16:52:24 +00002//
Chandler Carruth2946cd72019-01-19 08:50:56 +00003// 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
Chris Lattner30fdc8d2010-06-08 16:52:24 +00006//
7//===----------------------------------------------------------------------===//
8
9#include "lldb/API/SBAddress.h"
Jonas Devliegherebaf56642019-03-06 00:06:00 +000010#include "SBReproducerPrivate.h"
Jonas Devliegherebd4bf822019-03-06 00:05:55 +000011#include "Utils.h"
Chris Lattner30fdc8d2010-06-08 16:52:24 +000012#include "lldb/API/SBProcess.h"
Greg Claytoncac9c5f2011-09-24 00:52:29 +000013#include "lldb/API/SBSection.h"
Caroline Ticedde9cff2010-09-20 05:20:02 +000014#include "lldb/API/SBStream.h"
Chris Lattner30fdc8d2010-06-08 16:52:24 +000015#include "lldb/Core/Address.h"
Greg Clayton05d2b7f2011-03-31 01:08:07 +000016#include "lldb/Core/Module.h"
Zachary Turner32abc6e2015-03-03 19:23:09 +000017#include "lldb/Symbol/LineEntry.h"
Greg Claytonaf67cec2010-12-20 20:49:23 +000018#include "lldb/Target/Target.h"
Zachary Turnerbf9a7732017-02-02 21:39:50 +000019#include "lldb/Utility/StreamString.h"
Chris Lattner30fdc8d2010-06-08 16:52:24 +000020
21using namespace lldb;
Caroline Ticeceb6b132010-10-26 03:11:13 +000022using namespace lldb_private;
Chris Lattner30fdc8d2010-06-08 16:52:24 +000023
Jonas Devliegherebaf56642019-03-06 00:06:00 +000024SBAddress::SBAddress() : m_opaque_up(new Address()) {
25 LLDB_RECORD_CONSTRUCTOR_NO_ARGS(SBAddress);
26}
Chris Lattner30fdc8d2010-06-08 16:52:24 +000027
Kate Stoneb9c1b512016-09-06 20:57:50 +000028SBAddress::SBAddress(const Address *lldb_object_ptr)
Jonas Devlieghered5b44032019-02-13 06:25:41 +000029 : m_opaque_up(new Address()) {
Kate Stoneb9c1b512016-09-06 20:57:50 +000030 if (lldb_object_ptr)
Jonas Devliegherea8f3ae72019-08-14 22:19:23 +000031 m_opaque_up = std::make_unique<Address>(*lldb_object_ptr);
Chris Lattner30fdc8d2010-06-08 16:52:24 +000032}
33
Jonas Devlieghered5b44032019-02-13 06:25:41 +000034SBAddress::SBAddress(const SBAddress &rhs) : m_opaque_up(new Address()) {
Jonas Devliegherebaf56642019-03-06 00:06:00 +000035 LLDB_RECORD_CONSTRUCTOR(SBAddress, (const lldb::SBAddress &), rhs);
36
Jonas Devliegherebd4bf822019-03-06 00:05:55 +000037 m_opaque_up = clone(rhs.m_opaque_up);
Chris Lattner30fdc8d2010-06-08 16:52:24 +000038}
39
Kate Stoneb9c1b512016-09-06 20:57:50 +000040SBAddress::SBAddress(lldb::SBSection section, lldb::addr_t offset)
Jonas Devliegherebaf56642019-03-06 00:06:00 +000041 : m_opaque_up(new Address(section.GetSP(), offset)) {
42 LLDB_RECORD_CONSTRUCTOR(SBAddress, (lldb::SBSection, lldb::addr_t), section,
43 offset);
44}
Greg Clayton819134a2012-02-04 02:58:17 +000045
Greg Clayton00e6fbf2011-07-22 16:46:35 +000046// Create an address by resolving a load address using the supplied target
Kate Stoneb9c1b512016-09-06 20:57:50 +000047SBAddress::SBAddress(lldb::addr_t load_addr, lldb::SBTarget &target)
Jonas Devlieghered5b44032019-02-13 06:25:41 +000048 : m_opaque_up(new Address()) {
Jonas Devliegherebaf56642019-03-06 00:06:00 +000049 LLDB_RECORD_CONSTRUCTOR(SBAddress, (lldb::addr_t, lldb::SBTarget &),
50 load_addr, target);
51
Kate Stoneb9c1b512016-09-06 20:57:50 +000052 SetLoadAddress(load_addr, target);
Greg Clayton00e6fbf2011-07-22 16:46:35 +000053}
54
Jonas Devlieghere866b7a62020-02-17 22:57:06 -080055SBAddress::~SBAddress() = default;
Greg Clayton00e6fbf2011-07-22 16:46:35 +000056
Kate Stoneb9c1b512016-09-06 20:57:50 +000057const SBAddress &SBAddress::operator=(const SBAddress &rhs) {
Jonas Devliegherebaf56642019-03-06 00:06:00 +000058 LLDB_RECORD_METHOD(const lldb::SBAddress &,
59 SBAddress, operator=,(const lldb::SBAddress &), rhs);
60
Jonas Devliegherebd4bf822019-03-06 00:05:55 +000061 if (this != &rhs)
62 m_opaque_up = clone(rhs.m_opaque_up);
Jonas Devlieghere306809f2019-04-03 21:31:22 +000063 return LLDB_RECORD_RESULT(*this);
Chris Lattner30fdc8d2010-06-08 16:52:24 +000064}
65
Nitesh Jaindd125942017-05-04 11:34:42 +000066bool lldb::operator==(const SBAddress &lhs, const SBAddress &rhs) {
67 if (lhs.IsValid() && rhs.IsValid())
68 return lhs.ref() == rhs.ref();
69 return false;
70}
71
Pavel Labath4bc05002019-04-02 10:18:46 +000072bool SBAddress::operator!=(const SBAddress &rhs) const {
73 LLDB_RECORD_METHOD_CONST(bool, SBAddress, operator!=,(const SBAddress &),
74 &rhs);
75
76 return !(*this == rhs);
77}
78
Kate Stoneb9c1b512016-09-06 20:57:50 +000079bool SBAddress::IsValid() const {
Jonas Devliegherebaf56642019-03-06 00:06:00 +000080 LLDB_RECORD_METHOD_CONST_NO_ARGS(bool, SBAddress, IsValid);
Pavel Labath7f5237b2019-03-11 13:58:46 +000081 return this->operator bool();
82}
83SBAddress::operator bool() const {
84 LLDB_RECORD_METHOD_CONST_NO_ARGS(bool, SBAddress, operator bool);
Jonas Devliegherebaf56642019-03-06 00:06:00 +000085
Konrad Kleine248a1302019-05-23 11:14:47 +000086 return m_opaque_up != nullptr && m_opaque_up->IsValid();
Kate Stoneb9c1b512016-09-06 20:57:50 +000087}
88
Jonas Devliegherebaf56642019-03-06 00:06:00 +000089void SBAddress::Clear() {
90 LLDB_RECORD_METHOD_NO_ARGS(void, SBAddress, Clear);
91
Jonas Devlieghere1c0bbe42020-06-24 16:25:05 -070092 m_opaque_up = std::make_unique<Address>();
Jonas Devliegherebaf56642019-03-06 00:06:00 +000093}
Kate Stoneb9c1b512016-09-06 20:57:50 +000094
95void SBAddress::SetAddress(lldb::SBSection section, lldb::addr_t offset) {
Jonas Devliegherebaf56642019-03-06 00:06:00 +000096 LLDB_RECORD_METHOD(void, SBAddress, SetAddress,
97 (lldb::SBSection, lldb::addr_t), section, offset);
98
Kate Stoneb9c1b512016-09-06 20:57:50 +000099 Address &addr = ref();
100 addr.SetSection(section.GetSP());
101 addr.SetOffset(offset);
102}
103
104void SBAddress::SetAddress(const Address *lldb_object_ptr) {
105 if (lldb_object_ptr)
106 ref() = *lldb_object_ptr;
107 else
Jonas Devlieghere1c0bbe42020-06-24 16:25:05 -0700108 m_opaque_up = std::make_unique<Address>();
Kate Stoneb9c1b512016-09-06 20:57:50 +0000109}
110
111lldb::addr_t SBAddress::GetFileAddress() const {
Jonas Devliegherebaf56642019-03-06 00:06:00 +0000112 LLDB_RECORD_METHOD_CONST_NO_ARGS(lldb::addr_t, SBAddress, GetFileAddress);
113
Jonas Devlieghered5b44032019-02-13 06:25:41 +0000114 if (m_opaque_up->IsValid())
115 return m_opaque_up->GetFileAddress();
Kate Stoneb9c1b512016-09-06 20:57:50 +0000116 else
117 return LLDB_INVALID_ADDRESS;
118}
119
120lldb::addr_t SBAddress::GetLoadAddress(const SBTarget &target) const {
Jonas Devliegherebaf56642019-03-06 00:06:00 +0000121 LLDB_RECORD_METHOD_CONST(lldb::addr_t, SBAddress, GetLoadAddress,
122 (const lldb::SBTarget &), target);
123
Kate Stoneb9c1b512016-09-06 20:57:50 +0000124 lldb::addr_t addr = LLDB_INVALID_ADDRESS;
125 TargetSP target_sp(target.GetSP());
126 if (target_sp) {
Jonas Devlieghered5b44032019-02-13 06:25:41 +0000127 if (m_opaque_up->IsValid()) {
Kate Stoneb9c1b512016-09-06 20:57:50 +0000128 std::lock_guard<std::recursive_mutex> guard(target_sp->GetAPIMutex());
Jonas Devlieghered5b44032019-02-13 06:25:41 +0000129 addr = m_opaque_up->GetLoadAddress(target_sp.get());
Kate Stoneb9c1b512016-09-06 20:57:50 +0000130 }
131 }
132
Kate Stoneb9c1b512016-09-06 20:57:50 +0000133 return addr;
Chris Lattner30fdc8d2010-06-08 16:52:24 +0000134}
135
Kate Stoneb9c1b512016-09-06 20:57:50 +0000136void SBAddress::SetLoadAddress(lldb::addr_t load_addr, lldb::SBTarget &target) {
Jonas Devliegherebaf56642019-03-06 00:06:00 +0000137 LLDB_RECORD_METHOD(void, SBAddress, SetLoadAddress,
138 (lldb::addr_t, lldb::SBTarget &), load_addr, target);
139
Kate Stoneb9c1b512016-09-06 20:57:50 +0000140 // Create the address object if we don't already have one
141 ref();
142 if (target.IsValid())
143 *this = target.ResolveLoadAddress(load_addr);
144 else
Jonas Devlieghered5b44032019-02-13 06:25:41 +0000145 m_opaque_up->Clear();
Caroline Ticeceb6b132010-10-26 03:11:13 +0000146
Adrian Prantl05097242018-04-30 16:49:04 +0000147 // Check if we weren't were able to resolve a section offset address. If we
148 // weren't it is ok, the load address might be a location on the stack or
149 // heap, so we should just have an address with no section and a valid offset
Jonas Devlieghered5b44032019-02-13 06:25:41 +0000150 if (!m_opaque_up->IsValid())
151 m_opaque_up->SetOffset(load_addr);
Kate Stoneb9c1b512016-09-06 20:57:50 +0000152}
153
154bool SBAddress::OffsetAddress(addr_t offset) {
Jonas Devliegherebaf56642019-03-06 00:06:00 +0000155 LLDB_RECORD_METHOD(bool, SBAddress, OffsetAddress, (lldb::addr_t), offset);
156
Jonas Devlieghered5b44032019-02-13 06:25:41 +0000157 if (m_opaque_up->IsValid()) {
158 addr_t addr_offset = m_opaque_up->GetOffset();
Kate Stoneb9c1b512016-09-06 20:57:50 +0000159 if (addr_offset != LLDB_INVALID_ADDRESS) {
Jonas Devlieghered5b44032019-02-13 06:25:41 +0000160 m_opaque_up->SetOffset(addr_offset + offset);
Kate Stoneb9c1b512016-09-06 20:57:50 +0000161 return true;
Caroline Ticeceb6b132010-10-26 03:11:13 +0000162 }
Kate Stoneb9c1b512016-09-06 20:57:50 +0000163 }
164 return false;
Chris Lattner30fdc8d2010-06-08 16:52:24 +0000165}
166
Kate Stoneb9c1b512016-09-06 20:57:50 +0000167lldb::SBSection SBAddress::GetSection() {
Jonas Devliegherebaf56642019-03-06 00:06:00 +0000168 LLDB_RECORD_METHOD_NO_ARGS(lldb::SBSection, SBAddress, GetSection);
169
Kate Stoneb9c1b512016-09-06 20:57:50 +0000170 lldb::SBSection sb_section;
Jonas Devlieghered5b44032019-02-13 06:25:41 +0000171 if (m_opaque_up->IsValid())
172 sb_section.SetSP(m_opaque_up->GetSection());
Jonas Devliegherebaf56642019-03-06 00:06:00 +0000173 return LLDB_RECORD_RESULT(sb_section);
Greg Clayton00e6fbf2011-07-22 16:46:35 +0000174}
175
Kate Stoneb9c1b512016-09-06 20:57:50 +0000176lldb::addr_t SBAddress::GetOffset() {
Jonas Devliegherebaf56642019-03-06 00:06:00 +0000177 LLDB_RECORD_METHOD_NO_ARGS(lldb::addr_t, SBAddress, GetOffset);
178
Jonas Devlieghered5b44032019-02-13 06:25:41 +0000179 if (m_opaque_up->IsValid())
180 return m_opaque_up->GetOffset();
Kate Stoneb9c1b512016-09-06 20:57:50 +0000181 return 0;
Chris Lattner30fdc8d2010-06-08 16:52:24 +0000182}
183
Jonas Devlieghered5b44032019-02-13 06:25:41 +0000184Address *SBAddress::operator->() { return m_opaque_up.get(); }
Kate Stoneb9c1b512016-09-06 20:57:50 +0000185
Jonas Devlieghered5b44032019-02-13 06:25:41 +0000186const Address *SBAddress::operator->() const { return m_opaque_up.get(); }
Kate Stoneb9c1b512016-09-06 20:57:50 +0000187
188Address &SBAddress::ref() {
Konrad Kleine248a1302019-05-23 11:14:47 +0000189 if (m_opaque_up == nullptr)
Jonas Devlieghere1c0bbe42020-06-24 16:25:05 -0700190 m_opaque_up = std::make_unique<Address>();
Jonas Devlieghered5b44032019-02-13 06:25:41 +0000191 return *m_opaque_up;
Greg Claytoncac9c5f2011-09-24 00:52:29 +0000192}
193
Kate Stoneb9c1b512016-09-06 20:57:50 +0000194const Address &SBAddress::ref() const {
Adrian Prantl05097242018-04-30 16:49:04 +0000195 // This object should already have checked with "IsValid()" prior to calling
196 // this function. In case you didn't we will assert and die to let you know.
Jonas Devlieghered5b44032019-02-13 06:25:41 +0000197 assert(m_opaque_up.get());
198 return *m_opaque_up;
Greg Clayton13d19502012-01-29 06:07:39 +0000199}
Greg Claytoncac9c5f2011-09-24 00:52:29 +0000200
Jonas Devlieghered5b44032019-02-13 06:25:41 +0000201Address *SBAddress::get() { return m_opaque_up.get(); }
Kate Stoneb9c1b512016-09-06 20:57:50 +0000202
203bool SBAddress::GetDescription(SBStream &description) {
Jonas Devliegherebaf56642019-03-06 00:06:00 +0000204 LLDB_RECORD_METHOD(bool, SBAddress, GetDescription, (lldb::SBStream &),
205 description);
206
Kate Stoneb9c1b512016-09-06 20:57:50 +0000207 // Call "ref()" on the stream to make sure it creates a backing stream in
208 // case there isn't one already...
209 Stream &strm = description.ref();
Jonas Devlieghered5b44032019-02-13 06:25:41 +0000210 if (m_opaque_up->IsValid()) {
Konrad Kleine248a1302019-05-23 11:14:47 +0000211 m_opaque_up->Dump(&strm, nullptr, Address::DumpStyleResolvedDescription,
Kate Stoneb9c1b512016-09-06 20:57:50 +0000212 Address::DumpStyleModuleWithFileAddress, 4);
Kate Stoneb9c1b512016-09-06 20:57:50 +0000213 } else
214 strm.PutCString("No value");
215
216 return true;
Greg Clayton09960032010-09-10 18:31:35 +0000217}
Chris Lattner30fdc8d2010-06-08 16:52:24 +0000218
Kate Stoneb9c1b512016-09-06 20:57:50 +0000219SBModule SBAddress::GetModule() {
Jonas Devliegherebaf56642019-03-06 00:06:00 +0000220 LLDB_RECORD_METHOD_NO_ARGS(lldb::SBModule, SBAddress, GetModule);
221
Kate Stoneb9c1b512016-09-06 20:57:50 +0000222 SBModule sb_module;
Jonas Devlieghered5b44032019-02-13 06:25:41 +0000223 if (m_opaque_up->IsValid())
224 sb_module.SetSP(m_opaque_up->GetModule());
Jonas Devliegherebaf56642019-03-06 00:06:00 +0000225 return LLDB_RECORD_RESULT(sb_module);
Chris Lattner30fdc8d2010-06-08 16:52:24 +0000226}
227
Kate Stoneb9c1b512016-09-06 20:57:50 +0000228SBSymbolContext SBAddress::GetSymbolContext(uint32_t resolve_scope) {
Jonas Devliegherebaf56642019-03-06 00:06:00 +0000229 LLDB_RECORD_METHOD(lldb::SBSymbolContext, SBAddress, GetSymbolContext,
230 (uint32_t), resolve_scope);
231
Kate Stoneb9c1b512016-09-06 20:57:50 +0000232 SBSymbolContext sb_sc;
Zachary Turner991e4452018-10-25 20:45:19 +0000233 SymbolContextItem scope = static_cast<SymbolContextItem>(resolve_scope);
Jonas Devlieghered5b44032019-02-13 06:25:41 +0000234 if (m_opaque_up->IsValid())
235 m_opaque_up->CalculateSymbolContext(&sb_sc.ref(), scope);
Jonas Devliegherebaf56642019-03-06 00:06:00 +0000236 return LLDB_RECORD_RESULT(sb_sc);
Greg Clayton09960032010-09-10 18:31:35 +0000237}
238
Kate Stoneb9c1b512016-09-06 20:57:50 +0000239SBCompileUnit SBAddress::GetCompileUnit() {
Jonas Devliegherebaf56642019-03-06 00:06:00 +0000240 LLDB_RECORD_METHOD_NO_ARGS(lldb::SBCompileUnit, SBAddress, GetCompileUnit);
241
Kate Stoneb9c1b512016-09-06 20:57:50 +0000242 SBCompileUnit sb_comp_unit;
Jonas Devlieghered5b44032019-02-13 06:25:41 +0000243 if (m_opaque_up->IsValid())
244 sb_comp_unit.reset(m_opaque_up->CalculateSymbolContextCompileUnit());
Jonas Devliegherebaf56642019-03-06 00:06:00 +0000245 return LLDB_RECORD_RESULT(sb_comp_unit);
Chris Lattner30fdc8d2010-06-08 16:52:24 +0000246}
247
Kate Stoneb9c1b512016-09-06 20:57:50 +0000248SBFunction SBAddress::GetFunction() {
Jonas Devliegherebaf56642019-03-06 00:06:00 +0000249 LLDB_RECORD_METHOD_NO_ARGS(lldb::SBFunction, SBAddress, GetFunction);
250
Kate Stoneb9c1b512016-09-06 20:57:50 +0000251 SBFunction sb_function;
Jonas Devlieghered5b44032019-02-13 06:25:41 +0000252 if (m_opaque_up->IsValid())
253 sb_function.reset(m_opaque_up->CalculateSymbolContextFunction());
Jonas Devliegherebaf56642019-03-06 00:06:00 +0000254 return LLDB_RECORD_RESULT(sb_function);
Caroline Tice750cd172010-10-26 23:49:36 +0000255}
Chris Lattner30fdc8d2010-06-08 16:52:24 +0000256
Kate Stoneb9c1b512016-09-06 20:57:50 +0000257SBBlock SBAddress::GetBlock() {
Jonas Devliegherebaf56642019-03-06 00:06:00 +0000258 LLDB_RECORD_METHOD_NO_ARGS(lldb::SBBlock, SBAddress, GetBlock);
259
Kate Stoneb9c1b512016-09-06 20:57:50 +0000260 SBBlock sb_block;
Jonas Devlieghered5b44032019-02-13 06:25:41 +0000261 if (m_opaque_up->IsValid())
262 sb_block.SetPtr(m_opaque_up->CalculateSymbolContextBlock());
Jonas Devliegherebaf56642019-03-06 00:06:00 +0000263 return LLDB_RECORD_RESULT(sb_block);
Caroline Ticedde9cff2010-09-20 05:20:02 +0000264}
Greg Clayton05d2b7f2011-03-31 01:08:07 +0000265
Kate Stoneb9c1b512016-09-06 20:57:50 +0000266SBSymbol SBAddress::GetSymbol() {
Jonas Devliegherebaf56642019-03-06 00:06:00 +0000267 LLDB_RECORD_METHOD_NO_ARGS(lldb::SBSymbol, SBAddress, GetSymbol);
268
Kate Stoneb9c1b512016-09-06 20:57:50 +0000269 SBSymbol sb_symbol;
Jonas Devlieghered5b44032019-02-13 06:25:41 +0000270 if (m_opaque_up->IsValid())
271 sb_symbol.reset(m_opaque_up->CalculateSymbolContextSymbol());
Jonas Devliegherebaf56642019-03-06 00:06:00 +0000272 return LLDB_RECORD_RESULT(sb_symbol);
Greg Clayton05d2b7f2011-03-31 01:08:07 +0000273}
274
Kate Stoneb9c1b512016-09-06 20:57:50 +0000275SBLineEntry SBAddress::GetLineEntry() {
Jonas Devliegherebaf56642019-03-06 00:06:00 +0000276 LLDB_RECORD_METHOD_NO_ARGS(lldb::SBLineEntry, SBAddress, GetLineEntry);
277
Kate Stoneb9c1b512016-09-06 20:57:50 +0000278 SBLineEntry sb_line_entry;
Jonas Devlieghered5b44032019-02-13 06:25:41 +0000279 if (m_opaque_up->IsValid()) {
Kate Stoneb9c1b512016-09-06 20:57:50 +0000280 LineEntry line_entry;
Jonas Devlieghered5b44032019-02-13 06:25:41 +0000281 if (m_opaque_up->CalculateSymbolContextLineEntry(line_entry))
Kate Stoneb9c1b512016-09-06 20:57:50 +0000282 sb_line_entry.SetLineEntry(line_entry);
283 }
Jonas Devliegherebaf56642019-03-06 00:06:00 +0000284 return LLDB_RECORD_RESULT(sb_line_entry);
Greg Clayton7e9b1fd2011-08-12 21:40:01 +0000285}
Michal Gornyae211ec2019-03-19 17:13:13 +0000286
287namespace lldb_private {
288namespace repro {
289
290template <>
291void RegisterMethods<SBAddress>(Registry &R) {
292 LLDB_REGISTER_CONSTRUCTOR(SBAddress, ());
293 LLDB_REGISTER_CONSTRUCTOR(SBAddress, (const lldb::SBAddress &));
294 LLDB_REGISTER_CONSTRUCTOR(SBAddress, (lldb::SBSection, lldb::addr_t));
295 LLDB_REGISTER_CONSTRUCTOR(SBAddress, (lldb::addr_t, lldb::SBTarget &));
296 LLDB_REGISTER_METHOD(const lldb::SBAddress &,
297 SBAddress, operator=,(const lldb::SBAddress &));
Pavel Labath4bc05002019-04-02 10:18:46 +0000298 LLDB_REGISTER_METHOD_CONST(bool,
299 SBAddress, operator!=,(const lldb::SBAddress &));
Michal Gornyae211ec2019-03-19 17:13:13 +0000300 LLDB_REGISTER_METHOD_CONST(bool, SBAddress, IsValid, ());
301 LLDB_REGISTER_METHOD_CONST(bool, SBAddress, operator bool, ());
302 LLDB_REGISTER_METHOD(void, SBAddress, Clear, ());
303 LLDB_REGISTER_METHOD(void, SBAddress, SetAddress,
304 (lldb::SBSection, lldb::addr_t));
305 LLDB_REGISTER_METHOD_CONST(lldb::addr_t, SBAddress, GetFileAddress, ());
306 LLDB_REGISTER_METHOD_CONST(lldb::addr_t, SBAddress, GetLoadAddress,
307 (const lldb::SBTarget &));
308 LLDB_REGISTER_METHOD(void, SBAddress, SetLoadAddress,
309 (lldb::addr_t, lldb::SBTarget &));
310 LLDB_REGISTER_METHOD(bool, SBAddress, OffsetAddress, (lldb::addr_t));
311 LLDB_REGISTER_METHOD(lldb::SBSection, SBAddress, GetSection, ());
312 LLDB_REGISTER_METHOD(lldb::addr_t, SBAddress, GetOffset, ());
313 LLDB_REGISTER_METHOD(bool, SBAddress, GetDescription, (lldb::SBStream &));
314 LLDB_REGISTER_METHOD(lldb::SBModule, SBAddress, GetModule, ());
315 LLDB_REGISTER_METHOD(lldb::SBSymbolContext, SBAddress, GetSymbolContext,
316 (uint32_t));
317 LLDB_REGISTER_METHOD(lldb::SBCompileUnit, SBAddress, GetCompileUnit, ());
318 LLDB_REGISTER_METHOD(lldb::SBFunction, SBAddress, GetFunction, ());
319 LLDB_REGISTER_METHOD(lldb::SBBlock, SBAddress, GetBlock, ());
320 LLDB_REGISTER_METHOD(lldb::SBSymbol, SBAddress, GetSymbol, ());
321 LLDB_REGISTER_METHOD(lldb::SBLineEntry, SBAddress, GetLineEntry, ());
322}
323
324}
325}