From: Michael Snyder <msnyder@vmware.com>
To: "Vyacheslav V. Yurkov" <uvv.mail@gmail.com>
Cc: "gdb@sourceware.org" <gdb@sourceware.org>
Subject: Re: C++, can't see debug info for some classes
Date: Wed, 26 Jan 2011 18:57:00 -0000 [thread overview]
Message-ID: <4D406E77.9060706@vmware.com> (raw)
In-Reply-To: <4D40424E.3040604@gmail.com>
Vyacheslav V. Yurkov wrote:
> Hi,
> We use several static libraries in our project as our run-time.
> To add debug info for a class X I just do:
> g++ X.cpp -I../include -c -g -Wall -o X.o
> ar rsu ../lib1.a X.o
> That worked OK with any class from our library but at the moment
> I have some issues with class X. I can't see its members in a debugger gdb.
> gdb says that class X is <incomplete type>.
> I tried to do 'ptype X' in gdb and got the following:
> No symbol "X" in current context.
> I looked into it more, did objdump for X.o file and saw that
> there is no address near the symbol which looks like my class X.
>
> I tried 3 different versions of g++ (4.3.x, 4.4.x, 4.5.x), tried
> following parameters for gcc: -g3, -g2 -O0, -ggdb, -gstubs+. But nothing
> helped.
> My class X also doesn't use anonymous unions.
>
> Does anyone have an idea what is wrong with g++ or with my class X?
> Thanks in advance.
Was your class ever instantiated by the program? Sometimes if a class
or struct type has no instances, its symbolic info is discarded.
next prev parent reply other threads:[~2011-01-26 18:57 UTC|newest]
Thread overview: 3+ messages / expand[flat|nested] mbox.gz Atom feed top
2011-01-26 15:48 Vyacheslav V. Yurkov
2011-01-26 18:57 ` Michael Snyder [this message]
2011-01-26 19:38 ` Vyacheslav V. Yurkov
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=4D406E77.9060706@vmware.com \
--to=msnyder@vmware.com \
--cc=gdb@sourceware.org \
--cc=uvv.mail@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