LLVM 17.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 hasValidRelocs ()=0
 Checks that there are valid relocations against a .debug_info section.
 
virtual std::optional< int64_t > getExprOpAddressRelocAdjustment (DWARFUnit &U, const DWARFExpression::Operation &Op, uint64_t StartOffset, uint64_t EndOffset)=0
 Checks that the specified DWARF expression operand Op references live code section and returns the relocation adjustment value (to get the linked address this value might be added to the source expression operand address).
 
virtual std::optional< int64_t > getSubprogramRelocAdjustment (const DWARFDie &DIE)=0
 Checks that the specified subprogram DIE references the live code section and returns the relocation adjustment value (to get the linked address this value might be added to the source subprogram address).
 
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.
 
virtual RangesTygetValidAddressRanges ()=0
 Returns all valid functions address ranges(i.e., those ranges which points to sections with code).
 
virtual void clear ()=0
 Erases all data.
 

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 44 of file DWARFLinker.h.

Constructor & Destructor Documentation

◆ ~AddressesMap()

llvm::AddressesMap::~AddressesMap ( )
virtualdefault

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.

◆ clear()

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

Erases all data.

◆ getExprOpAddressRelocAdjustment()

virtual std::optional< int64_t > llvm::AddressesMap::getExprOpAddressRelocAdjustment ( DWARFUnit U,
const DWARFExpression::Operation Op,
uint64_t  StartOffset,
uint64_t  EndOffset 
)
pure virtual

Checks that the specified DWARF expression operand Op references live code section and returns the relocation adjustment value (to get the linked address this value might be added to the source expression operand address).

Returns
relocation adjustment value or std::nullopt if there is no corresponding live address.

◆ getSubprogramRelocAdjustment()

virtual std::optional< int64_t > llvm::AddressesMap::getSubprogramRelocAdjustment ( const DWARFDie DIE)
pure virtual

Checks that the specified subprogram DIE references the live code section and returns the relocation adjustment value (to get the linked address this value might be added to the source subprogram address).

Allowed kinds of input DIE: DW_TAG_subprogram, DW_TAG_label.

Returns
relocation adjustment value or std::nullopt if there is no corresponding live address.

◆ getValidAddressRanges()

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

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

◆ hasValidRelocs()

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

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


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