Lines Matching full:address
1 //===-- Address.cpp -------------------------------------------------------===//
9 #include "lldb/Core/Address.h"
64 const Address &address, void *dst, size_t dst_len) {
72 return target_sp->ReadMemory(address, dst, dst_len, error,
79 const Address &address,
94 ModuleSP module_sp(address.GetModule());
104 const Address &address, uint32_t byte_size,
113 success = ReadBytes(exe_scope, address, &buf, byte_size) == byte_size;
117 if (GetByteOrderAndAddressSize(exe_scope, address, byte_order, addr_size)) {
128 const Address &address, uint32_t pointer_size,
129 Address &deref_so_addr) {
134 addr_t deref_addr = ReadUIntMax64(exe_scope, address, pointer_size, success);
148 ModuleSP module_sp(address.GetModule());
156 // able to read the address, so we return a section offset address with no
157 // section and "deref_addr" as the offset (address).
164 static bool DumpUInt(ExecutionContextScope *exe_scope, const Address &address,
170 if (ReadBytes(exe_scope, address, &buf[0], buf.size()) == buf.size()) {
173 if (GetByteOrderAndAddressSize(exe_scope, address, byte_order, addr_size)) {
182 LLDB_INVALID_ADDRESS, // base address
193 const Address &address, Stream *strm) {
200 // Byte order and address size don't matter for C string dumping..
204 Address curr_address(address);
220 LLDB_INVALID_ADDRESS, // base address
235 Address::Address(lldb::addr_t abs_addr) : m_section_wp(), m_offset(abs_addr) {}
237 Address::Address(addr_t address, const SectionList *section_list)
239 ResolveAddressUsingFileSections(address, section_list);
242 const Address &Address::operator=(const Address &rhs) {
250 bool Address::ResolveAddressUsingFileSections(addr_t file_addr,
260 // address
264 return false; // Failed to resolve this address to a section offset value
267 /// if "addr_range_ptr" is not NULL, then fill in with the address range of the function.
268 bool Address::ResolveFunctionScope(SymbolContext &sym_ctx,
285 ModuleSP Address::GetModule() const {
293 addr_t Address::GetFileAddress() const {
298 // Section isn't resolved, we can't return a valid file address
301 // We have a valid file range, so we can return the file based address by
302 // adding the file base address to our offset
313 addr_t Address::GetLoadAddress(Target *target) const {
320 // We have a valid file range, so we can return the file based address
321 // by adding the file base address to our offset
330 // We don't have a section so the offset is the load address
334 // return a valid load address.
338 addr_t Address::GetCallableLoadAddress(Target *target, bool is_indirect) const {
361 bool Address::SetCallableLoadAddress(lldb::addr_t load_addr, Target *target) {
370 addr_t Address::GetOpcodeLoadAddress(Target *target,
381 bool Address::SetOpcodeLoadAddress(lldb::addr_t load_addr, Target *target,
395 bool Address::GetDescription(Stream &s, Target &target,
408 bool Address::Dump(Stream *s, ExecutionContextScope *exe_scope, DumpStyle style,
412 // If the section was nullptr, only load address is going to work unless we
420 // If addr_byte_size is UINT32_MAX, then determine the correct address byte
429 Address so_addr;
475 * Display address in compressed form for MIPS16 or microMIPS
476 * if the address belongs to AddressClass::eCodeAlternateISA.
566 Address cstr_addr(*this);
592 Address cfstring_data_addr(*this);
685 // address.
717 // our address. If it isn't, then we might have just found the last
718 // symbol that came before the address that we are looking up that
719 // has nothing to do with our address lookup.
787 Address dereferenced_addr;
812 bool Address::SectionWasDeleted() const {
818 bool Address::SectionWasDeletedPrivate() const {
825 // was unloaded/deleted, or if the address doesn't have a valid reference to
832 Address::CalculateSymbolContext(SymbolContext *sc,
851 ModuleSP Address::CalculateSymbolContextModule() const {
858 CompileUnit *Address::CalculateSymbolContextCompileUnit() const {
872 Function *Address::CalculateSymbolContextFunction() const {
886 Block *Address::CalculateSymbolContextBlock() const {
900 Symbol *Address::CalculateSymbolContextSymbol() const {
914 bool Address::CalculateSymbolContextLineEntry(LineEntry &line_entry) const {
932 int Address::CompareFileAddress(const Address &a, const Address &b) {
942 int Address::CompareLoadAddress(const Address &a, const Address &b,
954 int Address::CompareModulePointerAndOffset(const Address &a, const Address &b) {
963 // Modules are the same, just compare the file address since they should be
974 size_t Address::MemorySize() const {
975 // Noting special for the memory size of a single Address object, it is just
977 return sizeof(Address);
988 // address results to make much sense
990 // This basically lets Address objects be used in ordered collection classes.
992 bool lldb_private::operator<(const Address &lhs, const Address &rhs) {
1007 bool lldb_private::operator>(const Address &lhs, const Address &rhs) {
1023 bool lldb_private::operator==(const Address &a, const Address &rhs) {
1029 bool lldb_private::operator!=(const Address &a, const Address &rhs) {
1033 AddressClass Address::GetAddressClass() const {
1047 bool Address::SetLoadAddress(lldb::addr_t load_addr, Target *target,