From e74193f405a8ecd2f25d47a319df29f6bc6bf7c8 Mon Sep 17 00:00:00 2001 From: Alexey Lapshin Date: Wed, 20 Sep 2023 15:27:30 +0400 Subject: [PATCH] fix(gdbstub): fix getting FreeRTOS TCB pointer --- components/esp_gdbstub/src/port/riscv/gdbstub_riscv.c | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/components/esp_gdbstub/src/port/riscv/gdbstub_riscv.c b/components/esp_gdbstub/src/port/riscv/gdbstub_riscv.c index 9e2d1b7846..1fd13ba3e4 100644 --- a/components/esp_gdbstub/src/port/riscv/gdbstub_riscv.c +++ b/components/esp_gdbstub/src/port/riscv/gdbstub_riscv.c @@ -89,10 +89,10 @@ void esp_gdbstub_int(__attribute__((unused)) void *frame) int core_id = esp_cpu_get_core_id(); #if CONFIG_FREERTOS_USE_KERNEL_10_5_1 extern void **pxCurrentTCBs; - dummy_tcb_t *tcb = pxCurrentTCBs[core_id]; + dummy_tcb_t *tcb = (dummy_tcb_t *) &pxCurrentTCBs[core_id]; #else extern void **pxCurrentTCB; - dummy_tcb_t *tcb = pxCurrentTCB[core_id]; + dummy_tcb_t *tcb = (dummy_tcb_t *) &pxCurrentTCB[core_id]; #endif /* CONFIG_FREERTOS_USE_KERNEL_10_5_1 */ gdbstub_handle_uart_int((esp_gdbstub_frame_t *)tcb->top_of_stack); }