Re: gdb.c++ testsuite 1.3: member_data_static.exp (resend)

Michael Elizabeth Chastain
2002-05-28T21:12:46Z

Hi Benjamin,

mec> (gdb) print test3
mec> $2 = {static data = <optimized out>}

bk> ... which makes debugging C++ a pain in the ass, and the reason I sat
bk> down and wrote this file. I consider gdb to be broken. Hopefully this
bk> test case will facilitate a fix to the problem noted above.

As far as I can tell, gdb is reporting what's actually in the executable
file. 'test3' has one static member and no non-static members.
So perhaps gcc is broken, but I don't understand your view that
gdb is broken. Can you explain more? What do you *want* gdb to print
here?

> Errr. No, unless you expect everybody using gdb and C++ do to this as
> well. In which case, you should put this in the FAQ.

Okay, I'll forget about my 'refer' kludge. I thought that the 'refer'
kludge was working around a side issue, but optimizing away the static
data is the *main* issue for this test. So I should not work around it.

Michael C