diff options
author | Keith Seitz <keiths@redhat.com> | 2014-06-07 10:40:39 -0700 |
---|---|---|
committer | Keith Seitz <keiths@redhat.com> | 2014-06-07 10:40:39 -0700 |
commit | 4186eb54dd4d57b59d58f470ec0fa9b19b9c9d5e (patch) | |
tree | a06ca25b09e28008b738dbbda552e4628c4fdbc4 /gdb/testsuite | |
parent | b893397a4b1316610f49819344817715e4305de9 (diff) | |
download | gdb-4186eb54dd4d57b59d58f470ec0fa9b19b9c9d5e.zip gdb-4186eb54dd4d57b59d58f470ec0fa9b19b9c9d5e.tar.gz gdb-4186eb54dd4d57b59d58f470ec0fa9b19b9c9d5e.tar.bz2 |
Revert patchset for c++/16253: it causes a large performance regression.
See the bug for further information.
Diffstat (limited to 'gdb/testsuite')
-rw-r--r-- | gdb/testsuite/ChangeLog | 11 | ||||
-rw-r--r-- | gdb/testsuite/gdb.cp/var-tag.cc | 44 | ||||
-rw-r--r-- | gdb/testsuite/gdb.cp/var-tag.exp | 105 | ||||
-rw-r--r-- | gdb/testsuite/gdb.dwarf2/dw2-ada-ffffffff.exp | 4 | ||||
-rw-r--r-- | gdb/testsuite/gdb.dwarf2/dw2-anon-mptr.exp | 2 | ||||
-rw-r--r-- | gdb/testsuite/gdb.dwarf2/dw2-double-set-die-type.exp | 1 | ||||
-rw-r--r-- | gdb/testsuite/gdb.dwarf2/dw2-inheritance.exp | 1 |
7 files changed, 11 insertions, 157 deletions
diff --git a/gdb/testsuite/ChangeLog b/gdb/testsuite/ChangeLog index 9c8da4a..35ff0b2 100644 --- a/gdb/testsuite/ChangeLog +++ b/gdb/testsuite/ChangeLog @@ -1,3 +1,14 @@ +2014-06-07 Keith Seitz <keiths@redhat.com> + + Revert: + PR c++/16253 + * gdb.cp/var-tag.cc: New file. + * gdb.cp/var-tag.exp: New file. + * gdb.dwarf2/dw2-ada-ffffffff.exp: Set the language to C++. + * gdb.dwarf2/dw2-anon-mptr.exp: Likewise. + * gdb.dwarf2/dw2-double-set-die-type.exp: Likewise. + * gdb.dwarf2/dw2-inheritance.exp: Likewise. + 2014-06-06 Doug Evans <xdje42@gmail.com> * gdb.guile/scm-frame-args.c (foo): Tweak to work with gcc 4.6.3. diff --git a/gdb/testsuite/gdb.cp/var-tag.cc b/gdb/testsuite/gdb.cp/var-tag.cc deleted file mode 100644 index 93b9caf..0000000 --- a/gdb/testsuite/gdb.cp/var-tag.cc +++ /dev/null @@ -1,44 +0,0 @@ -/* This testcase is part of GDB, the GNU debugger. - - Copyright 2014 Free Software Foundation, Inc. - - This program is free software; you can redistribute it and/or modify - it under the terms of the GNU General Public License as published by - the Free Software Foundation; either version 3 of the License, or - (at your option) any later version. - - This program is distributed in the hope that it will be useful, - but WITHOUT ANY WARRANTY; without even the implied warranty of - MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the - GNU General Public License for more details. - - You should have received a copy of the GNU General Public License - along with this program. If not, see <http://www.gnu.org/licenses/>. */ - -int global = 3; - -class C { -public: - struct C1 {} C1; - enum E1 {a1, b1, c1} E1; - union U1 {int a1; char b1;} U1; - - C () : E1 (b1) {} - void global (void) const {} - int f (void) const { global (); return 0; } -} C; - -struct S {} S; -enum E {a, b, c} E; -union U {int a; char b;} U; - -class CC {} cc; -struct SS {} ss; -enum EE {ea, eb, ec} ee; -union UU {int aa; char bb;} uu; - -int -main (void) -{ - return C.f (); -} diff --git a/gdb/testsuite/gdb.cp/var-tag.exp b/gdb/testsuite/gdb.cp/var-tag.exp deleted file mode 100644 index 9e46282..0000000 --- a/gdb/testsuite/gdb.cp/var-tag.exp +++ /dev/null @@ -1,105 +0,0 @@ -# Copyright 2014 Free Software Foundation, Inc. - -# This program is free software; you can redistribute it and/or modify -# it under the terms of the GNU General Public License as published by -# the Free Software Foundation; either version 3 of the License, or -# (at your option) any later version. -# -# This program is distributed in the hope that it will be useful, -# but WITHOUT ANY WARRANTY; without even the implied warranty of -# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the -# GNU General Public License for more details. -# -# You should have received a copy of the GNU General Public License -# along with this program. If not, see <http://www.gnu.org/licenses/>. - -# This file is part of the gdb testsuite - -# Test expressions in which variable names shadow tag names. - -if {[skip_cplus_tests]} { continue } - -standard_testfile .cc - -if {[prepare_for_testing $testfile.exp $testfile $srcfile {debug c++}]} { - return -1 -} - -proc do_global_tests {lang} { - if {$lang == "c++"} { - set opt_underlying "(: unsigned int )?" - } else { - set opt_underlying "" - } - - if {$lang == "c"} { - set invalid_print "No symbol \"%s\" in current context." - set ptypefmt $invalid_print - } else { - set invalid_print "Attempt to use a type name as an expression" - set ptypefmt "type = (class|enum|union|struct) %s $opt_underlying{.*}" - } - - with_test_prefix $lang { - gdb_test_no_output "set language $lang" - gdb_test "ptype C" "type = class C {.*}" - gdb_test "print E" "= a" - gdb_test "ptype E" "type = enum E $opt_underlying{.*}" - gdb_test "print S" "= {<No data fields>}" - gdb_test "ptype S" "type = struct S {.*}" - gdb_test "print U" "= {.*}" - gdb_test "ptype U" "type = union U {.*}" - gdb_test "print cc" "= {.*}" - gdb_test "ptype cc" "type = class CC {.*}" - gdb_test "print CC" [format $invalid_print "CC"] - gdb_test "ptype CC" [format $ptypefmt "CC"] - gdb_test "print ss" "= {<No data fields>}" - gdb_test "ptype ss" "type = struct SS {.*}" - gdb_test "print SS" [format $invalid_print "SS"] - gdb_test "ptype SS" [format $ptypefmt "SS"] - gdb_test "print ee" "= .*" - gdb_test "ptype ee" "type = enum EE $opt_underlying{.*}" - gdb_test "print EE" [format $invalid_print "EE"] - gdb_test "ptype EE" [format $ptypefmt "EE"] - gdb_test "print uu" "= {.*}" - gdb_test "ptype uu" "type = union UU {.*}" - gdb_test "print UU" [format $invalid_print "UU"] - gdb_test "ptype UU" [format $ptypefmt "UU"] - } -} - -# First test expressions when there is no context. -with_test_prefix "before start" { - do_global_tests c++ - do_global_tests c -} - -# Run to main and test again. -if {![runto_main]} { - perror "couldn't run to main" - continue -} - -with_test_prefix "in main" { - do_global_tests c++ - do_global_tests c -} - -# Finally run to C::f and test again -gdb_breakpoint "C::f" -gdb_continue_to_breakpoint "continue to C::f" -with_test_prefix "in C::f" { - do_global_tests c++ - do_global_tests c -} - -# Another hard-to-guess-the-users-intent bug... -# It would be really nice if we could query the user! -with_test_prefix "global collision" { - gdb_test_no_output "set language c++" - setup_kfail "c++/16463" "*-*-*" - gdb_test "print global" "= 3" - - # ... with a simple workaround: - gdb_test "print ::global" "= 3" -} diff --git a/gdb/testsuite/gdb.dwarf2/dw2-ada-ffffffff.exp b/gdb/testsuite/gdb.dwarf2/dw2-ada-ffffffff.exp index 7936f25..1c1d10f 100644 --- a/gdb/testsuite/gdb.dwarf2/dw2-ada-ffffffff.exp +++ b/gdb/testsuite/gdb.dwarf2/dw2-ada-ffffffff.exp @@ -28,10 +28,6 @@ if { [gdb_compile "${srcdir}/${subdir}/${srcfile}" "${binfile}" object {}] != "" clean_restart $executable -# Force the language to C++, since we want to treat the type -# defined in the object file like a C++ type, using sizeof. -gdb_test_no_output "set language c++" - # -1 was produced, it is now caught with the complaint: # Suspicious DW_AT_byte_size value treated as zero instead of ... gdb_test "p sizeof (t)" " = 0" diff --git a/gdb/testsuite/gdb.dwarf2/dw2-anon-mptr.exp b/gdb/testsuite/gdb.dwarf2/dw2-anon-mptr.exp index c9e59ed..aef3cb8 100644 --- a/gdb/testsuite/gdb.dwarf2/dw2-anon-mptr.exp +++ b/gdb/testsuite/gdb.dwarf2/dw2-anon-mptr.exp @@ -40,7 +40,5 @@ gdb_test "show cp-abi" {The currently selected C\+\+ ABI is "gnu-v3".*} gdb_load $binfile -gdb_test_no_output "set language c++" - gdb_test "ptype crash" \ "type = class crash {\[\r\n \t\]*public:\[\r\n \t\]*crash\\(int \\(class {\\.\\.\\.}::\\*\\)\\(class {\\.\\.\\.} \\* const\\)\\);\[\r\n \t\]*}" diff --git a/gdb/testsuite/gdb.dwarf2/dw2-double-set-die-type.exp b/gdb/testsuite/gdb.dwarf2/dw2-double-set-die-type.exp index 40daed9..7aabcfe 100644 --- a/gdb/testsuite/gdb.dwarf2/dw2-double-set-die-type.exp +++ b/gdb/testsuite/gdb.dwarf2/dw2-double-set-die-type.exp @@ -30,5 +30,4 @@ if { [gdb_compile [file join $srcdir $subdir $srcfile] $binfile \ } clean_restart $testfile -gdb_test_no_output "set language c++" gdb_test "ptype a" "type = class .*" diff --git a/gdb/testsuite/gdb.dwarf2/dw2-inheritance.exp b/gdb/testsuite/gdb.dwarf2/dw2-inheritance.exp index 028a1df..7c954bb 100644 --- a/gdb/testsuite/gdb.dwarf2/dw2-inheritance.exp +++ b/gdb/testsuite/gdb.dwarf2/dw2-inheritance.exp @@ -31,5 +31,4 @@ if { [gdb_compile "${srcdir}/${subdir}/${srcfile}" $binfile \ clean_restart $testfile -gdb_test_no_output "set language c++" gdb_test "ptype inherited" "type = class inherited .*" |