diff mbox

[20/24] Drop FP and MSA control registers from default info registers

Message ID 1467038991-6600-20-git-send-email-bhushan.attarde@imgtec.com
State New
Headers show

Commit Message

Bhushan Attarde June 27, 2016, 2:49 p.m. UTC
gdb/ChangeLog:
        * mips-tdep.c (print_gp_register_row, mips_print_registers_info):
        Skip FP & MSA control registers.
---
 gdb/mips-tdep.c | 15 +++++++++++++--
 1 file changed, 13 insertions(+), 2 deletions(-)
diff mbox

Patch

diff --git a/gdb/mips-tdep.c b/gdb/mips-tdep.c
index 7a6d23d..14e3aa6 100644
--- a/gdb/mips-tdep.c
+++ b/gdb/mips-tdep.c
@@ -7650,6 +7650,9 @@  print_gp_register_row (struct ui_file *file, struct frame_info *frame,
       if (mips_float_register_p (gdbarch, regnum) ||
 	  mips_vector_register_p (gdbarch, regnum))
 	break;			/* End the row: reached FP register.  */
+      if (mips_register_reggroup_p (gdbarch, regnum, float_reggroup) ||
+	  mips_register_reggroup_p (gdbarch, regnum, vector_reggroup))
+	break;
       /* Large registers are handled separately.  */
       if (register_size (gdbarch, regnum) > mips_abi_regsize (gdbarch))
 	{
@@ -7690,6 +7693,9 @@  print_gp_register_row (struct ui_file *file, struct frame_info *frame,
       if (mips_float_register_p (gdbarch, regnum) ||
 	  mips_vector_register_p (gdbarch, regnum))
 	break;			/* End row: reached FP register.  */
+      if (mips_register_reggroup_p (gdbarch, regnum, float_reggroup) ||
+	 mips_register_reggroup_p (gdbarch, regnum, vector_reggroup))
+	break;
       if (register_size (gdbarch, regnum) > mips_abi_regsize (gdbarch))
 	break;			/* End row: large register.  */
 
@@ -7776,8 +7782,13 @@  mips_print_registers_info (struct gdbarch *gdbarch, struct ui_file *file,
 	    }
 	  else if (mips_register_reggroup_p (gdbarch, regnum, float_reggroup) ||
 		   mips_register_reggroup_p (gdbarch, regnum, vector_reggroup))
-	    /* FP & MSA control registers */
-	    regnum = print_control_register_row (file, frame, regnum);
+	    {
+	      /* FP & MSA control registers */
+	      if (all)		/* True for "INFO ALL-REGISTERS" command.  */
+		regnum = print_control_register_row (file, frame, regnum);
+	      else
+		++regnum;
+	    }
 	  else
 	    regnum = print_gp_register_row (file, frame, regnum);
 	}