vmmap supports qemu aarch64 and riscv64

pull/1042/head
Lonny Wong 4 years ago committed by Disconnect3d
parent f8860ec936
commit 52d30e2a72

@ -1 +1 @@
Subproject commit f0de535b15c9dc7c4df4cc61ebdd7c379c0ee7c9
Subproject commit f25898adc61d60e5f30c6452b15700bbf1bd630c

@ -413,7 +413,7 @@ class Page:
@property
def is_memory_mapped_file(self):
return len(self.objfile) > 0 and self.objfile[0] != '['
return len(self.objfile) > 0 and self.objfile[0] != '[' and self.objfile != '<pt>'
@property
def read(self):

@ -41,7 +41,7 @@ def get():
pages = []
pages.extend(proc_pid_maps())
if not pages and pwndbg.arch.current in ('i386', 'x86-64') and pwndbg.qemu.is_qemu():
if not pages and pwndbg.arch.current in ('i386', 'x86-64', 'aarch64', 'riscv:rv64') and pwndbg.qemu.is_qemu():
pages.extend(monitor_info_mem())
if not pages:
@ -243,8 +243,8 @@ def monitor_info_mem():
start = page.va
size = page.page_size
flags = 4 # IMPLY ALWAYS READ
if page.w: flags |= 2
if page.x: flags |= 1
if page.pwndbg_is_writeable(): flags |= 2
if page.pwndbg_is_executable(): flags |= 1
retpages.append(pwndbg.memory.Page(start, size, flags, 0, '<pt>'))
return tuple(retpages)
# NOTE: This works only on X86/X64/RISC-V

Loading…
Cancel
Save