Skip to content

Vmmap

monitor_info_mem_not_warned = True module-attribute

QemuMachine

Bases: Machine

file = os.open(f'/proc/{self.pid}/mem', os.O_RDONLY) instance-attribute

pid = QemuMachine.get_qemu_pid() instance-attribute

__del__()

__init__()

get_qemu_pid() staticmethod

read_physical_memory(physical_address, length)

read_register(register_name)

search_pids_for_file(pids, filename) staticmethod

kernel_vmmap_via_monitor_info_mem()

Returns Linux memory maps information by parsing monitor info mem output from QEMU kernel GDB stub. Works only on X86/X64/RISC-V as this is what QEMU supports.

Consider using the kernel_vmmap_via_page_tables method as it is probably more reliable/better.

See also: https://github.com/pwndbg/pwndbg/pull/685 (TODO: revisit with future QEMU versions)

Example output from the command:

pwndbg> monitor info mem

ffff903580000000-ffff903580099000 0000000000099000 -rw

ffff903580099000-ffff90358009b000 0000000000002000 -r-

ffff90358009b000-ffff903582200000 0000000002165000 -rw

ffff903582200000-ffff903582803000 0000000000603000 -r-

kernel_vmmap_via_page_tables()