diff options
author | Tim Newsome <tim@sifive.com> | 2017-07-03 11:52:35 -0700 |
---|---|---|
committer | Tim Newsome <tim@sifive.com> | 2017-07-03 11:52:35 -0700 |
commit | f18fd83ac7219cd1e5e62a121e6cd6474e5f53dc (patch) | |
tree | b96495978b55290603d8e36dbee48cbdad437a9e | |
parent | d77c4a953c1f2a6e1f84c28e64bf9296a4bb398a (diff) | |
download | riscv-openocd-f18fd83ac7219cd1e5e62a121e6cd6474e5f53dc.zip riscv-openocd-f18fd83ac7219cd1e5e62a121e6cd6474e5f53dc.tar.gz riscv-openocd-f18fd83ac7219cd1e5e62a121e6cd6474e5f53dc.tar.bz2 |
Fix trigger set/clear bug.
-rw-r--r-- | src/target/riscv/riscv-013.c | 4 |
1 files changed, 2 insertions, 2 deletions
diff --git a/src/target/riscv/riscv-013.c b/src/target/riscv/riscv-013.c index 86f5f1b..ab5b993 100644 --- a/src/target/riscv/riscv-013.c +++ b/src/target/riscv/riscv-013.c @@ -832,7 +832,7 @@ static int add_trigger(struct target *target, struct trigger *trigger) uint64_t tdata1_rb; for (int hartid = 0; hartid < riscv_count_harts(target); ++hartid) { - if (!riscv_hart_enabled(target, i)) + if (!riscv_hart_enabled(target, hartid)) continue; riscv_set_current_hartid(target, hartid); @@ -921,7 +921,7 @@ static int remove_trigger(struct target *target, struct trigger *trigger) } LOG_DEBUG("Stop using resource %d for bp %d", i, trigger->unique_id); for (int hartid = 0; hartid < riscv_count_harts(target); ++hartid) { - if (!riscv_hart_enabled(target, i)) + if (!riscv_hart_enabled(target, hartid)) continue; riscv_set_current_hartid(target, hartid); |