From 8703a9705935683930f35ab1becfaca05d1d8156 Mon Sep 17 00:00:00 2001 From: Eric-Paul Ickhorn Date: Fri, 30 Aug 2024 03:00:19 +0200 Subject: [PATCH] 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. --- i386/dump.bash | 10 +++++++++- i386/run.bash | 2 +- 2 files changed, 10 insertions(+), 2 deletions(-) diff --git a/i386/dump.bash b/i386/dump.bash index 1096a47..5974877 100755 --- a/i386/dump.bash +++ b/i386/dump.bash @@ -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 diff --git a/i386/run.bash b/i386/run.bash index 449e0c7..9bc1dad 100755 --- a/i386/run.bash +++ b/i386/run.bash @@ -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