[RFC] Special casing dtors?

Pedro Alves pedro@codesourcery.com
Mon Mar 30 21:46:00 GMT 2009


On Saturday 28 March 2009 07:41:53, Keith Seitz wrote:
> Keith Seitz wrote:
> 
> > I am building SVN gcc now, and I will retry everything.
> 
> I tried this with exactly the same result on both x86_64 and x86. [It 
> took long enough!] The "destructor breakpoint" test FAILs without the 
> patch, and the patch introduces no new failures. There must be something 
> different about our environments.

No, it just means you went in the wrong direction with your
testing.  :-)

I mentioned that these tests pass on *4.2*, and that you see them
failing on 4.3.  It isn't much of a surprise that they fail on
gcc head.

I just tried the templates.exp test with both the top of the gcc 4.2
branch, and with current gcc head, both on stabs, x86_64.  Here's the
result difference:

--- gdb.sum.4.2	2009-03-30 16:50:48.000000000 +0100
+++ gdb.sum.4.5	2009-03-30 16:51:33.000000000 +0100
@@ -1,4 +1,4 @@
-Test Run By pedro on Mon Mar 30 16:50:39 2009
+Test Run By pedro on Mon Mar 30 16:51:25 2009
 Native configuration is x86_64-unknown-linux-gnu
 
 		=== gdb tests ===
@@ -9,38 +9,39 @@ Schedule of variations:
 Running target unix/gdb:debug_flags=-gstabs+
 Running ../../../src/gdb/testsuite/gdb.cp/templates.exp ...
 PASS: gdb.cp/templates.exp: set multiple-symbols ask
-PASS: gdb.cp/templates.exp: ptype T5<int> (obsolescent gcc or gdb)
-PASS: gdb.cp/templates.exp: ptype t5i (obsolescent gcc or gdb)
-FAIL: gdb.cp/templates.exp: constructor breakpoint (bad menu choices)
+FAIL: gdb.cp/templates.exp: ptype T5<int>
+FAIL: gdb.cp/templates.exp: ptype t5i
+FAIL: gdb.cp/templates.exp: constructor breakpoint
 PASS: gdb.cp/templates.exp: destructor breakpoint
 PASS: gdb.cp/templates.exp: value method breakpoint
 PASS: gdb.cp/templates.exp: print t5i.value()
 PASS: gdb.cp/templates.exp: print fint
 PASS: gdb.cp/templates.exp: print fvpchar
-PASS: gdb.cp/templates.exp: ptype Foo
-PASS: gdb.cp/templates.exp: ptype fint
-PASS: gdb.cp/templates.exp: ptype fchar
-PASS: gdb.cp/templates.exp: ptype fvpchar
-PASS: gdb.cp/templates.exp: print Foo<volatile char *>::foo
-PASS: gdb.cp/templates.exp: print Foo<volatile char*>::foo
-PASS: gdb.cp/templates.exp: ptype Bar
-PASS: gdb.cp/templates.exp: ptype bint
-PASS: gdb.cp/templates.exp: ptype bint2
-PASS: gdb.cp/templates.exp: ptype Baz
-PASS: gdb.cp/templates.exp: ptype bazint
-PASS: gdb.cp/templates.exp: ptype bazint2
-PASS: gdb.cp/templates.exp: ptype Qux
-PASS: gdb.cp/templates.exp: ptype quxint
-PASS: gdb.cp/templates.exp: ptype Spec
-PASS: gdb.cp/templates.exp: ptype siip
-PASS: gdb.cp/templates.exp: ptype Garply<int>
-PASS: gdb.cp/templates.exp: ptype Garply<Garply<char> >
-PASS: gdb.cp/templates.exp: print Garply<Garply<char> >::garply
+FAIL: gdb.cp/templates.exp: ptype Foo
+FAIL: gdb.cp/templates.exp: ptype fint
+FAIL: gdb.cp/templates.exp: ptype fchar
+FAIL: gdb.cp/templates.exp: ptype fvpchar
+KFAIL: gdb.cp/templates.exp: print Foo<volatile char *>::foo (PRMS: gdb/931)
+KFAIL: gdb.cp/templates.exp: print Foo<volatile char*>::foo (PRMS: gdb/931)
+FAIL: gdb.cp/templates.exp: ptype Bar
+FAIL: gdb.cp/templates.exp: ptype bint
+FAIL: gdb.cp/templates.exp: ptype bint2
+FAIL: gdb.cp/templates.exp: ptype Baz
+FAIL: gdb.cp/templates.exp: ptype bazint
+FAIL: gdb.cp/templates.exp: ptype bazint2
+FAIL: gdb.cp/templates.exp: ptype Qux
+FAIL: gdb.cp/templates.exp: ptype quxint
+FAIL: gdb.cp/templates.exp: ptype Spec
+FAIL: gdb.cp/templates.exp: ptype siip
+FAIL: gdb.cp/templates.exp: ptype Garply<int>
+FAIL: gdb.cp/templates.exp: ptype Garply<Garply<char> >
+FAIL: gdb.cp/templates.exp: print Garply<Garply<char> >::garply
 PASS: gdb.cp/templates.exp: break Garply<Garply<char> >::garply
 
 		=== gdb Summary ===
 
