From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: (qmail 24472 invoked by alias); 3 Dec 2003 21:26:40 -0000 Mailing-List: contact gdb-help@sources.redhat.com; run by ezmlm Precedence: bulk List-Subscribe: List-Archive: List-Post: List-Help: , Sender: gdb-owner@sources.redhat.com Received: (qmail 24465 invoked from network); 3 Dec 2003 21:26:39 -0000 Received: from unknown (HELO nevyn.them.org) (66.93.172.17) by sources.redhat.com with SMTP; 3 Dec 2003 21:26:39 -0000 Received: from drow by nevyn.them.org with local (Exim 4.24 #1 (Debian)) id 1AReVw-0000iz-JO; Wed, 03 Dec 2003 16:26:28 -0500 Date: Wed, 03 Dec 2003 21:26:00 -0000 From: Daniel Jacobowitz To: Kris Warkentin Cc: Kevin Buettner , "Gdb@Sources.Redhat.Com" Subject: Re: interesting solib-absolute-prefix problem Message-ID: <20031203212628.GA2649@nevyn.them.org> Mail-Followup-To: Kris Warkentin , Kevin Buettner , "Gdb@Sources.Redhat.Com" References: <064801c3b9d6$5de8e5b0$0202040a@catdog> <1031203203529.ZM1946@localhost.localdomain> <06c101c3b9e3$5cd789d0$0202040a@catdog> Mime-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline In-Reply-To: <06c101c3b9e3$5cd789d0$0202040a@catdog> User-Agent: Mutt/1.5.1i X-SW-Source: 2003-12/txt/msg00066.txt.bz2 On Wed, Dec 03, 2003 at 04:21:06PM -0500, Kris Warkentin wrote: > It's a bit screwy....you'll probably just have to trust me on it. If it > makes you feel better, I can give an example of the problem when doing > remote debugging. Say I'm in my homedir on a cygwin machine. I export a > CIFS dir /home/kewarken/foo where I build my app. My remote machines > homedir has foo mounted. So /home/kewarken/foo/libmylib.so is exactly the > same path on the local and the remote. I've got solib-absolute-prefix set > to find my system libs but I would hope that gdb would find libmylib.so > properly because its location is the same on the host and target. As it > stands, it doesn't. > > Would printing something like: "Warning: opening without using > solib-absolute-prefix. You may need to set solib-search-path." make it a > little better? I could also test for solib_absolute_prefix like so: > > + if (solib_absolute_prefix != NULL && found_file < 0 && (found_file = > open (orig, O_RDONLY, 0)) > -1) > + temp_pathname = orig; I've got to agree with Kevin - let's really not go down this path. > It seems to me that if we accidentally opened up the wrong libc.so, for > example, we would have some fairly catastrophic failure anyway. You'd have Yes, we do. Usually, it involves GDB segfaulting. That's why I don't want us to do this :) > to have a pretty seriously misconfigured system for that to happen, > especially since this last ditch check happens after all other search paths > are used. For your users, since you autoset solib-absolute-prefix, yes you'd have to have a pretty seriously misconfigured system. For my users (at MontaVista), the same thing, since we do something similar for cross debugging. For the average person who rolls a toolchain themselves, however, this is an extremely common problem. -- Daniel Jacobowitz MontaVista Software Debian GNU/Linux Developer