1
0
Fork 0
forked from nuttx/nuttx-update

coredump: update coredump method to choice, default NONE

Signed-off-by: buxiasen <buxiasen@xiaomi.com>
This commit is contained in:
buxiasen 2024-11-02 16:37:58 +08:00 committed by Xiang Xiao
parent eca83c4a73
commit 88aaba29ba
3 changed files with 16 additions and 16 deletions

View file

@ -4693,9 +4693,9 @@ source "boards/arm/nrf91/common/Kconfig"
endif endif
endif endif
config BOARD_CRASHDUMP choice
bool "Enable Board level logging of crash dumps" prompt "BOARD crashdump method"
default n default BOARD_CRASHDUMP_NONE
---help--- ---help---
If selected up_assert will call out to board_crashdump, in the case If selected up_assert will call out to board_crashdump, in the case
of an assertion failure, prior to calling exit. Or in the of an assertion failure, prior to calling exit. Or in the
@ -4712,28 +4712,31 @@ config BOARD_CRASHDUMP
config BOARD_COREDUMP_SYSLOG config BOARD_COREDUMP_SYSLOG
bool "Enable Core dump to syslog" bool "Enable Core dump to syslog"
default n
depends on COREDUMP depends on COREDUMP
---help--- ---help---
Enable put coredump to syslog when crash. Enable put coredump to syslog when crash.
config BOARD_COREDUMP_BLKDEV config BOARD_COREDUMP_BLKDEV
bool "Enable Core Dump to block device" bool "Enable Core Dump to block device"
default n
depends on COREDUMP depends on COREDUMP
---help--- ---help---
Enable save coredump at block device when crash. Enable save coredump to block device when crash.
config BOARD_COREDUMP_BLKDEV_PATH config BOARD_CRASHDUMP_NONE
string "Save Core Dump block device PATH" bool "No Board level crash dump"
endchoice # BOARD crashdump method
config BOARD_COREDUMP_DEVPATH
string "Save Core Dump data with device PATH"
depends on BOARD_COREDUMP_BLKDEV depends on BOARD_COREDUMP_BLKDEV
---help--- ---help---
Save coredump file block device path. Save coredump file into block device path.
config BOARD_COREDUMP_FULL config BOARD_COREDUMP_FULL
bool "Core Dump all thread registers and stacks" bool "Core Dump all thread registers and stacks"
default y default y
depends on BOARD_COREDUMP_SYSLOG || BOARD_COREDUMP_BLKDEV depends on !BOARD_CRASHDUMP_NONE
---help--- ---help---
Enable to support for the dump all task registers and stacks. Enable to support for the dump all task registers and stacks.
@ -4741,7 +4744,7 @@ config BOARD_COREDUMP_COMPRESSION
bool "Enable Core Dump compression" bool "Enable Core Dump compression"
default y default y
select LIBC_LZF select LIBC_LZF
depends on BOARD_COREDUMP_SYSLOG || BOARD_COREDUMP_BLKDEV depends on !BOARD_CRASHDUMP_NONE
---help--- ---help---
Enable LZF compression algorithm for core dump content Enable LZF compression algorithm for core dump content

View file

@ -322,8 +322,7 @@ static inline void nx_start_application(void)
board_late_initialize(); board_late_initialize();
#endif #endif
#if defined(CONFIG_BOARD_COREDUMP_SYSLOG) || \ #ifndef CONFIG_BOARD_CRASHDUMP_NONE
defined(CONFIG_BOARD_COREDUMP_BLKDEV)
coredump_initialize(); coredump_initialize();
#endif #endif

View file

@ -769,9 +769,7 @@ static void dump_fatal_info(FAR struct tcb_s *rtcb,
board_crashdump(up_getsp(), rtcb, filename, linenum, msg, regs); board_crashdump(up_getsp(), rtcb, filename, linenum, msg, regs);
#endif #endif
#if defined(CONFIG_BOARD_COREDUMP_SYSLOG) || \ #ifndef CONFIG_BOARD_CRASHDUMP_NONE
defined(CONFIG_BOARD_COREDUMP_BLKDEV)
/* Flush previous SYSLOG data before possible long time coredump */ /* Flush previous SYSLOG data before possible long time coredump */
syslog_flush(); syslog_flush();