Index: defs.h
===================================================================
RCS file: /nfs/projects/cvs/crash/defs.h,v
retrieving revision 1.409
diff -u -r1.409 defs.h
--- defs.h	19 Jan 2010 16:27:54 -0000	1.409
+++ defs.h	4 Feb 2010 19:19:34 -0000
@@ -1495,6 +1495,7 @@
 	long module_sect_attr_attr;
 	long module_sections_attrs;
 	long swap_info_struct_inuse_pages;
+	long s390_lowcore_psw_save_area;
 };
 
 struct size_table {         /* stash of commonly-used sizes */
Index: s390.c
===================================================================
RCS file: /nfs/projects/cvs/crash/s390.c,v
retrieving revision 1.39
diff -u -r1.39 s390.c
--- s390.c	25 Jan 2010 21:25:45 -0000	1.39
+++ s390.c	4 Feb 2010 19:21:48 -0000
@@ -3,7 +3,7 @@
  * Copyright (C) 2001, 2002 Mission Critical Linux, Inc.
  * Copyright (C) 2002, 2003, 2004, 2005, 2006, 2009, 2010 David Anderson
  * Copyright (C) 2002, 2003, 2004, 2005, 2006, 2009, 2010 Red Hat, Inc. All rights reserved.
- * Copyright (C) 2005, 2006 Michael Holzheu, IBM Corporation
+ * Copyright (C) 2005, 2006, 2010 Michael Holzheu, IBM Corporation
  *
  * This program is free software; you can redistribute it and/or modify
  * it under the terms of the GNU General Public License as published by
@@ -67,6 +67,18 @@
 static struct line_number_hook s390_line_number_hooks[];
 static int s390_is_uvaddr(ulong, struct task_context *);
 
+/*
+ * Initialize member offsets
+ */
+static void s390_offsets_init(void)
+{
+	if (MEMBER_EXISTS("_lowcore", "st_status_fixed_logout"))
+		MEMBER_OFFSET_INIT(s390_lowcore_psw_save_area, "_lowcore",
+				   "st_status_fixed_logout");
+	else
+		MEMBER_OFFSET_INIT(s390_lowcore_psw_save_area, "_lowcore",
+				   "psw_save_area");
+}
 
 /*
  *  Do all necessary machine-specific setup here.  This is called several
@@ -132,6 +144,7 @@
 			machdep->hz = HZ;
 		machdep->section_size_bits = _SECTION_SIZE_BITS;
 		machdep->max_physmem_bits = _MAX_PHYSMEM_BITS;
+		s390_offsets_init();
 		break;
 
 	case POST_INIT:
@@ -632,8 +645,7 @@
 			return;
 		}
 		s390_get_lowcore(cpu,lowcore);
-		psw_flags = ULONG(lowcore + MEMBER_OFFSET("_lowcore",
-			    "st_status_fixed_logout"));
+		psw_flags = ULONG(lowcore + OFFSET(s390_lowcore_psw_save_area));
 		if(psw_flags & 0x10000UL){
 				fprintf(fp,"Task runs in userspace\n");
 				s390_print_lowcore(lowcore,bt,0);
@@ -755,7 +767,7 @@
 	char* ptr;
 	unsigned long tmp[4];
 
-	ptr = lc + MEMBER_OFFSET("_lowcore","st_status_fixed_logout");
+	ptr = lc + OFFSET(s390_lowcore_psw_save_area);
 	tmp[0]=ULONG(ptr);
 	tmp[1]=ULONG(ptr + S390_WORD_SIZE);
 
@@ -915,9 +927,8 @@
 		return;
 
 	if(s390_has_cpu(bt->task) && esp){
-		*eip = ULONG(lowcore + MEMBER_OFFSET("_lowcore",
-		       "st_status_fixed_logout") + S390_WORD_SIZE)
-       		       & S390_ADDR_MASK;
+		*eip = ULONG(lowcore + OFFSET(s390_lowcore_psw_save_area) +
+			S390_WORD_SIZE) & S390_ADDR_MASK;
 	} else {
 		if(!STRUCT_EXISTS("stack_frame")){
 			r14_offset = 56;
Index: s390x.c
===================================================================
RCS file: /nfs/projects/cvs/crash/s390x.c,v
retrieving revision 1.39
diff -u -r1.39 s390x.c
--- s390x.c	25 Jan 2010 21:25:45 -0000	1.39
+++ s390x.c	4 Feb 2010 19:21:00 -0000
@@ -3,7 +3,7 @@
  * Copyright (C) 2001, 2002 Mission Critical Linux, Inc.
  * Copyright (C) 2002, 2003, 2004, 2005, 2006, 2009, 2010 David Anderson
  * Copyright (C) 2002, 2003, 2004, 2005, 2006, 2009, 2010 Red Hat, Inc. All rights reserved.
- * Copyright (C) 2005, 2006 Michael Holzheu, IBM Corporation
+ * Copyright (C) 2005, 2006, 2010 Michael Holzheu, IBM Corporation
  *
  * This program is free software; you can redistribute it and/or modify
  * it under the terms of the GNU General Public License as published by
@@ -65,6 +65,20 @@
 static struct line_number_hook s390x_line_number_hooks[];
 static int s390x_is_uvaddr(ulong, struct task_context *);
 
+ 
+/*
+ * Initialize member offsets
+ */
+static void s390x_offsets_init(void)
+{
+	if (MEMBER_EXISTS("_lowcore", "st_status_fixed_logout"))
+		MEMBER_OFFSET_INIT(s390_lowcore_psw_save_area, "_lowcore",
+				   "st_status_fixed_logout");
+	else
+		MEMBER_OFFSET_INIT(s390_lowcore_psw_save_area, "_lowcore",
+				   "psw_save_area");
+}
+
 
 /*
  *  Do all necessary machine-specific setup here.  This is called several
@@ -130,6 +144,7 @@
 			machdep->hz = HZ;
 		machdep->section_size_bits = _SECTION_SIZE_BITS;
 		machdep->max_physmem_bits = _MAX_PHYSMEM_BITS;
+		s390x_offsets_init();
 		break;
 
 	case POST_INIT:
@@ -642,8 +657,8 @@
 			return;
 		}
 		s390x_get_lowcore(cpu,lowcore);
-		psw_flags = ULONG(lowcore + MEMBER_OFFSET("_lowcore",
-			    "st_status_fixed_logout"));
+		psw_flags = ULONG(lowcore + OFFSET(s390_lowcore_psw_save_area));
+
 		if(psw_flags & 0x1000000000000ULL){
 			fprintf(fp,"Task runs in userspace\n");
 			s390x_print_lowcore(lowcore,bt,0);
@@ -766,7 +781,7 @@
 	char* ptr;
 	unsigned long tmp[4];
 
-	ptr = lc + MEMBER_OFFSET("_lowcore","st_status_fixed_logout");
+	ptr = lc + OFFSET(s390_lowcore_psw_save_area);
 	tmp[0]=ULONG(ptr);
 	tmp[1]=ULONG(ptr + S390X_WORD_SIZE);
 
@@ -945,8 +960,8 @@
 		return;
 
 	if(s390x_has_cpu(bt->task) && esp){
-		*eip = ULONG(lowcore + MEMBER_OFFSET("_lowcore",
-		       "st_status_fixed_logout") + S390X_WORD_SIZE);
+		*eip = ULONG(lowcore + OFFSET(s390_lowcore_psw_save_area) +
+			S390X_WORD_SIZE);
 	} else {
 		if(!STRUCT_EXISTS("stack_frame")){
 			r14_offset = 112;
Index: symbols.c
===================================================================
RCS file: /nfs/projects/cvs/crash/symbols.c,v
retrieving revision 1.198
diff -u -r1.198 symbols.c
--- symbols.c	2 Feb 2010 15:51:18 -0000	1.198
+++ symbols.c	4 Feb 2010 19:19:27 -0000
@@ -7305,6 +7305,8 @@
 		OFFSET(pcpu_info_idle));
 	fprintf(fp, "                vcpu_struct_rq: %ld\n",
 		OFFSET(vcpu_struct_rq));
+	fprintf(fp, "    s390_lowcore_psw_save_area: %ld\n",
+		OFFSET(s390_lowcore_psw_save_area));
 
 	fprintf(fp, "\n                    size_table:\n");
 	fprintf(fp, "                          page: %ld\n", SIZE(page));
