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