LIEF: Library to Instrument Executable Formats Version 1.0.0
Loading...
Searching...
No Matches
LIEF::assembly::ebpf::Operand Class Reference

This class represents an operand for an eBPF instruction. More...

#include <Operand.hpp>

Inheritance diagram for LIEF::assembly::ebpf::Operand:

Classes

class  Iterator
 Forward iterator that lazily disassembles ebpf Operand. More...

Public Member Functions

std::string to_string () const
 Pretty representation of the operand.
template<class T>
const T * as () const
 This function can be used to down cast an Operand instance:
virtual ~Operand ()

Detailed Description

This class represents an operand for an eBPF instruction.

Constructor & Destructor Documentation

◆ ~Operand()

virtual LIEF::assembly::ebpf::Operand::~Operand ( )
virtual

References LIEF_LOCAL.

Member Function Documentation

◆ as()

template<class T>
const T * LIEF::assembly::ebpf::Operand::as ( ) const
inline

This function can be used to down cast an Operand instance:

std::unique_ptr<assembly::ebpf::Operand> op = ...;
if (const auto* imm = inst->as<assembly::ebpf::operands::Immediate>()) {
const int64_t value = imm->value();
}
This class represents an immediate operand (i.e. a constant).
Definition ebpf/operands/Immediate.hpp:35

◆ to_string()

std::string LIEF::assembly::ebpf::Operand::to_string ( ) const

Pretty representation of the operand.

Referenced by operator<<.


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