[gdb/testsuite] Fix gdb.base/style.exp with stub-termcap
[binutils-gdb.git] / gdb / reggroups.c
index 52b13fc9af88e49c4aba2491ef0ba7ae13cb168f..96ff1d3d97d7d2688dbd3358d7643faea47f2698 100644 (file)
@@ -1,6 +1,6 @@
 /* Register groupings for GDB, the GNU debugger.
 
-   Copyright (C) 2002-2020 Free Software Foundation, Inc.
+   Copyright (C) 2002-2021 Free Software Foundation, Inc.
 
    Contributed by Red Hat.
 
@@ -201,9 +201,9 @@ default_register_reggroup_p (struct gdbarch *gdbarch, int regnum,
     return 0;
   if (group == all_reggroup)
     return 1;
-  vector_p = TYPE_VECTOR (register_type (gdbarch, regnum));
-  float_p = (TYPE_CODE (register_type (gdbarch, regnum)) == TYPE_CODE_FLT
-            || (TYPE_CODE (register_type (gdbarch, regnum))
+  vector_p = register_type (gdbarch, regnum)->is_vector ();
+  float_p = (register_type (gdbarch, regnum)->code () == TYPE_CODE_FLT
+            || (register_type (gdbarch, regnum)->code ()
                 == TYPE_CODE_DECFLOAT));
   raw_p = regnum < gdbarch_num_regs (gdbarch);
   if (group == float_reggroup)
@@ -278,7 +278,7 @@ reggroups_dump (struct gdbarch *gdbarch, struct ui_file *file)
       }
 
       /* Note: If you change this, be sure to also update the
-         documentation.  */
+        documentation.  */
       
       fprintf_unfiltered (file, "\n");
 
@@ -321,8 +321,9 @@ struct reggroup *const all_reggroup = &all_group;
 struct reggroup *const save_reggroup = &save_group;
 struct reggroup *const restore_reggroup = &restore_group;
 
+void _initialize_reggroup ();
 void
-_initialize_reggroup (void)
+_initialize_reggroup ()
 {
   reggroups_data = gdbarch_data_register_pre_init (reggroups_init);