From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: (qmail 32394 invoked by alias); 2 Nov 2009 19:50:03 -0000 Received: (qmail 32164 invoked by uid 22791); 2 Nov 2009 19:50:02 -0000 X-SWARE-Spam-Status: No, hits=-2.5 required=5.0 tests=AWL,BAYES_00 X-Spam-Check-By: sourceware.org Received: from NaN.false.org (HELO nan.false.org) (208.75.86.248) by sourceware.org (qpsmtpd/0.43rc1) with ESMTP; Mon, 02 Nov 2009 19:49:58 +0000 Received: from nan.false.org (localhost [127.0.0.1]) by nan.false.org (Postfix) with ESMTP id E606010EA3; Mon, 2 Nov 2009 19:49:56 +0000 (GMT) Received: from caradoc.them.org (209.195.188.212.nauticom.net [209.195.188.212]) by nan.false.org (Postfix) with ESMTP id B67E810E94; Mon, 2 Nov 2009 19:49:56 +0000 (GMT) Received: from drow by caradoc.them.org with local (Exim 4.69) (envelope-from ) id 1N52ua-0001my-Bo; Mon, 02 Nov 2009 14:49:56 -0500 Date: Mon, 02 Nov 2009 19:50:00 -0000 From: Daniel Jacobowitz To: Tom Tromey Cc: gdb-patches@sourceware.org Subject: Re: RFC: Simplify partial dies Message-ID: <20091102194956.GB6842@caradoc.them.org> Mail-Followup-To: Tom Tromey , gdb-patches@sourceware.org References: <20091102152607.GA10051@caradoc.them.org> MIME-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline In-Reply-To: User-Agent: Mutt/1.5.20 (2009-06-14) 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: 2009-11/txt/msg00033.txt.bz2 [Sorry about the dupe, Tom.] On Mon, Nov 02, 2009 at 12:43:52PM -0700, Tom Tromey wrote: > >>>>> "Daniel" == Daniel Jacobowitz writes: > > Daniel> - if (comp_unit_die.dirname) > Daniel> - pst->dirname = obsavestring (comp_unit_die.dirname, > Daniel> - strlen (comp_unit_die.dirname), > Daniel> + attr = dwarf2_attr (comp_unit_die, DW_AT_comp_dir, &cu); > Daniel> + if (attr != NULL) > Daniel> + pst->dirname = obsavestring (DW_STRING (attr), > Daniel> + strlen (DW_STRING (attr)), > Daniel> &objfile->objfile_obstack); > > Is this obsavestring actually needed? I thought a DW_STRING value > necessarily had to live as long as the symbol tables, so did not need to > be copied; but if that isn't so, I would like to know. Good point. I'm not sure about the one before my patch, but after I'm confident you're right. -- Daniel Jacobowitz CodeSourcery