From: John Baldwin Date: Mon, 19 Jun 2017 21:30:24 +0000 (-0700) Subject: Don't throw an error in 'info registers' for unavailable MIPS registers. X-Git-Url: https://git.libre-soc.org/?a=commitdiff_plain;h=325c9fd4aa054118b80c621262f10fc6ffe98e25;p=binutils-gdb.git 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 "". This string is truncated to "" when displaying a 32-bit register. gdb/ChangeLog: * mips-tdep.c (print_gp_register_row): Don't error for unavailable registers. --- diff --git a/gdb/ChangeLog b/gdb/ChangeLog index c7cf4101317..4e091d7e40b 100644 --- a/gdb/ChangeLog +++ b/gdb/ChangeLog @@ -1,3 +1,8 @@ +2017-06-19 John Baldwin + + * mips-tdep.c (print_gp_register_row): Don't error for unavailable + registers. + 2017-06-19 Pedro Alves * dwarf2read.c (write_psymtabs_to_index): Construct file_closer diff --git a/gdb/mips-tdep.c b/gdb/mips-tdep.c index 3ff2dab491e..c1800e419f8 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 ? "" + : "")); + col++; + continue; + } raw_buffer = value_contents_all (value); /* pad small registers */ for (byte = 0;