This is the mail archive of the gdb-patches@sources.redhat.com mailing list for the GDB project.


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]
Other format: [Raw text]

Re: [patch/testsuite/c++] test script for PR c++/186


On Mon, 24 Nov 2003 13:13:21 -0500 (EST), mec.gnu@mindspring.com (Michael Elizabeth Chastain) said:

> But beyond that level, gdb is printing bogus values.  Specifically:
> I've got these two classes, "A" and "B".  "B" is derived from "A".
> I've got an object that used to be a "B", but thanks to B::~B, the
> dynamic type is actually "A" by now.  When I say "print *pb", gdb
> prints values for the fields of B.  But it prints bogus data, and it
> prints *different* bogus data on successive calls.  It's not like
> gdb is choosing an infelicitous type and forcing the target memory
> into that type, it's like gdb is dereferencing wild pointers
> internally.

Right, gotcha.  That's bad.

David Carlton
carlton@kealia.com


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]