LIEF: Library to Instrument Executable Formats Version 2.0.0
Loading...
Searching...
No Matches
LIEF::dwarf::Location Class Reference

This class represents where the value of a variable or a parameter lives. It interfaces the DWARF location expression (DW_AT_location). More...

#include <Location.hpp>

Inheritance diagram for LIEF::dwarf::Location:

Public Types

enum class  Type : uint8_t {
  UNKNOWN = 0 , REG , ADDRESS , FRAME_BASE ,
  REGISTER_OFFSET , EXPRESSION , UNAVAILABLE , COMPOSITE
}

Public Member Functions

 Location (Type ty)
 Location (const Location &)=default
Location & operator= (const Location &)=default
 Location (Location &&) noexcept=default
Location & operator= (Location &&) noexcept=default
virtual ~Location ()
template<class T>
const T * as () const
std::string to_string () const
 Human-readable description of this location.

Public Attributes

Type type = Type::UNKNOWN

Detailed Description

This class represents where the value of a variable or a parameter lives. It interfaces the DWARF location expression (DW_AT_location).

Member Enumeration Documentation

◆ Type

enum class LIEF::dwarf::Location::Type : uint8_t
strong
Enumerator
UNKNOWN 
REG 

The value is associated to a register.

ADDRESS 

The value is at a fixed memory address.

FRAME_BASE 

The value is at an offset of the frame base.

REGISTER_OFFSET 

The value is at an offset of a register.

EXPRESSION 

An unevaluated DWARF expression.

UNAVAILABLE 

The value is not available.

COMPOSITE 

The value is split in several pieces.

Constructor & Destructor Documentation

◆ Location() [1/3]

◆ Location() [2/3]

LIEF::dwarf::Location::Location ( const Location & )
default

References Location().

◆ Location() [3/3]

LIEF::dwarf::Location::Location ( Location && )
defaultnoexcept

References Location().

◆ ~Location()

virtual LIEF::dwarf::Location::~Location ( )
virtual

References Location().

Member Function Documentation

◆ as()

template<class T>
const T * LIEF::dwarf::Location::as ( ) const
inline

References as(), and LIEF_LIFETIMEBOUND.

Referenced by as().

◆ operator=() [1/2]

Location & LIEF::dwarf::Location::operator= ( const Location & )
default

References Location().

◆ operator=() [2/2]

Location & LIEF::dwarf::Location::operator= ( Location && )
defaultnoexcept

References Location().

◆ to_string()

std::string LIEF::dwarf::Location::to_string ( ) const

Human-readable description of this location.

Referenced by operator<<.

Member Data Documentation

◆ type


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