Types mangled when using "file -readnow "

Paul_Koning
2012-09-06T16:16:50Z

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