FAQ Search Today's Posts Mark Forums Read
» Video Reviews

» Linux Archive

Linux-archive is a website aiming to archive linux email lists and to make them easily accessible for linux users/developers.


» Sponsor

» Partners

» Sponsor

Go Back   Linux Archive > Redhat > Crash Utility

 
 
LinkBack Thread Tools
 
Old 04-26-2012, 05:04 PM
Michael Holzheu
 
Default s390x: Print userspace PSW and registers for active tasks

Hi Dave,

Currently when we find a userspace pt_regs at the beginning of the stack,
we print nothing. With this patch the userspace PSW and general purpose
registers are printed.

With this change for the user it is clearer now that the task has
been interrupted while running in userspace.

Example: External interrupt while in userspace

Before change:

crash> bt -a
...
#1 [176327e08] arch_send_call_function_ipi_mask at 115d80
#2 [176327e38] do_extint at 10dd82
#3 [176327eb0] ext_skip at 63e344

After change:

crash> bt -a
...
#1 [176327e08] arch_send_call_function_ipi_mask at 115d80
#2 [176327e38] do_extint at 10dd82
#3 [176327eb0] ext_skip at 63e344
PSW: 0705e00180000000 0000000080000a16 (userspace)
GPRS: 0000000000000001 000003ff00647213 000003fffd800000 0000000003710001
0000000080000afc 000003fffff77e58 0000000080000bb0 000003fffff781c0
00000000800007bc 0000000000000000 0000000080000b44 000003fffff77e58
000003fffd7c6000 000003fffd777020 0000000080000b02 000003fffff77e58

Michael
---
s390x.c | 20 +++++++++++++-------
1 file changed, 13 insertions(+), 7 deletions(-)

--- a/s390x.c
+++ b/s390x.c
@@ -978,12 +978,16 @@ static void print_ptregs(struct bt_info
return;

fprintf(fp, " PSW: %016lx %016lx ", psw_flags, psw_addr);
- sym = closest_symbol(psw_addr);
- offs = psw_addr - closest_symbol_value(psw_addr);
- if (module_symbol(psw_addr, NULL, &lm, NULL, 0))
- fprintf(fp, "(%s+%ld [%s])
", sym, offs, lm->mod_name);
- else
- fprintf(fp, "(%s+%ld)
", sym, offs);
+ if (psw_flags & S390X_PSW_MASK_PSTATE) {
+ fprintf(fp, "(user space)
");
+ } else {
+ sym = closest_symbol(psw_addr);
+ offs = psw_addr - closest_symbol_value(psw_addr);
+ if (module_symbol(psw_addr, NULL, &lm, NULL, 0))
+ fprintf(fp, "(%s+%ld [%s])
", sym, offs, lm->mod_name);
+ else
+ fprintf(fp, "(%s+%ld)
", sym, offs);
+ }

addr = sp + MEMBER_OFFSET("pt_regs", "gprs");
for (i = 0; i < 16; i++) {
@@ -1039,8 +1043,10 @@ static unsigned long show_trace(struct b
return sp;
/* Check for user PSW */
reg = readmem_ul(sp + MEMBER_OFFSET("pt_regs", "psw"));
- if (reg & S390X_PSW_MASK_PSTATE)
+ if (reg & S390X_PSW_MASK_PSTATE) {
+ print_ptregs(bt, sp);
return sp;
+ }
/* Get new backchain from r15 */
reg = readmem_ul(sp + MEMBER_OFFSET("pt_regs", "gprs") +
15 * sizeof(long));
--
Crash-utility mailing list
Crash-utility@redhat.com
https://www.redhat.com/mailman/listinfo/crash-utility
 

Thread Tools




All times are GMT. The time now is 11:44 PM.

VBulletin, Copyright ©2000 - 2014, Jelsoft Enterprises Ltd.
Content Relevant URLs by vBSEO ©2007, Crawlability, Inc.
Copyright 2007 - 2008, www.linux-archive.org