|
From: openocd-gerrit <ope...@us...> - 2026-07-04 17:53:27
|
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 fa01258d99d8b72a5eec2903b0240eeec0ceb82c (commit)
from c9fe186e14cf762240c195ad4b1f6098f4e7f595 (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 fa01258d99d8b72a5eec2903b0240eeec0ceb82c
Author: Lazar Aleksic <kri...@pr...>
Date: Tue Jun 23 01:04:14 2026 +0200
target/oocd_capstone: fix RISC-V mode and ARM64 rename for capstone v6
CS_MODE_RISCVC was renamed to CS_MODE_RISCV_C and CS_ARCH_ARM64
was renamed to CS_ARCH_AARCH64 in capstone v6 with no backward
compat #define.
Use version-separated #if blocks in the all_archs[] table.
CS_API_MAJOR < 6 keeps the old names, CS_API_MAJOR >= 6 uses
the new names directly.
Change-Id: I1fc343c7f4f40ab0b9902b72fa8f010e1a15d2e3
Signed-off-by: Lazar Aleksic <kri...@pr...>
Reviewed-on: https://review.openocd.org/c/openocd/+/9750
Reviewed-by: Samuel Obuch <sam...@es...>
Reviewed-by: Antonio Borneo <bor...@gm...>
Tested-by: jenkins
diff --git a/src/target/oocd_capstone.c b/src/target/oocd_capstone.c
index 05ae4d21e..b2175565e 100644
--- a/src/target/oocd_capstone.c
+++ b/src/target/oocd_capstone.c
@@ -29,15 +29,24 @@ static struct {
} all_archs[] = {
{ "arm", CS_ARCH_ARM, CS_MODE_ARM },
{ "armbe", CS_ARCH_ARM, CS_MODE_ARM | CS_MODE_BIG_ENDIAN },
- { "arm64", CS_ARCH_ARM64, CS_MODE_LITTLE_ENDIAN },
- { "arm64be", CS_ARCH_ARM64, CS_MODE_BIG_ENDIAN },
{ "cortexm", CS_ARCH_ARM, CS_MODE_ARM | CS_MODE_THUMB | CS_MODE_MCLASS },
{ "thumb", CS_ARCH_ARM, CS_MODE_ARM | CS_MODE_THUMB },
+#if CS_API_MAJOR < 6
+ { "arm64", CS_ARCH_ARM64, CS_MODE_LITTLE_ENDIAN },
+ { "arm64be", CS_ARCH_ARM64, CS_MODE_BIG_ENDIAN },
#if CS_API_MAJOR >= 5
{ "riscv32", CS_ARCH_RISCV, CS_MODE_RISCV32 | CS_MODE_RISCVC },
{ "riscv64", CS_ARCH_RISCV, CS_MODE_RISCV64 | CS_MODE_RISCVC },
-#endif /* CS_API_MAJOR >= 5 */
+#endif
+#endif /* CS_API_MAJOR < 6 */
+
+#if CS_API_MAJOR >= 6
+ { "arm64", CS_ARCH_AARCH64, CS_MODE_LITTLE_ENDIAN },
+ { "arm64be", CS_ARCH_AARCH64, CS_MODE_BIG_ENDIAN },
+ { "riscv32", CS_ARCH_RISCV, CS_MODE_RISCV32 | CS_MODE_RISCV_C },
+ { "riscv64", CS_ARCH_RISCV, CS_MODE_RISCV64 | CS_MODE_RISCV_C },
+#endif /* CS_API_MAJOR >= 6 */
};
int oocd_cs_list_insn_types(struct command_invocation *cmd)
-----------------------------------------------------------------------
Summary of changes:
src/target/oocd_capstone.c | 15 ++++++++++++---
1 file changed, 12 insertions(+), 3 deletions(-)
hooks/post-receive
--
Main OpenOCD repository
|