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
@@ -255,6 +255,11 @@ void xtensa_dumpstate(void)
sp = &g_instack[INTERRUPTSTACK_SIZE - sizeof(uint32_t)];
_alert("sp: %08x\n", sp);
}
else if (CURRENT_REGS)
{
_alert("ERROR: Stack pointer is not within the interrupt stack\n");
xtensa_stackdump(istackbase - istacksize, istackbase);
}
/* Show user stack info */
@@ -279,9 +284,8 @@ void xtensa_dumpstate(void)
if (sp > ustackbase || sp <= ustackbase - ustacksize)
{
#ifdef HAVE_INTERRUPTSTACK
_alert("ERROR: Stack pointer is not within allocated stack\n");
#endif
xtensa_stackdump(ustackbase - ustacksize, ustackbase);
}
else
{