Skip to content
This repository has been archived by the owner on Aug 17, 2022. It is now read-only.

Commit

Permalink
Complete full reg list if some aren't readable
Browse files Browse the repository at this point in the history
Previously `info all-registers` and `info registers all` would terminate
as soon as it got to a register that was not readable. Now the user gets
a message and the register list continues.
  • Loading branch information
timsifive committed Mar 27, 2018
1 parent 8bfcd4c commit df83b47
Showing 1 changed file with 14 additions and 1 deletion.
15 changes: 14 additions & 1 deletion gdb/riscv-tdep.c
Original file line number Diff line number Diff line change
Expand Up @@ -538,7 +538,20 @@ riscv_print_register_formatted (struct ui_file *file, struct frame_info *frame,
unsigned long long d;
int prefer_alias = regnum >= RISCV_FIRST_CSR_REGNUM;

if (!deprecated_frame_register_read (frame, regnum, raw_buffer))
int read_result = -1;
TRY
{
read_result = deprecated_frame_register_read (frame, regnum, raw_buffer);
}
CATCH (ex, RETURN_MASK_ERROR)
{
fprintf_filtered (file, "%-15s%s\n",
gdbarch_register_name (gdbarch, regnum),
ex.message);
return;
}

if (!read_result)
{
fprintf_filtered (file, "%-15s[Invalid]\n",
gdbarch_register_name (gdbarch, regnum));
Expand Down

0 comments on commit df83b47

Please sign in to comment.