This is the mail archive of the
gdb-patches@sources.redhat.com
mailing list for the GDB project.
Re: [patch/testsuite/c++] test script for PR c++/186
- From: mec dot gnu at mindspring dot com (Michael Elizabeth Chastain)
- To: gdb-patches at sources dot redhat dot com
- Date: Mon, 24 Nov 2003 11:41:41 -0500 (EST)
- Subject: Re: [patch/testsuite/c++] test script for PR c++/186
Sigh, I have to put this patch on hold for a little while.
I was adding more tests to it and I ran into a test where
gdb really does the wrong thing with gcc 2.95.3. That is:
(gdb) ptype alpha
type = class A {
public:
int a1;
virtual ~A(void);
}
(gdb) print alpha
$1 = {a1 = 100, _vptr.A = 0x804e198}
(gdb) print *&alpha
$2 = {a1 = 942760548, _vptr.A = 0x63632e36}
(gdb) print *&alpha
$3 = {a1 = -1073743984, _vptr.A = 0x8}
(gdb) print *&alpha
$4 = {a1 = -1073750008, _vptr.A = 0x2c}
I think the problem is somewhere around where gnuv2_value_rtti_type
calls lookup_typename. Before David's big namespace patch on
2003-09-11, lookup_typename returned a TYPE_CODE_STRUCT type to
gnuv2_value_rtti_type. Now lookup_typename is returning a
TYPE_CODE_NAMESPACE type and as you can see, gdb is printing random
weird values when it goes through gnuv2_value_rtti_type.
So I am gonna pursue that bug now, because it is simpler,
and put this patch on hold.
Michael C
===
2003-11-23 Michael Chastain <mec.gnu@mindspring.com>
New test case for PR c++/186.
* gdb.cp/gdb186.cc: New file.
* gdb.cp/gdb186.exp: New file.