Mirror of the gdb mailing list
 help / color / mirror / Atom feed
From: Daniel Jacobowitz <drow@false.org>
To: "Mentat K." <mentat79@gmail.com>
Cc: gdb@sourceware.org
Subject: Re: add-symbol-file question
Date: Thu, 06 Sep 2007 03:19:00 -0000	[thread overview]
Message-ID: <20070906024026.GA25178@caradoc.them.org> (raw)
In-Reply-To: <58f0b2e40709051630p6d523a8du5f6293c2df7aa16@mail.gmail.com>

On Wed, Sep 05, 2007 at 07:30:23PM -0400, Mentat K. wrote:
> 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?

If all you need is that type, build the definition of the type with
-g into a new object file.  Load it with add-symbol-file at an out of
the way address so that it does not overlap the code you care about.
Then you should be able to use the class name and type.

You have to be sure that debug info for the class is in the file you
compile; sometimes it isn't, with G++.

-- 
Daniel Jacobowitz
CodeSourcery


  reply	other threads:[~2007-09-06  2:40 UTC|newest]

Thread overview: 5+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2007-09-05 23:30 Mentat K.
2007-09-06  3:19 ` Daniel Jacobowitz [this message]
2007-09-06  8:39   ` Mentat K.
2007-11-20  0:50 vb
2007-11-20 12:19 ` Michael Snyder

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=20070906024026.GA25178@caradoc.them.org \
    --to=drow@false.org \
    --cc=gdb@sourceware.org \
    --cc=mentat79@gmail.com \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox