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

e1d87d
https://bugzilla.redhat.com/bugzilla/show_bug.cgi?id=109921
e1d87d
e1d87d
It is duplicite to its upstream variant:
e1d87d
http://sourceware.org/ml/gdb-cvs/2007-01/msg00157.html
e1d87d
http://sourceware.org/ml/gdb-patches/2007-01/msg00434.html
e1d87d
2007-01-21  Jan Kratochvil  <jan.kratochvil@redhat.com>
e1d87d
	    Daniel Jacobowitz  <dan@codesourcery.com>
e1d87d
e1d87d
	* gdb.base/included.c, gdb.base/included.exp,
e1d87d
	gdb.base/included.h: New files.
e1d87d
e1d87d
------------------------------------------------------------------------------
e1d87d
e1d87d
2007-01-09  Jan Kratochvil  <jan.kratochvil@redhat.com>
e1d87d
e1d87d
	* gdb.dwarf2/dw2-included.exp, gdb.dwarf2/dw2-included.c,
e1d87d
	gdb.dwarf2/dw2-included.h: New files.
e1d87d
e1d87d
Index: gdb-7.10.90.20160211/gdb/testsuite/gdb.dwarf2/dw2-included.c
e1d87d
===================================================================
e1d87d
--- /dev/null	1970-01-01 00:00:00.000000000 +0000
e1d87d
+++ gdb-7.10.90.20160211/gdb/testsuite/gdb.dwarf2/dw2-included.c	2016-02-16 09:52:29.861247534 +0100
e1d87d
@@ -0,0 +1,26 @@
e1d87d
+/* This testcase is part of GDB, the GNU debugger.
e1d87d
+
e1d87d
+   Copyright 2006 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 2 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, write to the Free Software
e1d87d
+   Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307,
e1d87d
+   USA.  */
e1d87d
+
e1d87d
+#include "dw2-included.h"
e1d87d
+
e1d87d
+int
e1d87d
+main()
e1d87d
+{
e1d87d
+  return 0;
e1d87d
+}
e1d87d
Index: gdb-7.10.90.20160211/gdb/testsuite/gdb.dwarf2/dw2-included.exp
e1d87d
===================================================================
e1d87d
--- /dev/null	1970-01-01 00:00:00.000000000 +0000
e1d87d
+++ gdb-7.10.90.20160211/gdb/testsuite/gdb.dwarf2/dw2-included.exp	2016-02-16 09:52:36.481292330 +0100
e1d87d
@@ -0,0 +1,47 @@
e1d87d
+# Copyright 2006 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 2 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, write to the Free Software
e1d87d
+# Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA.
e1d87d
+
e1d87d
+# Minimal DWARF-2 unit test
e1d87d
+
e1d87d
+# This test can only be run on targets which support DWARF-2.
e1d87d
+# For now pick a sampling of likely targets.
e1d87d
+if {![istarget *-*-linux*]
e1d87d
+    && ![istarget *-*-gnu*]
e1d87d
+    && ![istarget *-*-elf*]
e1d87d
+    && ![istarget *-*-openbsd*]
e1d87d
+    && ![istarget arm-*-eabi*]
e1d87d
+    && ![istarget powerpc-*-eabi*]} {
e1d87d
+    return 0  
e1d87d
+}
e1d87d
+
e1d87d
+set testfile "dw2-included"
e1d87d
+set srcfile ${testfile}.c
e1d87d
+set binfile [standard_output_file ${testfile}]
e1d87d
+
e1d87d
+if  { [gdb_compile "${srcdir}/${subdir}/${srcfile}" "${binfile}" executable {debug}] != "" } {
e1d87d
+    return -1
e1d87d
+}
e1d87d
+
e1d87d
+gdb_exit
e1d87d
+gdb_start
e1d87d
+gdb_reinitialize_dir $srcdir/$subdir
e1d87d
+gdb_load ${binfile}
e1d87d
+
e1d87d
+gdb_test "set listsize 1" ""
e1d87d
+gdb_test "list integer" "int integer;\r"
e1d87d
+gdb_test "ptype integer" "type = int\r"
e1d87d
+# Path varies depending on the build location.
e1d87d
+gdb_test "info variables integer" "\r\nFile \[^\r\n\]*/gdb.dwarf2/dw2-included.h:\r\nint integer;\r"
e1d87d
Index: gdb-7.10.90.20160211/gdb/testsuite/gdb.dwarf2/dw2-included.h
e1d87d
===================================================================
e1d87d
--- /dev/null	1970-01-01 00:00:00.000000000 +0000
e1d87d
+++ gdb-7.10.90.20160211/gdb/testsuite/gdb.dwarf2/dw2-included.h	2016-02-16 09:52:29.862247541 +0100
e1d87d
@@ -0,0 +1,20 @@
e1d87d
+/* This testcase is part of GDB, the GNU debugger.
e1d87d
+
e1d87d
+   Copyright 2006 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 2 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, write to the Free Software
e1d87d
+   Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307,
e1d87d
+   USA.  */
e1d87d
+
e1d87d
+int integer;