From 4a6bfd301abf9cac29d1066872f6ae9b33cfae91 Mon Sep 17 00:00:00 2001 From: Palmer Dabbelt Date: Fri, 24 Mar 2017 18:22:13 -0700 Subject: [PATCH] Better error messages --- src/target/riscv/riscv-013.c | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/src/target/riscv/riscv-013.c b/src/target/riscv/riscv-013.c index f719eabde..1ca2f0286 100644 --- a/src/target/riscv/riscv-013.c +++ b/src/target/riscv/riscv-013.c @@ -1926,7 +1926,7 @@ static int read_memory(struct target *target, uint32_t address, dmi_write(target, DMI_ABSTRACTCS, 0); increase_ac_busy_delay(target); } else if (cmderr) { - LOG_ERROR("cmderr=%d", get_field(abstractcs, DMI_ABSTRACTCS_CMDERR)); + LOG_ERROR("read_memory(): cmderr=%d", get_field(abstractcs, DMI_ABSTRACTCS_CMDERR)); return ERROR_FAIL; } else { return ERROR_OK; @@ -2033,7 +2033,7 @@ static int write_memory(struct target *target, uint32_t address, dmi_write(target, DMI_ABSTRACTCS, 0); increase_ac_busy_delay(target); } else if (cmderr) { - LOG_ERROR("cmderr=%d", get_field(abstractcs, DMI_ABSTRACTCS_CMDERR)); + LOG_ERROR("write_memory: cmderr=%d", get_field(abstractcs, DMI_ABSTRACTCS_CMDERR)); return ERROR_FAIL; } else if (!dmi_error) { break;