From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: (qmail 4281 invoked by alias); 14 Sep 2008 01:26:17 -0000 Received: (qmail 4267 invoked by uid 22791); 14 Sep 2008 01:26:17 -0000 X-Spam-Check-By: sourceware.org Received: from smtp-out.google.com (HELO smtp-out.google.com) (216.239.33.17) by sourceware.org (qpsmtpd/0.31) with ESMTP; Sun, 14 Sep 2008 01:25:42 +0000 Received: from wpaz24.hot.corp.google.com (wpaz24.hot.corp.google.com [172.24.198.88]) by smtp-out.google.com with ESMTP id m8E1PbtE021793 for ; Sun, 14 Sep 2008 02:25:38 +0100 Received: from rv-out-0506.google.com (rvbg37.prod.google.com [10.140.83.37]) by wpaz24.hot.corp.google.com with ESMTP id m8E1PagQ029177 for ; Sat, 13 Sep 2008 18:25:37 -0700 Received: by rv-out-0506.google.com with SMTP id g37so1351179rvb.21 for ; Sat, 13 Sep 2008 18:25:36 -0700 (PDT) Received: by 10.140.128.3 with SMTP id a3mr3720390rvd.195.1221355536289; Sat, 13 Sep 2008 18:25:36 -0700 (PDT) Received: by 10.141.99.20 with HTTP; Sat, 13 Sep 2008 18:25:36 -0700 (PDT) Message-ID: Date: Sun, 14 Sep 2008 01:26:00 -0000 From: "Doug Evans" To: "GDB Patches" Subject: [RFA] small size reduction to struct die_info MIME-Version: 1.0 Content-Type: text/plain; charset=ISO-8859-1 Content-Transfer-Encoding: 7bit Content-Disposition: inline X-IsSubscribed: yes Mailing-List: contact gdb-patches-help@sourceware.org; run by ezmlm Precedence: bulk List-Id: List-Subscribe: List-Archive: List-Post: List-Help: , Sender: gdb-patches-owner@sourceware.org X-SW-Source: 2008-09/txt/msg00310.txt.bz2 This reduces the size of struct die_info for 32 bit hosts. Ok to check in? 2008-09-13 Doug Evans * 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