This is an automated email from Gerrit. "Evgeniy Naydanov <[email protected]>" just uploaded a new patch set to Gerrit, which you can find at https://review.openocd.org/c/openocd/+/9587
-- gerrit commit 0339e4ad884992457886147323fa4e516e2e321e Author: Evgeniy Naydanov <[email protected]> Date: Thu Mar 12 14:52:21 2026 +0300 target/riscv: drop version-specific `arch_state()` Drop these placeholders. This is a part of the effort to eliminate "fake" `riscv013_target` and `riscv011_target` `target_type`s. Link: http://review.openocd.org/id/Ied5756fb61bceb9b428a54b7fffb02818f94d935 Change-Id: I055ce3114178cc870a6679aa91bc5477870bbeea Signed-off-by: Evgeniy Naydanov <[email protected]> diff --git a/src/target/riscv/riscv-011.c b/src/target/riscv/riscv-011.c index 2bef2228e1..8fd3792bf1 100644 --- a/src/target/riscv/riscv-011.c +++ b/src/target/riscv/riscv-011.c @@ -2347,11 +2347,6 @@ static int access_memory(struct target *target, const struct riscv_mem_access_ar return read_memory(target, args); } -static int arch_state(struct target *target) -{ - return ERROR_OK; -} - static COMMAND_HELPER(riscv011_print_info, struct target *target) { /* Abstract description. */ @@ -2472,6 +2467,4 @@ struct target_type riscv011_target = { .assert_reset = assert_reset, .deassert_reset = deassert_reset, - - .arch_state = arch_state, }; diff --git a/src/target/riscv/riscv-013.c b/src/target/riscv/riscv-013.c index 50e0f83dd8..4c5159fb87 100644 --- a/src/target/riscv/riscv-013.c +++ b/src/target/riscv/riscv-013.c @@ -5076,10 +5076,6 @@ static unsigned int riscv013_get_progbufsize(const struct target *target) return r->progbufsize; } -static int arch_state(struct target *target) -{ - return ERROR_OK; -} struct target_type riscv013_target = { .name = "riscv", @@ -5094,8 +5090,6 @@ struct target_type riscv013_target = { .assert_reset = assert_reset, .deassert_reset = deassert_reset, - - .arch_state = arch_state }; /*** 0.13-specific implementations of various RISC-V helper functions. ***/ diff --git a/src/target/riscv/riscv.c b/src/target/riscv/riscv.c index e92366d446..1c9ae812ee 100644 --- a/src/target/riscv/riscv.c +++ b/src/target/riscv/riscv.c @@ -3565,11 +3565,7 @@ static int riscv_arch_state(struct target *target) target_name(target), debug_reason_name(target), semihosting_active ? " Semihosting is active." : ""); - struct target_type *tt = get_target_type(target); - if (!tt) - return ERROR_FAIL; - assert(tt->arch_state); - return tt->arch_state(target); + return ERROR_OK; } /* Algorithm must end with a software breakpoint instruction. */ --
