[Crash-utility] [PATCH v4 1/3] arm64: more improvement of bt -f

Dave Anderson anderson at redhat.com
Wed Jun 22 20:31:12 UTC 2016



----- Original Message -----

Hi Takahiro,

BTW, in your next patch posting, can you possibly expound upon the diagram below?

For example, I'm presuming that 'p', 'c' and 'n' mean previous, current and next?
But I'm not sure about 'N', or what "real stackframe" or "calced" mean, and what
the 'top' marker in the IRQ stack signifies.  
  
Maybe you could add a sentence or two describing the 3 frame types? 

Thanks,
  Dave

> -static int
> -arm64_unwind_frame(struct bt_info *bt, struct arm64_stackframe *frame)
> +/*
> + * (1)Normal frame:
> + *     +------+
> + *     | pfp  |
> + *     | cpc  |
> + * psp +      +
> + *     |      |
> + *     |      |
> + * pfp +------+ <--- :prev stackframe = <pfp, psp, ppc>
> + *     | cfp  |
> + *     | npc  |
> + * csp +      +
> + *     |      |
> + *     |      |
> + * cfp +------+ <--- :curr stackframe = <cfp, csp, cpc>
> + *     | nfp  |   |                         cfp = *pfp
> + *     | Npc  |   |                         csp = pfp + 0x10
> + * nsp +      +  real stackframe
> + *     |      |   |         at cpc
> + *     |      |   |
> + * nfp +------+ <--- :next stackframe = <nfp, nsp, npc>
> + *     |      |
> + *
> + * (2)Exception:
> + *     +------+
> + *     | pfp  |
> + *     | cpc  |
> + * psp +      +
> + *     |      |
> + *     |      |
> + * pfp +------+ <--- :prev stackframe = <pfp, psp, ppc>
> + *     | cfp  |
> + *     | npc  |
> + * csp +      +
> + *     |      |
> + *     |      |
> + * cfp +------+ <--- :stackframe = <cfp, csp, cpc>
> + *     | nfp  |
> + *     | epc  |
> + *     +      +
> + *     |      |
> + *     |      |       calced dummy
> + * esp +------+ <--- :exp stackframe = <---, esp, epc>
> + *     |      |                           esp = nsp - sizeof(pt_regs)
> + *     |      |
> + *     | Npc  |
> + *     | nfp  |
> + *     | nsp  |
> + *     | npc  |
> + * nsp +      +
> + *     |      |       calced missing
> + * nfp +------+ <--- :task stackframe = <nfp, nsp, npc>
> + *     | Nfp  |
> + *     | NNpc |
> + * Nsp +      +
> + *     |      |
> + * Nfp +------+ <--- :task stackframe = <Nfp, Nsp, Npc>
> + *     | NNfp |
> + *
> + * (3)At interrupt:
> + *     +------+
> + *     | pfp  |
> + *     | cpc  |
> + * psp +      +
> + *     |      |
> + *     |      |
> + * pfp +------+ <--- :prev stackframe = <pfp, psp, ppc>
> + *     | cfp  |
> + *     | epc  |
> + * csp +      +
> + *     |      |
> + *     |      |       calced dummy
> + * cfp +------+ <--- :irq stackframe = <cfp, csp, epc>
> + *     | nfp  |                          | if (cfp == IRQ_STACK_PTR)
> + *     | esp  |                          V
> + * top +------+                        <---, esp, epc>
> + *     IRQ stack
> + *
> + *                    calced dummy
> + * esp +------+ <--- :exp stackframe = <---, esp, epc>
> + *     |      |                            esp = nsp - sizeof(pt_regs)
> + *     |      |
> + *     | Npc  |
> + *     | nfp  |
> + *     | nsp  |
> + *     | npc  |       calced missing
> + * nfp +------+ <--- :task stackframe = <nfp, nsp, npc>
> + *     | Nfp  |
> + *     | NNpc |
> + * Nsp +      +
> + *     |      |
> + * Nfp +------+ <--- :task stackframe = <Nfp, Nsp, Npc>
> + *     | NNfp |
> + */
> +




More information about the Crash-utility mailing list