summaryrefslogtreecommitdiff
path: root/arch/powerpc/xmon
diff options
context:
space:
mode:
authorOlaf Hering <olaf@aepfle.de>2006-09-08 16:29:21 +0200
committerPaul Mackerras <paulus@samba.org>2006-09-13 18:39:53 +1000
commit26c8af5f01dfb91f709cc2ba07fb650949aae13e (patch)
treedbaa11641da7348bb2fbde3c75429449c7ca4104 /arch/powerpc/xmon
parent87fd7724d4022913ae8dbee3ed55cd04f2c316a6 (diff)
downloadlinux-3.10-26c8af5f01dfb91f709cc2ba07fb650949aae13e.tar.gz
linux-3.10-26c8af5f01dfb91f709cc2ba07fb650949aae13e.tar.bz2
linux-3.10-26c8af5f01dfb91f709cc2ba07fb650949aae13e.zip
[POWERPC] print backtrace when entering xmon
xmon does not print a backtrace per default. This is bad on systems with USB keyboard, the most needed info about the crash is lost. print a backtrace during the very first xmon entry. Booting with xmon=nobt disables the autobacktrace functionality. Signed-off-by: Olaf Hering <olaf@aepfle.de> Signed-off-by: Paul Mackerras <paulus@samba.org>
Diffstat (limited to 'arch/powerpc/xmon')
-rw-r--r--arch/powerpc/xmon/xmon.c10
1 files changed, 10 insertions, 0 deletions
diff --git a/arch/powerpc/xmon/xmon.c b/arch/powerpc/xmon/xmon.c
index 179b10ced8c..8adad1444a5 100644
--- a/arch/powerpc/xmon/xmon.c
+++ b/arch/powerpc/xmon/xmon.c
@@ -137,10 +137,14 @@ static void bootcmds(void);
static void proccall(void);
void dump_segments(void);
static void symbol_lookup(void);
+static void xmon_show_stack(unsigned long sp, unsigned long lr,
+ unsigned long pc);
static void xmon_print_symbol(unsigned long address, const char *mid,
const char *after);
static const char *getvecname(unsigned long vec);
+int xmon_no_auto_backtrace;
+
extern int print_insn_powerpc(unsigned long, unsigned long, int);
extern void xmon_enter(void);
@@ -736,6 +740,12 @@ cmds(struct pt_regs *excp)
last_cmd = NULL;
xmon_regs = excp;
+
+ if (!xmon_no_auto_backtrace) {
+ xmon_no_auto_backtrace = 1;
+ xmon_show_stack(excp->gpr[1], excp->link, excp->nip);
+ }
+
for(;;) {
#ifdef CONFIG_SMP
printf("%x:", smp_processor_id());