[PATCH] ARM: fp when unwinding

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 



Hi Dave, Mika, Jan and anyone else interested in the Crash ARM support,

The table based unwind code potentially unwinds the stack pointer to the existing value of any other register except the PC:

	} else if ((insn & 0xf0) == 0x90 &&
		   (insn & 0x0d) != 0x0d) {
		/* 1001 nnnn: set vsp = r[nnnn] */
		ctrl->vrs[SP] = ctrl->vrs[insn & 0x0f];

The 'struct stackframe' we use to keep unwind state when going from one frame to the next (or should I say previous) only contains fp, sp, lr and pc, which might be something we should consider changing. Even as it stands however, frame.fp is assigned an incorrect value for active tasks. Here's a patch to fix that.


diff --git a/unwind_arm.c b/unwind_arm.c
index fd6ac65..6554804 100644
--- a/unwind_arm.c
+++ b/unwind_arm.c
@@ -710,6 +710,7 @@ unwind_backtrace(struct bt_info *bt)
         */
        if (bt->machdep) {
                const struct arm_pt_regs *regs = bt->machdep;
+               frame.fp = regs->ARM_fp;
                frame.lr = regs->ARM_lr;
        }


And this time I did remember to run a 'make warn' =o)

Regards,
Per

--
Crash-utility mailing list
Crash-utility@xxxxxxxxxx
https://www.redhat.com/mailman/listinfo/crash-utility


[Index of Archives]     [Fedora Development]     [Fedora Desktop]     [Fedora SELinux]     [Yosemite News]     [KDE Users]     [Fedora Tools]

 

Powered by Linux