LLVM  14.0.0git
Public Member Functions | List of all members
llvm::AddressesMap Class Referenceabstract

AddressesMap represents information about valid addresses used by debug information. More...

#include "llvm/DWARFLinker/DWARFLinker.h"

Public Member Functions

virtual ~AddressesMap ()
 
virtual bool areRelocationsResolved () const =0
 Returns true if represented addresses are from linked file. More...
 
virtual bool hasValidRelocs ()=0
 Checks that there are valid relocations against a .debug_info section. More...
 
virtual bool hasLiveMemoryLocation (const DWARFDie &DIE, CompileUnit::DIEInfo &Info)=0
 Checks that the specified DIE has a DW_AT_Location attribute that references into a live code section. More...
 
virtual bool hasLiveAddressRange (const DWARFDie &DIE, CompileUnit::DIEInfo &Info)=0
 Checks that the specified DIE has a DW_AT_Low_pc attribute that references into a live code section. More...
 
virtual bool applyValidRelocs (MutableArrayRef< char > Data, uint64_t BaseOffset, bool IsLittleEndian)=0
 Apply the valid relocations to the buffer Data, taking into account that Data is at BaseOffset in the .debug_info section. More...
 
virtual llvm::Expected< uint64_trelocateIndexedAddr (uint64_t StartOffset, uint64_t EndOffset)=0
 Relocate the given address offset if a valid relocation exists. More...
 
virtual RangesTygetValidAddressRanges ()=0
 Returns all valid functions address ranges(i.e., those ranges which points to sections with code). More...
 
virtual void clear ()=0
 Erases all data. More...
 

Detailed Description

AddressesMap represents information about valid addresses used by debug information.

Valid addresses are those which points to live code sections. i.e. relocations for these addresses point into sections which would be/are placed into resulting binary.

Definition at line 55 of file DWARFLinker.h.

Constructor & Destructor Documentation

◆ ~AddressesMap()

llvm::AddressesMap::~AddressesMap ( )
virtual

Definition at line 134 of file DWARFLinker.cpp.

Member Function Documentation

◆ applyValidRelocs()

virtual bool llvm::AddressesMap::applyValidRelocs ( MutableArrayRef< char >  Data,
uint64_t  BaseOffset,
bool  IsLittleEndian 
)
pure virtual

Apply the valid relocations to the buffer Data, taking into account that Data is at BaseOffset in the .debug_info section.

Returns
true whether any reloc has been applied.

◆ areRelocationsResolved()

virtual bool llvm::AddressesMap::areRelocationsResolved ( ) const
pure virtual

Returns true if represented addresses are from linked file.

Returns false if represented addresses are from not-linked object file.

◆ clear()

virtual void llvm::AddressesMap::clear ( )
pure virtual

Erases all data.

◆ getValidAddressRanges()

virtual RangesTy& llvm::AddressesMap::getValidAddressRanges ( )
pure virtual

Returns all valid functions address ranges(i.e., those ranges which points to sections with code).

◆ hasLiveAddressRange()

virtual bool llvm::AddressesMap::hasLiveAddressRange ( const DWARFDie DIE,
CompileUnit::DIEInfo Info 
)
pure virtual

Checks that the specified DIE has a DW_AT_Low_pc attribute that references into a live code section.

Returns
true and sets Info.InDebugMap if it is the case.

◆ hasLiveMemoryLocation()

virtual bool llvm::AddressesMap::hasLiveMemoryLocation ( const DWARFDie DIE,
CompileUnit::DIEInfo Info 
)
pure virtual

Checks that the specified DIE has a DW_AT_Location attribute that references into a live code section.

Returns
true and sets Info.InDebugMap if it is the case.

◆ hasValidRelocs()

virtual bool llvm::AddressesMap::hasValidRelocs ( )
pure virtual

Checks that there are valid relocations against a .debug_info section.

◆ relocateIndexedAddr()

virtual llvm::Expected<uint64_t> llvm::AddressesMap::relocateIndexedAddr ( uint64_t  StartOffset,
uint64_t  EndOffset 
)
pure virtual

Relocate the given address offset if a valid relocation exists.


The documentation for this class was generated from the following files: