This is the mail archive of the
gdb@sourceware.org
mailing list for the GDB project.
Re: Types mangled when using "file -readnow <filename>"
On Sep 6, 2012, at 12:16 PM, <Paul_Koning@Dell.com>
<Paul_Koning@Dell.com> wrote:
> I noticed a strange problem when doing some Python scripting in which I open the execfile with the "-readnow" switch: Some structures (C++ classes, actually) lose their fields when I do that.
>
> If I open the file without -readnow, and I do a "ptype", I see a base class, a data member, and a static method.
>
> If I open the file with -readnow, ptype shows only the static method, and omits both the base class and the data member.
>
> This is GDB 7.3.1, reading binaries produced by GCC 4.5.4 and Binutils 2.20.1. Is this a known problem? Fixed in a later release?
>
> paul
>
After further investigation, this turns out to be due to incorrect debug data emitted by GCC 4.*. I'll report it there.
paul