Dump more memory when using dump.bash

The dump script was limited to  the memory space below 0xa0000 because
the memory-mapped area of the framebuffer started above there,  making
the GNU Debugger refuse to dump that memory. Now, the script has got a
workaround for that.

The memory which is given to the emulated system is also reduced to 64
megabytes with this commit as to not use half a gigabyte of disk space
per memory dump.
This commit is contained in:
Eric-Paul Ickhorn 2024-08-30 03:00:19 +02:00
parent b1c7303b01
commit 8703a97059
Signed by: epickh
GPG Key ID: 1358818BAA38B104
2 changed files with 10 additions and 2 deletions

View File

@ -17,4 +17,12 @@ then
fi
echo "dump-guest-memory memory.dump" | qmp-shell -H qmp.socket
echo "dump memory memory.bin 0 0xa0000" | gdb --core=memory.dump
echo "dump memory lower.bin 0 0xa0000" | gdb --core=memory.dump -q
echo "dump memory upper.bin 0xc0000 0x400000" | gdb --core=memory.dump -q
truncate memory.bin --size 64M
dd if=lower.bin of=memory.bin
dd if=upper.bin of=memory.bin seek=131072
rm lower.bin
rm upper.bin

View File

@ -1,3 +1,3 @@
#!/usr/bin/env bash
qemu-system-x86_64 -m 512M -enable-kvm -d guest_errors nightloader.bin -qmp unix:qmp.socket,server,nowait
qemu-system-x86_64 -m 64M -enable-kvm -d guest_errors nightloader.bin -qmp unix:qmp.socket,server,nowait