From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: (qmail 9032 invoked by alias); 26 May 2007 20:29:06 -0000 Received: (qmail 9023 invoked by uid 22791); 26 May 2007 20:29:06 -0000 X-Spam-Check-By: sourceware.org Received: from wx-out-0506.google.com (HELO wx-out-0506.google.com) (66.249.82.224) by sourceware.org (qpsmtpd/0.31) with ESMTP; Sat, 26 May 2007 20:29:04 +0000 Received: by wx-out-0506.google.com with SMTP id i30so801347wxd for ; Sat, 26 May 2007 13:29:03 -0700 (PDT) Received: by 10.90.87.5 with SMTP id k5mr3249741agb.1180211342929; Sat, 26 May 2007 13:29:02 -0700 (PDT) Received: by 10.90.114.19 with HTTP; Sat, 26 May 2007 13:29:02 -0700 (PDT) Message-ID: <11b141710705261329k4e3e866bt898663aa85cd46f@mail.gmail.com> Date: Sat, 26 May 2007 20:37:00 -0000 From: "Paulo J. Matos" To: gcc-help@gcc.gnu.org Subject: Accessing symbol table to find function given address MIME-Version: 1.0 Content-Type: text/plain; charset=ISO-8859-1; format=flowed Content-Transfer-Encoding: 7bit Content-Disposition: inline X-Google-Sender-Auth: 78930b235215bc95 X-IsSubscribed: yes Mailing-List: contact gcc-help-help@gcc.gnu.org; run by ezmlm Precedence: bulk List-Id: List-Archive: List-Post: List-Help: Sender: gcc-help-owner@gcc.gnu.org X-SW-Source: 2007-05/txt/msg00271.txt.bz2 Hello all, Is there a way to access the symbol table during runtime to know which function belongs to a given address. The problem is to print the function name if I am instrumenting functions. I get the address, can I during runtime print the function name? (or the solution is get it through addr2line after program as run)? Cheers, -- Paulo Jorge Matos - pocm at soton.ac.uk http://www.personal.soton.ac.uk/pocm PhD Student @ ECS University of Southampton, UK