From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: (qmail 9172 invoked by alias); 4 Dec 2013 16:59:56 -0000 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 Received: (qmail 9151 invoked by uid 89); 4 Dec 2013 16:59:53 -0000 Authentication-Results: sourceware.org; auth=none X-Virus-Found: No X-Spam-SWARE-Status: No, score=0.9 required=5.0 tests=AWL,BAYES_50,RDNS_NONE,URIBL_BLOCKED autolearn=no version=3.3.2 X-HELO: rock.gnat.com Received: from Unknown (HELO rock.gnat.com) (205.232.38.15) by sourceware.org (qpsmtpd/0.93/v0.84-503-g423c35a) with (AES256-SHA encrypted) ESMTPS; Wed, 04 Dec 2013 16:59:53 +0000 Received: from localhost (localhost.localdomain [127.0.0.1]) by filtered-rock.gnat.com (Postfix) with ESMTP id 10FFD11665E; Wed, 4 Dec 2013 12:00:23 -0500 (EST) Received: from rock.gnat.com ([127.0.0.1]) by localhost (rock.gnat.com [127.0.0.1]) (amavisd-new, port 10024) with LMTP id KcxF5ANBUeaP; Wed, 4 Dec 2013 12:00:23 -0500 (EST) Received: from joel.gnat.com (localhost.localdomain [127.0.0.1]) by rock.gnat.com (Postfix) with ESMTP id A0F78116608; Wed, 4 Dec 2013 12:00:22 -0500 (EST) Received: by joel.gnat.com (Postfix, from userid 1000) id 8D3B2EA75C; Wed, 4 Dec 2013 20:59:40 +0400 (RET) Date: Wed, 04 Dec 2013 16:59:00 -0000 From: Joel Brobecker To: Luis Machado Cc: "'gdb-patches@sourceware.org'" Subject: Re: checked in: Re: RFC: solib.c:solib_map_sections so->so_name clobbering Message-ID: <20131204165940.GB3175@adacore.com> References: <526B2936.3080208@codesourcery.com> <526B2A53.7080905@codesourcery.com> <20131026042902.GE4769@adacore.com> <526C7E65.6050308@codesourcery.com> <20131028113939.GC3066@adacore.com> MIME-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline In-Reply-To: <20131028113939.GC3066@adacore.com> User-Agent: Mutt/1.5.21 (2010-09-15) X-SW-Source: 2013-12/txt/msg00153.txt.bz2 I just realize I dropped the ball on this, apologies! And it affects the 7.7 release as well. So I first started by adding this AI, with my name attached to it, to the gdb-7.7 release wiki page. I plan on going ahead with the proposal below as soon as I have a moment. If there are other suggestion, please do not hesitate. On Mon, Oct 28, 2013 at 03:39:39PM +0400, Joel Brobecker wrote: > > >My suspicion is that the bfd_open callback takes care of the path > > >translation, so the backend was allowing itself to defer it. I am > > >not sure how difficult it would be to move that part to each backend. > > > > > >Reverting the patch would be a real issue, because it would mean > > >that any given solib backend cannot set the so_name, and commands > > >such as "info shared" would print a bogus shared library name. > > >Nevertheless, if we did revert it, I think we can work around > > >the issue by using the same trick as the one we used for the 7.6 > > >branch IIRC. > > > > I wouldn't say this is critical, just a slight change from an > > undocumented direction we've been following. :-) > > I had the weekend to think about it some more. To me, the most > important aspect is that the output in GDB/MI is now incorrect, > not just confusing. So I think something should be done about it, > and sooner rather than later. > > At the moment, the approach I dislike the least is to revert > my patch, and let the couple of solib backends (darwin, AIX) > fix up the BFD filename, the same way we did on the gdb-7.6 > branch: > http://www.sourceware.org/ml/gdb-patches/2013-03/msg01084.html > > This fixup is what we used to do in the past, except that we were > leaking memory. It's possible to do the same without the memory leak, > thanks to a suggestion from Tom. It sounds contradictory to be > suggesting this, since I think this is clearly a step in the wrong > direction (making the semantics of that field a little iffy, since > time-sensitive), but seems like an acceptable compromise between amount > of work vs severity of the problem. > > The alternative would be, I think, to make sure that the various > solib backends set the so_name properly. I'm not sure whether > that's actually possible. I would need to study the framework > a little longer, but lack the time at the moment. > > Other thoughts/suggestions? -- Joel