Extend stack debug logic to include IDLE and interrupt stacks. Also color the heap as well. Based on suggestions from David Sidrane

This commit is contained in:
Gregory Nutt
2013-11-01 11:16:51 -06:00
parent b102d01046
commit f8b3dbaa61
33 changed files with 263 additions and 114 deletions
+1 -1
View File
@@ -272,7 +272,7 @@ extern uint32_t g_idle_topstack; /* Start of the heap */
#ifndef __ASSEMBLY__
# if CONFIG_ARCH_INTERRUPTSTACK > 3
extern uint16_t g_userstack;
extern uint16_t g_intstackbase;
# endif
#endif
+1 -1
View File
@@ -63,7 +63,7 @@
#ifndef __ASSEMBLY__
# if CONFIG_ARCH_INTERRUPTSTACK > 3
extern uint32_t g_userstack;
extern uint32_t g_intstackbase;
# endif
#endif
+2 -2
View File
@@ -172,7 +172,7 @@ void up_dumpstate(void)
/* Get the limits on the interrupt stack memory */
#if CONFIG_ARCH_INTERRUPTSTACK > 3
istackbase = (uint32_t)&g_userstack;
istackbase = (uint32_t)&g_intstackbase;
istacksize = (CONFIG_ARCH_INTERRUPTSTACK & ~3) - 4;
/* Show interrupt stack info */
@@ -196,7 +196,7 @@ void up_dumpstate(void)
* at the base of the interrupt stack.
*/
sp = g_userstack;
sp = g_intstackbase;
lldbg("sp: %08x\n", sp);
}
+10 -9
View File
@@ -411,7 +411,7 @@ _up_vector:
.align 2
#if CONFIG_ARCH_INTERRUPTSTACK > 3
.Lintstack:
.long _up_stackbase
.long _g_intstackbase
#endif
.Ldoirq:
.long _up_doirq
@@ -501,7 +501,7 @@ _up_fullcontextrestore:
.size _up_fullcontextrestore, .-_up_fullcontextrestore
/************************************************************************************
* Name: up_interruptstack/g_userstack
* Name: g_intstackalloc/g_intstackbase
*
* Description:
* Shouldn't happen
@@ -511,15 +511,16 @@ _up_fullcontextrestore:
#if CONFIG_ARCH_INTERRUPTSTACK > 3
.bss
.align 2
.globl _g_userstack
.type _g_userstack, object
_up_interruptstack:
.globl _g_intstackalloc
.type _g_intstackalloc, object
.globl _g_intstackbase
.type _g_intstackbase, object
_g_intstackalloc:
.skip ((CONFIG_ARCH_INTERRUPTSTACK & ~3) - 4)
_g_userstack:
_up_stackbase:
_g_intstackbase:
.skip 2
.size _g_userstack, 4
.size _up_interruptstack, (CONFIG_ARCH_INTERRUPTSTACK & ~3)
.size _g_intstackbase, 4
.size _g_intstackalloc, (CONFIG_ARCH_INTERRUPTSTACK & ~3)
#endif
.end