diff options
author | Paul Mundt <lethal@linux-sh.org> | 2006-10-12 17:07:45 +0900 |
---|---|---|
committer | Paul Mundt <lethal@linux-sh.org> | 2006-10-19 16:30:31 +0900 |
commit | 6b0022305f80cf249de69e746f6f5ccf7ffc5b7c (patch) | |
tree | 6434c1856bd3f38e03df04d6337b35e26760cf12 /arch/sh/kernel/process.c | |
parent | ce9e3d9953c8cb67001719b5516da2928e956be4 (diff) |
sh: Proper show_stack/show_trace() implementation.
This splits out some of the previous show_stack() implementation which
was mostly doing the show_trace() work without actually dumping any of
the stack contents. This now gets split in to two sections, where we
do the fetching of the stack pointer and subsequent stack dumping in
show_stack(), while moving the call trace in to show_trace().
Signed-off-by: Paul Mundt <lethal@linux-sh.org>
Diffstat (limited to 'arch/sh/kernel/process.c')
-rw-r--r-- | arch/sh/kernel/process.c | 12 |
1 files changed, 2 insertions, 10 deletions
diff --git a/arch/sh/kernel/process.c b/arch/sh/kernel/process.c index 91516dca4a8..a52b13ac6b7 100644 --- a/arch/sh/kernel/process.c +++ b/arch/sh/kernel/process.c @@ -105,7 +105,7 @@ void show_regs(struct pt_regs * regs) { printk("\n"); printk("Pid : %d, Comm: %20s\n", current->pid, current->comm); - print_symbol("PC is at %s\n", regs->pc); + print_symbol("PC is at %s\n", instruction_pointer(regs)); printk("PC : %08lx SP : %08lx SR : %08lx ", regs->pc, regs->regs[15], regs->sr); #ifdef CONFIG_MMU @@ -130,15 +130,7 @@ void show_regs(struct pt_regs * regs) printk("MACH: %08lx MACL: %08lx GBR : %08lx PR : %08lx\n", regs->mach, regs->macl, regs->gbr, regs->pr); - /* - * If we're in kernel mode, dump the stack too.. - */ - if (!user_mode(regs)) { - extern void show_task(unsigned long *sp); - unsigned long sp = regs->regs[15]; - - show_task((unsigned long *)sp); - } + show_trace(NULL, (unsigned long *)regs->regs[15], regs); } /* |