I have a multithreaded application running on NCS 2.9.0 and I want to be able to see what all the threads are doing at the time of a crash via coredump. I have the following options configured in my project:
def arch_supports_thread_operations(self): return False
(gdb) info threads Id Target Id Frame * 1 Thread 1 (name: shell_uart, state: 0x80, user_options: 0x0, prio: 0xe) _CmdFault (shell=0x7e0bc <shell_uart>, argc=1, argv=0x20018994 <shell_uart_stack+3684>) at /Users/timothy.lee/project/src/Sensor/console.c:217 2 Thread 2 (name: wdt_lowprio_thread_id, state: 0x10, user_options: 0x0, prio: 0xe) _CmdFault (shell=0x7e0bc <shell_uart>, argc=1, argv=0x20018994 <shell_uart_stack+3684>) at /Users/timothy.lee/project/src/Sensor/console.c:217 3 Thread 3 (name: task_1_thread, state: 0x2, user_options: 0x0, prio: 0x9) _CmdFault (shell=0x7e0bc <shell_uart>, argc=1, argv=0x20018994 <shell_uart_stack+3684>) at /Users/timothy.lee/project/src/Sensor/console.c:217 4 Thread 4 (name: task_2_thread, state: 0x10, user_options: 0x0, prio: 0xe) _CmdFault (shell=0x7e0bc <shell_uart>, argc=1,
The debug logs from the gdbstub seem to indicate that gdb wants to read the registers from each thread but its unimplemented on the stub so the frame is just duplicated from the crash frame:
def handle_register_group_read_packet(self): # the 'g' packet for reading a group of registers pass