mirror of
https://github.com/apache/nuttx.git
synced 2026-06-04 06:42:32 +08:00
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:
@@ -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
|
||||
{
|
||||
|
||||
Reference in New Issue
Block a user