add-symbol-file question

Mentat K.
2007-09-05T23:30:32Z

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 :)