From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: (qmail 28885 invoked by alias); 5 Sep 2007 23:30:32 -0000 Received: (qmail 28877 invoked by uid 22791); 5 Sep 2007 23:30:30 -0000 X-Spam-Check-By: sourceware.org Received: from nf-out-0910.google.com (HELO nf-out-0910.google.com) (64.233.182.189) by sourceware.org (qpsmtpd/0.31) with ESMTP; Wed, 05 Sep 2007 23:30:26 +0000 Received: by nf-out-0910.google.com with SMTP id d3so1842177nfc for ; Wed, 05 Sep 2007 16:30:23 -0700 (PDT) Received: by 10.78.140.17 with SMTP id n17mr1323026hud.1189035023039; Wed, 05 Sep 2007 16:30:23 -0700 (PDT) Received: by 10.78.189.11 with HTTP; Wed, 5 Sep 2007 16:30:22 -0700 (PDT) Message-ID: <58f0b2e40709051630p6d523a8du5f6293c2df7aa16@mail.gmail.com> Date: Wed, 05 Sep 2007 23:30:00 -0000 From: "Mentat K." To: gdb@sourceware.org Subject: add-symbol-file question MIME-Version: 1.0 Content-Type: text/plain; charset=ISO-8859-1 Content-Transfer-Encoding: 7bit Content-Disposition: inline X-IsSubscribed: yes Mailing-List: contact gdb-help@sourceware.org; run by ezmlm Precedence: bulk List-Id: List-Subscribe: List-Archive: List-Post: List-Help: , Sender: gdb-owner@sourceware.org X-SW-Source: 2007-09/txt/msg00038.txt.bz2 Hello, I am debugging a core that was generated from an app that was compiled with gcc 3.2 with -O2 (but without -g). All the shared object libs that it links with were similary compiled with -O2 without -g One of the shared object libs has a class and I know the address in the core file where an object of this class resides. I want to print out this object without doing the byte arithmetic myself. What would be the simplest way of doing this? I tried the following: Build that particular sharedlib with -O2-g and then use add-symbol-file to update the symbol table. I have had luck with this in the past but in this case, it seems to screw up the stack frames (as reported by where) So I am guessing this is not always possible. Also, this is somewhat of an overkill because I am only interested in that one class. I am a newbie with debugging techniques etc so any help is appreciated. Thanks :)