[RFA] small size reduction to struct die_info

Doug Evans dje@google.com
Sun Sep 14 01:26:00 GMT 2008


This reduces the size of struct die_info for 32 bit hosts.

Ok to check in?

2008-09-13  Doug Evans  <dje@sebabeach.org>

        * dwarf2read.c (struct die_info): Make members tag, num_attrs 16 bits.

Index: dwarf2read.c
===================================================================
RCS file: /cvs/src/src/gdb/dwarf2read.c,v
retrieving revision 1.281
diff -u -p -r1.281 dwarf2read.c
--- dwarf2read.c        13 Sep 2008 22:19:50 -0000      1.281
+++ dwarf2read.c        14 Sep 2008 01:22:52 -0000
@@ -536,10 +536,17 @@ struct attribute
 /* This data structure holds a complete die structure. */
 struct die_info
   {
-    enum dwarf_tag tag;                /* Tag indicating type of die */
-    unsigned int abbrev;       /* Abbrev number */
-    unsigned int offset;       /* Offset in .debug_info section */
-    unsigned int num_attrs;    /* Number of attributes */
+    /* DWARF-2 tag for this DIE.  */
+    ENUM_BITFIELD(dwarf_tag) tag : 16;
+
+    /* Number of attributes */
+    unsigned int num_attrs : 16;
+
+    /* Abbrev number */
+    unsigned int abbrev;
+
+    /* Offset in .debug_info section */
+    unsigned int offset;

     /* The dies in a compilation unit form an n-ary tree.  PARENT
        points to this die's parent; CHILD points to the first child of



More information about the Gdb-patches mailing list