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

Commit

Permalink
Merge pull request #143 from riscv/register_errors
Browse files Browse the repository at this point in the history
Complete full reg list if some aren't readable
  • Loading branch information
timsifive authored Mar 28, 2018
2 parents 8bfcd4c + df83b47 commit 68c5911
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 68c5911

Please sign in to comment.