diff options
Diffstat (limited to 'arch/powerpc/xmon/xmon.c')
-rw-r--r-- | arch/powerpc/xmon/xmon.c | 10 |
1 files changed, 10 insertions, 0 deletions
diff --git a/arch/powerpc/xmon/xmon.c b/arch/powerpc/xmon/xmon.c index 179b10ced8c7..8adad1444a51 100644 --- a/arch/powerpc/xmon/xmon.c +++ b/arch/powerpc/xmon/xmon.c | |||
@@ -137,10 +137,14 @@ static void bootcmds(void); | |||
137 | static void proccall(void); | 137 | static void proccall(void); |
138 | void dump_segments(void); | 138 | void dump_segments(void); |
139 | static void symbol_lookup(void); | 139 | static void symbol_lookup(void); |
140 | static void xmon_show_stack(unsigned long sp, unsigned long lr, | ||
141 | unsigned long pc); | ||
140 | static void xmon_print_symbol(unsigned long address, const char *mid, | 142 | static void xmon_print_symbol(unsigned long address, const char *mid, |
141 | const char *after); | 143 | const char *after); |
142 | static const char *getvecname(unsigned long vec); | 144 | static const char *getvecname(unsigned long vec); |
143 | 145 | ||
146 | int xmon_no_auto_backtrace; | ||
147 | |||
144 | extern int print_insn_powerpc(unsigned long, unsigned long, int); | 148 | extern int print_insn_powerpc(unsigned long, unsigned long, int); |
145 | 149 | ||
146 | extern void xmon_enter(void); | 150 | extern void xmon_enter(void); |
@@ -736,6 +740,12 @@ cmds(struct pt_regs *excp) | |||
736 | 740 | ||
737 | last_cmd = NULL; | 741 | last_cmd = NULL; |
738 | xmon_regs = excp; | 742 | xmon_regs = excp; |
743 | |||
744 | if (!xmon_no_auto_backtrace) { | ||
745 | xmon_no_auto_backtrace = 1; | ||
746 | xmon_show_stack(excp->gpr[1], excp->link, excp->nip); | ||
747 | } | ||
748 | |||
739 | for(;;) { | 749 | for(;;) { |
740 | #ifdef CONFIG_SMP | 750 | #ifdef CONFIG_SMP |
741 | printf("%x:", smp_processor_id()); | 751 | printf("%x:", smp_processor_id()); |