LIEF: Library to Instrument Executable Formats Version 1.0.0
Loading...
Searching...
No Matches
LIEF::runtime::Process Class Reference

This structure represents the current process and provides functions to query process-level information. More...

#include <Process.hpp>

Inheritance diagram for LIEF::runtime::Process:

Classes

struct  EnvVars
 This structure wraps environment variables. More...

Static Public Member Functions

static int32_t pid ()
 Get the Process ID of the current process.
static uint32_t tid ()
 Get the Thread ID of the current thread.
static constexpr ARCH arch ()
 Return the target architecture of the current process.
static constexpr PLATFORMS platform ()
 Return the target platform of the current process.
static uint32_t page_size ()
 Return the number of bytes in a memory page.
static optional< std::string > get_env (const std::string &key)
 Return the environment variable associated with the given key.
static EnvVars get_envs ()
 Return the environment variables present in the current process.
static assembly::Enginedefault_engine ()
 Return the assembler/disassembler for the current process.

Detailed Description

This structure represents the current process and provides functions to query process-level information.

Member Function Documentation

◆ arch()

constexpr ARCH LIEF::runtime::Process::arch ( )
inlinestaticconstexpr

Return the target architecture of the current process.

◆ default_engine()

assembly::Engine * LIEF::runtime::Process::default_engine ( )
static

Return the assembler/disassembler for the current process.

◆ get_env()

optional< std::string > LIEF::runtime::Process::get_env ( const std::string & key)
static

Return the environment variable associated with the given key.

◆ get_envs()

EnvVars LIEF::runtime::Process::get_envs ( )
static

Return the environment variables present in the current process.

◆ page_size()

uint32_t LIEF::runtime::Process::page_size ( )
static

Return the number of bytes in a memory page.

For instance:

  • 0x1000 (4096 bytes) for x86_64
  • 0x4000 (16384 bytes) for ARM64

◆ pid()

int32_t LIEF::runtime::Process::pid ( )
static

Get the Process ID of the current process.

◆ platform()

constexpr PLATFORMS LIEF::runtime::Process::platform ( )
inlinestaticconstexpr

◆ tid()

uint32_t LIEF::runtime::Process::tid ( )
static

Get the Thread ID of the current thread.


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