Print the following line for the stack frame with zero backchain
pointer prior to printing PSW and GPRS:

  KERNEL-MODE INTERRUPT FRAME; pt_regs at <address>:
or
  USER-MODE INTERRUPT FRAME; pt_regs at <address>:

Suggested-by: Heiko Carstens <[email protected]>
Signed-off-by: Mikhail Zaslonko <[email protected]>
---
 s390x.c | 2 ++
 1 file changed, 2 insertions(+)

diff --git a/s390x.c b/s390x.c
index 77d9082..e8c6343 100644
--- a/s390x.c
+++ b/s390x.c
@@ -1733,6 +1733,7 @@ static unsigned long show_trace(struct bt_info *bt, int 
cnt, unsigned long sp,
                /* Check for user PSW */
                reg = readmem_ul(sp + MEMBER_OFFSET("pt_regs", "psw"));
                if (reg & S390X_PSW_MASK_PSTATE) {
+                       fprintf(fp, " USER-MODE INTERRUPT FRAME; pt_regs at 
%lx:\n", sp);
                        print_ptregs(bt, sp);
                        return sp;
                }
@@ -1745,6 +1746,7 @@ static unsigned long show_trace(struct bt_info *bt, int 
cnt, unsigned long sp,
                /* Check for loop (kernel_thread_starter) of second zero bc */
                if (low == reg || reg == 0)
                        return reg;
+               fprintf(fp, " KERNEL-MODE INTERRUPT FRAME; pt_regs at %lx:\n", 
sp);
                print_ptregs(bt, sp);
                low = sp;
                sp = reg;
-- 
2.49.0
--
Crash-utility mailing list -- [email protected]
To unsubscribe send an email to [email protected]
https://${domain_name}/admin/lists/devel.lists.crash-utility.osci.io/
Contribution Guidelines: https://github.com/crash-utility/crash/wiki

Reply via email to