assert: move the backtrace dump after the stack dump
Execute the simple logic first to avoid rarely crash information when crash in backtrace again. Signed-off-by: Bowen Wang <wangbowen6@xiaomi.com>
This commit is contained in:
parent
98b15b1409
commit
77306e5029
@ -631,12 +631,6 @@ void _assert(FAR const char *filename, int linenum,
|
||||
#endif
|
||||
rtcb->entry.main);
|
||||
|
||||
/* Show back trace */
|
||||
|
||||
#ifdef CONFIG_SCHED_BACKTRACE
|
||||
sched_dumpstack(rtcb->pid);
|
||||
#endif
|
||||
|
||||
/* Register dump */
|
||||
|
||||
up_dump_register(regs);
|
||||
@ -645,6 +639,12 @@ void _assert(FAR const char *filename, int linenum,
|
||||
dump_stacks(rtcb, up_getusrsp(regs));
|
||||
#endif
|
||||
|
||||
/* Show back trace */
|
||||
|
||||
#ifdef CONFIG_SCHED_BACKTRACE
|
||||
sched_dumpstack(rtcb->pid);
|
||||
#endif
|
||||
|
||||
/* Flush any buffered SYSLOG data */
|
||||
|
||||
syslog_flush();
|
||||
|
Loading…
Reference in New Issue
Block a user