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