Skip to contentSkip to conversation

target/ppc: Fix size of struct PPCElfPrstatus

PATCH Applied Anton Blanchard 2 participants 2 messages Apr 11, 2017

lore
Share & tools
lore
#0 lore raw

PATCH 1/1 target/ppc: Fix size of struct PPCElfPrstatus

From: Anton Blanchard <[email protected]>

gdb refuses to parse QEMU memory dumps because struct PPCElfPrstatus is the wrong size. Fix it.

Fixes e62fbc54d459 ("target-ppc: dump-guest-memory support")
---
 target/ppc/arch_dump.c | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)
target/ppc/arch_dump.c +1 -1
index 28d9cc7d79..8e9397aa58 100644
@@ -50,7 +50,7 @@ struct PPCUserRegStruct {
 struct PPCElfPrstatus {
     char pad1[112];
     struct PPCUserRegStruct pr_reg;
-    reg_t pad2[4];
+    char pad2[40];
 } QEMU_PACKED;
 
 
Signature · 1 line
2.11.0
Applied
#1 lore raw
Quoted 7 lines · Anton Blanchard

From: Anton Blanchard <[email protected]>

gdb refuses to parse QEMU memory dumps because struct PPCElfPrstatus is the wrong size. Fix it.

Fixes e62fbc54d459 ("target-ppc: dump-guest-memory support")

Applied to ppc-for-2.10, thanks.

Quoted 17 lines
---
 target/ppc/arch_dump.c | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)
target/ppc/arch_dump.c +1 -1
index 28d9cc7d79..8e9397aa58 100644
@@ -50,7 +50,7 @@ struct PPCUserRegStruct {
 struct PPCElfPrstatus {
     char pad1[112];
     struct PPCUserRegStruct pr_reg;
-    reg_t pad2[4];
+    char pad2[40];
 } QEMU_PACKED;
 
 
Signature · 4 lines
David Gibson			| I'll have my music baroque, and my code
david AT gibson.dropbear.id.au	| minimalist, thank you.  NOT _the_ _other_
				| _way_ _around_!
http://www.ozlabs.org/~dgibson