From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: (qmail 29239 invoked by alias); 26 Jul 2004 21:13:52 -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 29231 invoked from network); 26 Jul 2004 21:13:51 -0000 Received: from unknown (HELO mail.siemenscom.com) (12.146.131.10) by sourceware.org with SMTP; 26 Jul 2004 21:13:51 -0000 Received: from fdns2.rolm.com (localhost [127.0.0.1]) by mail.siemenscom.com (8.12.10/8.12.10) with ESMTP id i6QLDnMD025589; Mon, 26 Jul 2004 14:13:49 -0700 Received: from stca200a.bus.sc.rolm.com (stca200a.bus.sc.rolm.com [165.218.68.180]) by fdns2.rolm.com (8.12.10/8.12.10) with ESMTP id i6QLDnKO010995; Mon, 26 Jul 2004 14:13:49 -0700 (PDT) Received: by stca200a.bus.sc.rolm.com with Internet Mail Service (5.5.2657.72) id ; Mon, 26 Jul 2004 14:13:49 -0700 Message-ID: <7A25937D23A1E64C8E93CB4A50509C2A0310F2CC@stca204a.bus.sc.rolm.com> From: "Bloch, Jack" To: "'Kevin Buettner'" Cc: gdb@sources.redhat.com Subject: RE: Determining base address of shared library from core file Date: Mon, 26 Jul 2004 21:15:00 -0000 MIME-Version: 1.0 Content-Type: text/plain; charset="iso-8859-1" X-SW-Source: 2004-07/txt/msg00330.txt.bz2 BTW, if I run readelf -d on my executable, it show a debug segment with a 0x0. I don't have to load the executable into memory somehow do I? -----Original Message----- From: Kevin Buettner [mailto:kevinb@redhat.com] Sent: Wednesday, July 21, 2004 1:53 PM To: Bloch, Jack Cc: gdb@sources.redhat.com Subject: Re: Determining base address of shared library from core file 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