Blame SOURCES/gdb-physname-pr11734-test.patch

99f0af
http://sourceware.org/ml/gdb-patches/2010-12/msg00263.html
99f0af
99f0af
Index: gdb-7.2/gdb/testsuite/gdb.cp/pr11734-1.cc
99f0af
===================================================================
99f0af
--- /dev/null	1970-01-01 00:00:00.000000000 +0000
99f0af
+++ gdb-7.2/gdb/testsuite/gdb.cp/pr11734-1.cc	2011-02-03 22:28:01.000000000 +0100
99f0af
@@ -0,0 +1,30 @@
99f0af
+/* This testcase is part of GDB, the GNU debugger.
99f0af
+
99f0af
+   Copyright 2010 Free Software Foundation, Inc.
99f0af
+
99f0af
+   This program is free software; you can redistribute it and/or modify
99f0af
+   it under the terms of the GNU General Public License as published by
99f0af
+   the Free Software Foundation; either version 3 of the License, or
99f0af
+   (at your option) any later version.
99f0af
+
99f0af
+   This program is distributed in the hope that it will be useful,
99f0af
+   but WITHOUT ANY WARRANTY; without even the implied warranty of
99f0af
+   MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
99f0af
+   GNU General Public License for more details.
99f0af
+
99f0af
+   You should have received a copy of the GNU General Public License
99f0af
+   along with this program.  If not, see <http://www.gnu.org/licenses/>.
99f0af
+
99f0af
+   Please email any bugs, comments, and/or additions to this file to:
99f0af
+   bug-gdb@gnu.org  */
99f0af
+
99f0af
+#include "pr11734.h"
99f0af
+
99f0af
+int
99f0af
+main ()
99f0af
+{
99f0af
+  pr11734 *p = new pr11734;
99f0af
+  p->foo ();
99f0af
+  return 0;
99f0af
+}
99f0af
+
99f0af
Index: gdb-7.2/gdb/testsuite/gdb.cp/pr11734-2.cc
99f0af
===================================================================
99f0af
--- /dev/null	1970-01-01 00:00:00.000000000 +0000
99f0af
+++ gdb-7.2/gdb/testsuite/gdb.cp/pr11734-2.cc	2011-02-03 22:28:01.000000000 +0100
99f0af
@@ -0,0 +1,27 @@
99f0af
+/* This testcase is part of GDB, the GNU debugger.
99f0af
+
99f0af
+   Copyright 2010 Free Software Foundation, Inc.
99f0af
+
99f0af
+   This program is free software; you can redistribute it and/or modify
99f0af
+   it under the terms of the GNU General Public License as published by
99f0af
+   the Free Software Foundation; either version 3 of the License, or
99f0af
+   (at your option) any later version.
99f0af
+
99f0af
+   This program is distributed in the hope that it will be useful,
99f0af
+   but WITHOUT ANY WARRANTY; without even the implied warranty of
99f0af
+   MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
99f0af
+   GNU General Public License for more details.
99f0af
+
99f0af
+   You should have received a copy of the GNU General Public License
99f0af
+   along with this program.  If not, see <http://www.gnu.org/licenses/>.
99f0af
+
99f0af
+   Please email any bugs, comments, and/or additions to this file to:
99f0af
+   bug-gdb@gnu.org  */
99f0af
+
99f0af
+#include "pr11734.h"
99f0af
+
99f0af
+void
99f0af
+pr11734::foo(void)
99f0af
+{
99f0af
+}
99f0af
+
99f0af
Index: gdb-7.2/gdb/testsuite/gdb.cp/pr11734-3.cc
99f0af
===================================================================
99f0af
--- /dev/null	1970-01-01 00:00:00.000000000 +0000
99f0af
+++ gdb-7.2/gdb/testsuite/gdb.cp/pr11734-3.cc	2011-02-03 22:28:01.000000000 +0100
99f0af
@@ -0,0 +1,27 @@
99f0af
+/* This testcase is part of GDB, the GNU debugger.
99f0af
+
99f0af
+   Copyright 2010 Free Software Foundation, Inc.
99f0af
+
99f0af
+   This program is free software; you can redistribute it and/or modify
99f0af
+   it under the terms of the GNU General Public License as published by
99f0af
+   the Free Software Foundation; either version 3 of the License, or
99f0af
+   (at your option) any later version.
99f0af
+
99f0af
+   This program is distributed in the hope that it will be useful,
99f0af
+   but WITHOUT ANY WARRANTY; without even the implied warranty of
99f0af
+   MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
99f0af
+   GNU General Public License for more details.
99f0af
+
99f0af
+   You should have received a copy of the GNU General Public License
99f0af
+   along with this program.  If not, see <http://www.gnu.org/licenses/>.
99f0af
+
99f0af
+   Please email any bugs, comments, and/or additions to this file to:
99f0af
+   bug-gdb@gnu.org  */
99f0af
+
99f0af
+#include "pr11734.h"
99f0af
+
99f0af
+void
99f0af
+pr11734::foo (int a)
99f0af
+{
99f0af
+}
99f0af
+
99f0af
Index: gdb-7.2/gdb/testsuite/gdb.cp/pr11734-4.cc
99f0af
===================================================================
99f0af
--- /dev/null	1970-01-01 00:00:00.000000000 +0000
99f0af
+++ gdb-7.2/gdb/testsuite/gdb.cp/pr11734-4.cc	2011-02-03 22:28:01.000000000 +0100
99f0af
@@ -0,0 +1,27 @@
99f0af
+/* This testcase is part of GDB, the GNU debugger.
99f0af
+
99f0af
+   Copyright 2010 Free Software Foundation, Inc.
99f0af
+
99f0af
+   This program is free software; you can redistribute it and/or modify
99f0af
+   it under the terms of the GNU General Public License as published by
99f0af
+   the Free Software Foundation; either version 3 of the License, or
99f0af
+   (at your option) any later version.
99f0af
+
99f0af
+   This program is distributed in the hope that it will be useful,
99f0af
+   but WITHOUT ANY WARRANTY; without even the implied warranty of
99f0af
+   MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
99f0af
+   GNU General Public License for more details.
99f0af
+
99f0af
+   You should have received a copy of the GNU General Public License
99f0af
+   along with this program.  If not, see <http://www.gnu.org/licenses/>.
99f0af
+
99f0af
+   Please email any bugs, comments, and/or additions to this file to:
99f0af
+   bug-gdb@gnu.org  */
99f0af
+
99f0af
+#include "pr11734.h"
99f0af
+
99f0af
+void
99f0af
+pr11734::foo (char *a)
99f0af
+{
99f0af
+}
99f0af
+
99f0af
Index: gdb-7.2/gdb/testsuite/gdb.cp/pr11734.exp
99f0af
===================================================================
99f0af
--- /dev/null	1970-01-01 00:00:00.000000000 +0000
99f0af
+++ gdb-7.2/gdb/testsuite/gdb.cp/pr11734.exp	2011-02-03 22:28:01.000000000 +0100
99f0af
@@ -0,0 +1,55 @@
99f0af
+# Copyright 2010 Free Software Foundation, Inc.
99f0af
+#
99f0af
+# Contributed by Red Hat, originally written by Keith Seitz.
99f0af
+#
99f0af
+# This program is free software; you can redistribute it and/or modify
99f0af
+# it under the terms of the GNU General Public License as published by
99f0af
+# the Free Software Foundation; either version 3 of the License, or
99f0af
+# (at your option) any later version.
99f0af
+#
99f0af
+# This program is distributed in the hope that it will be useful,
99f0af
+# but WITHOUT ANY WARRANTY; without even the implied warranty of
99f0af
+# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
99f0af
+# GNU General Public License for more details.
99f0af
+#
99f0af
+# You should have received a copy of the GNU General Public License
99f0af
+# along with this program.  If not, see <http://www.gnu.org/licenses/>.
99f0af
+
99f0af
+# This file is part of the gdb testsuite.
99f0af
+
99f0af
+if { [skip_cplus_tests] } { continue }
99f0af
+
99f0af
+set testfile "pr11734"
99f0af
+set class $testfile
99f0af
+
99f0af
+set srcfiles {}
99f0af
+for {set i 1} {$i < 5} {incr i} {
99f0af
+    lappend srcfiles $testfile-$i.cc
99f0af
+}
99f0af
+
99f0af
+prepare_for_testing pr11734 $testfile $srcfiles {c++ debug}
99f0af
+
99f0af
+if {![runto_main]} {
99f0af
+    perror "couldn't run to breakpoint"
99f0af
+    continue
99f0af
+}
99f0af
+
99f0af
+# An array holding the overload types for the method pr11734::foo.  The
99f0af
+# first element is the overloaded method parameter.  The second element
99f0af
+# is the expected source file number, e.g. "pr11734-?.cc".
99f0af
+array set tests {
99f0af
+    "char*"  4
99f0af
+    "int"    3
99f0af
+    ""       2
99f0af
+}
99f0af
+
99f0af
+# Test each overload instance twice: once quoted, once unquoted
99f0af
+foreach ovld [array names tests] {
99f0af
+    set method "${class}::foo\($ovld\)"
99f0af
+    set result "Breakpoint (\[0-9\]).*file .*/$class-$tests($ovld).*"
99f0af
+    gdb_test "break $method" $result
99f0af
+    gdb_test "break '$method'" $result
99f0af
+}
99f0af
+
99f0af
+gdb_exit
99f0af
+return 0
99f0af
Index: gdb-7.2/gdb/testsuite/gdb.cp/pr11734.h
99f0af
===================================================================
99f0af
--- /dev/null	1970-01-01 00:00:00.000000000 +0000
99f0af
+++ gdb-7.2/gdb/testsuite/gdb.cp/pr11734.h	2011-02-03 22:28:01.000000000 +0100
99f0af
@@ -0,0 +1,28 @@
99f0af
+/* This testcase is part of GDB, the GNU debugger.
99f0af
+
99f0af
+   Copyright 2010 Free Software Foundation, Inc.
99f0af
+
99f0af
+   This program is free software; you can redistribute it and/or modify
99f0af
+   it under the terms of the GNU General Public License as published by
99f0af
+   the Free Software Foundation; either version 3 of the License, or
99f0af
+   (at your option) any later version.
99f0af
+
99f0af
+   This program is distributed in the hope that it will be useful,
99f0af
+   but WITHOUT ANY WARRANTY; without even the implied warranty of
99f0af
+   MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
99f0af
+   GNU General Public License for more details.
99f0af
+
99f0af
+   You should have received a copy of the GNU General Public License
99f0af
+   along with this program.  If not, see <http://www.gnu.org/licenses/>.
99f0af
+
99f0af
+   Please email any bugs, comments, and/or additions to this file to:
99f0af
+   bug-gdb@gnu.org  */
99f0af
+
99f0af
+class pr11734
99f0af
+{
99f0af
+ public:
99f0af
+  void foo ();
99f0af
+  void foo (int);
99f0af
+  void foo (char *);
99f0af
+};
99f0af
+