Skip to content

Commit

Permalink
---
Browse files Browse the repository at this point in the history
yaml
---
r: 34104
b: refs/heads/master
c: 26c8af5
h: refs/heads/master
v: v3
  • Loading branch information
Olaf Hering authored and Paul Mackerras committed Sep 13, 2006
1 parent d9a14e9 commit 6bfa39e
Show file tree
Hide file tree
Showing 4 changed files with 17 additions and 1 deletion.
2 changes: 1 addition & 1 deletion [refs]
Original file line number Diff line number Diff line change
@@ -1,2 +1,2 @@
---
refs/heads/master: 87fd7724d4022913ae8dbee3ed55cd04f2c316a6
refs/heads/master: 26c8af5f01dfb91f709cc2ba07fb650949aae13e
2 changes: 2 additions & 0 deletions trunk/arch/powerpc/Kconfig.debug
Original file line number Diff line number Diff line change
Expand Up @@ -88,6 +88,8 @@ config XMON
very early during boot. 'xmon=on' will just enable the xmon
debugger hooks. 'xmon=off' will disable the debugger hooks
if CONFIG_XMON_DEFAULT is set.
xmon will print a backtrace on the very first invocation.
'xmon=nobt' will disable this autobacktrace.

config XMON_DEFAULT
bool "Enable xmon by default"
Expand Down
4 changes: 4 additions & 0 deletions trunk/arch/powerpc/kernel/setup-common.c
Original file line number Diff line number Diff line change
Expand Up @@ -441,6 +441,8 @@ void __init smp_setup_cpu_maps(void)

int __initdata do_early_xmon;
#ifdef CONFIG_XMON
extern int xmon_no_auto_backtrace;

static int __init early_xmon(char *p)
{
/* ensure xmon is enabled */
Expand All @@ -449,6 +451,8 @@ static int __init early_xmon(char *p)
xmon_init(1);
if (strncmp(p, "off", 3) == 0)
xmon_init(0);
if (strncmp(p, "nobt", 4) == 0)
xmon_no_auto_backtrace = 1;
if (strncmp(p, "early", 5) != 0)
return 0;
}
Expand Down
10 changes: 10 additions & 0 deletions trunk/arch/powerpc/xmon/xmon.c
Original file line number Diff line number Diff line change
Expand Up @@ -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);
Expand Down Expand Up @@ -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());
Expand Down

0 comments on commit 6bfa39e

Please sign in to comment.