Re: [RFC] Special casing dtors?

Pedro Alves
2009-03-27T17:34:59Z

On Friday 27 March 2009 17:15:11, Keith Seitz wrote:
> Pedro Alves wrote:
>
> > I regtested the whole testsuite with stabs on x86_64-linux, and
> > got this with your patch:
> >
> > -PASS: gdb.cp/templates.exp: destructor breakpoint
> > -PASS: gdb.cp/templates.exp: value method breakpoint
> > +FAIL: gdb.cp/templates.exp: destructor_breakpoint (timeout)
> > +FAIL: gdb.cp/templates.exp: value method breakpoint
>
> To be clear: You are getting two new FAILs with the patch? That would be
> baffling -- I don't see how the templates.exp test "destructor
> breakpoint" could pass on anything using gcc.

Yes, the patch causes the FAILs. The test passes on
a pristine GDB. Here's the relevant gdb.log diff:

break T5<int>::~T5
-Breakpoint 2 at 0x804933d: file ../../../src/gdb/testsuite/gdb.cp/templates.cc, line 478.
-(gdb) PASS: gdb.cp/templates.exp: destructor breakpoint
+[0] cancel
+[1] all
+[2] T5<int>::~T5() at ../../../src/gdb/testsuite/gdb.cp/templates.cc:478
+[3] T5<int>::~T5() at ../../../src/gdb/testsuite/gdb.cp/templates.cc:478
+> FAIL: gdb.cp/templates.exp: destructor_breakpoint (timeout)
break T5<int>::value
-Breakpoint 3 at 0x8049359: file ../../../src/gdb/testsuite/gdb.cp/templates.cc, line 493.
-(gdb) PASS: gdb.cp/templates.exp: value method breakpoint
+Arguments must be choice numbers.
+(gdb) FAIL: gdb.cp/templates.exp: value method breakpoint

Looks like GDB thinks there are two destructor instances in T5<int>.

I just confirmed this on x86-linux, to remove 64-bit out of
the picture.

--
Pedro Alves