From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: (qmail 532 invoked by alias); 27 Oct 2013 02:46:26 -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 510 invoked by uid 89); 27 Oct 2013 02:46:24 -0000 Authentication-Results: sourceware.org; auth=none X-Virus-Found: No X-Spam-SWARE-Status: No, score=-2.2 required=5.0 tests=AWL,BAYES_00 autolearn=ham version=3.3.2 X-HELO: relay1.mentorg.com Received: from relay1.mentorg.com (HELO relay1.mentorg.com) (192.94.38.131) by sourceware.org (qpsmtpd/0.93/v0.84-503-g423c35a) with ESMTP; Sun, 27 Oct 2013 02:46:23 +0000 Received: from svr-orw-fem-01.mgc.mentorg.com ([147.34.98.93]) by relay1.mentorg.com with esmtp id 1VaGMs-00047d-Ua from Luis_Gustavo@mentor.com ; Sat, 26 Oct 2013 19:46:18 -0700 Received: from NA1-MAIL.mgc.mentorg.com ([147.34.98.181]) by svr-orw-fem-01.mgc.mentorg.com with Microsoft SMTPSVC(6.0.3790.4675); Sat, 26 Oct 2013 19:46:18 -0700 Received: from [172.30.2.185] ([172.30.2.185]) by NA1-MAIL.mgc.mentorg.com with Microsoft SMTPSVC(6.0.3790.3959); Sat, 26 Oct 2013 19:46:16 -0700 Message-ID: <526C7E65.6050308@codesourcery.com> Date: Sun, 27 Oct 2013 02:46:00 -0000 From: Luis Machado Reply-To: lgustavo@codesourcery.com User-Agent: Mozilla/5.0 (X11; Linux x86_64; rv:24.0) Gecko/20100101 Thunderbird/24.0 MIME-Version: 1.0 To: Joel Brobecker CC: "'gdb-patches@sourceware.org'" Subject: Re: checked in: Re: RFC: solib.c:solib_map_sections so->so_name clobbering References: <526B2936.3080208@codesourcery.com> <526B2A53.7080905@codesourcery.com> <20131026042902.GE4769@adacore.com> In-Reply-To: <20131026042902.GE4769@adacore.com> Content-Type: text/plain; charset=ISO-8859-1; format=flowed Content-Transfer-Encoding: 7bit X-IsSubscribed: yes X-SW-Source: 2013-10/txt/msg00842.txt.bz2 On 10/26/2013 02:29 AM, Joel Brobecker wrote: >>> So it looks like we've lost information about the shared library's path >>> on the host, which may not be a big deal for CLI GDB, but may confuse >>> consumers of MI output. > > Agreed. > > Can you also check the output of "info shared" in GDB/CLI mode? > I suspect that you might have a change in behavior there as well. > Whether this change is actually a Good Thing or not, is unclear, > as the manual does not say whether the names are expected to be > host-side paths, or target-side paths. > It does affect "info shared". It displays the target path instead of the host path now. >>> I gave this a quick thought, but reverting the change seemed like the >>> most obvious solution. >>> >>> But since this change affects darwin, maybe Joel has a different idea? > > This would also affect AIX. > > It might probably need more thought, but at first sight, I am wondering > whether the real issue is that the solib backend created an entry > where "so_name" does not match the field description: > > /* Shared object file name, expanded to something GDB can open. */ > Yeah, by so_name i'd expect a canonical library name with no additional bits of path. > 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. :-)