incorrect address of class member

Daniel Jacobowitz drow@false.org
Wed Aug 12 13:47:00 GMT 2009


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



More information about the Gdb mailing list