diff --git a/_gdb.spec.Patch.include b/_gdb.spec.Patch.include index 9bf8e3a..e56cf90 100644 --- a/_gdb.spec.Patch.include +++ b/_gdb.spec.Patch.include @@ -19,283 +19,279 @@ Patch004: gdb-6.3-test-movedir-20050125.patch #=fedoratest Patch005: gdb-6.3-threaded-watchpoints2-20050225.patch -# Notify observers that the inferior has been created -#=fedoratest -Patch006: gdb-6.3-inferior-notification-20050721.patch - # Verify printing of inherited members test #=fedoratest -Patch007: gdb-6.3-inheritancetest-20050726.patch +Patch006: gdb-6.3-inheritancetest-20050726.patch # Support TLS symbols (+`errno' suggestion if no pthread is found) (BZ 185337). #=push+jan: It should be replaced by Infinity project. -Patch008: gdb-6.5-bz185337-resolve-tls-without-debuginfo-v2.patch +Patch007: gdb-6.5-bz185337-resolve-tls-without-debuginfo-v2.patch # Fix TLS symbols resolving for shared libraries with a relative pathname. # The testsuite needs `gdb-6.5-tls-of-separate-debuginfo.patch'. #=fedoratest: One should recheck if it is really fixed upstream. -Patch009: gdb-6.5-sharedlibrary-path.patch +Patch008: gdb-6.5-sharedlibrary-path.patch # Improved testsuite results by the testsuite provided by the courtesy of BEA. #=fedoratest: For upstream it should be rewritten as a dejagnu test, the test of no "??" was useful. -Patch010: gdb-6.5-BEA-testsuite.patch +Patch09: gdb-6.5-BEA-testsuite.patch # Testcase for deadlocking on last address space byte; for corrupted backtraces. #=fedoratest -Patch011: gdb-6.5-last-address-space-byte-test.patch +Patch010: gdb-6.5-last-address-space-byte-test.patch # Fix readline segfault on excessively long hand-typed lines. #=fedoratest -Patch012: gdb-6.5-readline-long-line-crash-test.patch +Patch011: gdb-6.5-readline-long-line-crash-test.patch # Test sideeffects of skipping ppc .so libs trampolines (BZ 218379). #=fedoratest -Patch013: gdb-6.5-bz218379-ppc-solib-trampoline-test.patch +Patch012: gdb-6.5-bz218379-ppc-solib-trampoline-test.patch # Find symbols properly at their original (included) file (BZ 109921). #=fedoratest -Patch014: gdb-6.5-bz109921-DW_AT_decl_file-test.patch +Patch013: gdb-6.5-bz109921-DW_AT_decl_file-test.patch # Update PPC unwinding patches to their upstream variants (BZ 140532). #=fedoratest -Patch015: gdb-6.3-bz140532-ppc-unwinding-test.patch +Patch014: gdb-6.3-bz140532-ppc-unwinding-test.patch # Testcase for exec() from threaded program (BZ 202689). #=fedoratest -Patch016: gdb-6.3-bz202689-exec-from-pthread-test.patch +Patch015: gdb-6.3-bz202689-exec-from-pthread-test.patch # Testcase for PPC Power6/DFP instructions disassembly (BZ 230000). #=fedoratest -Patch017: gdb-6.6-bz230000-power6-disassembly-test.patch +Patch016: gdb-6.6-bz230000-power6-disassembly-test.patch # Allow running `/usr/bin/gcore' with provided but inaccessible tty (BZ 229517). #=fedoratest -Patch018: gdb-6.6-bz229517-gcore-without-terminal.patch +Patch017: gdb-6.6-bz229517-gcore-without-terminal.patch # Avoid too long timeouts on failing cases of "annota1.exp annota3.exp". #=fedoratest -Patch019: gdb-6.6-testsuite-timeouts.patch +Patch018: gdb-6.6-testsuite-timeouts.patch # Support for stepping over PPC atomic instruction sequences (BZ 237572). #=fedoratest -Patch020: gdb-6.6-bz237572-ppc-atomic-sequence-test.patch +Patch019: gdb-6.6-bz237572-ppc-atomic-sequence-test.patch # Test kernel VDSO decoding while attaching to an i386 process. #=fedoratest -Patch021: gdb-6.3-attach-see-vdso-test.patch +Patch020: gdb-6.3-attach-see-vdso-test.patch # Test leftover zombie process (BZ 243845). #=fedoratest -Patch022: gdb-6.5-bz243845-stale-testing-zombie-test.patch +Patch021: gdb-6.5-bz243845-stale-testing-zombie-test.patch # New locating of the matching binaries from the pure core file (build-id). #=push+jan -Patch023: gdb-6.6-buildid-locate.patch +Patch022: gdb-6.6-buildid-locate.patch # Fix loading of core files without build-ids but with build-ids in executables. # Load strictly build-id-checked core files only if no executable is specified # (Jan Kratochvil, RH BZ 1339862). #=push+jan -Patch024: gdb-6.6-buildid-locate-solib-missing-ids.patch +Patch023: gdb-6.6-buildid-locate-solib-missing-ids.patch #=push+jan -Patch025: gdb-6.6-buildid-locate-rpm.patch +Patch024: gdb-6.6-buildid-locate-rpm.patch # Fix displaying of numeric char arrays as strings (BZ 224128). #=fedoratest: But it is failing anyway, one should check the behavior more. -Patch026: gdb-6.7-charsign-test.patch +Patch025: gdb-6.7-charsign-test.patch # Test PPC hiding of call-volatile parameter register. #=fedoratest -Patch027: gdb-6.7-ppc-clobbered-registers-O2-test.patch +Patch026: gdb-6.7-ppc-clobbered-registers-O2-test.patch # Testsuite fixes for more stable/comparable results. #=fedoratest -Patch028: gdb-6.7-testsuite-stable-results.patch +Patch027: gdb-6.7-testsuite-stable-results.patch # Test ia64 memory leaks of the code using libunwind. #=fedoratest -Patch029: gdb-6.5-ia64-libunwind-leak-test.patch +Patch028: gdb-6.5-ia64-libunwind-leak-test.patch # Test hiding unexpected breakpoints on intentional step commands. #=fedoratest -Patch030: gdb-6.5-missed-trap-on-step-test.patch +Patch029: gdb-6.5-missed-trap-on-step-test.patch # Test gcore memory and time requirements for large inferiors. #=fedoratest -Patch031: gdb-6.5-gcore-buffer-limit-test.patch +Patch030: gdb-6.5-gcore-buffer-limit-test.patch # Test GCORE for shmid 0 shared memory mappings. #=fedoratest: But it is broken anyway, sometimes the case being tested is not reproducible. -Patch032: gdb-6.3-mapping-zero-inode-test.patch +Patch031: gdb-6.3-mapping-zero-inode-test.patch # Test a crash on `focus cmd', `focus prev' commands. #=fedoratest -Patch033: gdb-6.3-focus-cmd-prev-test.patch +Patch032: gdb-6.3-focus-cmd-prev-test.patch # Test various forms of threads tracking across exec() (BZ 442765). #=fedoratest -Patch034: gdb-6.8-bz442765-threaded-exec-test.patch +Patch033: gdb-6.8-bz442765-threaded-exec-test.patch # Test a crash on libraries missing the .text section. #=fedoratest -Patch035: gdb-6.5-section-num-fixup-test.patch +Patch034: gdb-6.5-section-num-fixup-test.patch # Fix resolving of variables at locations lists in prelinked libs (BZ 466901). #=fedoratest -Patch036: gdb-6.8-bz466901-backtrace-full-prelinked.patch +Patch035: gdb-6.8-bz466901-backtrace-full-prelinked.patch # New test for step-resume breakpoint placed in multiple threads at once. #=fedoratest -Patch037: gdb-simultaneous-step-resume-breakpoint-test.patch +Patch036: gdb-simultaneous-step-resume-breakpoint-test.patch # Fix GNU/Linux core open: Can't read pathname for load map: Input/output error. # Fix regression of undisplayed missing shared libraries caused by a fix for. #=fedoratest: It should be in glibc: libc-alpha: <20091004161706.GA27450@.*> -Patch038: gdb-core-open-vdso-warning.patch +Patch037: gdb-core-open-vdso-warning.patch # Workaround ccache making lineno non-zero for command-line definitions. #=fedoratest: ccache is rarely used and it is even fixed now. -Patch039: gdb-ccache-workaround.patch +Patch038: gdb-ccache-workaround.patch # Testcase for "Do not make up line information" fix by Daniel Jacobowitz. #=fedoratest -Patch040: gdb-lineno-makeup-test.patch +Patch039: gdb-lineno-makeup-test.patch # Test power7 ppc disassembly. #=fedoratest -Patch041: gdb-ppc-power7-test.patch +Patch040: gdb-ppc-power7-test.patch # Fix follow-exec for C++ programs (bugreported by Martin Stransky). #=fedoratest -Patch042: gdb-archer-next-over-throw-cxx-exec.patch +Patch041: gdb-archer-next-over-throw-cxx-exec.patch # Backport DWARF-4 support (BZ 601887, Tom Tromey). #=fedoratest -Patch043: gdb-bz601887-dwarf4-rh-test.patch +Patch042: gdb-bz601887-dwarf4-rh-test.patch # Workaround librpm BZ 643031 due to its unexpected exit() calls (BZ 642879). #=push+jan -Patch044: gdb-6.6-buildid-locate-rpm-librpm-workaround.patch +Patch043: gdb-6.6-buildid-locate-rpm-librpm-workaround.patch # [delayed-symfile] Test a backtrace regression on CFIs without DIE (BZ 614604). #=fedoratest -Patch045: gdb-test-bt-cfi-without-die.patch +Patch044: gdb-test-bt-cfi-without-die.patch # Verify GDB Python built-in function gdb.solib_address exists (BZ # 634108). #=fedoratest -Patch046: gdb-bz634108-solib_address.patch +Patch045: gdb-bz634108-solib_address.patch # New test gdb.arch/x86_64-pid0-core.exp for kernel PID 0 cores (BZ 611435). #=fedoratest -Patch047: gdb-test-pid0-core.patch +Patch046: gdb-test-pid0-core.patch # [archer-tromey-delayed-symfile] New test gdb.dwarf2/dw2-aranges.exp. #=fedoratest -Patch048: gdb-test-dw2-aranges.patch +Patch047: gdb-test-dw2-aranges.patch # [archer-keiths-expr-cumulative+upstream] Import C++ testcases. #=fedoratest -Patch049: gdb-test-expr-cumulative-archer.patch +Patch048: gdb-test-expr-cumulative-archer.patch # Fix regressions on C++ names resolving (PR 11734, PR 12273, Keith Seitz). #=fedoratest -Patch050: gdb-physname-pr11734-test.patch +Patch049: gdb-physname-pr11734-test.patch # Fix regressions on C++ names resolving (PR 11734, PR 12273, Keith Seitz). #=fedoratest -Patch051: gdb-physname-pr12273-test.patch +Patch050: gdb-physname-pr12273-test.patch # Test GDB opcodes/ disassembly of Intel Ivy Bridge instructions (BZ 696890). #=fedoratest -Patch052: gdb-test-ivy-bridge.patch +Patch051: gdb-test-ivy-bridge.patch # Hack for proper PIE run of the testsuite. #=fedoratest -Patch053: gdb-runtest-pie-override.patch +Patch052: gdb-runtest-pie-override.patch # Workaround PR libc/14166 for inferior calls of strstr. #=fedoratest: Compatibility with RHELs (unchecked which ones). -Patch054: gdb-glibc-strstr-workaround.patch +Patch053: gdb-glibc-strstr-workaround.patch # Include testcase for `Unable to see a variable inside a module (XLF)' (BZ 823789). #=fedoratest -Patch055: gdb-rhel5.9-testcase-xlf-var-inside-mod.patch +Patch054: gdb-rhel5.9-testcase-xlf-var-inside-mod.patch # Testcase for `Setting solib-absolute-prefix breaks vDSO' (BZ 818343). #=fedoratest -Patch056: gdb-rhbz-818343-set-solib-absolute-prefix-testcase.patch +Patch055: 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 -Patch057: gdb-rhbz947564-findvar-assertion-frame-failed-testcase.patch +Patch056: gdb-rhbz947564-findvar-assertion-frame-failed-testcase.patch # Fix 'memory leak in infpy_read_memory()' (RH BZ 1007614) #=fedoratest -Patch058: gdb-rhbz1007614-memleak-infpy_read_memory-test.patch +Patch057: 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 -Patch059: gdb-6.6-buildid-locate-misleading-warning-missing-debuginfo-rhbz981154.patch +Patch058: gdb-6.6-buildid-locate-misleading-warning-missing-debuginfo-rhbz981154.patch # Display Fortran strings in backtraces. #=fedoratest -Patch060: gdb-fortran-frame-string.patch +Patch059: gdb-fortran-frame-string.patch # Testcase for '[SAP] Recursive dlopen causes SAP HANA installer to # crash.' (RH BZ 1156192). #=fedoratest -Patch061: gdb-rhbz1156192-recursive-dlopen-test.patch +Patch060: gdb-rhbz1156192-recursive-dlopen-test.patch # Fix '`catch syscall' doesn't work for parent after `fork' is called' # (Philippe Waroquiers, RH BZ 1149205). #=fedoratest -Patch062: gdb-rhbz1149205-catch-syscall-after-fork-test.patch +Patch061: 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 -Patch063: gdb-rhbz1186476-internal-error-unqualified-name-re-set-test.patch +Patch062: gdb-rhbz1186476-internal-error-unqualified-name-re-set-test.patch # Test 'info type-printers' Python error (RH BZ 1350436). #=fedoratest -Patch064: gdb-rhbz1350436-type-printers-error.patch +Patch063: gdb-rhbz1350436-type-printers-error.patch # Fix '[ppc64] and [s390x] wrong prologue skip on -O2 -g code' (Jan # Kratochvil, RH BZ 1084404). #=fedoratest -Patch065: gdb-rhbz1084404-ppc64-s390x-wrong-prologue-skip-O2-g-3of3.patch +Patch064: gdb-rhbz1084404-ppc64-s390x-wrong-prologue-skip-O2-g-3of3.patch # Force libncursesw over libncurses to match the includes (RH BZ 1270534). #=push+jan -Patch066: gdb-fedora-libncursesw.patch +Patch065: gdb-fedora-libncursesw.patch # Test clflushopt instruction decode (for RH BZ 1262471). #=fedoratest -Patch067: gdb-opcodes-clflushopt-test.patch +Patch066: gdb-opcodes-clflushopt-test.patch # [SCL] Skip deprecated .gdb_index warning for Red Hat built files (BZ 953585). #=push+jan -Patch068: gdb-6.6-buildid-locate-rpm-scl.patch +Patch067: gdb-6.6-buildid-locate-rpm-scl.patch # [aarch64] Fix hardware watchpoints (RH BZ 1261564). #=fedoratest -Patch069: gdb-rhbz1261564-aarch64-hw-watchpoint-test.patch +Patch068: gdb-rhbz1261564-aarch64-hw-watchpoint-test.patch # Add messages suggesting more recent RHEL gdbserver (RH BZ 1321114). #=fedora -Patch070: gdb-container-rh-pkg.patch +Patch069: gdb-container-rh-pkg.patch # New test for Python "Cannot locate object file for block" (for RH BZ 1325795). #=fedoratest -Patch071: gdb-rhbz1325795-framefilters-test.patch +Patch070: gdb-rhbz1325795-framefilters-test.patch # [dts+el7] [x86*] Bundle linux_perf.h for libipt (RH BZ 1256513). #=fedora -Patch072: gdb-linux_perf-bundle.patch +Patch071: gdb-linux_perf-bundle.patch # Fix gdb-headless /usr/bin/ executables (BZ 1390251). # @@ -304,54 +300,54 @@ Patch072: gdb-linux_perf-bundle.patch # # https://fedoraproject.org/wiki/Changes/Minimal_GDB_in_buildroot #=fedora -Patch073: gdb-libexec-add-index.patch +Patch072: gdb-libexec-add-index.patch # New testcase for: Fix -completion crash (Gary Benson, RH BZ 1398387). #=fedoratest -Patch074: gdb-rhbz1398387-tab-crash-test.patch +Patch073: gdb-rhbz1398387-tab-crash-test.patch # [s390x] Backport arch12 instructions decoding (RH BZ 1553104). # =fedoratest -Patch075: gdb-rhbz1553104-s390x-arch12-test.patch +Patch074: gdb-rhbz1553104-s390x-arch12-test.patch #Backport upstream patch which fixes internal-error: Unexpected #type field location kind (RHBZ 1976887). -Patch076: gdb-rhbz1976887-field-location-kind.patch +Patch075: gdb-rhbz1976887-field-location-kind.patch # Backport test for RHBZ 1976887 (Kevin Buettner). -Patch077: gdb-test-for-rhbz1976887.patch +Patch076: gdb-test-for-rhbz1976887.patch # Backport gdb.fortran testsuite changes in order to avoid Fortran # lexical analyzer bug. -Patch078: gdb-rhbz2012976-paper-over-fortran-lex-problems.patch +Patch077: gdb-rhbz2012976-paper-over-fortran-lex-problems.patch # Backport manpage update -Patch079: gdb-rhbz-853071-update-manpages.patch +Patch078: gdb-rhbz-853071-update-manpages.patch # Backport fix for dprintf bug (RH BZ 2022177). -Patch080: gdb-rhbz2022177-dprintf-1.patch +Patch079: gdb-rhbz2022177-dprintf-1.patch # Backport test case for dprintf bug (RH BZ 2022177). -Patch081: gdb-rhbz2022177-dprintf-2.patch +Patch080: gdb-rhbz2022177-dprintf-2.patch #Backport upstream commit from Aaron Merey #3ea44f21299 gdb.texinfo: Expand documentation for debuginfod -Patch082: gdb-rhbz2024875-expand-documentation-for-debuginfod.patch +Patch081: gdb-rhbz2024875-expand-documentation-for-debuginfod.patch #Backport upstream commit from Aaron Merey #7811fa5995f gdb: add set/show commands for managing debuginfo -Patch083: gdb-rhbz2024875-set_show-for-managing-debuginfod.patch +Patch082: gdb-rhbz2024875-set_show-for-managing-debuginfod.patch #Backport upstream commit from Tom Tromey #2a8f1f47446 Fix unittest.exp failure due to 'set debuginfod' addition -Patch084: gdb-rhbz2024875-fix-unittest-failure.patch +Patch083: gdb-rhbz2024875-fix-unittest-failure.patch #Backport upstream commit from Simon Marchi #333f35b6315 gdb: pass/return setting setter/getter #scalar values by value -Patch085: gdb-rhbz202487-rework-set-debuginfod.patch +Patch084: gdb-rhbz202487-rework-set-debuginfod.patch #Backport upstream commit from Aaron Merey #b9db26b4c44 [PR gdb/27026] CTRL-C is ignored when debug info is downloaded -Patch086: gdb-rhbz2024875-pr27026.patch +Patch085: gdb-rhbz2024875-pr27026.patch diff --git a/_gdb.spec.patch.include b/_gdb.spec.patch.include index 965fc8c..9594d35 100644 --- a/_gdb.spec.patch.include +++ b/_gdb.spec.patch.include @@ -83,4 +83,3 @@ %patch083 -p1 %patch084 -p1 %patch085 -p1 -%patch086 -p1 diff --git a/_patch_order b/_patch_order index b921d85..de20617 100644 --- a/_patch_order +++ b/_patch_order @@ -3,7 +3,6 @@ gdb-6.3-gstack-20050411.patch gdb-6.3-test-dtorfix-20050121.patch gdb-6.3-test-movedir-20050125.patch gdb-6.3-threaded-watchpoints2-20050225.patch -gdb-6.3-inferior-notification-20050721.patch gdb-6.3-inheritancetest-20050726.patch gdb-6.5-bz185337-resolve-tls-without-debuginfo-v2.patch gdb-6.5-sharedlibrary-path.patch diff --git a/gdb-6.3-inferior-notification-20050721.patch b/gdb-6.3-inferior-notification-20050721.patch deleted file mode 100644 index 894ef79..0000000 --- a/gdb-6.3-inferior-notification-20050721.patch +++ /dev/null @@ -1,324 +0,0 @@ -From FEDORA_PATCHES Mon Sep 17 00:00:00 2001 -From: Jeff Johnston -Date: Fri, 27 Oct 2017 21:07:50 +0200 -Subject: gdb-6.3-inferior-notification-20050721.patch - -;; Notify observers that the inferior has been created -;;=fedoratest - -2005-07-21 Jeff Johnston - - * gdb.base/attach-32.exp: New test for attaching in 32-bit - mode on 64-bit systems. - * gdb.base/attach-32.c: Ditto. - * gdb.base/attach-32b.c: Ditto. - -2007-12-26 Jan Kratochvil - - * gdb.base/attach-32.exp: Fix forgotten $GDBFLAGS as set. - -diff --git a/gdb/testsuite/gdb.base/attach-32.c b/gdb/testsuite/gdb.base/attach-32.c -new file mode 100644 ---- /dev/null -+++ b/gdb/testsuite/gdb.base/attach-32.c -@@ -0,0 +1,20 @@ -+/* This program is intended to be started outside of gdb, and then -+ attached to by gdb. Thus, it simply spins in a loop. The loop -+ is exited when & if the variable 'should_exit' is non-zero. (It -+ is initialized to zero in this program, so the loop will never -+ exit unless/until gdb sets the variable to non-zero.) -+ */ -+#include -+ -+int should_exit = 0; -+ -+int main () -+{ -+ int local_i = 0; -+ -+ while (! should_exit) -+ { -+ local_i++; -+ } -+ return 0; -+} -diff --git a/gdb/testsuite/gdb.base/attach-32.exp b/gdb/testsuite/gdb.base/attach-32.exp -new file mode 100644 ---- /dev/null -+++ b/gdb/testsuite/gdb.base/attach-32.exp -@@ -0,0 +1,246 @@ -+# Copyright 2005 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 2 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, write to the Free Software -+# Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA. -+# -+# This test was based on attach.exp and modified for 32/64 bit Linux systems. */ -+ -+# On HP-UX 11.0, this test is causing a process running the program -+# "attach" to be left around spinning. Until we figure out why, I am -+# commenting out the test to avoid polluting tiamat (our 11.0 nightly -+# test machine) with these processes. RT -+# -+# Setting the magic bit in the target app should work. I added a -+# "kill", and also a test for the R3 register warning. JB -+if { ![istarget "x86_64*-*linux*"] -+ && ![istarget "powerpc64*-*linux*"]} { -+ return 0 -+} -+ -+# are we on a target board -+if {[use_gdb_stub]} { -+ untested "skipping test because of use_gdb_stub" -+ return -1 -+} -+ -+set testfile "attach-32" -+set srcfile ${testfile}.c -+set srcfile2 ${testfile}b.c -+set binfile [standard_output_file ${testfile}] -+set binfile2 [standard_output_file ${testfile}b] -+set escapedbinfile [string_to_regexp [standard_output_file ${testfile}]] -+ -+#execute_anywhere "rm -f ${binfile} ${binfile2}" -+remote_exec build "rm -f ${binfile} ${binfile2}" -+# For debugging this test -+# -+#log_user 1 -+ -+# build the first test case -+# -+if { [gdb_compile "${srcdir}/${subdir}/${srcfile}" "${binfile}" executable [list debug "additional_flags=-m32"]] != "" } { -+ gdb_suppress_entire_file "Testcase compile failed, so all tests in this file will automatically fail." -+} -+ -+# Build the in-system-call test -+ -+if { [gdb_compile "${srcdir}/${subdir}/${srcfile2}" "${binfile2}" executable [list debug "additional_flags=-m32"]] != "" } { -+ gdb_suppress_entire_file "Testcase compile failed, so all tests in this file will automatically fail." -+} -+ -+if [get_compiler_info ${binfile}] { -+ return -1 -+} -+ -+proc do_attach_tests {} { -+ global gdb_prompt -+ global binfile -+ global escapedbinfile -+ global srcfile -+ global testfile -+ global objdir -+ global subdir -+ global timeout -+ global testpid -+ -+ # Verify that we can "see" the variable "should_exit" in the -+ # program, and that it is zero. -+ -+ gdb_test "print should_exit" " = 0" "after attach-32, print should_exit" -+ -+ # Verify that we can modify the variable "should_exit" in the -+ # program. -+ -+ gdb_test "set should_exit=1" "" "after attach-32, set should_exit" -+ -+ # Verify that the modification really happened. -+ -+ send_gdb "tbreak 19\n" -+ gdb_expect { -+ -re "reakpoint .*at.*$srcfile, line 19.*$gdb_prompt $" { -+ pass "after attach-32, set tbreak postloop" -+ } -+ -re "$gdb_prompt $" { -+ fail "after attach-32, set tbreak postloop" -+ } -+ timeout { -+ fail "(timeout) after attach-32, set tbreak postloop" -+ } -+ } -+ send_gdb "continue\n" -+ gdb_expect { -+ -re "main.*at.*$srcfile:19.*$gdb_prompt $" { -+ pass "after attach-32, reach tbreak postloop" -+ } -+ -re "$gdb_prompt $" { -+ fail "after attach-32, reach tbreak postloop" -+ } -+ timeout { -+ fail "(timeout) after attach-32, reach tbreak postloop" -+ } -+ } -+ -+ # Allow the test process to exit, to cleanup after ourselves. -+ -+ gdb_test "continue" {\[Inferior .* exited normally\]} "after attach-32, exit" -+ -+ # Make sure we don't leave a process around to confuse -+ # the next test run (and prevent the compile by keeping -+ # the text file busy), in case the "set should_exit" didn't -+ # work. -+ -+ remote_exec build "kill -9 ${testpid}" -+ -+ # Start the program running and then wait for a bit, to be sure -+ # that it can be attached to. -+ -+ set testpid [eval exec $binfile &] -+ exec sleep 2 -+ if { [istarget "*-*-cygwin*"] } { -+ # testpid is the Cygwin PID, GDB uses the Windows PID, which might be -+ # different due to the way fork/exec works. -+ set testpid [ exec ps -e | gawk "{ if (\$1 == $testpid) print \$4; }" ] -+ } -+ -+ # Verify that we can attach to the process, and find its a.out -+ # when we're cd'd to some directory that doesn't contain the -+ # a.out. (We use the source path set by the "dir" command.) -+ -+ gdb_test "dir ${objdir}/${subdir}" "Source directories searched: .*" \ -+ "set source path" -+ -+ gdb_test "cd /tmp" "Working directory /tmp." \ -+ "cd away from process working directory" -+ -+ # Explicitly flush out any knowledge of the previous attachment. -+ -+ set test "before attach-32-3, flush symbols" -+ gdb_test_multiple "symbol" "$test" { -+ -re "Discard symbol table from.*y or n. $" { -+ gdb_test "y" "No symbol file now." \ -+ "$test" -+ } -+ -re "No symbol file now.*$gdb_prompt $" { -+ pass "$test" -+ } -+ } -+ -+ gdb_test "exec" "No executable file now." \ -+ "before attach-32-3, flush exec" -+ -+ gdb_test "attach $testpid" \ -+ "Attaching to process $testpid.*Reading symbols from $escapedbinfile.*main.*at .*" \ -+ "attach-32 when process' a.out not in cwd" -+ -+ set test "after attach-32-3, exit" -+ gdb_test_multiple "kill" "$test" { -+ -re "Kill the program being debugged.*y or n. $" { -+ gdb_test "y" "" "$test" -+ } -+ } -+ -+ # Another "don't leave a process around" -+ remote_exec build "kill -9 ${testpid}" -+} -+ -+proc do_call_attach_tests {} { -+ global gdb_prompt -+ global binfile2 -+ global testpid -+ -+ # See if other registers are problems -+ -+ set test "info other register" -+ gdb_test_multiple "i r r3" "$test" { -+ -re "warning: reading register.*$gdb_prompt $" { -+ fail "$test" -+ } -+ -re "r3.*$gdb_prompt $" { -+ pass "$test" -+ } -+ } -+ -+ # Get rid of the process -+ -+ gdb_test "p should_exit = 1" -+ gdb_test "c" {\[Inferior .* exited normally\]} -+ -+ # Be paranoid -+ -+ remote_exec build "kill -9 ${testpid}" -+} -+ -+ -+# Start with a fresh gdb -+ -+gdb_exit -+set testpid [eval exec $binfile &] -+exec sleep 3 -+if { [istarget "*-*-cygwin*"] } { -+ # testpid is the Cygwin PID, GDB uses the Windows PID, which might be -+ # different due to the way fork/exec works. -+ set testpid [ exec ps -e | gawk "{ if (\$1 == $testpid) print \$4; }" ] -+} -+ -+set GDBFLAGS_orig $GDBFLAGS -+set GDBFLAGS "-iex \"set height 0\" --pid=$testpid" -+gdb_start -+set GDBFLAGS $GDBFLAGS_orig -+ -+gdb_reinitialize_dir $srcdir/$subdir -+ -+# This is a test of gdb's ability to attach to a running process. -+ -+do_attach_tests -+ -+# Test attaching when the target is inside a system call -+ -+gdb_exit -+set testpid [eval exec $binfile2 &] -+exec sleep 3 -+if { [istarget "*-*-cygwin*"] } { -+ # testpid is the Cygwin PID, GDB uses the Windows PID, which might be -+ # different due to the way fork/exec works. -+ set testpid [ exec ps -e | gawk "{ if (\$1 == $testpid) print \$4; }" ] -+} -+ -+set GDBFLAGS_orig $GDBFLAGS -+set GDBFLAGS "-iex \"set height 0\" --pid=$testpid" -+gdb_start -+set GDBFLAGS $GDBFLAGS_orig -+ -+gdb_reinitialize_dir $srcdir/$subdir -+do_call_attach_tests -+ -+return 0 -diff --git a/gdb/testsuite/gdb.base/attach-32b.c b/gdb/testsuite/gdb.base/attach-32b.c -new file mode 100644 ---- /dev/null -+++ b/gdb/testsuite/gdb.base/attach-32b.c -@@ -0,0 +1,24 @@ -+/* This program is intended to be started outside of gdb, and then -+ attached to by gdb. Thus, it simply spins in a loop. The loop -+ is exited when & if the variable 'should_exit' is non-zero. (It -+ is initialized to zero in this program, so the loop will never -+ exit unless/until gdb sets the variable to non-zero.) -+ */ -+#include -+#include -+#include -+ -+int should_exit = 0; -+ -+int main () -+{ -+ int local_i = 0; -+ -+ sleep( 10 ); /* System call causes register fetch to fail */ -+ /* This is a known HPUX "feature" */ -+ while (! should_exit) -+ { -+ local_i++; -+ } -+ return (0); -+} diff --git a/gdb.spec b/gdb.spec index 418628a..e9c9f86 100644 --- a/gdb.spec +++ b/gdb.spec @@ -37,7 +37,7 @@ Version: 11.1 # The release always contains a leading reserved number, start it at 1. # `upstream' is not a part of `name' to stay fully rpm dependencies compatible for the testing. -Release: 8%{?dist} +Release: 9%{?dist} License: GPLv3+ and GPLv3+ with exceptions and GPLv2+ and GPLv2+ with exceptions and GPL+ and LGPLv2+ and LGPLv3+ and BSD and Public Domain and GFDL # Do not provide URL for snapshots as the file lasts there only for 2 days. @@ -1144,6 +1144,10 @@ fi %endif %changelog +* Wed Jan 12 2022 Alexandra Hájková - 11.1-9 +- Remove gdb-6.3-inferior-notification-20050721.patch + which adds problematic attach-32 test. + * Tue Jan 11 2022 Alexandra Hájková - 11.1-8 - Backport upstream patch "[PR gdb/27026] CTRL-C is ignored when debug info is downloaded" (RHBZ 2024875, Aaron Merey).