From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: (qmail 25127 invoked by alias); 20 Aug 2003 17:46:55 -0000 Mailing-List: contact gdb-patches-help@sources.redhat.com; run by ezmlm Precedence: bulk List-Subscribe: List-Archive: List-Post: List-Help: , Sender: gdb-patches-owner@sources.redhat.com Received: (qmail 25077 invoked from network); 20 Aug 2003 17:46:53 -0000 Received: from unknown (HELO concert.shout.net) (204.253.184.25) by sources.redhat.com with SMTP; 20 Aug 2003 17:46:53 -0000 Received: from duracef.shout.net (duracef.shout.net [204.253.184.12]) by concert.shout.net (8.12.9/8.12.9) with ESMTP id h7KHkdca004334; Wed, 20 Aug 2003 12:46:39 -0500 Received: from duracef.shout.net (localhost [127.0.0.1]) by duracef.shout.net (8.12.9/8.12.9) with ESMTP id h7KHkdHK009278; Wed, 20 Aug 2003 12:46:39 -0500 Received: (from mec@localhost) by duracef.shout.net (8.12.9/8.12.9/Submit) id h7KHkdkV009277; Wed, 20 Aug 2003 13:46:39 -0400 Date: Wed, 20 Aug 2003 17:46:00 -0000 From: Michael Elizabeth Chastain Message-Id: <200308201746.h7KHkdkV009277@duracef.shout.net> To: ezannoni@redhat.com, gdb-patches@sources.redhat.com, jimb@redhat.com Subject: [rfa] space reduction in gdbtypes.h X-SW-Source: 2003-08/txt/msg00344.txt.bz2 More space reduction! This is the last of the low-hanging fruit. before: 90001408 after: 87068672 This is a re-arrangement of 'struct main_type'. struct main_type 52 40 Testing: native i686-pc-linux-gnu, gcc v2 and v3, dwarf-2 and stabs+. Full test suite, not regressions. Okay to commit? Michael C 2003-08-20 Michael Chastain * gdbtypes.h (struct main_type): Rearrange to save space. Index: gdbtypes.h =================================================================== RCS file: /cvs/src/src/gdb/gdbtypes.h,v retrieving revision 1.48 diff -u -r1.48 gdbtypes.h --- gdbtypes.h 23 Jun 2003 21:05:40 -0000 1.48 +++ gdbtypes.h 20 Aug 2003 02:53:46 -0000 @@ -274,10 +274,6 @@ struct main_type { - /* Code for kind of type */ - - enum type_code code; - /* Name of this type, or NULL if none. This is used for printing only, except by poorly designed C++ code. @@ -298,6 +294,10 @@ char *tag_name; + /* Code for kind of type */ + + ENUM_BITFIELD(type_code) code : 8; + /* FIXME, these should probably be restricted to a Fortran-specific field in some fashion. */ #define BOUND_CANNOT_BE_DETERMINED 5 @@ -306,8 +306,8 @@ #define BOUND_BY_REF_IN_REG 2 #define BOUND_BY_VALUE_IN_REG 1 #define BOUND_SIMPLE 0 - int upper_bound_type; - int lower_bound_type; + int upper_bound_type : 4; + int lower_bound_type : 4; /* Every type is now associated with a particular objfile, and the type is allocated on the type_obstack for that objfile. One problem @@ -340,6 +340,15 @@ short nfields; + /* Field number of the virtual function table pointer in + VPTR_BASETYPE. If -1, we were unable to find the virtual + function table pointer in initial symbol reading, and + fill_in_vptr_fieldno should be called to find it if possible. + + Unused if this type does not have virtual functions. */ + + short vptr_fieldno; + /* For structure and union types, a description of each field. For set and pascal array types, there is one "field", whose type is the domain type of the set or array. @@ -420,15 +429,6 @@ Unused otherwise. */ struct type *vptr_basetype; - - /* Field number of the virtual function table pointer in - VPTR_BASETYPE. If -1, we were unable to find the virtual - function table pointer in initial symbol reading, and - fill_in_vptr_fieldno should be called to find it if possible. - - Unused if this type does not have virtual functions. */ - - int vptr_fieldno; /* Slot to point to additional language-specific fields of this type. */