Remove gdb-lineno-makeup-test.patch

An equivalent test has been merged upstream in this commit:

  commit ef56b006501ba52b128d4e5f36657ddbf56d22bc
  Date:   Wed May 17 15:14:15 2023 +0100

      gdb/testsuite: test for a function with no line table

As this is only a test there seems little point in backporting this
commit to Fedora -- we'll pick it up next time we rebase.  For now I
suggest that we drop this patch.
This commit is contained in:
Andrew Burgess 2023-05-20 10:24:29 +01:00
parent f71aced2fd
commit 5f67b86ed1
5 changed files with 29 additions and 196 deletions

View File

@ -97,92 +97,88 @@ Patch023: gdb-simultaneous-step-resume-breakpoint-test.patch
#=fedoratest: It should be in glibc: libc-alpha: <20091004161706.GA27450@.*> #=fedoratest: It should be in glibc: libc-alpha: <20091004161706.GA27450@.*>
Patch024: gdb-core-open-vdso-warning.patch Patch024: gdb-core-open-vdso-warning.patch
# Testcase for "Do not make up line information" fix by Daniel Jacobowitz.
#=fedoratest
Patch025: gdb-lineno-makeup-test.patch
# Fix follow-exec for C++ programs (bugreported by Martin Stransky). # Fix follow-exec for C++ programs (bugreported by Martin Stransky).
#=fedoratest #=fedoratest
Patch026: gdb-archer-next-over-throw-cxx-exec.patch Patch025: gdb-archer-next-over-throw-cxx-exec.patch
# Workaround librpm BZ 643031 due to its unexpected exit() calls (BZ 642879). # Workaround librpm BZ 643031 due to its unexpected exit() calls (BZ 642879).
#=push+jan #=push+jan
Patch027: gdb-6.6-buildid-locate-rpm-librpm-workaround.patch Patch026: gdb-6.6-buildid-locate-rpm-librpm-workaround.patch
# [delayed-symfile] Test a backtrace regression on CFIs without DIE (BZ 614604). # [delayed-symfile] Test a backtrace regression on CFIs without DIE (BZ 614604).
#=fedoratest #=fedoratest
Patch028: gdb-test-bt-cfi-without-die.patch Patch027: gdb-test-bt-cfi-without-die.patch
# Verify GDB Python built-in function gdb.solib_address exists (BZ # 634108). # Verify GDB Python built-in function gdb.solib_address exists (BZ # 634108).
#=fedoratest #=fedoratest
Patch029: gdb-bz634108-solib_address.patch Patch028: gdb-bz634108-solib_address.patch
# New test gdb.arch/x86_64-pid0-core.exp for kernel PID 0 cores (BZ 611435). # New test gdb.arch/x86_64-pid0-core.exp for kernel PID 0 cores (BZ 611435).
#=fedoratest #=fedoratest
Patch030: gdb-test-pid0-core.patch Patch029: gdb-test-pid0-core.patch
# [archer-tromey-delayed-symfile] New test gdb.dwarf2/dw2-aranges.exp. # [archer-tromey-delayed-symfile] New test gdb.dwarf2/dw2-aranges.exp.
#=fedoratest #=fedoratest
Patch031: gdb-test-dw2-aranges.patch Patch030: gdb-test-dw2-aranges.patch
# Workaround PR libc/14166 for inferior calls of strstr. # Workaround PR libc/14166 for inferior calls of strstr.
#=fedoratest: Compatibility with RHELs (unchecked which ones). #=fedoratest: Compatibility with RHELs (unchecked which ones).
Patch032: gdb-glibc-strstr-workaround.patch Patch031: gdb-glibc-strstr-workaround.patch
# Testcase for `Setting solib-absolute-prefix breaks vDSO' (BZ 818343). # Testcase for `Setting solib-absolute-prefix breaks vDSO' (BZ 818343).
#=fedoratest #=fedoratest
Patch033: gdb-rhbz-818343-set-solib-absolute-prefix-testcase.patch Patch032: gdb-rhbz-818343-set-solib-absolute-prefix-testcase.patch
# Import regression test for `gdb/findvar.c:417: internal-error: # Import regression test for `gdb/findvar.c:417: internal-error:
# read_var_value: Assertion `frame' failed.' (RH BZ 947564) from RHEL 6.5. # read_var_value: Assertion `frame' failed.' (RH BZ 947564) from RHEL 6.5.
#=fedoratest #=fedoratest
Patch034: gdb-rhbz947564-findvar-assertion-frame-failed-testcase.patch Patch033: gdb-rhbz947564-findvar-assertion-frame-failed-testcase.patch
# Fix 'memory leak in infpy_read_memory()' (RH BZ 1007614) # Fix 'memory leak in infpy_read_memory()' (RH BZ 1007614)
#=fedoratest #=fedoratest
Patch035: gdb-rhbz1007614-memleak-infpy_read_memory-test.patch Patch034: gdb-rhbz1007614-memleak-infpy_read_memory-test.patch
# Fix 'gdb gives highly misleading error when debuginfo pkg is present, # Fix 'gdb gives highly misleading error when debuginfo pkg is present,
# but not corresponding binary pkg' (RH BZ 981154). # but not corresponding binary pkg' (RH BZ 981154).
#=push+jan #=push+jan
Patch036: gdb-6.6-buildid-locate-misleading-warning-missing-debuginfo-rhbz981154.patch Patch035: gdb-6.6-buildid-locate-misleading-warning-missing-debuginfo-rhbz981154.patch
# Testcase for '[SAP] Recursive dlopen causes SAP HANA installer to # Testcase for '[SAP] Recursive dlopen causes SAP HANA installer to
# crash.' (RH BZ 1156192). # crash.' (RH BZ 1156192).
#=fedoratest #=fedoratest
Patch037: gdb-rhbz1156192-recursive-dlopen-test.patch Patch036: gdb-rhbz1156192-recursive-dlopen-test.patch
# Fix '`catch syscall' doesn't work for parent after `fork' is called' # Fix '`catch syscall' doesn't work for parent after `fork' is called'
# (Philippe Waroquiers, RH BZ 1149205). # (Philippe Waroquiers, RH BZ 1149205).
#=fedoratest #=fedoratest
Patch038: gdb-rhbz1149205-catch-syscall-after-fork-test.patch Patch037: gdb-rhbz1149205-catch-syscall-after-fork-test.patch
# Fix 'backport GDB 7.4 fix to RHEL 6.6 GDB' [Original Sourceware bug # Fix 'backport GDB 7.4 fix to RHEL 6.6 GDB' [Original Sourceware bug
# description: 'C++ (and objc): Internal error on unqualified name # description: 'C++ (and objc): Internal error on unqualified name
# re-set', PR 11657] (RH BZ 1186476). # re-set', PR 11657] (RH BZ 1186476).
#=fedoratest #=fedoratest
Patch039: gdb-rhbz1186476-internal-error-unqualified-name-re-set-test.patch Patch038: gdb-rhbz1186476-internal-error-unqualified-name-re-set-test.patch
# Fix '[ppc64] and [s390x] wrong prologue skip on -O2 -g code' (Jan # Fix '[ppc64] and [s390x] wrong prologue skip on -O2 -g code' (Jan
# Kratochvil, RH BZ 1084404). # Kratochvil, RH BZ 1084404).
#=fedoratest #=fedoratest
Patch040: gdb-rhbz1084404-ppc64-s390x-wrong-prologue-skip-O2-g-3of3.patch Patch039: gdb-rhbz1084404-ppc64-s390x-wrong-prologue-skip-O2-g-3of3.patch
# Force libncursesw over libncurses to match the includes (RH BZ 1270534). # Force libncursesw over libncurses to match the includes (RH BZ 1270534).
#=push+jan #=push+jan
Patch041: gdb-fedora-libncursesw.patch Patch040: gdb-fedora-libncursesw.patch
# [aarch64] Fix hardware watchpoints (RH BZ 1261564). # [aarch64] Fix hardware watchpoints (RH BZ 1261564).
#=fedoratest #=fedoratest
Patch042: gdb-rhbz1261564-aarch64-hw-watchpoint-test.patch Patch041: gdb-rhbz1261564-aarch64-hw-watchpoint-test.patch
# Add messages suggesting more recent RHEL gdbserver (RH BZ 1321114). # Add messages suggesting more recent RHEL gdbserver (RH BZ 1321114).
#=fedora #=fedora
Patch043: gdb-container-rh-pkg.patch Patch042: gdb-container-rh-pkg.patch
# [dts+el7] [x86*] Bundle linux_perf.h for libipt (RH BZ 1256513). # [dts+el7] [x86*] Bundle linux_perf.h for libipt (RH BZ 1256513).
#=fedora #=fedora
Patch044: gdb-linux_perf-bundle.patch Patch043: gdb-linux_perf-bundle.patch
# Update gdb-add-index.sh such that, when the GDB environment # Update gdb-add-index.sh such that, when the GDB environment
# variable is not set, the script is smarter than just looking for # variable is not set, the script is smarter than just looking for
@ -196,24 +192,24 @@ Patch044: gdb-linux_perf-bundle.patch
# https://fedoraproject.org/wiki/Changes/Minimal_GDB_in_buildroot # https://fedoraproject.org/wiki/Changes/Minimal_GDB_in_buildroot
# #
#=fedora #=fedora
Patch045: gdb-add-index.patch Patch044: gdb-add-index.patch
# [s390x] Backport arch12 instructions decoding (RH BZ 1553104). # [s390x] Backport arch12 instructions decoding (RH BZ 1553104).
# =fedoratest # =fedoratest
Patch046: gdb-rhbz1553104-s390x-arch12-test.patch Patch045: gdb-rhbz1553104-s390x-arch12-test.patch
# [aarch64] Backport fix from Luis Machado for RH BZ 2177655. # [aarch64] Backport fix from Luis Machado for RH BZ 2177655.
Patch047: gdb-rhbz2177655-aarch64-pauth-valid-regcache.patch Patch046: gdb-rhbz2177655-aarch64-pauth-valid-regcache.patch
# Backport "Fix crash in inside_main_func" # Backport "Fix crash in inside_main_func"
# (Tom Tromey, RHBZ 2183595) # (Tom Tromey, RHBZ 2183595)
Patch048: gdb-rhbz2183595-rustc-inside_main.patch Patch047: gdb-rhbz2183595-rustc-inside_main.patch
# Backport "Fix a potential illegal memory access in the BFD library..." # Backport "Fix a potential illegal memory access in the BFD library..."
# (Nick Clifton, binutils/29988) # (Nick Clifton, binutils/29988)
Patch049: gdb-binutils29988-read_indexed_address.patch Patch048: gdb-binutils29988-read_indexed_address.patch
# Backport upstream patch fixing a "dangling pointer" build problem # Backport upstream patch fixing a "dangling pointer" build problem
# first seen when building with GCC 13.1.1 20230426 (Red Hat ;; 13.1.1-1). # first seen when building with GCC 13.1.1 20230426 (Red Hat ;; 13.1.1-1).
Patch050: gdb-rhbz2192105-ftbs-dangling-pointer Patch049: gdb-rhbz2192105-ftbs-dangling-pointer

