xiaoxiang781216 commented on code in PR #7808: URL: https://github.com/apache/nuttx/pull/7808#discussion_r1042512154
########## arch/arm/src/common/arm_assert.c: ########## @@ -520,39 +489,12 @@ void up_assert(const char *filename, int lineno) { board_autoled_on(LED_ASSERTION); - /* Flush any buffered SYSLOG data (prior to the assertion) */ - - syslog_flush(); - - _alert("Assertion failed " -#ifdef CONFIG_SMP - "CPU%d " -#endif - "at file:%s line: %d" -#if CONFIG_TASK_NAME_SIZE > 0 - " task: %s" -#endif - "\n", -#ifdef CONFIG_SMP - up_cpu_index(), -#endif - filename, lineno -#if CONFIG_TASK_NAME_SIZE > 0 - , running_task()->name -#endif - ); - #ifdef CONFIG_ARCH_STACKDUMP arm_dumpstate(); #endif /* Flush any buffered SYSLOG data (from the above) */ syslog_flush(); - -#ifdef CONFIG_BOARD_CRASHDUMP - board_crashdump(up_getsp(), running_task(), filename, lineno); -#endif - arm_assert(); Review Comment: arm_assert could move to common code ########## arch/arm/src/common/arm_assert.c: ########## @@ -520,39 +489,12 @@ void up_assert(const char *filename, int lineno) { board_autoled_on(LED_ASSERTION); - /* Flush any buffered SYSLOG data (prior to the assertion) */ - - syslog_flush(); - - _alert("Assertion failed " -#ifdef CONFIG_SMP - "CPU%d " -#endif - "at file:%s line: %d" -#if CONFIG_TASK_NAME_SIZE > 0 - " task: %s" -#endif - "\n", -#ifdef CONFIG_SMP - up_cpu_index(), -#endif - filename, lineno -#if CONFIG_TASK_NAME_SIZE > 0 - , running_task()->name -#endif - ); - #ifdef CONFIG_ARCH_STACKDUMP arm_dumpstate(); Review Comment: can we share all arm_dumpstate code except arm_registerdump? ########## arch/arm/src/common/arm_assert.c: ########## @@ -520,39 +489,12 @@ void up_assert(const char *filename, int lineno) { board_autoled_on(LED_ASSERTION); Review Comment: could move to common code? -- This is an automated message from the Apache Git Service. To respond to the message, please log on to GitHub and use the URL above to go to the specific comment. To unsubscribe, e-mail: commits-unsubscr...@nuttx.apache.org For queries about this service, please contact Infrastructure at: us...@infra.apache.org