From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: (qmail 1804 invoked by alias); 21 Apr 2006 17:00:37 -0000 Received: (qmail 1783 invoked by uid 22791); 21 Apr 2006 17:00:31 -0000 X-Spam-Check-By: sourceware.org Received: from lon-del-04.spheriq.net (HELO lon-del-04.spheriq.net) (195.46.50.101) by sourceware.org (qpsmtpd/0.31) with ESMTP; Fri, 21 Apr 2006 17:00:27 +0000 Received: from lon-out-01.spheriq.net ([195.46.50.129]) by lon-del-04.spheriq.net with ESMTP id k3LH0Nt2013216 for ; Fri, 21 Apr 2006 17:00:23 GMT Received: from lon-cus-01.spheriq.net (lon-cus-01.spheriq.net [195.46.50.37]) by lon-out-01.spheriq.net with ESMTP id k3LH0M8O025659 for ; Fri, 21 Apr 2006 17:00:23 GMT Received: from beta.dmz-eu.st.com (beta.dmz-eu.st.com [164.129.1.35]) by lon-cus-01.spheriq.net with ESMTP id k3LH0J2U012991 (version=TLSv1/SSLv3 cipher=EDH-RSA-DES-CBC3-SHA bits=168 verify=OK); Fri, 21 Apr 2006 17:00:21 GMT Received: from zeta.dmz-eu.st.com (ns2.st.com [164.129.230.9]) by beta.dmz-eu.st.com (STMicroelectronics) with ESMTP id 87BFEDA42; Fri, 21 Apr 2006 17:00:19 +0000 (GMT) Received: from mail1.cro.st.com (mail1.cro.st.com [164.129.40.131]) by zeta.dmz-eu.st.com (STMicroelectronics) with ESMTP id 4A4C648F0C; Fri, 21 Apr 2006 17:00:16 +0000 (GMT) Received: from crx549.cro.st.com (crx549.cro.st.com [164.129.44.49]) by mail1.cro.st.com (MOS 3.5.8-GR) with ESMTP id CHG07884 (AUTH "frederic riss"); Fri, 21 Apr 2006 19:00:14 +0200 (CEST) Subject: Re: [RFC] Don't lose compilation directory in Dwarf2 line-tables From: Frederic RISS To: Jim Blandy Cc: Daniel Jacobowitz , GDB Patches In-Reply-To: <8f2776cb0604210946kf7c1e2br2c4c47ecbfa9322d@mail.gmail.com> References: <1144927446.14807.561.camel@crx549.cro.st.com> <8f2776cb0604140041o63c56c2xa9113d3c4ee259d@mail.gmail.com> <1145002976.14807.744.camel@crx549.cro.st.com> <20060414140449.GA14270@nevyn.them.org> <1145026289.14807.816.camel@crx549.cro.st.com> <1145363529.14807.848.camel@crx549.cro.st.com> <20060418130432.GC10130@nevyn.them.org> <1145368299.14807.889.camel@crx549.cro.st.com> <8f2776cb0604201809l68067aey47fa372a2468c8ea@mail.gmail.com> <1145608477.14807.1018.camel@crx549.cro.st.com> <8f2776cb0604210946kf7c1e2br2c4c47ecbfa9322d@mail.gmail.com> Content-Type: text/plain Date: Fri, 21 Apr 2006 17:00:00 -0000 Message-Id: <1145638813.14807.1094.camel@crx549.cro.st.com> Mime-Version: 1.0 X-Mailer: Evolution 2.6.0 Content-Transfer-Encoding: 7bit X-IsSubscribed: yes Mailing-List: contact gdb-patches-help@sourceware.org; run by ezmlm Precedence: bulk List-Subscribe: List-Archive: List-Post: List-Help: , Sender: gdb-patches-owner@sourceware.org X-SW-Source: 2006-04/txt/msg00314.txt.bz2 On Fri, 2006-04-21 at 09:46 -0700, Jim Blandy wrote: > On 4/21/06, Frederic RISS wrote: > > > - Leave the comparison loop alone, as in your last patch. > > > - If dwarf2_start_subfile does have to start a subfile itself, always > > > pass comp_dir as start_subfile's second argument, whether it's NULL or > > > not (because this is what we do when calling start_symtab), and > > > concatenate dirname, if it's non-null, with filename to get > > > start_subfile's first argument. I think this means that 'fullname' > > > always gets used, so you can hoist that computation and its xfree out > > > of the 'if'. > > > > But then, the loop in dwarf2_start_subfile doesn't serve any purpose, > > because the loop at the beginning of start_subfile proper will do the > > same work. Or maybe I'm missing something? > > No --- I hadn't noticed the loop in start_subfile. That's great! > > > > Either way, this definitely needs a comment. If you'd like to write > > > up one yourself, great; if not, that's fine; I'll put one in after > > > your patch goes in. > > > > Attached is a new patch that adds comments and removes the superfluous > > loop. How's that? > > If it doesn't cause any regressions, it looks great to me! Thanks very much! I had regression tested it on i686-linux. I'll check it in in a few hours time. Thanks.