arch/ all assertion functinos: up_stackdump dump the full stack if stack overflow the stack info is very useful to find the backtrace

This commit is contained in:
Xiang Xiao
2018-11-11 12:52:36 -06:00
committed by Gregory Nutt
parent e4106a3744
commit dfe788be25
18 changed files with 157 additions and 38 deletions
+6 -2
View File
@@ -187,6 +187,11 @@ void lm32_dumpstate(void)
sp = g_intstackbase;
_alert("sp: %08x\n", sp);
}
else if (g_current_regs)
{
_alert("ERROR: Stack pointer is not within the interrupt stack\n");
up_stackdump(istackbase - istacksize, istackbase);
}
/* Show user stack info */
@@ -205,9 +210,8 @@ void lm32_dumpstate(void)
if (sp > ustackbase || sp <= ustackbase - ustacksize)
{
#if !defined(CONFIG_ARCH_INTERRUPTSTACK) || CONFIG_ARCH_INTERRUPTSTACK < 4
_alert("ERROR: Stack pointer is not within allocated stack\n");
#endif
up_stackdump(ustackbase - ustacksize, ustackbase);
}
else
{