diff options
author | Antonio Borneo <borneo.antonio@gmail.com> | 2024-05-03 23:04:46 +0200 |
---|---|---|
committer | Antonio Borneo <borneo.antonio@gmail.com> | 2024-06-08 08:38:26 +0000 |
commit | 71013521d7b195022616284aabc5e072a60c52bf (patch) | |
tree | 45a58cfccce7057b766bfcfabc991f6ff39dffad /ChangeLog | |
parent | 437dde701c13e707e5fd912ef6403e09052e4d9b (diff) | |
download | riscv-openocd-71013521d7b195022616284aabc5e072a60c52bf.zip riscv-openocd-71013521d7b195022616284aabc5e072a60c52bf.tar.gz riscv-openocd-71013521d7b195022616284aabc5e072a60c52bf.tar.bz2 |
server: gdb: respect command gdb_report_register_access_error
Commit 236c54c94a53 ("server/gdb_server.c: support unavailable
registers") correctly returns a string of 'x' when the register is
not available in the current target.
While implementing this, it incorrectly drops the pre-existing
feature of optionally ignoring errors while reading a register.
This feature has a real use case documented in the OpenOCD manual
in chapter 'Using GDB as a non-intrusive memory inspector', where
GDB attaches to a target without halting it. For targets that need
to be halted to read its registers, we need to hack the values of
the registers returned to GDB; either returning 'xxxx' or an error
causes GDB to drop the connection.
Re-add the check on 'gdb_report_register_access_error' to keep the
pre-existing behavior when a register error has to be ignored:
- return a string of '0';
- drop a debug message.
Change-Id: Ie65c92f259f92502e688914f334655b635874179
Signed-off-by: Antonio Borneo <borneo.antonio@gmail.com>
Fixes: 236c54c94a53 ("server/gdb_server.c: support unavailable registers")
Reviewed-on: https://review.openocd.org/c/openocd/+/8228
Tested-by: jenkins
Diffstat (limited to 'ChangeLog')
0 files changed, 0 insertions, 0 deletions