From e17bebd049d78f489c2cff755e2b66a0536a156e Mon Sep 17 00:00:00 2001 From: Jon Doron Date: Wed, 9 Jan 2019 10:22:03 +0200 Subject: dump: Set correct vaddr for ELF dump vaddr needs to be equal to the paddr since the dump file represents the physical memory image. Without setting vaddr correctly, GDB would load all the different memory regions on top of each other to vaddr 0, thus making GDB showing the wrong memory data for a given address. Signed-off-by: Jon Doron Message-Id: <20190109082203.27142-1-arilou@gmail.com> Reviewed-by: Marc-André Lureau Tested-by: Marc-André Lureau Acked-by: Laszlo Ersek --- scripts/dump-guest-memory.py | 1 + 1 file changed, 1 insertion(+) (limited to 'scripts/dump-guest-memory.py') diff --git a/scripts/dump-guest-memory.py b/scripts/dump-guest-memory.py index 198cd0fe40..2c587cbefc 100644 --- a/scripts/dump-guest-memory.py +++ b/scripts/dump-guest-memory.py @@ -163,6 +163,7 @@ class ELF(object): phdr = get_arch_phdr(self.endianness, self.elfclass) phdr.p_type = p_type phdr.p_paddr = p_paddr + phdr.p_vaddr = p_paddr phdr.p_filesz = p_size phdr.p_memsz = p_size self.segments.append(phdr) -- cgit v1.2.3-55-g7522