Ah, for future reference: 1. in update_threads(), the RTOS should update rtos->current_thread. 2. rtos_get_gdb_reg_list() returns an error if rtos->current_thread != target->rtos->current_threadid 3. gdb_get_registers_packet() (and various others), will ask the target for the register list instead if rtos_get_gdb_reg_list() returns an error
My problem was that step 1 wasn't happening correctly. (Is there any chance of all this working when a target has multiple cores, configured as SMP?) Tim On Tue, Feb 23, 2021 at 11:45 AM Tim Newsome <[email protected]> wrote: > When using `-rtos freertos` I put a breakpoint inside a FreeRTOS task. I > run to this breakpoint, and gdb is shown the list of tasks with their > names. When gdb asks for the registers for each task, freertos.c reads the > register values from memory, through the task control block. That is > correct for tasks that are not currently active, because the registers are > saved in memory when context switching. However, it is not correct for the > currently running task. Its register values are the ones actually on the > target. > > I don't see this happening anywhere in the code, but at the same time I > don't see ARM FreeRTOS users complaining about this behavior. What am > I missing? How is this supposed to work? > > Thank you, > Tim >
_______________________________________________ OpenOCD-devel mailing list [email protected] https://lists.sourceforge.net/lists/listinfo/openocd-devel
