From owner-freebsd-hackers@FreeBSD.ORG Thu Apr 29 09:59:19 2004 Return-Path: Delivered-To: freebsd-hackers@freebsd.org Received: from mx1.FreeBSD.org (mx1.freebsd.org [216.136.204.125]) by hub.freebsd.org (Postfix) with ESMTP id 7649016A4CE for ; Thu, 29 Apr 2004 09:59:19 -0700 (PDT) Received: from mail4.speakeasy.net (mail4.speakeasy.net [216.254.0.204]) by mx1.FreeBSD.org (Postfix) with ESMTP id 3483B43D1F for ; Thu, 29 Apr 2004 09:59:19 -0700 (PDT) (envelope-from jmg@hydrogen.funkthat.com) Received: (qmail 18856 invoked from network); 29 Apr 2004 16:59:18 -0000 Received: from gate.funkthat.com (HELO hydrogen.funkthat.com) ([69.17.45.168]) (envelope-sender ) by mail4.speakeasy.net (qmail-ldap-1.03) with SMTP for ; 29 Apr 2004 16:59:18 -0000 Received: from hydrogen.funkthat.com (nmbcnc@localhost.funkthat.com [127.0.0.1])i3TGxHOE021741; Thu, 29 Apr 2004 09:59:18 -0700 (PDT) (envelope-from jmg@hydrogen.funkthat.com) Received: (from jmg@localhost) by hydrogen.funkthat.com (8.12.10/8.12.10/Submit) id i3TGxGNU021740; Thu, 29 Apr 2004 09:59:16 -0700 (PDT) Date: Thu, 29 Apr 2004 09:59:16 -0700 From: John-Mark Gurney To: "P. de Boer" Message-ID: <20040429165916.GL567@funkthat.com> Mail-Followup-To: "P. de Boer" , freebsd-hackers@freebsd.org References: <1083167960.653.23.camel@edinburgh.thedarkside.tix> Mime-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline In-Reply-To: <1083167960.653.23.camel@edinburgh.thedarkside.tix> User-Agent: Mutt/1.4.1i X-Operating-System: FreeBSD 4.2-RELEASE i386 X-PGP-Fingerprint: B7 EC EF F8 AE ED A7 31 96 7A 22 B3 D8 56 36 F4 X-Files: The truth is out there X-URL: http://resnet.uoregon.edu/~gurney_j/ X-Resume: http://resnet.uoregon.edu/~gurney_j/resume.html cc: freebsd-hackers@freebsd.org Subject: Re: Extracting symbol info out of processes at runtime X-BeenThere: freebsd-hackers@freebsd.org X-Mailman-Version: 2.1.1 Precedence: list Reply-To: John-Mark Gurney List-Id: Technical Discussions relating to FreeBSD List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Thu, 29 Apr 2004 16:59:19 -0000 P. de Boer wrote this message on Wed, Apr 28, 2004 at 17:59 +0200: > For a little private project I'm working at, I need to find the address > of a function which is inside a shared library of a running process, OR > the base address the library is running at (in that case, I can simply > do a base_address+known_offset_of_function). The executable nor > libraries have their symbols stripped. Well, if you don't mind not doing all the code, you could use gcore + gdb to extract the function and library... It may not be the most elegant solution, but it will work.. -- John-Mark Gurney Voice: +1 415 225 5579 "All that I will do, has been done, All that I have, has not."