From dc320d26f03d2a9932947c3eb2f065bd35c80f44 Mon Sep 17 00:00:00 2001 From: Tim Newsome Date: Wed, 27 Apr 2022 12:46:09 -0700 Subject: [PATCH] Small code cleanup. Change-Id: I563b7c62494987287b13d9ed52a923e6f49a64be --- src/target/riscv/riscv.c | 3 +-- 1 file changed, 1 insertion(+), 2 deletions(-) diff --git a/src/target/riscv/riscv.c b/src/target/riscv/riscv.c index 484db7485..174568fbe 100644 --- a/src/target/riscv/riscv.c +++ b/src/target/riscv/riscv.c @@ -1025,8 +1025,6 @@ int riscv_remove_watchpoint(struct target *target, * and new value. */ int riscv_hit_watchpoint(struct target *target, struct watchpoint **hit_watchpoint) { - struct watchpoint *wp = target->watchpoints; - LOG_DEBUG("Current hartid = %d", riscv_current_hartid(target)); /*TODO instead of disassembling the instruction that we think caused the @@ -1081,6 +1079,7 @@ int riscv_hit_watchpoint(struct target *target, struct watchpoint **hit_watchpoi return ERROR_FAIL; } + struct watchpoint *wp = target->watchpoints; while (wp) { /*TODO support length/mask */ if (wp->address == mem_addr) {