From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: (qmail 5797 invoked by alias); 19 Aug 2003 12:43:43 -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 5790 invoked from network); 19 Aug 2003 12:43:43 -0000 Received: from unknown (HELO nevyn.them.org) (66.93.172.17) by sources.redhat.com with SMTP; 19 Aug 2003 12:43:43 -0000 Received: from drow by nevyn.them.org with local (Exim 4.20 #1 (Debian)) id 19p5pu-0004cN-DH; Tue, 19 Aug 2003 08:43:42 -0400 Date: Tue, 19 Aug 2003 12:43:00 -0000 From: Daniel Jacobowitz To: Erik Gustafsson Cc: gdb@sources.redhat.com Subject: Re: debugging core files from other machines with archived symbol files Message-ID: <20030819124341.GA17709@nevyn.them.org> Mail-Followup-To: Erik Gustafsson , gdb@sources.redhat.com References: Mime-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline In-Reply-To: User-Agent: Mutt/1.5.1i X-SW-Source: 2003-08/txt/msg00212.txt.bz2 On Tue, Aug 19, 2003 at 01:25:52PM +0200, Erik Gustafsson wrote: > Hi, > > I have a problem using gdb in a core file senario: > > A machine with my stripped shared library crashes somewere in the world. > The core file is sent to me together with information on what version it > was that crashed. I have archived non-stripped versions of my shared > library, and now I want to get gdb to read the non-stripped version of my > shared lib. > > 1: How do I find the base address where the text segment of my lib was > loaded? > 2: How can I tell gdb to load my library from my archive instead of the > path where my lib was installed on the customer machine that crashed? > > Is there any way of doing this accept from creating a file system structure > matching the one on the machine where the crash occured, and copy the > correct version of the non-stripped lib file to that directory? Not really. You can use solib-absolute-prefix to move the file structure around, but it has to look the same. You can work out the load address by poking around with objdump, and then load the shared library with add-symbol-file. But this is not for the faint of heart. -- Daniel Jacobowitz MontaVista Software Debian GNU/Linux Developer