Skip to content

Commit 464cd56

Browse files
RobertGalatNordiccfriedt
authored andcommitted
coredump_log: coredump log in panic mode
Current impementation assumes that CONFIG_LOG_IMMEDIATE=y guarantees complete transfer, and it is not true. In my opinion core dump should always be printed in panic mode. Signed-off-by: Robert Gałat <[email protected]>
1 parent ca088aa commit 464cd56

File tree

1 file changed

+4
-3
lines changed

1 file changed

+4
-3
lines changed

subsys/debug/coredump/coredump_backend_logging.c

Lines changed: 4 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -30,9 +30,10 @@ static void coredump_logging_backend_start(void)
3030
/* Reset error */
3131
error = 0;
3232

33-
if (!IS_ENABLED(CONFIG_LOG_IMMEDIATE)) {
34-
LOG_PANIC();
35-
}
33+
while (LOG_PROCESS())
34+
;
35+
36+
LOG_PANIC();
3637
LOG_ERR(COREDUMP_PREFIX_STR COREDUMP_BEGIN_STR);
3738
}
3839

0 commit comments

Comments
 (0)