From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: (qmail 18429 invoked by alias); 23 Jan 2008 17:32:53 -0000 Received: (qmail 18292 invoked by uid 22791); 23 Jan 2008 17:32:14 -0000 X-Spam-Check-By: sourceware.org Received: from NaN.false.org (HELO nan.false.org) (208.75.86.248) by sourceware.org (qpsmtpd/0.31) with ESMTP; Wed, 23 Jan 2008 17:31:41 +0000 Received: from nan.false.org (localhost [127.0.0.1]) by nan.false.org (Postfix) with ESMTP id 4508198375; Wed, 23 Jan 2008 17:31:39 +0000 (GMT) Received: from caradoc.them.org (22.svnf5.xdsl.nauticom.net [209.195.183.55]) by nan.false.org (Postfix) with ESMTP id 31091980E0; Wed, 23 Jan 2008 17:31:39 +0000 (GMT) Received: from drow by caradoc.them.org with local (Exim 4.68) (envelope-from ) id 1JHjRq-000412-0M; Wed, 23 Jan 2008 12:31:38 -0500 Date: Wed, 23 Jan 2008 17:32:00 -0000 From: Daniel Jacobowitz To: Olaf Hering Cc: gdb@sourceware.org Subject: Re: gdb follows symlinks when looking for debuginfo Message-ID: <20080123173137.GA15119@caradoc.them.org> Mail-Followup-To: Olaf Hering , gdb@sourceware.org References: <20080123161537.GA25123@suse.de> MIME-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline In-Reply-To: <20080123161537.GA25123@suse.de> User-Agent: Mutt/1.5.17 (2007-12-11) 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/msg00232.txt.bz2 On Wed, Jan 23, 2008 at 05:15:37PM +0100, Olaf Hering wrote: > > Why does gdb follow symlinks when looking for debuginfo and executables? Most likely something uses realpath when opening files. Looks like exec_file_attach -> openp -> xfullpath. > The binaries in our installation images are symlinked into a > loop-mounted cramfs image, or to an extracted tree on a remote > filesystem. > The gdb binary itself is a symlink /usr/bin/gdb -> > /mounts/inst-sys/usr/bin/gdb. For some reason, gdb starts to look for > debuginfo in /mounts/inst-sys/usr/lib/debug instead of just > /usr/lib/debug. The same is true for the executable thats being > debugged. That path is surprising. I would have expected /usr/lib/debug/mounts/inst-sys/... Does "show sysroot" show anything? What about "show debug-file-directory"? -- Daniel Jacobowitz CodeSourcery