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

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