aboutsummaryrefslogtreecommitdiff
path: root/src/target/riscv/riscv.c
diff options
context:
space:
mode:
authorTim Newsome <tim@sifive.com>2022-04-30 09:55:12 -0700
committerTim Newsome <tim@sifive.com>2022-04-30 10:15:04 -0700
commit788c364031394948712c1f0f3f21d5a20a89e3dc (patch)
tree4c8093ee34d661ddfe65ba3b13d3f004160e79a1 /src/target/riscv/riscv.c
parent31812cd13f35ab28011615cce1aac7298dfe35c7 (diff)
downloadriscv-openocd-macro.zip
riscv-openocd-macro.tar.gz
riscv-openocd-macro.tar.bz2
Use updated macros, which take arguments as expected.macro
This is more to test the debug changes than to improve OpenOCD in any way. Change-Id: If2c3424af89f93952049a519108762a0644405ec Signed-off-by: Tim Newsome <tim@sifive.com>
Diffstat (limited to 'src/target/riscv/riscv.c')
-rw-r--r--src/target/riscv/riscv.c4
1 files changed, 2 insertions, 2 deletions
diff --git a/src/target/riscv/riscv.c b/src/target/riscv/riscv.c
index 484db74..da1ef65 100644
--- a/src/target/riscv/riscv.c
+++ b/src/target/riscv/riscv.c
@@ -710,7 +710,7 @@ static int add_trigger(struct target *target, struct trigger *trigger)
int result = riscv_get_register(target, &tdata1, GDB_REGNO_TDATA1);
if (result != ERROR_OK)
return result;
- int type = get_field(tdata1, MCONTROL_TYPE(riscv_xlen(target)));
+ int type = get_field(tdata1, CSR_MCONTROL_TYPE(riscv_xlen(target)));
result = ERROR_OK;
switch (type) {
@@ -3929,7 +3929,7 @@ int riscv_enumerate_triggers(struct target *target)
if (result != ERROR_OK)
return result;
- int type = get_field(tdata1, MCONTROL_TYPE(riscv_xlen(target)));
+ int type = get_field(tdata1, CSR_MCONTROL_TYPE(riscv_xlen(target)));
if (type == 0)
break;
switch (type) {