mirror of
https://github.com/apache/nuttx.git
synced 2026-05-31 14:27:37 +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:
@@ -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
|
||||
{
|
||||
|
||||
Reference in New Issue
Block a user