Skip to content

functions ¤

Put all functions defined for gdb in here.

This file might be changed into a module in the future.

Functions:

  • GdbFunction
  • rebase

    Return rebased address.

  • base

    Return base address of the first memory mapping containing the given name.

  • hex2ptr

    Converts a hex string to a little-endian address and returns the address.

  • argv

    Evaluate argv on the supplied value.

  • envp

    Evaluate envp on the supplied value.

  • argc

    Evaluates to argc.

  • environ

    Evaluate getenv() on the supplied value.

  • dbg_value_to_gdb

Attributes:

functions module-attribute ¤

functions: list[_GdbFunction] = []

GdbFunction ¤

GdbFunction(only_when_running: bool = False) -> Callable[..., Any]

rebase ¤

rebase(addr: int | Value) -> int

Return rebased address.

base ¤

base(name_pattern: str | Value) -> int

Return base address of the first memory mapping containing the given name.

hex2ptr ¤

hex2ptr(hex_string: str | Value) -> int

Converts a hex string to a little-endian address and returns the address. Example usage: $hex2ptr("00 70 75 c1 cd ef 59 00")

argv ¤

argv(number_value: Value) -> Value

Evaluate argv on the supplied value.

envp ¤

envp(number_value: Value) -> Value

Evaluate envp on the supplied value.

argc ¤

argc(*args) -> int

Evaluates to argc.

environ ¤

environ(name_value: Value) -> Value

Evaluate getenv() on the supplied value.

dbg_value_to_gdb ¤

dbg_value_to_gdb(d: Value) -> Value