Skip to content

arch ¤

Classes:

Attributes:

PWNDBG_SUPPORTED_ARCHITECTURES_TYPE module-attribute ¤

PWNDBG_SUPPORTED_ARCHITECTURES_TYPE = Literal[
    "x86-64",
    "i386",
    "i8086",
    "mips",
    "aarch64",
    "arm",
    "armcm",
    "rv32",
    "rv64",
    "sparc",
    "powerpc",
    "loongarch64",
]

PWNDBG_SUPPORTED_ARCHITECTURES module-attribute ¤

PWNDBG_SUPPORTED_ARCHITECTURES: list[PWNDBG_SUPPORTED_ARCHITECTURES_TYPE] = (
    list(get_args(PWNDBG_SUPPORTED_ARCHITECTURES_TYPE))
)

PWNLIB_ARCH_MAPPINGS module-attribute ¤

PWNLIB_ARCH_MAPPINGS = {
    "x86-64": "amd64",
    "i386": "i386",
    "i8086": "none",
    "mips": "mips",
    "aarch64": "aarch64",
    "arm": "arm",
    "armcm": "thumb",
    "rv32": "riscv32",
    "rv64": "riscv64",
    "powerpc": "powerpc",
    "sparc": "sparc",
    "loongarch64": "none",
}

FMT_LITTLE_ENDIAN module-attribute ¤

FMT_LITTLE_ENDIAN = {1: 'B', 2: '<H', 4: '<I', 8: '<Q'}

FMT_BIG_ENDIAN module-attribute ¤

FMT_BIG_ENDIAN = {1: 'B', 2: '>H', 4: '>I', 8: '>Q'}

Arch ¤

Arch(
    arch_name: PWNDBG_SUPPORTED_ARCHITECTURES_TYPE,
    ptrsize: int,
    endian: Literal["little", "big"],
)

Methods:

Attributes:

native_endian instance-attribute ¤

native_endian = str(byteorder)

update ¤

update(
    arch_name: PWNDBG_SUPPORTED_ARCHITECTURES_TYPE,
    ptrsize: int,
    endian: Literal["little", "big"],
) -> None

pack ¤

pack(integer: int) -> bytes

unpack ¤

unpack(data: bytes) -> int

pack_size ¤

pack_size(integer: int, size: int) -> bytes

unpack_size ¤

unpack_size(data: bytes, size: int) -> int