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

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