View File

@ -47,4 +47,3 @@
%patch -p1 -P047 %patch -p1 -P047
%patch -p1 -P048 %patch -p1 -P048
%patch -p1 -P049 %patch -p1 -P049
%patch -p1 -P050

View File

@ -22,7 +22,6 @@ gdb-6.5-section-num-fixup-test.patch
gdb-6.8-bz466901-backtrace-full-prelinked.patch gdb-6.8-bz466901-backtrace-full-prelinked.patch
gdb-simultaneous-step-resume-breakpoint-test.patch gdb-simultaneous-step-resume-breakpoint-test.patch
gdb-core-open-vdso-warning.patch gdb-core-open-vdso-warning.patch
gdb-lineno-makeup-test.patch
gdb-archer-next-over-throw-cxx-exec.patch gdb-archer-next-over-throw-cxx-exec.patch
gdb-6.6-buildid-locate-rpm-librpm-workaround.patch gdb-6.6-buildid-locate-rpm-librpm-workaround.patch
gdb-test-bt-cfi-without-die.patch gdb-test-bt-cfi-without-die.patch

View File

@ -1,165 +0,0 @@
From FEDORA_PATCHES Mon Sep 17 00:00:00 2001
From: Fedora GDB patches <invalid@email.com>
Date: Fri, 27 Oct 2017 21:07:50 +0200
Subject: gdb-lineno-makeup-test.patch
;; Testcase for "Do not make up line information" fix by Daniel Jacobowitz.
;;=fedoratest
New testcase for:
https://bugzilla.redhat.com/show_bug.cgi?id=466222
(for the first / customer recommended fix)
and the upstream fix:
http://sourceware.org/ml/gdb-patches/2006-11/msg00253.html
[rfc] Do not make up line information
http://sourceware.org/ml/gdb-cvs/2006-11/msg00127.html
diff --git a/gdb/testsuite/gdb.base/lineno-makeup-func.c b/gdb/testsuite/gdb.base/lineno-makeup-func.c
new file mode 100644
--- /dev/null
+++ b/gdb/testsuite/gdb.base/lineno-makeup-func.c
@@ -0,0 +1,21 @@
+/* This testcase is part of GDB, the GNU debugger.
+
+ Copyright 2009 Free Software Foundation, Inc.
+
+ This program is free software; you can redistribute it and/or modify
+ it under the terms of the GNU General Public License as published by
+ the Free Software Foundation; either version 3 of the License, or
+ (at your option) any later version.
+
+ This program is distributed in the hope that it will be useful,
+ but WITHOUT ANY WARRANTY; without even the implied warranty of
+ MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
+ GNU General Public License for more details.
+
+ You should have received a copy of the GNU General Public License
+ along with this program. If not, see <http://www.gnu.org/licenses/>. */
+
+void
+func (void)
+{
+}
diff --git a/gdb/testsuite/gdb.base/lineno-makeup.c b/gdb/testsuite/gdb.base/lineno-makeup.c
new file mode 100644
--- /dev/null
+++ b/gdb/testsuite/gdb.base/lineno-makeup.c
@@ -0,0 +1,35 @@
+/* This testcase is part of GDB, the GNU debugger.
+
+ Copyright 2009 Free Software Foundation, Inc.
+
+ This program is free software; you can redistribute it and/or modify
+ it under the terms of the GNU General Public License as published by
+ the Free Software Foundation; either version 3 of the License, or
+ (at your option) any later version.
+
+ This program is distributed in the hope that it will be useful,
+ but WITHOUT ANY WARRANTY; without even the implied warranty of
+ MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
+ GNU General Public License for more details.
+
+ You should have received a copy of the GNU General Public License
+ along with this program. If not, see <http://www.gnu.org/licenses/>. */
+
+/* DW_AT_low_pc-DW_AT_high_pc should cover the function without line number
+ information (.debug_line) so we cannot use an external object file.
+
+ It must not be just a label as it would alias on the next function even for
+ correct GDB. Therefore some stub data must be placed there.
+
+ We need to provide a real stub function body as at least s390
+ (s390_analyze_prologue) would skip the whole body till reaching `main'. */
+
+extern void func (void);
+asm ("func: .incbin \"" BINFILENAME "\"");
+
+int
+main (void)
+{
+ func ();
+ return 0;
+}
diff --git a/gdb/testsuite/gdb.base/lineno-makeup.exp b/gdb/testsuite/gdb.base/lineno-makeup.exp
new file mode 100644
--- /dev/null
+++ b/gdb/testsuite/gdb.base/lineno-makeup.exp
@@ -0,0 +1,78 @@
+# Copyright 2009 Free Software Foundation, Inc.
+
+# This program is free software; you can redistribute it and/or modify
+# it under the terms of the GNU General Public License as published by
+# the Free Software Foundation; either version 3 of the License, or
+# (at your option) any later version.
+#
+# This program is distributed in the hope that it will be useful,
+# but WITHOUT ANY WARRANTY; without even the implied warranty of
+# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
+# GNU General Public License for more details.
+#
+# You should have received a copy of the GNU General Public License
+# along with this program. If not, see <http://www.gnu.org/licenses/>.
+
+set testfile "lineno-makeup"
+set srcfuncfile ${testfile}-func.c
+set srcfile ${testfile}.c
+set objfuncfile [standard_output_file ${testfile}-func.o]
+set binfuncfile [standard_output_file ${testfile}-func.bin]
+set binfile [standard_output_file ${testfile}]
+
+if { [gdb_compile "${srcdir}/${subdir}/${srcfuncfile}" "${objfuncfile}" object {}] != "" } {
+ gdb_suppress_entire_file "Testcase compile failed, so all tests in this file will automatically fail."
+}
+
+set objcopy [catch "exec objcopy -O binary --only-section .text ${objfuncfile} ${binfuncfile}" output]
+verbose -log "objcopy=$objcopy: $output"
+if { $objcopy != 0 } {
+ gdb_suppress_entire_file "Testcase compile failed, so all tests in this file will automatically fail."
+}
+set binfuncfilesize [file size $binfuncfile]
+verbose -log "file size $binfuncfile = $binfuncfilesize"
+
+if { [gdb_compile "${srcdir}/${subdir}/${srcfile}" "${binfile}" executable [list debug additional_flags=-DBINFILENAME=\"$binfuncfile\"]] != "" } {
+ gdb_suppress_entire_file "Testcase compile failed, so all tests in this file will automatically fail."
+}
+
+gdb_exit
+gdb_start
+gdb_reinitialize_dir $srcdir/$subdir
+gdb_load ${binfile}
+
+set b_addr ""
+set test "break func"
+gdb_test_multiple $test $test {
+ -re "Breakpoint \[0-9\]+ at (0x\[0-9a-f\]+)\r\n$gdb_prompt $" {
+ set b_addr $expect_out(1,string)
+ pass $test
+ }
+ -re "Breakpoint \[0-9\]+ at (0x\[0-9a-f\]+): .*\r\n$gdb_prompt $" {
+ set b_addr $expect_out(1,string)
+ fail $test
+ }
+}
+verbose -log "b_addr=<$b_addr>"
+
+set p_addr ""
+set test "print func"
+gdb_test_multiple $test $test {
+ -re "\\$\[0-9\]+ = {<text variable, no debug info>} (0x\[0-9a-f\]+) <func>\r\n$gdb_prompt $" {
+ set p_addr $expect_out(1,string)
+ pass $test
+ }
+}
+verbose -log "p_addr=<$p_addr>"
+
+set test "break address belongs to func"
+if {$b_addr == $p_addr} {
+ pass "$test (exact match)"
+} else {
+ set skip [expr $b_addr - $p_addr]
+ if {$skip > 0 && $skip < $binfuncfilesize} {
+ pass "$test (prologue skip by $skip bytes)"
+ } else {
+ fail $test
+ }
+}

View File

@ -1249,6 +1249,10 @@ fi
%endif %endif
%changelog %changelog
* Sat May 20 2023 Andrew Burgess <aburgess@redhat.com>
- Remove gdb-lineno-makeup-test.patch. An equivalent test has now
been merged to upstream binutils-gdb in commit ef56b006501.
* Tue May 16 2023 Andrew Burgess <aburgess@redhat.com> * Tue May 16 2023 Andrew Burgess <aburgess@redhat.com>
- Remove gdb-ccache-workaround.patch. This patch works around - Remove gdb-ccache-workaround.patch. This patch works around
problems when using older versions of ccache, however, upstream GDB problems when using older versions of ccache, however, upstream GDB