Skip to content

arguments ¤

Allows describing functions, specifically enumerating arguments which may be passed in a combination of registers and stack values.

Functions:

  • get

    Returns an array containing the arguments to the current function,

  • argname
  • argument

    Returns the nth argument, as if $pc were a 'call' or 'bl' type

  • arguments

    Yields (arg_name, arg_value) tuples for arguments from a given ABI.

  • format_args

Attributes:

FILE_DESCRIPTOR_ARG_NAMES module-attribute ¤

FILE_DESCRIPTOR_ARG_NAMES = {
    "fd",
    "in_fd",
    "out_fd",
    "fdin",
    "fdout",
    "oldfd",
    "fildes",
    "newfd",
    "epfd",
    "dfd",
    "dirfd",
    "mountdirfd",
}

get ¤

get(instruction: PwndbgInstruction) -> list[tuple[Argument, int]]

Returns an array containing the arguments to the current function, if $pc is a function call or syscall instruction.

Otherwise, returns None.

argname ¤

argname(n: int, abi: ABI) -> str

argument ¤

argument(n: int, abi: ABI | None = None) -> int

Returns the nth argument, as if $pc were a 'call' or 'bl' type instruction. Works only for ABIs that use registers for arguments.

arguments ¤

arguments(abi: ABI | None = None)

Yields (arg_name, arg_value) tuples for arguments from a given ABI. Works only for ABIs that use registers for arguments.

format_args ¤

format_args(instruction: PwndbgInstruction) -> list[str]