Go to the documentation of this file.
9 #ifndef LLDB_CORE_ADDRESS_H
10 #define LLDB_CORE_ADDRESS_H
23 class ExecutionContextScope;
250 bool all_ranges =
false)
const;
293 bool is_indirect =
false)
const;
407 bool allow_section_end =
false);
412 bool allow_section_end =
false);
478 lldb::SymbolContextItem resolve_scope =
479 lldb::eSymbolContextEverything)
const;
532 #endif // LLDB_CORE_ADDRESS_H
bool SetLoadAddress(lldb::addr_t load_addr, Target *target, bool allow_section_end=false)
Set the address to represent load_addr.
CompileUnit * CalculateSymbolContextCompileUnit() const
ModulePointerAndOffsetLessThanFunctionObject()=default
@ DumpStyleSectionNameOffset
Display as the section name + offset.
Address(const Address &rhs)
Copy constructor.
@ DumpStyleSectionPointerOffset
Display as the section pointer + offset (debug output).
bool IsValid() const
Check if the object state is valid.
void Clear()
Clear the object's state.
Function * CalculateSymbolContextFunction() const
@ DumpStyleFileAddress
Display as the file address (if any).
lldb::addr_t m_offset
Offset into section if m_section_wp is valid...
lldb::ModuleSP CalculateSymbolContextModule() const
const Address & operator=(const Address &rhs)
Assignment operator.
lldb::addr_t GetOpcodeLoadAddress(Target *target, AddressClass addr_class=AddressClass::eInvalid) const
Get the load address as an opcode load address.
bool CalculateSymbolContextLineEntry(LineEntry &line_entry) const
bool operator==(const Address &lhs, const Address &rhs)
bool SectionWasDeleted() const
@ DumpStyleLoadAddress
Display as the load address (if resolved).
AddressClass GetAddressClass() const
lldb::addr_t GetCallableLoadAddress(Target *target, bool is_indirect=false) const
Get the load address as a callable code load address.
void SetSection(const lldb::SectionSP §ion_sp)
Set accessor for the section.
lldb::addr_t GetFileAddress() const
Get the file address.
Block * CalculateSymbolContextBlock() const
bool operator>(const Address &lhs, const Address &rhs)
bool SetOpcodeLoadAddress(lldb::addr_t load_addr, Target *target, AddressClass addr_class=AddressClass::eInvalid, bool allow_section_end=false)
lldb::SectionSP GetSection() const
Get const accessor for the section.
Symbol * CalculateSymbolContextSymbol() const
static int CompareLoadAddress(const Address &lhs, const Address &rhs, Target *target)
@ DumpStyleModuleWithFileAddress
Display as the file address with the module name prepended (if any).
bool operator!=(const Address &lhs, const Address &rhs)
static int CompareModulePointerAndOffset(const Address &lhs, const Address &rhs)
Address()=default
Default constructor.
void SetRawAddress(lldb::addr_t addr)
@ DumpStyleResolvedDescriptionNoFunctionArguments
bool ResolveFunctionScope(lldb_private::SymbolContext &sym_ctx, lldb_private::AddressRange *addr_range_ptr=nullptr)
Resolve this address to its containing function and optionally get that function's address range.
Address(const lldb::SectionSP §ion_sp, lldb::addr_t offset)
Construct with a section pointer and offset.
bool operator()(const Address &a, const Address &b) const
static int CompareFileAddress(const Address &lhs, const Address &rhs)
Compare two Address objects.
@ DumpStyleResolvedDescription
Display the details about what an address resolves to.
@ DumpStyleResolvedDescriptionNoModule
bool Dump(Stream *s, ExecutionContextScope *exe_scope, DumpStyle style, DumpStyle fallback_style=DumpStyleInvalid, uint32_t addr_byte_size=UINT32_MAX, bool all_ranges=false) const
Dump a description of this object to a Stream.
@ DumpStyleInvalid
Invalid dump style.
bool SetCallableLoadAddress(lldb::addr_t load_addr, Target *target)
bool GetDescription(Stream &s, Target &target, lldb::DescriptionLevel level) const
Write a description of this object to a Stream.
lldb::addr_t GetLoadAddress(Target *target) const
Get the load address.
bool ResolveAddressUsingFileSections(lldb::addr_t addr, const SectionList *sections)
Resolve a file virtual address using a section list.
size_t MemorySize() const
Get the memory cost of this object.
bool operator<(const Address &lhs, const Address &rhs)
bool SectionWasDeletedPrivate() const
bool SetOffset(lldb::addr_t offset)
Set accessor for the offset.
#define LLDB_INVALID_ADDRESS
lldb::SectionWP m_section_wp
The section for the address, can be NULL.
A class that represents a running process on the host machine.
DumpStyle
Dump styles allow the Address::Dump(Stream *,DumpStyle) const function to display Address contents in...
bool IsSectionOffset() const
Check if an address is section offset.
lldb::addr_t GetOffset() const
Get the section relative offset value.
lldb::ModuleSP GetModule() const
Get accessor for the module for this address.
@ DumpStyleResolvedPointerDescription
Dereference a pointer at the current address and then lookup the dereferenced address using DumpStyle...
bool Slide(int64_t offset)
uint32_t CalculateSymbolContext(SymbolContext *sc, lldb::SymbolContextItem resolve_scope=lldb::eSymbolContextEverything) const
Reconstruct a symbol context from an address.
DescriptionLevel
Description levels for "void GetDescription(Stream *, DescriptionLevel)" calls.
@ DumpStyleNoFunctionName
Elide the function name; display an offset into the current function.
@ DumpStyleDetailedSymbolContext
Detailed symbol context information for an address for all symbol context members.