[Crash-utility] [PATCH] s390: Add restart stack support (version 2)

Michael Holzheu holzheu at linux.vnet.ibm.com
Mon Aug 15 16:28:15 UTC 2011


Hi Dave,

Sorry, the restart stack patch is missing a check if the restart_stack
symbols exists. Without this check, we get error messages for older
kernels. Here the updated patch.

Sorry for the noise.

Signed-off-by: Michael Holzheu <holzheu at linux.vnet.ibm.com>
---
 s390x.c |   17 ++++++++++++++---
 1 file changed, 14 insertions(+), 3 deletions(-)

--- a/s390x.c
+++ b/s390x.c
@@ -825,9 +825,16 @@ static void get_int_stack(char *stack_na
 	unsigned long stack_addr;
 
 	*start = *end = 0;
-	if (!MEMBER_EXISTS("_lowcore", stack_name))
-		return;
-	stack_addr = ULONG(lc + MEMBER_OFFSET("_lowcore", stack_name));
+	if (strcmp(stack_name, "restart_stack") == 0) {
+		stack_addr = symbol_value("restart_stack");
+		if (!stack_addr)
+			return;
+		stack_addr = readmem_ul(stack_addr);
+	} else {
+		if (!MEMBER_EXISTS("_lowcore", stack_name))
+			return;
+		stack_addr = ULONG(lc + MEMBER_OFFSET("_lowcore", stack_name));
+	}
 	if (stack_addr == 0)
 		return;
 	*start = stack_addr - INT_STACK_SIZE;
@@ -993,6 +1000,10 @@ static void s390x_back_trace_cmd(struct
 		}
 		s390x_print_lowcore(lowcore,bt,1);
 		fprintf(fp,"\n");
+		if (symbol_exists("restart_stack")) {
+			get_int_stack("restart_stack", lowcore, &low, &high);
+			sp = show_trace(bt, cnt, sp, low, high);
+		}
 		get_int_stack("panic_stack", lowcore, &low, &high);
 		sp = show_trace(bt, cnt, sp, low, high);
 		get_int_stack("async_stack", lowcore, &low, &high);

-------------- next part --------------
A non-text attachment was scrubbed...
Name: crash-5.1.7-s390-add-restart-stack.patch
Type: text/x-patch
Size: 1549 bytes
Desc: not available
URL: <http://listman.redhat.com/archives/crash-utility/attachments/20110815/279a444e/attachment.bin>


More information about the Crash-utility mailing list