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

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