This is the mail archive of the
gdb-patches@sources.redhat.com
mailing list for the GDB project.
RFA: move type flag bit into gdbtypes.h
- From: Fred Fish <fnf at fishpond dot ninemoons dot com>
- To: gdb-patches at sources dot redhat dot com
- Cc: fnf at redhat dot com
- Date: Sat, 8 Dec 2001 17:41:49 -0700 (MST)
- Subject: RFA: move type flag bit into gdbtypes.h
- Reply-to: fnf at redhat dot com
The dwarf2read.c defines a bit (TYPE_FLAG_VARARGS) in the type flags
word that collides with one of the global bits (TYPE_FLAG_DATA_SPACE)
defined in gdbtypes.h. This patch moves the TYPE_FLAGS_VARARGS
definition to gdbtypes.h and changes it's value to one of the
available free bits.
-Fred
2001-12-08 Fred Fish <fnf@redhat.com>
* dwarf2read.c (TYPE_FLAG_VARARGS): Remove from here.
* gdbtypes.h (TYPE_FLAG_VARARGS): Add here and change value to
not collide with other flag bits.
Index: dwarf2read.c
===================================================================
RCS file: /cvs/src/src/gdb/dwarf2read.c,v
retrieving revision 1.38
diff -u -p -r1.38 dwarf2read.c
--- dwarf2read.c 2001/12/07 22:11:51 1.38
+++ dwarf2read.c 2001/12/09 00:07:48
@@ -474,10 +474,6 @@ struct field_info
int nfnfields;
};
-/* FIXME: Kludge to mark a varargs function type for C++ member function
- argument processing. */
-#define TYPE_FLAG_VARARGS (1 << 10)
-
/* Dwarf2 has no clean way to discern C++ static and non-static member
functions. G++ helps GDB by marking the first parameter for non-static
member functions (which is the this pointer) as artificial.
Index: gdbtypes.h
===================================================================
RCS file: /cvs/src/src/gdb/gdbtypes.h,v
retrieving revision 1.19
diff -u -p -r1.19 gdbtypes.h
--- gdbtypes.h 2001/12/07 22:11:51 1.19
+++ gdbtypes.h 2001/12/09 00:07:50
@@ -228,6 +228,12 @@ enum type_code
#define TYPE_FLAG_CODE_SPACE (1 << 9)
#define TYPE_FLAG_DATA_SPACE (1 << 10)
+/* FIXME: Kludge to mark a varargs function type for C++ member
+ function argument processing. Currently only used in dwarf2read.c,
+ but put it here so we won't accidentally overload the bit with
+ another flag. */
+
+#define TYPE_FLAG_VARARGS (1 << 11)
struct type
{