-# of expected passes		28
-# of unexpected failures	1
+# of expected passes		7
+# of unexpected failures	20
+# of known failures		2
 /home/pedro/gdb/baseline/build/gdb/testsuite/../../gdb/gdb version  6.8.50.20090327-cvs -nw -nx 
 
So, gcc regressed a bunch of stabs after gcc 4.2.  The full logs of running
this test with both compilers are attached.

> 
> I don't know what's going on now, but we seem to be at a "Mexican 
> Stand-off? [Pardon the colloquialism]

I don't know how much we care for stabs on 4.2.  Certainly on
linux it isn't that important, but other platforms are still a
bit stuck with it.  Note that I'm not objecting to you applying
your patch.  The failure mode it introduces on stabs isn't that
critical.  I was merely trying to be helpful, and I didn't
expect that we'd find this.  In any case, it is always good to
try out several compilers, not just the tip of the trunk.  GDB
has to cope with code produced from older compilers as well.

-- 
Pedro Alves
-------------- next part --------------
Test Run By pedro on Mon Mar 30 16:50:39 2009
Native configuration is x86_64-unknown-linux-gnu

		=== gdb tests ===

Schedule of variations:
    unix/gdb:debug_flags=-gstabs+

Running target unix/gdb:debug_flags=-gstabs+
Running ../../../src/gdb/testsuite/gdb.cp/templates.exp ...
PASS: gdb.cp/templates.exp: set multiple-symbols ask
PASS: gdb.cp/templates.exp: ptype T5<int> (obsolescent gcc or gdb)
PASS: gdb.cp/templates.exp: ptype t5i (obsolescent gcc or gdb)
FAIL: gdb.cp/templates.exp: constructor breakpoint (bad menu choices)
PASS: gdb.cp/templates.exp: destructor breakpoint
PASS: gdb.cp/templates.exp: value method breakpoint
PASS: gdb.cp/templates.exp: print t5i.value()
PASS: gdb.cp/templates.exp: print fint
PASS: gdb.cp/templates.exp: print fvpchar
PASS: gdb.cp/templates.exp: ptype Foo
PASS: gdb.cp/templates.exp: ptype fint
PASS: gdb.cp/templates.exp: ptype fchar
PASS: gdb.cp/templates.exp: ptype fvpchar
PASS: gdb.cp/templates.exp: print Foo<volatile char *>::foo
PASS: gdb.cp/templates.exp: print Foo<volatile char*>::foo
PASS: gdb.cp/templates.exp: ptype Bar
PASS: gdb.cp/templates.exp: ptype bint
PASS: gdb.cp/templates.exp: ptype bint2
PASS: gdb.cp/templates.exp: ptype Baz
PASS: gdb.cp/templates.exp: ptype bazint
PASS: gdb.cp/templates.exp: ptype bazint2
PASS: gdb.cp/templates.exp: ptype Qux
PASS: gdb.cp/templates.exp: ptype quxint
PASS: gdb.cp/templates.exp: ptype Spec
PASS: gdb.cp/templates.exp: ptype siip
PASS: gdb.cp/templates.exp: ptype Garply<int>
PASS: gdb.cp/templates.exp: ptype Garply<Garply<char> >
PASS: gdb.cp/templates.exp: print Garply<Garply<char> >::garply
PASS: gdb.cp/templates.exp: break Garply<Garply<char> >::garply

		=== gdb Summary ===

