Make priv readable in 0.11.

macbuild
Tim Newsome 2017-09-30 13:31:57 -07:00
parent 1083352576
commit 6795270a8e
1 changed files with 2 additions and 0 deletions

View File

@ -1311,6 +1311,8 @@ static int register_get(struct reg *reg)
if (cache_write(target, 4, true) != ERROR_OK) {
return ERROR_FAIL;
}
} else if (reg->number == GDB_REGNO_PRIV) {
value = get_field(info->dcsr, DCSR_PRV);
} else {
if (register_read(target, &value, reg->number) != ERROR_OK)
return ERROR_FAIL;