This is an automated email from the ASF dual-hosted git repository. andk pushed a commit to branch master in repository https://gitbox.apache.org/repos/asf/mynewt-core.git
commit cbc12d27eadafe2661ac10883e3e300c4500b239 Author: Andrzej Kaczmarek <[email protected]> AuthorDate: Mon Jun 19 23:12:52 2023 +0200 hw/drivers/ipc_cmac: Calculate assert file in-place This updates assert_file in coredump struct in-place instead of storing it in local variable. It allows to easily restore this value in debugger since it will not be optimized-out by compiler. --- hw/drivers/ipc_cmac/src/shm_hs.c | 8 +++----- 1 file changed, 3 insertions(+), 5 deletions(-) diff --git a/hw/drivers/ipc_cmac/src/shm_hs.c b/hw/drivers/ipc_cmac/src/shm_hs.c index f93915bac..444de258a 100644 --- a/hw/drivers/ipc_cmac/src/shm_hs.c +++ b/hw/drivers/ipc_cmac/src/shm_hs.c @@ -109,7 +109,6 @@ static void cmac2sys_isr(void) { volatile struct cmac_shm_crashinfo *ci = g_cmac_shm_crashinfo; - const char *assert_file; os_trace_isr_enter(); @@ -128,11 +127,10 @@ cmac2sys_isr(void) console_printf(" assert:0x%08lx\n", ci->assert); if (ci->assert_file) { /* Need to translate pointer from M0 code segment to M33 data */ - assert_file = - ci->assert_file + MCU_MEM_SYSRAM_START_ADDRESS + - MEMCTRL->CMI_CODE_BASE_REG; + ci->assert_file += MCU_MEM_SYSRAM_START_ADDRESS + + MEMCTRL->CMI_CODE_BASE_REG; console_printf(" %s:%d\n", - assert_file, (unsigned)ci->assert_line); + ci->assert_file, (unsigned)ci->assert_line); } } console_printf(" 0x%08lx CM_ERROR_REG\n", ci->CM_ERROR_REG);