# of expected passes		28
# of unexpected failures	1
/home/pedro/gdb/baseline/build/gdb/testsuite/../../gdb/gdb version  6.8.50.20090327-cvs -nw -nx 

-------------- next part --------------
A non-text attachment was scrubbed...
Name: gdb.log.4.2
Type: text/x-java
Size: 8711 bytes
Desc: not available
URL: <http://sourceware.org/pipermail/gdb-patches/attachments/20090330/fc70983f/attachment.bin>
-------------- next part --------------
Test Run By pedro on Mon Mar 30 16:51:25 2009
Native configuration is x86_64-unknown-linux-gnu

		=== gdb tests ===

Schedule of variations:
    unix/gdb:debug_flags=-gstabs+

Running target unix/gdb:debug_flags=-gstabs+
Running ../../../src/gdb/testsuite/gdb.cp/templates.exp ...
PASS: gdb.cp/templates.exp: set multiple-symbols ask
FAIL: gdb.cp/templates.exp: ptype T5<int>
FAIL: gdb.cp/templates.exp: ptype t5i
FAIL: gdb.cp/templates.exp: constructor breakpoint
PASS: gdb.cp/templates.exp: destructor breakpoint
PASS: gdb.cp/templates.exp: value method breakpoint
PASS: gdb.cp/templates.exp: print t5i.value()
PASS: gdb.cp/templates.exp: print fint
PASS: gdb.cp/templates.exp: print fvpchar
FAIL: gdb.cp/templates.exp: ptype Foo
FAIL: gdb.cp/templates.exp: ptype fint
FAIL: gdb.cp/templates.exp: ptype fchar
FAIL: gdb.cp/templates.exp: ptype fvpchar
KFAIL: gdb.cp/templates.exp: print Foo<volatile char *>::foo (PRMS: gdb/931)
KFAIL: gdb.cp/templates.exp: print Foo<volatile char*>::foo (PRMS: gdb/931)
FAIL: gdb.cp/templates.exp: ptype Bar
FAIL: gdb.cp/templates.exp: ptype bint
FAIL: gdb.cp/templates.exp: ptype bint2
FAIL: gdb.cp/templates.exp: ptype Baz
FAIL: gdb.cp/templates.exp: ptype bazint
FAIL: gdb.cp/templates.exp: ptype bazint2
FAIL: gdb.cp/templates.exp: ptype Qux
FAIL: gdb.cp/templates.exp: ptype quxint
FAIL: gdb.cp/templates.exp: ptype Spec
FAIL: gdb.cp/templates.exp: ptype siip
FAIL: gdb.cp/templates.exp: ptype Garply<int>
FAIL: gdb.cp/templates.exp: ptype Garply<Garply<char> >
FAIL: gdb.cp/templates.exp: print Garply<Garply<char> >::garply
PASS: gdb.cp/templates.exp: break Garply<Garply<char> >::garply

		=== gdb Summary ===

# of expected passes		7
# of unexpected failures	20
# of known failures		2
/home/pedro/gdb/baseline/build/gdb/testsuite/../../gdb/gdb version  6.8.50.20090327-cvs -nw -nx 

-------------- next part --------------
A non-text attachment was scrubbed...
Name: gdb.log.4.5
Type: text/x-objcsrc
Size: 7942 bytes
Desc: not available
URL: <http://sourceware.org/pipermail/gdb-patches/attachments/20090330/fc70983f/attachment-0001.bin>


More information about the Gdb-patches mailing list