riscv-openocd/src
Antonio Borneo c72afedce7 target: cortex_a: fix regs invalidation when -defer-examine
The code for cortex_a allocates the register cache during the very
first examine of the target.
To prevent a segmentation fault in assert_reset(), the call to
register_cache_invalidate() is guarded by target_was_examined().

But for targets with -defer-examine, the target is set as not
examined in handle_target_reset() just before entering in
assert_reset().

This causes registers to not be invalidated while reset a target
examined but with -defer-examine.

Change the condition and invalidate the register cache if it has
been already allocated.

Change-Id: I81ae782ddce07431d5f2c1bea3e2f19dfcd6d1ce
Signed-off-by: Antonio Borneo <borneo.antonio@gmail.com>
Reviewed-on: https://review.openocd.org/c/openocd/+/8215
Tested-by: jenkins
2024-05-04 08:35:00 +00:00
..
flash flash/nor/eneispif: support ENE KB1200 ispi flash 2024-04-01 05:51:33 +00:00
helper helper/list: include the correct header file 2024-03-24 13:41:17 +00:00
jtag jtag: linuxgpiod: minor alignment to coding style 2024-05-04 08:22:11 +00:00
pld jtag: Rename 'hasidcode' to 'has_idcode' 2023-12-16 07:51:56 +00:00
rtos OpenOCD memory leak in `hwthread_update_threads()` 2023-10-27 11:41:30 +00:00
rtt rtt/tcl: Fix line indentation 2023-11-18 11:38:27 +00:00
server gdb_server: drop useless check in gdb_keep_client_alive() 2024-03-24 13:40:27 +00:00
svf svf: make command 'svf' syntax consistent 2023-03-25 18:09:06 +00:00
target target: cortex_a: fix regs invalidation when -defer-examine 2024-05-04 08:35:00 +00:00
transport transport: rewrite command 'transport select' as COMMAND_HANDLER 2023-03-25 18:09:47 +00:00
xsvf openocd: fix SPDX tag format for files .c 2022-09-18 08:22:01 +00:00
Makefile.am openocd: build: add SPDX tag 2022-07-23 13:06:38 +00:00
hello.c hello: include hello.h 2023-05-18 10:13:41 +00:00
hello.h openocd: src: replace the GPL-2.0-or-later license tag 2022-07-23 13:59:13 +00:00
main.c openocd: fix SPDX tag format for files .c 2022-09-18 08:22:01 +00:00
openocd.c openocd: rewrite command 'version' as COMMAND_HANDLER 2023-03-25 18:10:54 +00:00
openocd.h openocd: src: replace the GPL-2.0-or-later license tag 2022-07-23 13:59:13 +00:00