gdb_server: fix HW thread status at gdb attach
authorAntonio Borneo <borneo.antonio@gmail.com>
Sat, 19 Dec 2020 21:31:29 +0000 (22:31 +0100)
committerAntonio Borneo <borneo.antonio@gmail.com>
Sat, 26 Dec 2020 15:48:17 +0000 (15:48 +0000)
commitc69b4deae36a7bcbab5df80ec2a5dbfd652e25ac
tree58fd963057eb5cfdb729c29795272da35d1fa52d
parent7f74906c2d18a2347ec392f9a457963bff3f25b8
gdb_server: fix HW thread status at gdb attach

At gdb attach, the event TARGET_EVENT_GDB_ATTACH is in charge of
halting the target.
For HW thread, rtos_update_threads() should be called after the
event to detect and record the new 'halted' status. Instead it is
called immediately before the event, thus reading the status
before the halt.

Move after the event the call to rtos_update_threads().

Change-Id: Iab3480ea0f5283ed6580f0f6c11200083197d1e9
Signed-off-by: Antonio Borneo <borneo.antonio@gmail.com>
Reviewed-on: http://openocd.zylin.com/5983
Tested-by: jenkins
src/server/gdb_server.c