眼见为实
修改.gdbinit
file x86_64-softmmu/qemu-system-x86_64
set args -nographic
source gdb-script
b pc_memory_init
r查看帮助
显示AddressSpace
显示MemoryRegion
显示FlatView
Last updated
file x86_64-softmmu/qemu-system-x86_64
set args -nographic
source gdb-script
b pc_memory_init
rLast updated
(gdb) help dump_address_spaces
Dump a AddressSpace: dump_address_spaces 0|1
Example:
dump_address_spaces 0
dump_address_spaces 1
(gdb) help dump_memory_region
Dump a MemoryRegion: dump_memory_region SYM|ADDRESS
Example:
dump_memory_region system_memory
dump_memory_region 0x5555565036a0
(gdb) help dump_flatview
Dump a FlatView: dump_flatview ADDRESS
Example:
dump_memory_region 0x555556675be0(gdb) dump_address_spaces 0
AddressSpace : memory(0x5555565036a0)
Root MR : 0x55555661e300
FlatView : 0x555556675be0
AddressSpace : I/O(0x555556503640)
Root MR : 0x555556616800
FlatView : 0x555556691f60
AddressSpace : cpu-memory-0(0x5555566756e0)
Root MR : 0x55555661e300
FlatView : 0x555556675be0
AddressSpace : cpu-smm-0(0x5555566758c0)
Root MR : 0x555556590000
FlatView : 0x555556675be0(gdb) dump_memory_region 0x55555661e300
Dump MemoryRegion:system(gdb) dump_flatview 0x555556675be0
[000000000fee00000-000000000fef00000], offset_in_region 0000000000000000