From: OpenOCD-Gerrit <ope...@us...> - 2020-02-15 15:39:23
|
This is an automated email from the git hooks/post-receive script. It was generated because a ref change was pushed to the repository containing the project "Main OpenOCD repository". The branch, master has been updated via 54814015148345c01c8878893daed7b429d2793c (commit) from 1492a103db6174bd4d6994ea3487c096aef4560d (commit) Those revisions listed above that are new to this repository have not appeared on any other notification email; so we list those revisions in full, below. - Log ----------------------------------------------------------------- commit 54814015148345c01c8878893daed7b429d2793c Author: Antonio Borneo <bor...@gm...> Date: Fri Jun 14 15:59:17 2019 +0200 armv8: check the core state to pass the correct arch to gdb Commit 3799eded6761 ("target/aarch64: add support for multi-architecture gdb") passes the constant string "aarch64" as architecture to gdb. This is not working if the core is running in 32 bits mode; gdb reports: Truncated register 8 in remote 'g' packet then closes the connection with OpenOCD. Make the architecture string dependant from the current state of the core. Change-Id: I16e1614ea02ba29bf87f450b3dfe25c83c9a3612 Signed-off-by: Antonio Borneo <bor...@gm...> Reviewed-on: http://openocd.zylin.com/5234 Tested-by: jenkins Reviewed-by: Muhammad Omair Javaid <oma...@li...> diff --git a/src/target/armv8.c b/src/target/armv8.c index e7369372a..88b932073 100644 --- a/src/target/armv8.c +++ b/src/target/armv8.c @@ -1753,7 +1753,8 @@ const struct command_registration armv8_command_handlers[] = { const char *armv8_get_gdb_arch(struct target *target) { - return "aarch64"; + struct arm *arm = target_to_arm(target); + return arm->core_state == ARM_STATE_AARCH64 ? "aarch64" : "arm"; } int armv8_get_gdb_reg_list(struct target *target, ----------------------------------------------------------------------- Summary of changes: src/target/armv8.c | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) hooks/post-receive -- Main OpenOCD repository |