Commit 73805343 authored by Heiko Carstens's avatar Heiko Carstens Committed by Martin Schwidefsky

[S390] incomplete stack traces.

show_stack() passes a pointer to the current stack frame to show_trace().
Because of tail call optimization the pointer doesn't point to the original
stack frame anymory and therefore traces are wrong. Don't pass the pointer
of the current stack frame to show_trace(). Instead let show_trace()
calculate the pointer on its own.
Signed-off-by: default avatarHeiko Carstens <heiko.carstens@de.ibm.com>
Signed-off-by: default avatarMartin Schwidefsky <schwidefsky@de.ibm.com>
parent c406abd3
...@@ -150,13 +150,11 @@ void show_stack(struct task_struct *task, unsigned long *sp) ...@@ -150,13 +150,11 @@ void show_stack(struct task_struct *task, unsigned long *sp)
unsigned long *stack; unsigned long *stack;
int i; int i;
// debugging aid: "show_stack(NULL);" prints the
// back trace for this cpu.
if (!sp) if (!sp)
sp = task ? (unsigned long *) task->thread.ksp : __r15; stack = task ? (unsigned long *) task->thread.ksp : __r15;
else
stack = sp;
stack = sp;
for (i = 0; i < kstack_depth_to_print; i++) { for (i = 0; i < kstack_depth_to_print; i++) {
if (((addr_t) stack & (THREAD_SIZE-1)) == 0) if (((addr_t) stack & (THREAD_SIZE-1)) == 0)
break; break;
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment