tests: coredump: Enable code coverage

Enable code coverage for debug.coredump.logging_backend test.

Signed-off-by: Dmitrii Golovanov <dmitrii.golovanov@intel.com>
This commit is contained in:
Dmitrii Golovanov 2023-11-06 21:40:18 +01:00 committed by Carles Cufí
parent 0bf08e5775
commit 3a95c78545

View file

@ -8,6 +8,23 @@
#include <zephyr/sys/printk.h>
#include <zephyr/debug/coredump.h>
#ifdef CONFIG_COVERAGE_DUMP
#include <zephyr/debug/gcov.h>
#endif
void k_sys_fatal_error_handler(unsigned int reason, const z_arch_esf_t *pEsf)
{
ARG_UNUSED(pEsf);
printk("%s is expected; reason = %u; halting ...\n", __func__, reason);
#ifdef CONFIG_COVERAGE_DUMP
gcov_coverage_dump(); /* LCOV_EXCL_LINE */
#endif
k_fatal_halt(reason);
}
void func_3(uint32_t *addr)
{
#if defined(CONFIG_BOARD_M2GL025_MIV) || \