diff options
author | John Baldwin <jhb@FreeBSD.org> | 2017-06-19 14:30:24 -0700 |
---|---|---|
committer | John Baldwin <jhb@FreeBSD.org> | 2017-06-19 14:40:22 -0700 |
commit | 325c9fd4aa054118b80c621262f10fc6ffe98e25 (patch) | |
tree | 86ec5e22c5ed088c31e6c249498f89670cdf244d /gdb/mips-tdep.c | |
parent | 66953522c9061874047d2e9832c206af783c971c (diff) | |
download | gdb-325c9fd4aa054118b80c621262f10fc6ffe98e25.zip gdb-325c9fd4aa054118b80c621262f10fc6ffe98e25.tar.gz gdb-325c9fd4aa054118b80c621262f10fc6ffe98e25.tar.bz2 |
Don't throw an error in 'info registers' for unavailable MIPS registers.
'info registers' for MIPS throws an error and when it first encounters
an unavailable register. This does not match other architectures
which annotate unavailable registers and continue to print out the
values of subsequent registers. Replace the error by displaying an
aligned "<unavailable>". This string is truncated to "<unavl>" when
displaying a 32-bit register.
gdb/ChangeLog:
* mips-tdep.c (print_gp_register_row): Don't error for unavailable
registers.
Diffstat (limited to 'gdb/mips-tdep.c')
-rw-r--r-- | gdb/mips-tdep.c | 10 |
1 files changed, 8 insertions, 2 deletions
diff --git a/gdb/mips-tdep.c b/gdb/mips-tdep.c index 3ff2dab..c1800e4 100644 --- a/gdb/mips-tdep.c +++ b/gdb/mips-tdep.c @@ -6542,8 +6542,14 @@ print_gp_register_row (struct ui_file *file, struct frame_info *frame, value = get_frame_register_value (frame, regnum); if (value_optimized_out (value) || !value_entirely_available (value)) - error (_("can't read register %d (%s)"), - regnum, gdbarch_register_name (gdbarch, regnum)); + { + fprintf_filtered (file, "%*s ", + (int) mips_abi_regsize (gdbarch) * 2, + (mips_abi_regsize (gdbarch) == 4 ? "<unavl>" + : "<unavailable>")); + col++; + continue; + } raw_buffer = value_contents_all (value); /* pad small registers */ for (byte = 0; |