LIEF: Library to Instrument Executable Formats Version 0.17.0
Loading...
Searching...
No Matches
LIEF::dwarf::editor::Variable Class Reference

This class represents an editable DWARF variable which can be scoped by a function or a compilation unit (DW_TAG_variable) More...

#include <Variable.hpp>

Public Member Functions

 Variable ()=delete
 
 Variable (std::unique_ptr< details::Variable > impl)
 
Variableset_addr (uint64_t address)
 Set the global address of this variable. Setting this address is only revelant in the case of a static global variable. For stack variable, you should use set_stack_offset.
 
Variableset_stack_offset (uint64_t offset)
 Set the stack offset of this variable.
 
Variableset_external ()
 Mark this variable as imported
 
Variableset_type (const Type &type)
 Set the type of the current variable.
 
 ~Variable ()
 

Detailed Description

This class represents an editable DWARF variable which can be scoped by a function or a compilation unit (DW_TAG_variable)

Constructor & Destructor Documentation

◆ Variable() [1/2]

LIEF::dwarf::editor::Variable::Variable ( )
delete

◆ Variable() [2/2]

LIEF::dwarf::editor::Variable::Variable ( std::unique_ptr< details::Variable > impl)

◆ ~Variable()

LIEF::dwarf::editor::Variable::~Variable ( )

Member Function Documentation

◆ set_addr()

Variable & LIEF::dwarf::editor::Variable::set_addr ( uint64_t address)

Set the global address of this variable. Setting this address is only revelant in the case of a static global variable. For stack variable, you should use set_stack_offset.

This function set the DW_AT_location attribute

◆ set_external()

Variable & LIEF::dwarf::editor::Variable::set_external ( )

Mark this variable as imported

◆ set_stack_offset()

Variable & LIEF::dwarf::editor::Variable::set_stack_offset ( uint64_t offset)

Set the stack offset of this variable.

This function set the DW_AT_location attribute

◆ set_type()

Variable & LIEF::dwarf::editor::Variable::set_type ( const Type & type)

Set the type of the current variable.


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