Blame SOURCES/gdb-6.5-bz109921-DW_AT_decl_file-test.patch

861f93
https://bugzilla.redhat.com/bugzilla/show_bug.cgi?id=109921
861f93
861f93
It is duplicite to its upstream variant:
861f93
http://sourceware.org/ml/gdb-cvs/2007-01/msg00157.html
861f93
http://sourceware.org/ml/gdb-patches/2007-01/msg00434.html
861f93
2007-01-21  Jan Kratochvil  <jan.kratochvil@redhat.com>
861f93
	    Daniel Jacobowitz  <dan@codesourcery.com>
861f93
861f93
	* gdb.base/included.c, gdb.base/included.exp,
861f93
	gdb.base/included.h: New files.
861f93
861f93
------------------------------------------------------------------------------
861f93
861f93
2007-01-09  Jan Kratochvil  <jan.kratochvil@redhat.com>
861f93
861f93
	* gdb.dwarf2/dw2-included.exp, gdb.dwarf2/dw2-included.c,
861f93
	gdb.dwarf2/dw2-included.h: New files.
861f93
861f93
--- /dev/null	1 Jan 1970 00:00:00 -0000
861f93
+++ ./gdb/testsuite/gdb.dwarf2/dw2-included.c	2 Jan 2007 00:20:27 -0000
861f93
@@ -0,0 +1,26 @@
861f93
+/* This testcase is part of GDB, the GNU debugger.
861f93
+
861f93
+   Copyright 2006 Free Software Foundation, Inc.
861f93
+
861f93
+   This program is free software; you can redistribute it and/or modify
861f93
+   it under the terms of the GNU General Public License as published by
861f93
+   the Free Software Foundation; either version 2 of the License, or
861f93
+   (at your option) any later version.
861f93
+
861f93
+   This program is distributed in the hope that it will be useful,
861f93
+   but WITHOUT ANY WARRANTY; without even the implied warranty of
861f93
+   MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
861f93
+   GNU General Public License for more details.
861f93
+ 
861f93
+   You should have received a copy of the GNU General Public License
861f93
+   along with this program; if not, write to the Free Software
861f93
+   Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307,
861f93
+   USA.  */
861f93
+
861f93
+#include "dw2-included.h"
861f93
+
861f93
+int
861f93
+main()
861f93
+{
861f93
+  return 0;
861f93
+}
861f93
--- /dev/null	1 Jan 1970 00:00:00 -0000
861f93
+++ ./gdb/testsuite/gdb.dwarf2/dw2-included.exp	2 Jan 2007 00:20:27 -0000
861f93
@@ -0,0 +1,47 @@
861f93
+# Copyright 2006 Free Software Foundation, Inc.
861f93
+
861f93
+# This program is free software; you can redistribute it and/or modify
861f93
+# it under the terms of the GNU General Public License as published by
861f93
+# the Free Software Foundation; either version 2 of the License, or
861f93
+# (at your option) any later version.
861f93
+# 
861f93
+# This program is distributed in the hope that it will be useful,
861f93
+# but WITHOUT ANY WARRANTY; without even the implied warranty of
861f93
+# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
861f93
+# GNU General Public License for more details.
861f93
+# 
861f93
+# You should have received a copy of the GNU General Public License
861f93
+# along with this program; if not, write to the Free Software
861f93
+# Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA.
861f93
+
861f93
+# Minimal DWARF-2 unit test
861f93
+
861f93
+# This test can only be run on targets which support DWARF-2.
861f93
+# For now pick a sampling of likely targets.
861f93
+if {![istarget *-*-linux*]
861f93
+    && ![istarget *-*-gnu*]
861f93
+    && ![istarget *-*-elf*]
861f93
+    && ![istarget *-*-openbsd*]
861f93
+    && ![istarget arm-*-eabi*]
861f93
+    && ![istarget powerpc-*-eabi*]} {
861f93
+    return 0  
861f93
+}
861f93
+
861f93
+set testfile "dw2-included"
861f93
+set srcfile ${testfile}.c
861f93
+set binfile ${objdir}/${subdir}/${testfile}
861f93
+
861f93
+if  { [gdb_compile "${srcdir}/${subdir}/${srcfile}" "${binfile}" executable {debug}] != "" } {
861f93
+    return -1
861f93
+}
861f93
+
861f93
+gdb_exit
861f93
+gdb_start
861f93
+gdb_reinitialize_dir $srcdir/$subdir
861f93
+gdb_load ${binfile}
861f93
+
861f93
+gdb_test "set listsize 1" ""
861f93
+gdb_test "list integer" "int integer;\r"
861f93
+gdb_test "ptype integer" "type = int\r"
861f93
+# Path varies depending on the build location.
861f93
+gdb_test "info variables integer" "\r\nFile \[^\r\n\]*/gdb.dwarf2/dw2-included.h:\r\nint integer;\r"
861f93
--- /dev/null	1 Jan 1970 00:00:00 -0000
861f93
+++ ./gdb/testsuite/gdb.dwarf2/dw2-included.h	2 Jan 2007 00:20:27 -0000
861f93
@@ -0,0 +1,20 @@
861f93
+/* This testcase is part of GDB, the GNU debugger.
861f93
+
861f93
+   Copyright 2006 Free Software Foundation, Inc.
861f93
+
861f93
+   This program is free software; you can redistribute it and/or modify
861f93
+   it under the terms of the GNU General Public License as published by
861f93
+   the Free Software Foundation; either version 2 of the License, or
861f93
+   (at your option) any later version.
861f93
+
861f93
+   This program is distributed in the hope that it will be useful,
861f93
+   but WITHOUT ANY WARRANTY; without even the implied warranty of
861f93
+   MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
861f93
+   GNU General Public License for more details.
861f93
+ 
861f93
+   You should have received a copy of the GNU General Public License
861f93
+   along with this program; if not, write to the Free Software
861f93
+   Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307,
861f93
+   USA.  */
861f93
+
861f93
+int integer;