From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: (qmail 26742 invoked by alias); 7 Feb 2004 23:24:27 -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 26725 invoked from network); 7 Feb 2004 23:24:27 -0000 Received: from unknown (HELO localhost.redhat.com) (66.30.197.194) by sources.redhat.com with SMTP; 7 Feb 2004 23:24:27 -0000 Received: by localhost.redhat.com (Postfix, from userid 469) id 906B51A4484; Sat, 7 Feb 2004 18:21:07 -0500 (EST) From: Elena Zannoni MIME-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Transfer-Encoding: 7bit Message-ID: <16421.29411.490179.382466@localhost.redhat.com> Date: Sat, 07 Feb 2004 23:24:00 -0000 To: mec.gnu@mindspring.com (Michael Elizabeth Chastain) Cc: ezannoni@redhat.com, gdb-patches@sources.redhat.com Subject: Re: [PATCH/ob] unify objfile obstacks(2/4) In-Reply-To: <20040207023425.40A0D4B364@berman.michael-chastain.com> References: <20040207023425.40A0D4B364@berman.michael-chastain.com> X-SW-Source: 2004-02/txt/msg00157.txt.bz2 Michael Elizabeth Chastain writes: > This comment in dbxread.c seems a bit wack now: > > - /* Read the string table and stash it away in the psymbol_obstack. It is > + /* Read the string table and stash it away in the objfile_obstack. It is > only needed as long as we need to expand psymbols into full symbols, > so when we blow away the psymbol the string table goes away as well. > > The psymbols are going to have the same lifetime as the symbols, > so talking about blowing away the psymbols seems weird. > Yes true, however we never did blow away the psymbols. The obstacks always had the same lifetime. I.e. the comment was a bit weird to start with. I'll clean that up though. here: Index: dbxread.c =================================================================== RCS file: /cvs/src/src/gdb/dbxread.c,v retrieving revision 1.62 diff -u -p -r1.62 dbxread.c --- dbxread.c 9 Jan 2004 16:26:17 -0000 1.62 +++ dbxread.c 7 Feb 2004 17:21:36 -0000 @@ -651,14 +651,13 @@ dbx_symfile_init (struct objfile *objfil DBX_SYMCOUNT (objfile) = bfd_get_symcount (sym_bfd); DBX_SYMTAB_OFFSET (objfile) = SYMBOL_TABLE_OFFSET; - /* Read the string table and stash it away in the psymbol_obstack. It is - only needed as long as we need to expand psymbols into full symbols, - so when we blow away the psymbol the string table goes away as well. + /* Read the string table and stash it away in the objfile_obstack. + When we blow away the objfile the string table goes away as well. Note that gdb used to use the results of attempting to malloc the string table, based on the size it read, as a form of sanity check [....] all in now.