From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: (qmail 4633 invoked by alias); 21 Jul 2004 17:53:12 -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 4622 invoked from network); 21 Jul 2004 17:53:11 -0000 Received: from unknown (HELO mx1.redhat.com) (66.187.233.31) by sourceware.org with SMTP; 21 Jul 2004 17:53:11 -0000 Received: from int-mx1.corp.redhat.com (int-mx1.corp.redhat.com [172.16.52.254]) by mx1.redhat.com (8.12.10/8.12.10) with ESMTP id i6LHrBe3019560 for ; Wed, 21 Jul 2004 13:53:11 -0400 Received: from pobox.corp.redhat.com (pobox.corp.redhat.com [172.16.52.156]) by int-mx1.corp.redhat.com (8.11.6/8.11.6) with ESMTP id i6LHrBa28901; Wed, 21 Jul 2004 13:53:11 -0400 Received: from localhost.localdomain (vpn50-37.rdu.redhat.com [172.16.50.37]) by pobox.corp.redhat.com (8.12.8/8.12.8) with ESMTP id i6LHrANf005720; Wed, 21 Jul 2004 13:53:10 -0400 Received: from saguaro (saguaro.lan [192.168.64.2]) by localhost.localdomain (8.12.11/8.12.10) with SMTP id i6LHr5mg010380; Wed, 21 Jul 2004 10:53:05 -0700 Date: Wed, 21 Jul 2004 17:58:00 -0000 From: Kevin Buettner To: "Bloch, Jack" Cc: gdb@sources.redhat.com Subject: Re: Determining base address of shared library from core file Message-Id: <20040721105304.304147da@saguaro> In-Reply-To: <7A25937D23A1E64C8E93CB4A50509C2A0310F29D@stca204a.bus.sc.rolm.com> References: <7A25937D23A1E64C8E93CB4A50509C2A0310F29D@stca204a.bus.sc.rolm.com> Organization: Red Hat Mime-Version: 1.0 Content-Type: text/plain; charset=US-ASCII Content-Transfer-Encoding: 7bit X-SW-Source: 2004-07/txt/msg00266.txt.bz2 On Mon, 19 Jul 2004 07:51:31 -0700 "Bloch, Jack" wrote: > Is there an easy way to determine the base address of a shared library from > a core file? It depends upon what you mean by "easy". For an SVR4-like system (which includes Linux), you have to traverse the dynamic section to find the address of the r_debug struct. Once that is done, you still have to traverse the link_map structs to find the desired address. See solib-svr4.c for the gory details. (IMO, this isn't very easy.) Kevin