mirror of
https://github.com/apache/nuttx.git
synced 2026-05-31 14:27:37 +08:00
assert: show stacks with the sp from regs
1. Get the value of sp from dump regs when an exception occurs, to avoid getting the value of fp from up_getsp and causing incomplete stack printing. 2. Determine which stack the value belongs to based on the value of SP to avoid false reports of stack overflow Signed-off-by: zhangyuan21 <zhangyuan21@xiaomi.com>
This commit is contained in:
@@ -41,9 +41,10 @@
|
||||
* Name: up_getusrsp
|
||||
****************************************************************************/
|
||||
|
||||
uintptr_t up_getusrsp(void)
|
||||
uintptr_t up_getusrsp(void *regs)
|
||||
{
|
||||
return CURRENT_REGS[REG_I6];
|
||||
uint32_t *ptr = regs;
|
||||
return ptr[REG_I6];
|
||||
}
|
||||
|
||||
/****************************************************************************
|
||||
|
||||
Reference in New Issue
Block a user