From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: (qmail 32044 invoked by alias); 30 Jan 2008 18:31:50 -0000 Received: (qmail 32036 invoked by uid 22791); 30 Jan 2008 18:31:50 -0000 X-Spam-Check-By: sourceware.org Received: from shell4.BAYAREA.NET (HELO shell4.bayarea.net) (209.128.82.1) by sourceware.org (qpsmtpd/0.31) with ESMTP; Wed, 30 Jan 2008 18:31:29 +0000 Received: (qmail 19370 invoked from network); 30 Jan 2008 10:31:27 -0800 Received: from 209-128-106-254.bayarea.net (HELO ?192.168.20.7?) (209.128.106.254) by shell4.bayarea.net with SMTP; 30 Jan 2008 10:31:27 -0800 Message-ID: <47A0C27E.2090206@eagercon.com> Date: Wed, 30 Jan 2008 18:31:00 -0000 From: Michael Eager User-Agent: Thunderbird 1.5.0.9 (X11/20070102) MIME-Version: 1.0 To: Daniel Jacobowitz , gdb@sourceware.org Subject: Re: Finding ld.so dynamic loader References: <47A0A8D8.7090508@eagercon.com> <20080130165114.GA21783@caradoc.them.org> <47A0AD33.9060905@eagercon.com> <20080130174641.GA24736@caradoc.them.org> In-Reply-To: <20080130174641.GA24736@caradoc.them.org> Content-Type: text/plain; charset=UTF-8; format=flowed Content-Transfer-Encoding: 7bit X-IsSubscribed: yes Mailing-List: contact gdb-help@sourceware.org; run by ezmlm Precedence: bulk List-Id: List-Subscribe: List-Archive: List-Post: List-Help: , Sender: gdb-owner@sourceware.org X-SW-Source: 2008-01/txt/msg00343.txt.bz2 Daniel Jacobowitz wrote: > On Wed, Jan 30, 2008 at 09:00:35AM -0800, Michael Eager wrote: >> IMO, if this prefix is not set by the user, the environment >> symbol or path should be searched, with the host system searched >> as a final choice. I can create a patch to do this if desired. > > It's harder than it sounds to figure out whether we're native > debugging or remote debugging once you're down in the shared library > code; I don't think it's worth it. I have no preference whether we > search the solib-search-path before or after the sysroot, though I am > a little worried about breaking existing setups... There's a chain of calls from remote_open() to enable_break() to solib_open(). It would be possible to set a global flag (arrgh!) in remote_open() which could be checked in solib_open(). It would also seem reasonable to have a flag set in the gdb-arch code to say not to search host system directories. Somewhere along the way the principle of least surprise should kick in. I only noticed this because my target has a dynamic loader named "/lib/ld.so.1". If it had been "/lib/ld-linux.so.2" then gdb would have quietly placed a breakpoint on the target at whatever location would be correct on the host system. -- Michael Eager eager@eagercon.com 1960 Park Blvd., Palo Alto, CA 94306 650-325-8077