class RegisterLocations

Declaration

class RegisterLocations { /* full declaration omitted */ };

Description

A class that can track all registers with locations in a UnwindRow object. Register locations use a map where the key is the register number and the the value is a UnwindLocation. The register maps are put into a class so that all register locations can be copied when parsing the unwind opcodes DW_CFA_remember_state and DW_CFA_restore_state.

Declared at: llvm/include/llvm/DebugInfo/DWARF/DWARFDebugFrame.h:180

Member Variables

private std::map<uint32_t, UnwindLocation> Locations

Method Overview

Methods

void dump(llvm::raw_ostream& OS,
          const llvm::MCRegisterInfo* MRI,
          bool IsEH) const

Description

Dump all registers + locations that are currently defined in this object.

Declared at: llvm/include/llvm/DebugInfo/DWARF/DWARFDebugFrame.h:223

Parameters

llvm::raw_ostream& OS
the stream to use for output.
const llvm::MCRegisterInfo* MRI
register information that helps emit register names insteead of raw register numbers.
bool IsEH
true if the DWARF Call Frame Information is from .eh_frame instead of from .debug_frame. This is needed for register number conversion because some register numbers differ between the two sections for certain architectures like x86.

Optional<llvm::dwarf::UnwindLocation>
getRegisterLocation(uint32_t RegNum) const

Description

Return the location for the register in \a RegNum if there is a location.

Declared at: llvm/include/llvm/DebugInfo/DWARF/DWARFDebugFrame.h:190

Parameters

uint32_t RegNum
the register number to find a location for.

Returns

A location if one is available for \a RegNum, or llvm::None otherwise.

bool hasLocations() const

Description

Returns true if we have any register locations in this object.

Declared at: llvm/include/llvm/DebugInfo/DWARF/DWARFDebugFrame.h:226

void removeRegisterLocation(uint32_t RegNum)

Description

Removes any rule for the register in \a RegNum.

Declared at: llvm/include/llvm/DebugInfo/DWARF/DWARFDebugFrame.h:210

Parameters

uint32_t RegNum
the register number to remove the location for.

void setRegisterLocation(
    uint32_t RegNum,
    const llvm::dwarf::UnwindLocation& Location)

Description

Set the location for the register in \a RegNum to \a Location.

Declared at: llvm/include/llvm/DebugInfo/DWARF/DWARFDebugFrame.h:202

Parameters

uint32_t RegNum
the register number to set the location for.
const llvm::dwarf::UnwindLocation& Location
the UnwindLocation that describes how to unwind the value.

size_t size() const

Declared at: llvm/include/llvm/DebugInfo/DWARF/DWARFDebugFrame.h:228