This is the mail archive of the
gdb-patches@sources.redhat.com
mailing list for the GDB project.
[patch] Fix default for reggroups :-(
- From: Andrew Cagney <ac131313 at redhat dot com>
- To: gdb-patches at sources dot redhat dot com
- Date: Sat, 02 Nov 2002 19:03:20 -0500
- Subject: [patch] Fix default for reggroups :-(
Ulgh,
The attached patch fixes a botch (by me) in the just added
register_reggroup_p() method. Even though there was a valid default,
the code was still requireing each architecture provide a default value :-(
If you were wondering why, for the last ~4 hrs, GDB wouldn't start.
This is it.
I'm currently checking it in.
Andrew
2002-11-02 Andrew Cagney <ac131313@redhat.com>
* gdbarch.sh (register_reggroup_p): Allow default value.
* gdbarch.h, gdbarch.c: Regenerate.
Index: gdbarch.c
===================================================================
RCS file: /cvs/src/src/gdb/gdbarch.c,v
retrieving revision 1.157
diff -u -r1.157 gdbarch.c
--- gdbarch.c 2 Nov 2002 15:13:34 -0000 1.157
+++ gdbarch.c 2 Nov 2002 23:51:19 -0000
@@ -823,9 +823,7 @@
/* Skip verify of address_class_type_flags, has predicate */
/* Skip verify of address_class_type_flags_to_name, has predicate */
/* Skip verify of address_class_name_to_type_flags, has predicate */
- if ((GDB_MULTI_ARCH > GDB_MULTI_ARCH_PARTIAL)
- && (gdbarch->register_reggroup_p == default_register_reggroup_p))
- fprintf_unfiltered (log, "\n\tregister_reggroup_p");
+ /* Skip verify of register_reggroup_p, invalid_p == 0 */
buf = ui_file_xstrdup (log, &dummy);
make_cleanup (xfree, buf);
if (strlen (buf) > 0)
Index: gdbarch.sh
===================================================================
RCS file: /cvs/src/src/gdb/gdbarch.sh,v
retrieving revision 1.168
diff -u -r1.168 gdbarch.sh
--- gdbarch.sh 2 Nov 2002 15:13:34 -0000 1.168
+++ gdbarch.sh 2 Nov 2002 23:56:00 -0000
@@ -668,7 +668,7 @@
M:2:ADDRESS_CLASS_TYPE_FLAGS_TO_NAME:char *:address_class_type_flags_to_name:int type_flags:type_flags:
M:2:ADDRESS_CLASS_NAME_TO_TYPE_FLAGS:int:address_class_name_to_type_flags:char *name, int *type_flags_ptr:name, type_flags_ptr
# Is a register in a group
-m:::int:register_reggroup_p:int regnum, struct reggroup *reggroup:regnum, reggroup:::default_register_reggroup_p
+m:::int:register_reggroup_p:int regnum, struct reggroup *reggroup:regnum, reggroup:::default_register_reggroup_p::0
EOF
}