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>
This commit is contained in:
Paul Mundt
2006-10-12 17:07:45 +09:00
parent ce9e3d9953
commit 6b0022305f
3 changed files with 81 additions and 65 deletions

View File

@@ -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);
}
/*