From 5eb22ad289ad4f15ebb81057d18a9ebd1bd6e65e Mon Sep 17 00:00:00 2001 From: adamdunkels Date: Sun, 4 Apr 2010 12:30:10 +0000 Subject: [PATCH] Print out stack pointer when rebooting node --- cpu/msp430/watchdog.c | 9 ++++++--- 1 file changed, 6 insertions(+), 3 deletions(-) diff --git a/cpu/msp430/watchdog.c b/cpu/msp430/watchdog.c index efe47ec2e..7df5a8bd3 100644 --- a/cpu/msp430/watchdog.c +++ b/cpu/msp430/watchdog.c @@ -28,7 +28,7 @@ * * This file is part of the Contiki operating system. * - * @(#)$Id: watchdog.c,v 1.7 2010/03/31 11:55:04 adamdunkels Exp $ + * @(#)$Id: watchdog.c,v 1.8 2010/04/04 12:30:10 adamdunkels Exp $ */ #include #include @@ -76,8 +76,11 @@ watchdog_interrupt(void) /* printstring("Watchdog reset at PC $"); hexprint(ptr[3]); hexprint(ptr[2]);*/ - printstring("\nStack:\n"); - + printstring("\nStack at $"); + hexprint(((int)ptr) >> 8); + hexprint(((int)ptr) & 0xff); + printstring(":\n"); + for(i = 0; i < 64; ++i) { hexprint(ptr[i]); printchar(' ');