diff options
author | Tarek BOCHKATI <tarek.bouchkati@gmail.com> | 2020-03-13 11:49:25 +0100 |
---|---|---|
committer | Antonio Borneo <borneo.antonio@gmail.com> | 2020-04-05 14:11:43 +0100 |
commit | 4ce4aa752b638d8eb39864d1ad498bde139f5233 (patch) | |
tree | 511aeb9294b4bef8d853939a675f5b63732fbf93 /src | |
parent | af82b97834cfba60144894b79244cf421ff88359 (diff) | |
download | riscv-openocd-4ce4aa752b638d8eb39864d1ad498bde139f5233.zip riscv-openocd-4ce4aa752b638d8eb39864d1ad498bde139f5233.tar.gz riscv-openocd-4ce4aa752b638d8eb39864d1ad498bde139f5233.tar.bz2 |
armv8: log the register name which we failed to read or write
when openocd fails to read armv8 register, the user is not informed
which register has caused the error.
for example, in AArch32 state ESR_EL3 read/write is not supported,
thus armv8_dpm_read_current_registers is always failing without mentioning
which register has caused the error.
Change-Id: I24c5abbda9fac24fb77a01777ed15261aeaaf800
Signed-off-by: Tarek BOCHKATI <tarek.bouchkati@gmail.com>
Reviewed-on: http://openocd.zylin.com/5516
Tested-by: jenkins
Reviewed-by: Antonio Borneo <borneo.antonio@gmail.com>
Diffstat (limited to 'src')
-rw-r--r-- | src/target/armv8_dpm.c | 7 |
1 files changed, 7 insertions, 0 deletions
diff --git a/src/target/armv8_dpm.c b/src/target/armv8_dpm.c index 081eed2..5be5272 100644 --- a/src/target/armv8_dpm.c +++ b/src/target/armv8_dpm.c @@ -681,6 +681,10 @@ static int dpmv8_read_reg(struct arm_dpm *dpm, struct reg *r, unsigned regnum) LOG_DEBUG("READ: %s, hvalue=%16.8llx", r->name, (unsigned long long) hvalue); } } + + if (retval != ERROR_OK) + LOG_ERROR("Failed to read %s register", r->name); + return retval; } @@ -720,6 +724,9 @@ static int dpmv8_write_reg(struct arm_dpm *dpm, struct reg *r, unsigned regnum) } } + if (retval != ERROR_OK) + LOG_ERROR("Failed to write %s register", r->name); + return retval; } |