From 5f67b86ed19d2a8e8806ec087282ec31c17da5b6 Mon Sep 17 00:00:00 2001 From: Andrew Burgess Date: Sat, 20 May 2023 10:24:29 +0100 Subject: [PATCH] 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. --- _gdb.spec.Patch.include | 54 ++++++------ _gdb.spec.patch.include | 1 - _patch_order | 1 - gdb-lineno-makeup-test.patch | 165 ----------------------------------- gdb.spec | 4 + 5 files changed, 29 insertions(+), 196 deletions(-) delete mode 100644 gdb-lineno-makeup-test.patch diff --git a/_gdb.spec.Patch.include b/_gdb.spec.Patch.include index 6d3ff93..9501c8f 100644 --- a/_gdb.spec.Patch.include +++ b/_gdb.spec.Patch.include @@ -97,92 +97,88 @@ Patch023: gdb-simultaneous-step-resume-breakpoint-test.patch #=fedoratest: It should be in glibc: libc-alpha: <20091004161706.GA27450@.*> 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). #=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). #=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). #=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). #=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). #=fedoratest -Patch030: gdb-test-pid0-core.patch +Patch029: gdb-test-pid0-core.patch # [archer-tromey-delayed-symfile] New test gdb.dwarf2/dw2-aranges.exp. #=fedoratest -Patch031: gdb-test-dw2-aranges.patch +Patch030: gdb-test-dw2-aranges.patch # Workaround PR libc/14166 for inferior calls of strstr. #=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). #=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: # read_var_value: Assertion `frame' failed.' (RH BZ 947564) from RHEL 6.5. #=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) #=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, # but not corresponding binary pkg' (RH BZ 981154). #=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 # crash.' (RH BZ 1156192). #=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' # (Philippe Waroquiers, RH BZ 1149205). #=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 # description: 'C++ (and objc): Internal error on unqualified name # re-set', PR 11657] (RH BZ 1186476). #=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 # Kratochvil, RH BZ 1084404). #=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). #=push+jan -Patch041: gdb-fedora-libncursesw.patch +Patch040: gdb-fedora-libncursesw.patch # [aarch64] Fix hardware watchpoints (RH BZ 1261564). #=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). #=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). #=fedora -Patch044: gdb-linux_perf-bundle.patch +Patch043: gdb-linux_perf-bundle.patch # Update gdb-add-index.sh such that, when the GDB environment # 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 # #=fedora -Patch045: gdb-add-index.patch +Patch044: gdb-add-index.patch # [s390x] Backport arch12 instructions decoding (RH BZ 1553104). # =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. -Patch047: gdb-rhbz2177655-aarch64-pauth-valid-regcache.patch +Patch046: gdb-rhbz2177655-aarch64-pauth-valid-regcache.patch # Backport "Fix crash in inside_main_func" # (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..." # (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 # 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 diff --git a/_gdb.spec.patch.include b/_gdb.spec.patch.include index f84adba..2ca0c1f 100644 --- a/_gdb.spec.patch.include +++ b/_gdb.spec.patch.include @@ -47,4 +47,3 @@ %patch -p1 -P047 %patch -p1 -P048 %patch -p1 -P049 -%patch -p1 -P050 diff --git a/_patch_order b/_patch_order index 2ddd86b..8568481 100644 --- a/_patch_order +++ b/_patch_order @@ -22,7 +22,6 @@ gdb-6.5-section-num-fixup-test.patch gdb-6.8-bz466901-backtrace-full-prelinked.patch gdb-simultaneous-step-resume-breakpoint-test.patch gdb-core-open-vdso-warning.patch -gdb-lineno-makeup-test.patch gdb-archer-next-over-throw-cxx-exec.patch gdb-6.6-buildid-locate-rpm-librpm-workaround.patch gdb-test-bt-cfi-without-die.patch diff --git a/gdb-lineno-makeup-test.patch b/gdb-lineno-makeup-test.patch deleted file mode 100644 index 4b96286..0000000 --- a/gdb-lineno-makeup-test.patch +++ /dev/null @@ -1,165 +0,0 @@ -From FEDORA_PATCHES Mon Sep 17 00:00:00 2001 -From: Fedora GDB patches -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 . */ -+ -+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 . */ -+ -+/* 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 . -+ -+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\]+ = {} (0x\[0-9a-f\]+) \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 -+ } -+} diff --git a/gdb.spec b/gdb.spec index ca09465..9dbd51a 100644 --- a/gdb.spec +++ b/gdb.spec @@ -1249,6 +1249,10 @@ fi %endif %changelog +* Sat May 20 2023 Andrew Burgess +- 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 - Remove gdb-ccache-workaround.patch. This patch works around problems when using older versions of ccache, however, upstream GDB