public inbox for gdb@sourceware.org
 help / color / mirror / Atom feed
* Types mangled when using "file -readnow <filename>"
@ 2012-09-06 16:16 Paul_Koning
  2012-09-06 18:46 ` Paul_Koning
  0 siblings, 1 reply; 2+ messages in thread
From: Paul_Koning @ 2012-09-06 16:16 UTC (permalink / raw)
  To: gdb

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

^ permalink raw reply	[flat|nested] 2+ messages in thread

* Re: Types mangled when using "file -readnow <filename>"
  2012-09-06 16:16 Types mangled when using "file -readnow <filename>" Paul_Koning
@ 2012-09-06 18:46 ` Paul_Koning
  0 siblings, 0 replies; 2+ messages in thread
From: Paul_Koning @ 2012-09-06 18:46 UTC (permalink / raw)
  Cc: gdb

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

^ permalink raw reply	[flat|nested] 2+ messages in thread

end of thread, other threads:[~2012-09-06 18:46 UTC | newest]

Thread overview: 2+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2012-09-06 16:16 Types mangled when using "file -readnow <filename>" Paul_Koning
2012-09-06 18:46 ` Paul_Koning

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for read-only IMAP folder(s) and NNTP newsgroup(s).