This is the mail archive of the gdb-patches@sourceware.org mailing list for the GDB project.


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]
Other format: [Raw text]

Re: [patch, arm] Consistent display of registers in corefile


On 01/13/2011 09:55 AM, Ulrich Weigand wrote:
Yao Qi wrote:

FPS belongs to float_reggroup, save_reggroup, and restore_reggroup,
instead of float_reggroup only.

+  /* FPS register's type is INT, but belongs to float_reggroup,
+     save_regroup, and restore_reggroup.  */
    if (regnum == ARM_FPS_REGNUM)
-    return (group == float_reggroup);
+    return (group == float_reggroup
+	    || group == save_reggroup
+	    || group == restore_reggroup);
    else
      return default_register_reggroup_p (gdbarch, regnum, group);

Well, FPS should also belong to all_reggroup, otherwise it wil not show up in "info all-registers" ...

OK, fix it in my new patch.


--
Yao Qi
gdb/
	* arm-tdep.c (arm_register_reggroup_p): FPS register is in
	save_reggroup, restore_reggroup and all_reggroup.

diff --git a/gdb/arm-tdep.c b/gdb/arm-tdep.c
index 9ec410d..e24a6d9 100644
--- a/gdb/arm-tdep.c
+++ b/gdb/arm-tdep.c
@@ -7234,9 +7234,14 @@ static int
 arm_register_reggroup_p (struct gdbarch *gdbarch, int regnum,
 			  struct reggroup *group)
 {
-  /* FPS register's type is INT, but belongs to float_group.  */
+  /* FPS register's type is INT, but belongs to float_reggroup.  Beside
+     this, FPS register belongs to save_regroup, restore_reggroup, and
+     all_reggroup, of course.  */
   if (regnum == ARM_FPS_REGNUM)
-    return (group == float_reggroup);
+    return (group == float_reggroup
+	    || group == save_reggroup
+	    || group == restore_reggroup
+	    || group == all_reggroup);
   else
     return default_register_reggroup_p (gdbarch, regnum, group);
 }

Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]