From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: (qmail 27173 invoked by alias); 21 Apr 2006 16:46:47 -0000 Received: (qmail 27165 invoked by uid 22791); 21 Apr 2006 16:46:47 -0000 X-Spam-Check-By: sourceware.org Received: from xproxy.gmail.com (HELO xproxy.gmail.com) (66.249.82.203) by sourceware.org (qpsmtpd/0.31) with ESMTP; Fri, 21 Apr 2006 16:46:44 +0000 Received: by xproxy.gmail.com with SMTP id s16so336450wxc for ; Fri, 21 Apr 2006 09:46:41 -0700 (PDT) Received: by 10.70.117.13 with SMTP id p13mr401204wxc; Fri, 21 Apr 2006 09:46:41 -0700 (PDT) Received: by 10.70.125.5 with HTTP; Fri, 21 Apr 2006 09:46:41 -0700 (PDT) Message-ID: <8f2776cb0604210946kf7c1e2br2c4c47ecbfa9322d@mail.gmail.com> Date: Fri, 21 Apr 2006 16:46:00 -0000 From: "Jim Blandy" To: "Frederic RISS" Subject: Re: [RFC] Don't lose compilation directory in Dwarf2 line-tables Cc: "Daniel Jacobowitz" , "GDB Patches" In-Reply-To: <1145608477.14807.1018.camel@crx549.cro.st.com> MIME-Version: 1.0 Content-Type: text/plain; charset=ISO-8859-1 Content-Transfer-Encoding: quoted-printable Content-Disposition: inline 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> 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/msg00313.txt.bz2 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 muc= h!