user_regs_struct structure on x86_32 old kernels, at least 2.6.18, has different prefix e-: eax, esp, eflags and so on. Signed-off-by: HATAYAMA Daisuke <d.hatayama@xxxxxxxxxxxxxx> --- sadump.c | 8 ++++++-- 1 files changed, 6 insertions(+), 2 deletions(-)
diff --git a/sadump.c b/sadump.c index 3482e85..73a4a6d 100644 --- a/sadump.c +++ b/sadump.c @@ -1394,10 +1394,14 @@ void get_sadump_regs(struct bt_info *bt, ulong *ipp, ulong *spp) if (get_prstatus_from_crash_notes(cpu, prstatus)) { ip = ULONG(prstatus + OFFSET(elf_prstatus_pr_reg) + - OFFSET(user_regs_struct_rip)); + (BITS64() + ? OFFSET(user_regs_struct_rip) + : OFFSET(user_regs_struct_eip))); sp = ULONG(prstatus + OFFSET(elf_prstatus_pr_reg) + - OFFSET(user_regs_struct_rsp)); + (BITS64() + ? OFFSET(user_regs_struct_rsp) + : OFFSET(user_regs_struct_eip))); if (ip || sp) { *ipp = ip; *spp = sp;
-- Crash-utility mailing list Crash-utility@xxxxxxxxxx https://www.redhat.com/mailman/listinfo/crash-utility