From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: (qmail 2125 invoked by alias); 5 Aug 2003 17:54:33 -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 1862 invoked from network); 5 Aug 2003 17:54:31 -0000 Received: from unknown (HELO nevyn.them.org) (66.93.172.17) by sources.redhat.com with SMTP; 5 Aug 2003 17:54:31 -0000 Received: from drow by nevyn.them.org with local (Exim 4.20 #1 (Debian)) id 19k60z-0007lu-Fe for ; Tue, 05 Aug 2003 13:54:29 -0400 Date: Tue, 05 Aug 2003 17:54:00 -0000 From: Daniel Jacobowitz To: gdb-patches@sources.redhat.com Subject: Re: [rfa] generate symbols associated to namespaces Message-ID: <20030805175429.GA29704@nevyn.them.org> Mail-Followup-To: gdb-patches@sources.redhat.com References: <20030622173547.GA22603@nevyn.them.org> <20030624185019.GA24662@nevyn.them.org> Mime-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline In-Reply-To: User-Agent: Mutt/1.5.1i X-SW-Source: 2003-08/txt/msg00061.txt.bz2 On Fri, Jun 27, 2003 at 02:58:50PM -0700, David Carlton wrote: > On Fri, 27 Jun 2003 09:04:13 -0700, David Carlton said: > > > I've looked at your code comments, and they all seem reasonable. I > > hope I'll have a revised version of the patch today; job transition > > issues will take up some of my time (I start full-time work at > > Kealia today, so I have to figure out what they want me to do other > > than hack GDB), but it's near the top of my priority list. > > Okay, here's the new version. Following Daniel's suggestion, it puts > symbols associated to DW_TAG_namespace in the symtab where they are > found, instead of in a special block, and creates one possible > namespace block for each objfile. This fixes the problem Daniel found > with the last version of my patch (which, incidentally, turns out also > to show up under DWARF 2 with pr-1210.exp; the more tests the > merrier). > > Tested with GCC 3.2, i686-pc-linux-gnu with both DWARF 2 and stabs+, > and with a version of GCC 3.2.3 that generates DW_TAG_namespace DIEs. > No new regressions (though the new tests in gdb.c++/namespace.exp fail > under stabs+, as expected). > > How does this one look to y'all? Sorry 'bout the delay. This looks good to me; Elena? Minor comments: > +/* Allocate everything necessary the possible namespace block > + associated to OBJFILE. */ Grammar :) > + /* Allocate empty GLOBAL_BLOCK and STATIC_BLOCK. */ > + > + bl = allocate_block (&objfile->symbol_obstack); > + BLOCK_DICT (bl) = dict_create_linear (&objfile->symbol_obstack, > + NULL); > + BLOCKVECTOR_BLOCK (bv, GLOBAL_BLOCK) = bl; > + bl = allocate_block (&objfile->symbol_obstack); > + BLOCK_DICT (bl) = dict_create_linear (&objfile->symbol_obstack, > + NULL); > + BLOCKVECTOR_BLOCK (bv, STATIC_BLOCK) = bl; > + > + /* Allocate the possible namespace block; we put it where the first > + local block will live, though I don't think there's any need to > + pretend that it's actually a local block (e.g. by setting > + BLOCK_SUPERBLOCK appropriately). */ > + > + bl = allocate_block (&objfile->symbol_obstack); > + BLOCK_DICT (bl) = dict_create_hashed_expandable (); > + BLOCKVECTOR_BLOCK (bv, FIRST_LOCAL_BLOCK) = bl; Is there any particular reason not to use the global block? If so might want to comment what it is. -- Daniel Jacobowitz MontaVista Software Debian GNU/Linux Developer