This is the mail archive of the gdb@sourceware.org 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: incorrect address of class member


On Wed, Aug 12, 2009 at 09:35:38AM -0400, David Plumb wrote:
> The following code illustrates the problem. The expected output of this
> little program is the string "Flag value is 1" being printed in the
> terminal. It works but when I debug it with gdb, I see unexpected
> things. It appears as if gdb is getting confused about how the memory is
> being allocated for the Blah class object. The address of the mFlag
> member is reported by gdb to be 0xd7ffb00c when it should be 0xf7ffb00c.
> If gdb is using the wrong address for the mFlag member, it explains why
> the gdb print command is returning the wrong value for the mFlag member.

Could you try a CVS snapshot of GDB?  If this still happens, file a
bug.

-- 
Daniel Jacobowitz
CodeSourcery


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