From 29841d1068b452ab68e0630788aed3a31afa3a85 Mon Sep 17 00:00:00 2001 From: Sergio Durigan Junior Date: Tue, 5 Mar 2019 11:27:44 -0500 Subject: [PATCH 1/5] Rebase to FSF GDB 8.3.50.20190304 (8.4pre). Rewrite gdb-6.6-buildid-locate.patch. Remove gdb-python-gil.patch. --- .gitignore | 2 +- _gdb.spec.Patch.include | 212 ++++++------ _gdb.spec.patch.include | 2 - _git_upstream_commit | 2 +- _patch_order | 2 - gdb-6.3-readnever-20050907.patch | 35 -- gdb-6.6-buildid-locate-core-as-arg.patch | 6 +- ...warning-missing-debuginfo-rhbz981154.patch | 11 - ...buildid-locate-rpm-librpm-workaround.patch | 2 +- gdb-6.6-buildid-locate-rpm-scl.patch | 8 +- gdb-6.6-buildid-locate-rpm.patch | 8 +- gdb-6.6-buildid-locate.patch | 327 ++++++++++-------- gdb-archer.patch | 26 +- gdb-attach-fail-reasons-5of5.patch | 8 +- gdb-bz1219747-attach-kills.patch | 2 +- gdb-linux_perf-bundle.patch | 4 +- gdb-python-gil.patch | 243 ------------- gdb-rhbz795424-bitpos-20of25.patch | 16 +- gdb-rhbz795424-bitpos-21of25.patch | 2 +- gdb-rhbz795424-bitpos-22of25.patch | 6 +- gdb-rhbz795424-bitpos-23of25.patch | 22 +- gdb-vla-intel-fortran-strides.patch | 8 +- gdb-vla-intel-fortran-vla-strings.patch | 26 +- gdb.spec | 14 +- sources | 2 +- 25 files changed, 364 insertions(+), 632 deletions(-) delete mode 100644 gdb-6.3-readnever-20050907.patch delete mode 100644 gdb-python-gil.patch diff --git a/.gitignore b/.gitignore index a7163be..b365cea 100644 --- a/.gitignore +++ b/.gitignore @@ -1,3 +1,3 @@ /gdb-libstdc++-v3-python-8.1.1-20180626.tar.xz /v2.0.tar.gz -/gdb-8.2.50.20190219.tar.xz +/gdb-8.3.50.20190304.tar.xz diff --git a/_gdb.spec.Patch.include b/_gdb.spec.Patch.include index 74e8a67..02596be 100644 --- a/_gdb.spec.Patch.include +++ b/_gdb.spec.Patch.include @@ -45,432 +45,424 @@ Patch011: gdb-6.3-inferior-notification-20050721.patch #=fedoratest Patch012: gdb-6.3-inheritancetest-20050726.patch -# Add readnever option -#=push -Patch013: gdb-6.3-readnever-20050907.patch - # Support TLS symbols (+`errno' suggestion if no pthread is found) (BZ 185337). #=push+jan: It should be replaced by Infinity project. -Patch014: gdb-6.5-bz185337-resolve-tls-without-debuginfo-v2.patch +Patch013: 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. -Patch015: gdb-6.5-sharedlibrary-path.patch +Patch014: 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. -Patch016: gdb-6.5-BEA-testsuite.patch +Patch015: gdb-6.5-BEA-testsuite.patch # Testcase for deadlocking on last address space byte; for corrupted backtraces. #=fedoratest -Patch017: gdb-6.5-last-address-space-byte-test.patch +Patch016: gdb-6.5-last-address-space-byte-test.patch # Fix readline segfault on excessively long hand-typed lines. #=fedoratest -Patch018: gdb-6.5-readline-long-line-crash-test.patch +Patch017: gdb-6.5-readline-long-line-crash-test.patch # Fix bogus 0x0 unwind of the thread's topmost function clone(3) (BZ 216711). #=fedora -Patch019: gdb-6.5-bz216711-clone-is-outermost.patch +Patch018: gdb-6.5-bz216711-clone-is-outermost.patch # Test sideeffects of skipping ppc .so libs trampolines (BZ 218379). #=fedoratest -Patch020: gdb-6.5-bz218379-ppc-solib-trampoline-test.patch +Patch019: gdb-6.5-bz218379-ppc-solib-trampoline-test.patch # Fix lockup on trampoline vs. its function lookup; unreproducible (BZ 218379). #=fedora -Patch021: gdb-6.5-bz218379-solib-trampoline-lookup-lock-fix.patch +Patch020: gdb-6.5-bz218379-solib-trampoline-lookup-lock-fix.patch # Find symbols properly at their original (included) file (BZ 109921). #=fedoratest -Patch022: gdb-6.5-bz109921-DW_AT_decl_file-test.patch +Patch021: gdb-6.5-bz109921-DW_AT_decl_file-test.patch # Update PPC unwinding patches to their upstream variants (BZ 140532). #=fedoratest -Patch023: gdb-6.3-bz140532-ppc-unwinding-test.patch +Patch022: gdb-6.3-bz140532-ppc-unwinding-test.patch # Testcase for exec() from threaded program (BZ 202689). #=fedoratest -Patch024: gdb-6.3-bz202689-exec-from-pthread-test.patch +Patch023: gdb-6.3-bz202689-exec-from-pthread-test.patch # Testcase for PPC Power6/DFP instructions disassembly (BZ 230000). #=fedoratest -Patch025: gdb-6.6-bz230000-power6-disassembly-test.patch +Patch024: gdb-6.6-bz230000-power6-disassembly-test.patch # Allow running `/usr/bin/gcore' with provided but inaccessible tty (BZ 229517). #=fedoratest -Patch026: gdb-6.6-bz229517-gcore-without-terminal.patch +Patch025: gdb-6.6-bz229517-gcore-without-terminal.patch # Avoid too long timeouts on failing cases of "annota1.exp annota3.exp". #=fedoratest -Patch027: gdb-6.6-testsuite-timeouts.patch +Patch026: gdb-6.6-testsuite-timeouts.patch # Support for stepping over PPC atomic instruction sequences (BZ 237572). #=fedoratest -Patch028: gdb-6.6-bz237572-ppc-atomic-sequence-test.patch +Patch027: gdb-6.6-bz237572-ppc-atomic-sequence-test.patch # Make upstream `set scheduler-locking step' as default. #=push+jan: How much is scheduler-locking relevant after non-stop? -Patch029: gdb-6.6-scheduler_locking-step-is-default.patch +Patch028: gdb-6.6-scheduler_locking-step-is-default.patch # Test kernel VDSO decoding while attaching to an i386 process. #=fedoratest -Patch030: gdb-6.3-attach-see-vdso-test.patch +Patch029: gdb-6.3-attach-see-vdso-test.patch # Test leftover zombie process (BZ 243845). #=fedoratest -Patch031: gdb-6.5-bz243845-stale-testing-zombie-test.patch +Patch030: gdb-6.5-bz243845-stale-testing-zombie-test.patch # New locating of the matching binaries from the pure core file (build-id). #=push+jan -Patch032: gdb-6.6-buildid-locate.patch +Patch031: 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 -Patch033: gdb-6.6-buildid-locate-solib-missing-ids.patch +Patch032: gdb-6.6-buildid-locate-solib-missing-ids.patch #=push+jan -Patch034: gdb-6.6-buildid-locate-rpm.patch +Patch033: 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. -Patch035: gdb-6.7-charsign-test.patch +Patch034: gdb-6.7-charsign-test.patch # Test PPC hiding of call-volatile parameter register. #=fedoratest -Patch036: gdb-6.7-ppc-clobbered-registers-O2-test.patch +Patch035: gdb-6.7-ppc-clobbered-registers-O2-test.patch # Testsuite fixes for more stable/comparable results. #=fedoratest -Patch037: gdb-6.7-testsuite-stable-results.patch +Patch036: gdb-6.7-testsuite-stable-results.patch # Test ia64 memory leaks of the code using libunwind. #=fedoratest -Patch038: gdb-6.5-ia64-libunwind-leak-test.patch +Patch037: gdb-6.5-ia64-libunwind-leak-test.patch # Test hiding unexpected breakpoints on intentional step commands. #=fedoratest -Patch039: gdb-6.5-missed-trap-on-step-test.patch +Patch038: gdb-6.5-missed-trap-on-step-test.patch # Test gcore memory and time requirements for large inferiors. #=fedoratest -Patch040: gdb-6.5-gcore-buffer-limit-test.patch +Patch039: 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. -Patch041: gdb-6.3-mapping-zero-inode-test.patch +Patch040: gdb-6.3-mapping-zero-inode-test.patch # Test a crash on `focus cmd', `focus prev' commands. #=fedoratest -Patch042: gdb-6.3-focus-cmd-prev-test.patch +Patch041: gdb-6.3-focus-cmd-prev-test.patch # Test various forms of threads tracking across exec() (BZ 442765). #=fedoratest -Patch043: gdb-6.8-bz442765-threaded-exec-test.patch +Patch042: gdb-6.8-bz442765-threaded-exec-test.patch # Test a crash on libraries missing the .text section. #=fedoratest -Patch044: gdb-6.5-section-num-fixup-test.patch +Patch043: gdb-6.5-section-num-fixup-test.patch # Fix register assignments with no GDB stack frames (BZ 436037). #=push+jan: This fix is incorrect. -Patch045: gdb-6.8-bz436037-reg-no-longer-active.patch +Patch044: gdb-6.8-bz436037-reg-no-longer-active.patch # Fix resolving of variables at locations lists in prelinked libs (BZ 466901). #=fedoratest -Patch046: gdb-6.8-bz466901-backtrace-full-prelinked.patch +Patch045: gdb-6.8-bz466901-backtrace-full-prelinked.patch # New test for step-resume breakpoint placed in multiple threads at once. #=fedoratest -Patch047: gdb-simultaneous-step-resume-breakpoint-test.patch +Patch046: 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@.*> -Patch048: gdb-core-open-vdso-warning.patch +Patch047: gdb-core-open-vdso-warning.patch # Fix syscall restarts for amd64->i386 biarch. #=push+jan -Patch049: gdb-x86_64-i386-syscall-restart.patch +Patch048: gdb-x86_64-i386-syscall-restart.patch # Fix stepping with OMP parallel Fortran sections (BZ 533176). #=push+jan: It requires some better DWARF annotations. -Patch050: gdb-bz533176-fortran-omp-step.patch +Patch049: gdb-bz533176-fortran-omp-step.patch # Fix regression by python on ia64 due to stale current frame. #=push+jan -Patch051: gdb-follow-child-stale-parent.patch +Patch050: gdb-follow-child-stale-parent.patch # Workaround ccache making lineno non-zero for command-line definitions. #=fedoratest: ccache is rarely used and it is even fixed now. -Patch052: gdb-ccache-workaround.patch +Patch051: gdb-ccache-workaround.patch #=push+jan: May get obsoleted by Tom's unrelocated objfiles patch. -Patch053: gdb-archer-pie-addons.patch +Patch052: gdb-archer-pie-addons.patch #=push+jan: Breakpoints disabling matching should not be based on address. -Patch054: gdb-archer-pie-addons-keep-disabled.patch +Patch053: gdb-archer-pie-addons-keep-disabled.patch # Testcase for "Do not make up line information" fix by Daniel Jacobowitz. #=fedoratest -Patch055: gdb-lineno-makeup-test.patch +Patch054: gdb-lineno-makeup-test.patch # Test power7 ppc disassembly. #=fedoratest -Patch056: gdb-ppc-power7-test.patch +Patch055: gdb-ppc-power7-test.patch # Fix i386+x86_64 rwatch+awatch before run, regression against 6.8 (BZ 541866). # Fix i386 rwatch+awatch before run (BZ 688788, on top of BZ 541866). #=push+jan: It should be fixed properly instead. -Patch057: gdb-bz541866-rwatch-before-run.patch +Patch056: gdb-bz541866-rwatch-before-run.patch # Workaround non-stop moribund locations exploited by kernel utrace (BZ 590623). #=push+jan: Currently it is still not fully safe. -Patch058: gdb-moribund-utrace-workaround.patch +Patch057: gdb-moribund-utrace-workaround.patch # Fix follow-exec for C++ programs (bugreported by Martin Stransky). #=fedoratest -Patch059: gdb-archer-next-over-throw-cxx-exec.patch +Patch058: gdb-archer-next-over-throw-cxx-exec.patch # Backport DWARF-4 support (BZ 601887, Tom Tromey). #=fedoratest -Patch060: gdb-bz601887-dwarf4-rh-test.patch +Patch059: gdb-bz601887-dwarf4-rh-test.patch #=push+jan -Patch061: gdb-6.6-buildid-locate-core-as-arg.patch +Patch060: gdb-6.6-buildid-locate-core-as-arg.patch # Workaround librpm BZ 643031 due to its unexpected exit() calls (BZ 642879). #=push+jan -Patch062: gdb-6.6-buildid-locate-rpm-librpm-workaround.patch +Patch061: gdb-6.6-buildid-locate-rpm-librpm-workaround.patch # [delayed-symfile] Test a backtrace regression on CFIs without DIE (BZ 614604). #=fedoratest -Patch063: gdb-test-bt-cfi-without-die.patch +Patch062: gdb-test-bt-cfi-without-die.patch # Out of memory is just an error, not fatal (uninitialized VLS vars, BZ 568248). #=push+jan: Inferior objects should be read in parts, then this patch gets obsoleted. -Patch064: gdb-bz568248-oom-is-error.patch +Patch063: gdb-bz568248-oom-is-error.patch # Verify GDB Python built-in function gdb.solib_address exists (BZ # 634108). #=fedoratest -Patch065: gdb-bz634108-solib_address.patch +Patch064: gdb-bz634108-solib_address.patch # New test gdb.arch/x86_64-pid0-core.exp for kernel PID 0 cores (BZ 611435). #=fedoratest -Patch066: gdb-test-pid0-core.patch +Patch065: gdb-test-pid0-core.patch # [archer-tromey-delayed-symfile] New test gdb.dwarf2/dw2-aranges.exp. #=fedoratest -Patch067: gdb-test-dw2-aranges.patch +Patch066: gdb-test-dw2-aranges.patch # [archer-keiths-expr-cumulative+upstream] Import C++ testcases. #=fedoratest -Patch068: gdb-test-expr-cumulative-archer.patch +Patch067: gdb-test-expr-cumulative-archer.patch # Fix regressions on C++ names resolving (PR 11734, PR 12273, Keith Seitz). #=fedoratest -Patch069: gdb-physname-pr11734-test.patch +Patch068: gdb-physname-pr11734-test.patch # Fix regressions on C++ names resolving (PR 11734, PR 12273, Keith Seitz). #=fedoratest -Patch070: gdb-physname-pr12273-test.patch +Patch069: gdb-physname-pr12273-test.patch # Test GDB opcodes/ disassembly of Intel Ivy Bridge instructions (BZ 696890). #=fedoratest -Patch071: gdb-test-ivy-bridge.patch +Patch070: gdb-test-ivy-bridge.patch # Hack for proper PIE run of the testsuite. #=fedoratest -Patch072: gdb-runtest-pie-override.patch +Patch071: gdb-runtest-pie-override.patch # Print reasons for failed attach/spawn incl. SELinux deny_ptrace (BZ 786878). #=push+jan -Patch073: gdb-attach-fail-reasons-5of5.patch +Patch072: gdb-attach-fail-reasons-5of5.patch # Workaround PR libc/14166 for inferior calls of strstr. #=fedoratest: Compatibility with RHELs (unchecked which ones). -Patch074: gdb-glibc-strstr-workaround.patch +Patch073: gdb-glibc-strstr-workaround.patch # Include testcase for `Unable to see a variable inside a module (XLF)' (BZ 823789). #=fedoratest -Patch075: gdb-rhel5.9-testcase-xlf-var-inside-mod.patch +Patch074: gdb-rhel5.9-testcase-xlf-var-inside-mod.patch # Testcase for `Setting solib-absolute-prefix breaks vDSO' (BZ 818343). #=fedoratest -Patch076: gdb-rhbz-818343-set-solib-absolute-prefix-testcase.patch +Patch075: gdb-rhbz-818343-set-solib-absolute-prefix-testcase.patch # Fix `GDB cannot access struct member whose offset is larger than 256MB' # (RH BZ 795424). #=push -Patch077: gdb-rhbz795424-bitpos-20of25.patch +Patch076: gdb-rhbz795424-bitpos-20of25.patch # Fix `GDB cannot access struct member whose offset is larger than 256MB' # (RH BZ 795424). #=push -Patch078: gdb-rhbz795424-bitpos-21of25.patch +Patch077: gdb-rhbz795424-bitpos-21of25.patch # Fix `GDB cannot access struct member whose offset is larger than 256MB' # (RH BZ 795424). #=push -Patch079: gdb-rhbz795424-bitpos-22of25.patch +Patch078: gdb-rhbz795424-bitpos-22of25.patch # Fix `GDB cannot access struct member whose offset is larger than 256MB' # (RH BZ 795424). #=push -Patch080: gdb-rhbz795424-bitpos-23of25.patch +Patch079: gdb-rhbz795424-bitpos-23of25.patch # Fix `GDB cannot access struct member whose offset is larger than 256MB' # (RH BZ 795424). #=push -Patch081: gdb-rhbz795424-bitpos-25of25.patch +Patch080: gdb-rhbz795424-bitpos-25of25.patch # Fix `GDB cannot access struct member whose offset is larger than 256MB' # (RH BZ 795424). #=push -Patch082: gdb-rhbz795424-bitpos-25of25-test.patch +Patch081: gdb-rhbz795424-bitpos-25of25-test.patch # Fix `GDB cannot access struct member whose offset is larger than 256MB' # (RH BZ 795424). #=push -Patch083: gdb-rhbz795424-bitpos-lazyvalue.patch +Patch082: gdb-rhbz795424-bitpos-lazyvalue.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 -Patch084: gdb-rhbz947564-findvar-assertion-frame-failed-testcase.patch +Patch083: gdb-rhbz947564-findvar-assertion-frame-failed-testcase.patch # Fix crash of -readnow /usr/lib/debug/usr/bin/gnatbind.debug (BZ 1069211). #=push+jan -Patch085: gdb-gnat-dwarf-crash-3of3.patch +Patch084: gdb-gnat-dwarf-crash-3of3.patch # Fix 'memory leak in infpy_read_memory()' (RH BZ 1007614) #=fedoratest -Patch086: gdb-rhbz1007614-memleak-infpy_read_memory-test.patch +Patch085: 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 -Patch087: gdb-6.6-buildid-locate-misleading-warning-missing-debuginfo-rhbz981154.patch +Patch086: gdb-6.6-buildid-locate-misleading-warning-missing-debuginfo-rhbz981154.patch #=fedoratest -Patch088: gdb-archer-vla-tests.patch +Patch087: gdb-archer-vla-tests.patch #=fedoratest -Patch089: gdb-vla-intel-tests.patch +Patch088: gdb-vla-intel-tests.patch # Continue backtrace even if a frame filter throws an exception (Phil Muldoon). #=push -Patch090: gdb-btrobust.patch +Patch089: gdb-btrobust.patch # Display Fortran strings in backtraces. #=fedoratest -Patch091: gdb-fortran-frame-string.patch - -# Fix Python GIL with gdb.execute("continue") (Phil Muldoon, BZ 1116957). -#=push -Patch092: gdb-python-gil.patch +Patch090: gdb-fortran-frame-string.patch # Testcase for '[SAP] Recursive dlopen causes SAP HANA installer to # crash.' (RH BZ 1156192). #=fedoratest -Patch093: gdb-rhbz1156192-recursive-dlopen-test.patch +Patch091: gdb-rhbz1156192-recursive-dlopen-test.patch # Fix jit-reader.h for multi-lib. #=push+jan -Patch094: gdb-jit-reader-multilib.patch +Patch092: gdb-jit-reader-multilib.patch # Fix '`catch syscall' doesn't work for parent after `fork' is called' # (Philippe Waroquiers, RH BZ 1149205). #=fedoratest -Patch095: gdb-rhbz1149205-catch-syscall-after-fork-test.patch +Patch093: 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 -Patch096: gdb-rhbz1186476-internal-error-unqualified-name-re-set-test.patch +Patch094: gdb-rhbz1186476-internal-error-unqualified-name-re-set-test.patch # Test 'info type-printers' Python error (RH BZ 1350436). #=fedoratest -Patch097: gdb-rhbz1350436-type-printers-error.patch +Patch095: gdb-rhbz1350436-type-printers-error.patch # Fix '[ppc64] and [s390x] wrong prologue skip on -O2 -g code' (Jan # Kratochvil, RH BZ 1084404). #=fedoratest -Patch098: gdb-rhbz1084404-ppc64-s390x-wrong-prologue-skip-O2-g-3of3.patch +Patch096: gdb-rhbz1084404-ppc64-s390x-wrong-prologue-skip-O2-g-3of3.patch # Never kill PID on: gdb exec PID (Jan Kratochvil, RH BZ 1219747). #=push+jan -Patch099: gdb-bz1219747-attach-kills.patch +Patch097: gdb-bz1219747-attach-kills.patch # Force libncursesw over libncurses to match the includes (RH BZ 1270534). #=push+jan -Patch100: gdb-fedora-libncursesw.patch +Patch098: gdb-fedora-libncursesw.patch # Test clflushopt instruction decode (for RH BZ 1262471). #=fedoratest -Patch101: gdb-opcodes-clflushopt-test.patch +Patch099: gdb-opcodes-clflushopt-test.patch # [rhel6] DTS backward Python compatibility API (BZ 1020004, Phil Muldoon). #=fedora -Patch102: gdb-dts-rhel6-python-compat.patch +Patch100: gdb-dts-rhel6-python-compat.patch # [SCL] Skip deprecated .gdb_index warning for Red Hat built files (BZ 953585). #=push+jan -Patch103: gdb-6.6-buildid-locate-rpm-scl.patch +Patch101: gdb-6.6-buildid-locate-rpm-scl.patch # Work around readline-6.2 incompatibility not asking for --more-- (BZ 701131). #=fedora -Patch104: gdb-readline62-ask-more-rh.patch +Patch102: gdb-readline62-ask-more-rh.patch # Make the GDB quit processing non-abortable to cleanup everything properly. #=fedora: It was useful only after gdb-6.8-attach-signalled-detach-stopped.patch . -Patch105: gdb-6.8-quit-never-aborts.patch +Patch103: gdb-6.8-quit-never-aborts.patch # [aarch64] Fix hardware watchpoints (RH BZ 1261564). #=fedoratest -Patch106: gdb-rhbz1261564-aarch64-hw-watchpoint-test.patch +Patch104: gdb-rhbz1261564-aarch64-hw-watchpoint-test.patch # Add messages suggesting more recent RHEL gdbserver (RH BZ 1321114). #=fedora -Patch107: gdb-container-rh-pkg.patch +Patch105: gdb-container-rh-pkg.patch # New test for Python "Cannot locate object file for block" (for RH BZ 1325795). #=fedoratest -Patch108: gdb-rhbz1325795-framefilters-test.patch +Patch106: gdb-rhbz1325795-framefilters-test.patch # [dts+el7] [x86*] Bundle linux_perf.h for libipt (RH BZ 1256513). #=fedora -Patch109: gdb-linux_perf-bundle.patch +Patch107: gdb-linux_perf-bundle.patch # Fix gdb-headless /usr/bin/ executables (BZ 1390251). #=fedora -Patch110: gdb-libexec-add-index.patch +Patch108: gdb-libexec-add-index.patch # New testcase for: Fix -completion crash (Gary Benson, RH BZ 1398387). #=fedoratest -Patch111: gdb-rhbz1398387-tab-crash-test.patch +Patch109: gdb-rhbz1398387-tab-crash-test.patch # [testsuite] Fix false selftest.exp FAIL from system readline-6.3+ (Patrick Palka). #=fedoratest -Patch112: gdb-testsuite-readline63-sigint.patch +Patch110: gdb-testsuite-readline63-sigint.patch # Python patches of: http://sourceware.org/gdb/wiki/ProjectArcher #=push -Patch113: gdb-archer.patch +Patch111: gdb-archer.patch # Revert upstream commit 469412dd9ccc4de5874fd3299b105833f36b34cd -Patch114: gdb-vla-intel-fix-print-char-array.patch +Patch112: gdb-vla-intel-fix-print-char-array.patch # [s390x] Backport arch12 instructions decoding (RH BZ 1553104). # =fedoratest -Patch115: gdb-rhbz1553104-s390x-arch12-test.patch +Patch113: gdb-rhbz1553104-s390x-arch12-test.patch # This patch is needed to compile GDB after -Werror=narrowing has # been enabled by default. # Author: Sergio Durigan Junior. -Patch116: gdb-rhbz795424-bitpos-arrayview.patch +Patch114: gdb-rhbz795424-bitpos-arrayview.patch diff --git a/_gdb.spec.patch.include b/_gdb.spec.patch.include index f0da001..afc8a74 100644 --- a/_gdb.spec.patch.include +++ b/_gdb.spec.patch.include @@ -112,5 +112,3 @@ %patch112 -p1 %patch113 -p1 %patch114 -p1 -%patch115 -p1 -%patch116 -p1 diff --git a/_git_upstream_commit b/_git_upstream_commit index 88ccee7..919fbcf 100644 --- a/_git_upstream_commit +++ b/_git_upstream_commit @@ -1 +1 @@ -c72e75a64030b0f6535a80481f37968ad55c333a +67490c6bad8c8d3fcbcbd5a3012ab5d189fd3981 diff --git a/_patch_order b/_patch_order index b59f1cf..89f69fe 100644 --- a/_patch_order +++ b/_patch_order @@ -10,7 +10,6 @@ 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.3-readnever-20050907.patch gdb-6.5-bz185337-resolve-tls-without-debuginfo-v2.patch gdb-6.5-sharedlibrary-path.patch gdb-6.5-BEA-testsuite.patch @@ -89,7 +88,6 @@ gdb-archer-vla-tests.patch gdb-vla-intel-tests.patch gdb-btrobust.patch gdb-fortran-frame-string.patch -gdb-python-gil.patch gdb-rhbz1156192-recursive-dlopen-test.patch gdb-jit-reader-multilib.patch gdb-rhbz1149205-catch-syscall-after-fork-test.patch diff --git a/gdb-6.3-readnever-20050907.patch b/gdb-6.3-readnever-20050907.patch deleted file mode 100644 index 8a51aef..0000000 --- a/gdb-6.3-readnever-20050907.patch +++ /dev/null @@ -1,35 +0,0 @@ -From FEDORA_PATCHES Mon Sep 17 00:00:00 2001 -From: Andrew Cagney -Date: Fri, 27 Oct 2017 21:07:50 +0200 -Subject: gdb-6.3-readnever-20050907.patch - -;; Add readnever option -;;=push - -2004-11-18 Andrew Cagney - - * dwarf2read.c: Include "top.c". - (dwarf2_has_info): Check for readnever_symbol_files. - * symfile.c (readnever_symbol_files): Define. - * top.h (readnever_symbol_files): Declare. - * main.c (captured_main): Add --readnever option. - (print_gdb_help): Ditto. - -2004-11-18 Andrew Cagney - - * gdb.texinfo (File Options): Document --readnever. - -Pushed upstream: https://sourceware.org/ml/gdb-cvs/2017-12/msg00007.html - -diff --git a/gdb/gcore.in b/gdb/gcore.in ---- a/gdb/gcore.in -+++ b/gdb/gcore.in -@@ -97,7 +97,7 @@ for pid in "$@" - do - # `: NULL after it is free'd, otherwise the code below thinks that it is still valid and doesn't print the necessary warning ("Try: yum install ..."). -diff --git a/gdb/build-id.c b/gdb/build-id.c ---- a/gdb/build-id.c -+++ b/gdb/build-id.c -@@ -590,6 +590,7 @@ build_id_to_debug_bfd (size_t build_id_len, const bfd_byte *build_id, - if (separate_debug_file_debug) - printf_unfiltered (_(" no, unable to open.\n")); - -+ filename.reset (nullptr); - continue; - } - diff --git a/gdb/testsuite/gdb.base/rhbz981154-misleading-yum-install-warning.exp b/gdb/testsuite/gdb.base/rhbz981154-misleading-yum-install-warning.exp new file mode 100644 --- /dev/null diff --git a/gdb-6.6-buildid-locate-rpm-librpm-workaround.patch b/gdb-6.6-buildid-locate-rpm-librpm-workaround.patch index 5442f1a..f8dcbeb 100644 --- a/gdb-6.6-buildid-locate-rpm-librpm-workaround.patch +++ b/gdb-6.6-buildid-locate-rpm-librpm-workaround.patch @@ -9,7 +9,7 @@ Subject: gdb-6.6-buildid-locate-rpm-librpm-workaround.patch diff --git a/gdb/build-id.c b/gdb/build-id.c --- a/gdb/build-id.c +++ b/gdb/build-id.c -@@ -672,6 +672,19 @@ build_id_to_filename (const struct bfd_build_id *build_id, char **link_return) +@@ -712,6 +712,19 @@ build_id_to_filename (const struct bfd_build_id *build_id, char **link_return) #include #endif diff --git a/gdb-6.6-buildid-locate-rpm-scl.patch b/gdb-6.6-buildid-locate-rpm-scl.patch index 4748bcb..5b3d4ad 100644 --- a/gdb-6.6-buildid-locate-rpm-scl.patch +++ b/gdb-6.6-buildid-locate-rpm-scl.patch @@ -12,7 +12,7 @@ https://bugzilla.redhat.com/show_bug.cgi?id=953585 diff --git a/gdb/build-id.c b/gdb/build-id.c --- a/gdb/build-id.c +++ b/gdb/build-id.c -@@ -707,7 +707,11 @@ static int missing_rpm_list_entries; +@@ -746,7 +746,11 @@ static int missing_rpm_list_entries; /* Returns the count of newly added rpms. */ static int @@ -24,7 +24,7 @@ diff --git a/gdb/build-id.c b/gdb/build-id.c { static int rpm_init_done = 0; rpmts ts; -@@ -814,7 +818,11 @@ missing_rpm_enlist (const char *filename) +@@ -853,7 +857,11 @@ missing_rpm_enlist (const char *filename) mi = rpmtsInitIterator_p (ts, RPMTAG_BASENAMES, filename, 0); if (mi != NULL) { @@ -36,7 +36,7 @@ diff --git a/gdb/build-id.c b/gdb/build-id.c { Header h; char *debuginfo, **slot, *s, *s2; -@@ -932,6 +940,37 @@ missing_rpm_enlist (const char *filename) +@@ -971,6 +979,37 @@ missing_rpm_enlist (const char *filename) xfree (debuginfo); count++; } @@ -74,7 +74,7 @@ diff --git a/gdb/build-id.c b/gdb/build-id.c rpmdbFreeIterator_p (mi); } -@@ -942,6 +981,21 @@ missing_rpm_enlist (const char *filename) +@@ -981,6 +1020,21 @@ missing_rpm_enlist (const char *filename) } static int diff --git a/gdb-6.6-buildid-locate-rpm.patch b/gdb-6.6-buildid-locate-rpm.patch index 36527b9..3f7c651 100644 --- a/gdb-6.6-buildid-locate-rpm.patch +++ b/gdb-6.6-buildid-locate-rpm.patch @@ -244,7 +244,7 @@ diff --git a/gdb/build-id.c b/gdb/build-id.c #define BUILD_ID_VERBOSE_NONE 0 #define BUILD_ID_VERBOSE_FILENAMES 1 -@@ -660,8 +662,366 @@ build_id_to_filename (const struct bfd_build_id *build_id, char **link_return) +@@ -700,8 +702,366 @@ build_id_to_filename (const struct bfd_build_id *build_id, char **link_return) return result; } @@ -612,7 +612,7 @@ diff --git a/gdb/build-id.c b/gdb/build-id.c avoidance. */ struct missing_filepair -@@ -715,11 +1075,17 @@ missing_filepair_change (void) +@@ -755,11 +1115,17 @@ missing_filepair_change (void) /* All their memory came just from missing_filepair_OBSTACK. */ missing_filepair_hash = NULL; } @@ -630,7 +630,7 @@ diff --git a/gdb/build-id.c b/gdb/build-id.c missing_filepair_change (); } -@@ -786,14 +1152,39 @@ debug_print_missing (const char *binary, const char *debug) +@@ -826,14 +1192,39 @@ debug_print_missing (const char *binary, const char *debug) *slot = missing_filepair; @@ -690,7 +690,7 @@ diff --git a/gdb/config.in b/gdb/config.in /* Define to 1 if translation of program messages to the user's native language is requested. */ #undef ENABLE_NLS -@@ -261,6 +264,9 @@ +@@ -255,6 +258,9 @@ /* Define if Python 2.7 is being used. */ #undef HAVE_LIBPYTHON2_7 diff --git a/gdb-6.6-buildid-locate.patch b/gdb-6.6-buildid-locate.patch index 4c9a1e6..c588eb1 100644 --- a/gdb-6.6-buildid-locate.patch +++ b/gdb-6.6-buildid-locate.patch @@ -436,7 +436,7 @@ diff --git a/gdb/build-id.c b/gdb/build-id.c if (found == NULL) warning (_("File \"%s\" has no build-id, file skipped"), -@@ -65,11 +463,47 @@ build_id_verify (bfd *abfd, size_t check_len, const bfd_byte *check) +@@ -65,62 +463,173 @@ build_id_verify (bfd *abfd, size_t check_len, const bfd_byte *check) return retval; } @@ -474,6 +474,160 @@ diff --git a/gdb/build-id.c b/gdb/build-id.c + return retval; +} + + /* Helper for build_id_to_debug_bfd. LINK is a path to a potential + build-id-based separate debug file, potentially a symlink to the real file. + If the file exists and matches BUILD_ID, return a BFD reference to it. */ + + static gdb_bfd_ref_ptr +-build_id_to_debug_bfd_1 (const std::string &link, size_t build_id_len, +- const bfd_byte *build_id) ++build_id_to_debug_bfd_1 (const std::string &orig_link, size_t build_id_len, ++ const bfd_byte *build_id, char **link_return, ++ int add_debug_suffix) + { ++ gdb_bfd_ref_ptr ret_bfd = {}; ++ std::string ret_link; ++ + if (separate_debug_file_debug) + { +- printf_unfiltered (_(" Trying %s..."), link.c_str ()); ++ printf_unfiltered (_(" Trying %s..."), orig_link.c_str ()); + gdb_flush (gdb_stdout); + } + +- /* lrealpath() is expensive even for the usually non-existent files. */ +- gdb::unique_xmalloc_ptr filename; +- if (access (link.c_str (), F_OK) == 0) +- filename.reset (lrealpath (link.c_str ())); +- +- if (filename == NULL) ++ for (unsigned seqno = 0;; seqno++) + { +- if (separate_debug_file_debug) +- printf_unfiltered (_(" no, unable to compute real path\n")); ++ std::string link = orig_link; + +- return {}; +- } ++ if (seqno > 0) ++ { ++ /* There can be multiple build-id symlinks pointing to real files ++ with the same build-id (such as hard links). Some of the real ++ files may not be installed. */ + +- /* We expect to be silent on the non-existing files. */ +- gdb_bfd_ref_ptr debug_bfd = gdb_bfd_open (filename.get (), gnutarget, -1); ++ string_appendf (link, ".%u", seqno); ++ } + +- if (debug_bfd == NULL) +- { +- if (separate_debug_file_debug) +- printf_unfiltered (_(" no, unable to open.\n")); ++ if (add_debug_suffix) ++ link += ".debug"; ++ ++ ret_link = link; ++ ++ struct stat statbuf_trash; ++ ++ /* `access' automatically dereferences LINK. */ ++ if (lstat (link.c_str (), &statbuf_trash) != 0) ++ { ++ /* Stop increasing SEQNO. */ ++ break; ++ } ++ ++ /* lrealpath() is expensive even for the usually non-existent files. */ ++ gdb::unique_xmalloc_ptr filename; ++ ++ if (access (link.c_str (), F_OK) == 0) ++ filename.reset (lrealpath (link.c_str ())); ++ ++ if (filename == NULL) ++ { ++ if (separate_debug_file_debug) ++ printf_unfiltered (_(" no, unable to compute real path\n")); ++ ++ continue; ++ } ++ ++ /* We expect to be silent on the non-existing files. */ ++ gdb_bfd_ref_ptr debug_bfd = gdb_bfd_open (filename.get (), gnutarget, -1); ++ ++ if (debug_bfd == NULL) ++ { ++ if (separate_debug_file_debug) ++ printf_unfiltered (_(" no, unable to open.\n")); ++ ++ continue; ++ } ++ ++ if (!build_id_verify (debug_bfd.get(), build_id_len, build_id)) ++ { ++ if (separate_debug_file_debug) ++ printf_unfiltered (_(" no, build-id does not match.\n")); ++ ++ continue; ++ } + +- return {}; ++ ret_bfd = debug_bfd; ++ break; + } + +- if (!build_id_verify (debug_bfd.get(), build_id_len, build_id)) ++ std::string link_all; ++ ++ if (ret_bfd != NULL) + { + if (separate_debug_file_debug) +- printf_unfiltered (_(" no, build-id does not match.\n")); ++ printf_unfiltered (_(" yes!\n")); ++ } ++ else ++ { ++ /* If none of the real files is found report as missing file ++ always the non-.%u-suffixed file. */ ++ std::string link0 = orig_link; ++ ++ if (add_debug_suffix) ++ link0 += ".debug"; ++ ++ /* If the symlink has target request to install the target. ++ BASE-debuginfo.rpm contains the symlink but BASE.rpm may be missing. ++ https://bugzilla.redhat.com/show_bug.cgi?id=981154 */ ++ std::string link0_resolved (link_resolve (link0.c_str (), 0)); + +- return {}; ++ if (link_all.empty ()) ++ link_all = link0_resolved; ++ else ++ { ++ /* Use whitespace instead of DIRNAME_SEPARATOR to be compatible with ++ its possible use as an argument for installation command. */ ++ link_all += " " + link0_resolved; ++ } + } + +- if (separate_debug_file_debug) +- printf_unfiltered (_(" yes!\n")); ++ if (link_return != NULL) ++ { ++ if (ret_bfd != NULL) ++ { ++ *link_return = xstrdup (ret_link.c_str ()); ++ } ++ else ++ { ++ *link_return = xstrdup (link_all.c_str ()); ++ } ++ } + +- return debug_bfd; ++ return ret_bfd; + } + /* See build-id.h. */ gdb_bfd_ref_ptr @@ -481,23 +635,9 @@ diff --git a/gdb/build-id.c b/gdb/build-id.c +build_id_to_debug_bfd (size_t build_id_len, const bfd_byte *build_id, + char **link_return, int add_debug_suffix) { -+ std::string link, link_all; - gdb_bfd_ref_ptr abfd; - /* Keep backward compatibility so that DEBUG_FILE_DIRECTORY being "" will -@@ -82,86 +516,319 @@ build_id_to_debug_bfd (size_t build_id_len, const bfd_byte *build_id) - { - const gdb_byte *data = build_id; - size_t size = build_id_len; -+ unsigned seqno; -+ struct stat statbuf_trash; -+ std::string link0; -+ gdb::unique_xmalloc_ptr filename; - -- std::string link = debugdir.get (); -+ link = debugdir.get (); - link += "/.build-id/"; - + cause "/.build-id/..." lookups. */ +@@ -143,16 +652,16 @@ build_id_to_debug_bfd (size_t build_id_len, const bfd_byte *build_id) if (size > 0) { size--; @@ -512,140 +652,25 @@ diff --git a/gdb/build-id.c b/gdb/build-id.c - link += ".debug"; - - if (separate_debug_file_debug) + gdb_bfd_ref_ptr debug_bfd +- = build_id_to_debug_bfd_1 (link, build_id_len, build_id); ++ = build_id_to_debug_bfd_1 (link, build_id_len, build_id, ++ link_return, add_debug_suffix); + if (debug_bfd != NULL) + return debug_bfd; + +@@ -166,7 +675,8 @@ build_id_to_debug_bfd (size_t build_id_len, const bfd_byte *build_id) + if (strcmp (gdb_sysroot, TARGET_SYSROOT_PREFIX) != 0) { - printf_unfiltered (_(" Trying %s..."), link.c_str ()); - gdb_flush (gdb_stdout); + link = gdb_sysroot + link; +- debug_bfd = build_id_to_debug_bfd_1 (link, build_id_len, build_id); ++ debug_bfd = build_id_to_debug_bfd_1 (link, build_id_len, build_id, ++ link_return, add_debug_suffix); + if (debug_bfd != NULL) + return debug_bfd; } - -- /* lrealpath() is expensive even for the usually non-existent files. */ -- gdb::unique_xmalloc_ptr filename; -- if (access (link.c_str (), F_OK) == 0) -- filename.reset (lrealpath (link.c_str ())); -- -- if (filename == NULL) -+ for (seqno = 0;; seqno++) - { -- if (separate_debug_file_debug) -- printf_unfiltered (_(" no, unable to compute real path\n")); -+ if (seqno) -+ { -+ /* There can be multiple build-id symlinks pointing to real files -+ with the same build-id (such as hard links). Some of the real -+ files may not be installed. */ -+ -+ string_appendf (link, ".%u", seqno); -+ } -+ -+ if (add_debug_suffix) -+ link += ".debug"; -+ -+ if (!seqno) -+ { -+ /* If none of the real files is found report as missing file -+ always the non-.%u-suffixed file. */ -+ link0 = link; -+ } -+ -+ /* `access' automatically dereferences LINK. */ -+ if (lstat (link.c_str (), &statbuf_trash) != 0) -+ { -+ /* Stop increasing SEQNO. */ -+ break; -+ } -+ -+ /* lrealpath() is expensive even for the usually non-existent files. */ -+ if (access (link.c_str (), F_OK) == 0) -+ filename.reset (lrealpath (link.c_str ())); -+ -+ if (filename == NULL) -+ { -+ if (separate_debug_file_debug) -+ printf_unfiltered (_(" no, unable to compute real path\n")); -+ -+ continue; -+ } -+ -+ /* We expect to be silent on the non-existing files. */ -+ abfd = gdb_bfd_open (filename.get (), gnutarget, -1); -+ -+ if (abfd == NULL) -+ { -+ if (separate_debug_file_debug) -+ printf_unfiltered (_(" no, unable to open.\n")); -+ -+ continue; -+ } -+ -+ if (build_id_verify (abfd.get(), build_id_len, build_id)) -+ { -+ if (separate_debug_file_debug) -+ printf_unfiltered (_(" yes!\n")); -+ -+ break; -+ } -+ else -+ { -+ if (separate_debug_file_debug) -+ printf_unfiltered (_(" no, build-id does not match.\n")); -+ } -+ -+ abfd.release (); -+ -+ filename.reset (nullptr); -+ } - -- continue; -+ if (filename != NULL) -+ { -+ /* LINK_ALL is not used below in this non-NULL FILENAME case. */ -+ break; - } - -- /* We expect to be silent on the non-existing files. */ -- abfd = gdb_bfd_open (filename.get (), gnutarget, -1); -+ /* If the symlink has target request to install the target. -+ BASE-debuginfo.rpm contains the symlink but BASE.rpm may be missing. -+ https://bugzilla.redhat.com/show_bug.cgi?id=981154 */ -+ std::string link0_resolved (link_resolve (link0.c_str (), 0)); - -- if (abfd == NULL) -+ if (link_all.empty ()) -+ link_all = link0_resolved; -+ else - { -- if (separate_debug_file_debug) -- printf_unfiltered (_(" no, unable to open.\n")); -- -- continue; -+ /* Use whitespace instead of DIRNAME_SEPARATOR to be compatible with -+ its possible use as an argument for installation command. */ -+ link_all += " " + link0_resolved; - } -+ } - -- if (build_id_verify (abfd.get(), build_id_len, build_id)) -+ if (link_return != NULL) -+ { -+ if (abfd != NULL) - { -- if (separate_debug_file_debug) -- printf_unfiltered (_(" yes!\n")); -- -- break; -+ *link_return = xstrdup (link.c_str ()); - } - else - { -- if (separate_debug_file_debug) -- printf_unfiltered (_(" no, build-id does not match.\n")); -+ *link_return = xstrdup (link_all.c_str ()); - } -- -- abfd.release (); - } - - return abfd; +@@ -175,22 +685,190 @@ build_id_to_debug_bfd (size_t build_id_len, const bfd_byte *build_id) + return {}; } +char * @@ -838,7 +863,7 @@ diff --git a/gdb/build-id.c b/gdb/build-id.c /* Prevent looping on a stripped .debug file. */ if (abfd != NULL && filename_cmp (bfd_get_filename (abfd.get ()), -@@ -174,3 +841,21 @@ find_separate_debug_file_by_buildid (struct objfile *objfile) +@@ -203,3 +881,21 @@ find_separate_debug_file_by_buildid (struct objfile *objfile) return std::string (); } @@ -902,7 +927,7 @@ diff --git a/gdb/build-id.h b/gdb/build-id.h diff --git a/gdb/coffread.c b/gdb/coffread.c --- a/gdb/coffread.c +++ b/gdb/coffread.c -@@ -732,7 +732,8 @@ coff_symfile_read (struct objfile *objfile, symfile_add_flags symfile_flags) +@@ -729,7 +729,8 @@ coff_symfile_read (struct objfile *objfile, symfile_add_flags symfile_flags) /* Try to add separate debug file if no symbols table found. */ if (!objfile_has_partial_symbols (objfile)) { diff --git a/gdb-archer.patch b/gdb-archer.patch index 2d107fc..5df4f56 100644 --- a/gdb-archer.patch +++ b/gdb-archer.patch @@ -112,7 +112,7 @@ diff --git a/gdb/main.c b/gdb/main.c #include "source.h" #include "cli/cli-cmds.h" #include "objfiles.h" -@@ -477,7 +478,7 @@ exec_or_core_file_attach (const char *filename, int from_tty) +@@ -478,7 +479,7 @@ exec_or_core_file_attach (const char *filename, int from_tty) } static void @@ -121,7 +121,7 @@ diff --git a/gdb/main.c b/gdb/main.c { int argc = context->argc; char **argv = context->argv; -@@ -697,10 +698,14 @@ captured_main_1 (struct captured_main_args *context) +@@ -698,10 +699,14 @@ captured_main_1 (struct captured_main_args *context) {"args", no_argument, &set_args, 1}, {"l", required_argument, 0, 'l'}, {"return-child-result", no_argument, &return_child_result, 1}, @@ -137,7 +137,7 @@ diff --git a/gdb/main.c b/gdb/main.c { int option_index; -@@ -718,6 +723,9 @@ captured_main_1 (struct captured_main_args *context) +@@ -719,6 +724,9 @@ captured_main_1 (struct captured_main_args *context) case 0: /* Long option that just sets a flag. */ break; @@ -147,7 +147,7 @@ diff --git a/gdb/main.c b/gdb/main.c case OPT_SE: symarg = optarg; execarg = optarg; -@@ -892,7 +900,31 @@ captured_main_1 (struct captured_main_args *context) +@@ -898,7 +906,31 @@ captured_main_1 (struct captured_main_args *context) /* Now that gdb_init has created the initial inferior, we're in position to set args for that inferior. */ @@ -180,7 +180,7 @@ diff --git a/gdb/main.c b/gdb/main.c { /* The remaining options are the command-line options for the inferior. The first one is the sym/exec file, and the rest -@@ -1193,7 +1225,8 @@ captured_main_1 (struct captured_main_args *context) +@@ -1199,7 +1231,8 @@ captured_main_1 (struct captured_main_args *context) /* Read in the old history after all the command files have been read. */ @@ -190,7 +190,7 @@ diff --git a/gdb/main.c b/gdb/main.c if (batch_flag) { -@@ -1209,24 +1242,37 @@ static void +@@ -1215,24 +1248,37 @@ static void captured_main (void *data) { struct captured_main_args *context = (struct captured_main_args *) data; @@ -241,7 +241,7 @@ diff --git a/gdb/main.c b/gdb/main.c } /* No exit -- exit is through quit_command. */ } -@@ -1269,6 +1315,12 @@ print_gdb_help (struct ui_file *stream) +@@ -1275,6 +1321,12 @@ print_gdb_help (struct ui_file *stream) fputs_unfiltered (_("\ This is the GNU debugger. Usage:\n\n\ gdb [options] [executable-file [core-file or process-id]]\n\ @@ -254,7 +254,7 @@ diff --git a/gdb/main.c b/gdb/main.c gdb [options] --args executable-file [inferior-arguments ...]\n\n\ "), stream); fputs_unfiltered (_("\ -@@ -1314,6 +1366,13 @@ Output and user interface control:\n\n\ +@@ -1320,6 +1372,13 @@ Output and user interface control:\n\n\ #endif fputs_unfiltered (_("\ --dbx DBX compatibility mode.\n\ @@ -365,7 +365,7 @@ new file mode 100644 diff --git a/gdb/python/python-internal.h b/gdb/python/python-internal.h --- a/gdb/python/python-internal.h +++ b/gdb/python/python-internal.h -@@ -711,6 +711,9 @@ private: +@@ -658,6 +658,9 @@ private: PyThreadState *m_save; }; @@ -417,7 +417,7 @@ diff --git a/gdb/python/python.c b/gdb/python/python.c /* Set the quit flag. */ static void -@@ -1315,6 +1340,92 @@ gdbpy_print_stack_or_quit () +@@ -1283,6 +1308,92 @@ gdbpy_print_stack_or_quit () @@ -510,7 +510,7 @@ diff --git a/gdb/python/python.c b/gdb/python/python.c /* Return a sequence holding all the Progspaces. */ static PyObject * -@@ -1969,6 +2080,8 @@ PyMethodDef python_GdbMethods[] = +@@ -1935,6 +2046,8 @@ PyMethodDef python_GdbMethods[] = Evaluate command, a string, as a gdb CLI command. Optionally returns\n\ a Python String containing the output of the command if to_string is\n\ set to True." }, @@ -564,8 +564,8 @@ diff --git a/gdb/testsuite/gdb.python/py-value.exp b/gdb/testsuite/gdb.python/py # Regression test for invalid subscript operations. The bug was that # the type of the value was not being checked before allowing a # subscript operation to proceed. -@@ -540,6 +549,7 @@ if ![runto_main] then { - test_value_in_inferior +@@ -585,6 +594,7 @@ test_value_in_inferior + test_value_from_buffer test_inferior_function_call test_value_after_death +test_cast_regression diff --git a/gdb-attach-fail-reasons-5of5.patch b/gdb-attach-fail-reasons-5of5.patch index 7848929..897a557 100644 --- a/gdb-attach-fail-reasons-5of5.patch +++ b/gdb-attach-fail-reasons-5of5.patch @@ -45,7 +45,7 @@ gdb/gdbserver/ diff --git a/gdb/config.in b/gdb/config.in --- a/gdb/config.in +++ b/gdb/config.in -@@ -267,6 +267,9 @@ +@@ -261,6 +261,9 @@ /* Define if librpm library is being used. */ #undef HAVE_LIBRPM @@ -55,7 +55,7 @@ diff --git a/gdb/config.in b/gdb/config.in /* Define to 1 if you have the header file. */ #undef HAVE_LIBUNWIND_IA64_H -@@ -390,6 +393,9 @@ +@@ -384,6 +387,9 @@ /* Define to 1 if you have the `scm_new_smob' function. */ #undef HAVE_SCM_NEW_SMOB @@ -68,7 +68,7 @@ diff --git a/gdb/config.in b/gdb/config.in diff --git a/gdb/configure b/gdb/configure --- a/gdb/configure +++ b/gdb/configure -@@ -15874,6 +15874,64 @@ cat >>confdefs.h <<_ACEOF +@@ -15790,6 +15790,64 @@ cat >>confdefs.h <<_ACEOF _ACEOF @@ -136,7 +136,7 @@ diff --git a/gdb/configure b/gdb/configure diff --git a/gdb/configure.ac b/gdb/configure.ac --- a/gdb/configure.ac +++ b/gdb/configure.ac -@@ -2032,6 +2032,10 @@ case $host_os in +@@ -2020,6 +2020,10 @@ case $host_os in esac AC_DEFINE_UNQUOTED(GDBINIT,"$gdbinit",[The .gdbinit filename.]) diff --git a/gdb-bz1219747-attach-kills.patch b/gdb-bz1219747-attach-kills.patch index 024d1f6..6127999 100644 --- a/gdb-bz1219747-attach-kills.patch +++ b/gdb-bz1219747-attach-kills.patch @@ -80,7 +80,7 @@ gdb/testsuite/ChangeLog diff --git a/gdb/main.c b/gdb/main.c --- a/gdb/main.c +++ b/gdb/main.c -@@ -1123,7 +1123,10 @@ captured_main_1 (struct captured_main_args *context) +@@ -1129,7 +1129,10 @@ captured_main_1 (struct captured_main_args *context) { ret = catch_command_errors (attach_command, pid_or_core_arg, !batch_flag); diff --git a/gdb-linux_perf-bundle.patch b/gdb-linux_perf-bundle.patch index 11504d5..8e4e1f9 100644 --- a/gdb-linux_perf-bundle.patch +++ b/gdb-linux_perf-bundle.patch @@ -9,7 +9,7 @@ Subject: gdb-linux_perf-bundle.patch diff --git a/gdb/configure b/gdb/configure --- a/gdb/configure +++ b/gdb/configure -@@ -12113,7 +12113,7 @@ else +@@ -12029,7 +12029,7 @@ else #include #ifndef PERF_ATTR_SIZE_VER5 @@ -21,7 +21,7 @@ diff --git a/gdb/configure b/gdb/configure diff --git a/gdb/configure.ac b/gdb/configure.ac --- a/gdb/configure.ac +++ b/gdb/configure.ac -@@ -1481,7 +1481,7 @@ else +@@ -1469,7 +1469,7 @@ else AC_PREPROC_IFELSE([AC_LANG_SOURCE([[ #include #ifndef PERF_ATTR_SIZE_VER5 diff --git a/gdb-python-gil.patch b/gdb-python-gil.patch deleted file mode 100644 index 5603bd2..0000000 --- a/gdb-python-gil.patch +++ /dev/null @@ -1,243 +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-python-gil.patch - -;; Fix Python GIL with gdb.execute("continue") (Phil Muldoon, BZ 1116957). -;;=push - -diff --git a/gdb/doc/python.texi b/gdb/doc/python.texi ---- a/gdb/doc/python.texi -+++ b/gdb/doc/python.texi -@@ -234,6 +234,14 @@ returned as a string. The default is @code{False}, in which case the - return value is @code{None}. If @var{to_string} is @code{True}, the - @value{GDBN} virtual terminal will be temporarily set to unlimited width - and height, and its pagination will be disabled; @pxref{Screen Size}. -+ -+The @var{release_gil} flag specifies whether @value{GDBN} ought to -+release the Python GIL before executing the command. This is useful -+in multi-threaded Python programs where by default the Python -+interpreter will acquire the GIL and lock other threads from -+executing. After the command has completed executing in @value{GDBN} -+the Python GIL is reacquired. This flag must be a boolean value. If -+omitted, it defaults to @code{False}. - @end defun - - @findex gdb.breakpoints -diff --git a/gdb/python/python-internal.h b/gdb/python/python-internal.h ---- a/gdb/python/python-internal.h -+++ b/gdb/python/python-internal.h -@@ -137,6 +137,8 @@ typedef int Py_ssize_t; - #define PyGILState_Release(ARG) ((void)(ARG)) - #define PyEval_InitThreads() - #define PyThreadState_Swap(ARG) ((void)(ARG)) -+#define PyEval_SaveThread() ((void)(ARG)) -+#define PyEval_RestoreThread(ARG) ((void)(ARG)) - #define PyEval_ReleaseLock() - #endif - -diff --git a/gdb/python/python.c b/gdb/python/python.c ---- a/gdb/python/python.c -+++ b/gdb/python/python.c -@@ -544,12 +544,16 @@ execute_gdb_command (PyObject *self, PyObject *args, PyObject *kw) - { - const char *arg; - PyObject *from_tty_obj = NULL, *to_string_obj = NULL; -- int from_tty, to_string; -- static const char *keywords[] = { "command", "from_tty", "to_string", NULL }; -+ int from_tty, to_string, release_gil; -+ static const char *keywords[] = {"command", "from_tty", "to_string", "release_gil", NULL }; -+ PyObject *release_gil_obj = NULL; -+ /* Initialize it just to avoid a GCC false warning. */ -+ PyThreadState *state = NULL; - -- if (!gdb_PyArg_ParseTupleAndKeywords (args, kw, "s|O!O!", keywords, &arg, -+ if (!gdb_PyArg_ParseTupleAndKeywords (args, kw, "s|O!O!O!", keywords, &arg, - &PyBool_Type, &from_tty_obj, -- &PyBool_Type, &to_string_obj)) -+ &PyBool_Type, &to_string_obj, -+ &PyBool_Type, &release_gil_obj)) - return NULL; - - from_tty = 0; -@@ -570,6 +574,15 @@ execute_gdb_command (PyObject *self, PyObject *args, PyObject *kw) - to_string = cmp; - } - -+ release_gil = 0; -+ if (release_gil_obj) -+ { -+ int cmp = PyObject_IsTrue (release_gil_obj); -+ if (cmp < 0) -+ return NULL; -+ release_gil = cmp; -+ } -+ - std::string to_string_res; - - scoped_restore preventer = prevent_dont_repeat (); -@@ -594,6 +607,13 @@ execute_gdb_command (PyObject *self, PyObject *args, PyObject *kw) - - counted_command_line lines = read_command_lines_1 (reader, 1, nullptr); - -+ /* In the case of long running GDB commands, allow the user to -+ release the Python GIL acquired by Python. Restore the GIL -+ after the command has completed before handing back to -+ Python. */ -+ if (release_gil) -+ state = PyEval_SaveThread(); -+ - { - scoped_restore save_async = make_scoped_restore (¤t_ui->async, - 0); -@@ -612,12 +632,24 @@ execute_gdb_command (PyObject *self, PyObject *args, PyObject *kw) - execute_control_commands (lines.get (), from_tty); - } - -+ /* Reacquire the GIL if it was released earlier. */ -+ if (release_gil) -+ PyEval_RestoreThread (state); -+ - /* Do any commands attached to breakpoint we stopped at. */ - bpstat_do_actions (); - } - CATCH (except, RETURN_MASK_ALL) - { -- GDB_PY_HANDLE_EXCEPTION (except); -+ if (except.reason < 0) -+ { -+ /* Reacquire the GIL if it was released earlier. */ -+ if (release_gil) -+ PyEval_RestoreThread (state); -+ -+ gdbpy_convert_exception (except); -+ return NULL; -+ } - } - END_CATCH - -diff --git a/gdb/testsuite/gdb.python/py-gil-mthread.c b/gdb/testsuite/gdb.python/py-gil-mthread.c -new file mode 100644 ---- /dev/null -+++ b/gdb/testsuite/gdb.python/py-gil-mthread.c -@@ -0,0 +1,13 @@ -+#include -+#include -+ -+int -+main (void) -+{ -+ int i; -+ for (i = 0; i < 10; i++) -+ { -+ sleep (1); /* break-here */ -+ printf ("Sleeping %d\n", i); -+ } -+} -diff --git a/gdb/testsuite/gdb.python/py-gil-mthread.exp b/gdb/testsuite/gdb.python/py-gil-mthread.exp -new file mode 100644 ---- /dev/null -+++ b/gdb/testsuite/gdb.python/py-gil-mthread.exp -@@ -0,0 +1,69 @@ -+# Copyright (C) 2014 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 . -+ -+standard_testfile .c .py -+set executable $testfile -+ -+if { [prepare_for_testing $testfile.exp $executable $srcfile] } { -+ return -1 -+} -+ -+# Skip all tests if Python scripting is not enabled. -+if { [skip_python_tests] } { continue } -+ -+if ![runto_main] { -+ return -1 -+} -+ -+gdb_breakpoint $srcfile:[gdb_get_line_number "break-here"] temporary -+gdb_continue_to_breakpoint "break-here" ".* break-here .*" -+ -+set test "response" -+set timeout 60 -+set sleeping_last -1 -+set hello_last 0 -+set minimal 5 -+gdb_test_multiple "python exec (open ('$srcdir/$subdir/$srcfile2').read ())" $test { -+ -re "Error: unable to start thread\r\n" { -+ fail $test -+ # Not $gdb_prompt-synced! -+ } -+ -re "Sleeping (\[0-9\]+)\r\n" { -+ set n $expect_out(1,string) -+ if { $sleeping_last + 1 != $n } { -+ fail $test -+ } else { -+ set sleeping_last $n -+ if { $sleeping_last >= $minimal && $hello_last >= $minimal } { -+ pass $test -+ } else { -+ exp_continue -+ } -+ } -+ } -+ -re "Hello \\( (\[0-9\]+) \\)\r\n" { -+ set n $expect_out(1,string) -+ if { $hello_last + 1 != $n } { -+ fail $test -+ } else { -+ set hello_last $n -+ if { $sleeping_last >= $minimal && $hello_last >= $minimal } { -+ pass $test -+ } else { -+ exp_continue -+ } -+ } -+ } -+} -diff --git a/gdb/testsuite/gdb.python/py-gil-mthread.py b/gdb/testsuite/gdb.python/py-gil-mthread.py -new file mode 100644 ---- /dev/null -+++ b/gdb/testsuite/gdb.python/py-gil-mthread.py -@@ -0,0 +1,28 @@ -+try: -+ import thread -+except: -+ import _thread -+import time -+import gdb -+ -+# Define a function for the thread -+def print_thread_hello(): -+ count = 0 -+ while count < 10: -+ time.sleep(1) -+ count += 1 -+ print ("Hello ( %d )" % count) -+ -+# Create a threads a continue -+try: -+ thread.start_new_thread (print_thread_hello, ()) -+ gdb.execute ("continue", release_gil=True) -+except: -+ try: -+ _thread.start_new_thread (print_thread_hello, ()) -+ gdb.execute ("continue", release_gil=True) -+ except: -+ print ("Error: unable to start thread") -+ -+while 1: -+ pass diff --git a/gdb-rhbz795424-bitpos-20of25.patch b/gdb-rhbz795424-bitpos-20of25.patch index 59d0421..2d64afc 100644 --- a/gdb-rhbz795424-bitpos-20of25.patch +++ b/gdb-rhbz795424-bitpos-20of25.patch @@ -1631,7 +1631,7 @@ diff --git a/gdb/dwarf2read.c b/gdb/dwarf2read.c } static void -@@ -15105,8 +15105,8 @@ dwarf2_add_field (struct field_info *fip, struct die_info *die, +@@ -15104,8 +15104,8 @@ dwarf2_add_field (struct field_info *fip, struct die_info *die, object, and then subtract off the number of bits of the field itself. The result is the bit offset of the LSB of the field. */ @@ -1893,7 +1893,7 @@ diff --git a/gdb/gdbtypes.c b/gdb/gdbtypes.c const char *name) { struct type *type; -@@ -3340,8 +3340,8 @@ is_public_ancestor (struct type *base, struct type *dclass) +@@ -3346,8 +3346,8 @@ is_public_ancestor (struct type *base, struct type *dclass) static int is_unique_ancestor_worker (struct type *base, struct type *dclass, @@ -1904,7 +1904,7 @@ diff --git a/gdb/gdbtypes.c b/gdb/gdbtypes.c CORE_ADDR address, struct value *val) { int i, count = 0; -@@ -3352,7 +3352,7 @@ is_unique_ancestor_worker (struct type *base, struct type *dclass, +@@ -3358,7 +3358,7 @@ is_unique_ancestor_worker (struct type *base, struct type *dclass, for (i = 0; i < TYPE_N_BASECLASSES (dclass) && count < 2; ++i) { struct type *iter; @@ -1913,7 +1913,7 @@ diff --git a/gdb/gdbtypes.c b/gdb/gdbtypes.c iter = check_typedef (TYPE_BASECLASS (dclass, i)); -@@ -3393,7 +3393,7 @@ is_unique_ancestor_worker (struct type *base, struct type *dclass, +@@ -3399,7 +3399,7 @@ is_unique_ancestor_worker (struct type *base, struct type *dclass, int is_unique_ancestor (struct type *base, struct value *val) { @@ -1922,7 +1922,7 @@ diff --git a/gdb/gdbtypes.c b/gdb/gdbtypes.c return is_unique_ancestor_worker (base, value_type (val), &offset, value_contents_for_printing (val), -@@ -4620,7 +4620,7 @@ recursive_dump_type (struct type *type, int spaces) +@@ -4626,7 +4626,7 @@ recursive_dump_type (struct type *type, int spaces) break; } puts_filtered ("\n"); @@ -1931,7 +1931,7 @@ diff --git a/gdb/gdbtypes.c b/gdb/gdbtypes.c if (TYPE_OBJFILE_OWNED (type)) { printfi_filtered (spaces, "objfile "); -@@ -5065,7 +5065,7 @@ copy_type (const struct type *type) +@@ -5071,7 +5071,7 @@ copy_type (const struct type *type) struct type * arch_type (struct gdbarch *gdbarch, @@ -2603,7 +2603,7 @@ diff --git a/gdb/printcmd.c b/gdb/printcmd.c diff --git a/gdb/procfs.c b/gdb/procfs.c --- a/gdb/procfs.c +++ b/gdb/procfs.c -@@ -3369,7 +3369,7 @@ procfs_target::remove_watchpoint (CORE_ADDR addr, int len, +@@ -3374,7 +3374,7 @@ procfs_target::remove_watchpoint (CORE_ADDR addr, int len, } int @@ -2927,7 +2927,7 @@ diff --git a/gdb/target.c b/gdb/target.c static void default_rcmd (struct target_ops *, const char *, struct ui_file *); -@@ -3103,7 +3103,7 @@ target_fileio_read_stralloc (struct inferior *inf, const char *filename) +@@ -3114,7 +3114,7 @@ target_fileio_read_stralloc (struct inferior *inf, const char *filename) static int default_region_ok_for_hw_watchpoint (struct target_ops *self, diff --git a/gdb-rhbz795424-bitpos-21of25.patch b/gdb-rhbz795424-bitpos-21of25.patch index 43e0955..fab38d2 100644 --- a/gdb-rhbz795424-bitpos-21of25.patch +++ b/gdb-rhbz795424-bitpos-21of25.patch @@ -111,7 +111,7 @@ diff --git a/gdb/p-valprint.c b/gdb/p-valprint.c diff --git a/gdb/utils.c b/gdb/utils.c --- a/gdb/utils.c +++ b/gdb/utils.c -@@ -2933,6 +2933,17 @@ string_to_core_addr (const char *my_string) +@@ -2952,6 +2952,17 @@ string_to_core_addr (const char *my_string) return addr; } diff --git a/gdb-rhbz795424-bitpos-22of25.patch b/gdb-rhbz795424-bitpos-22of25.patch index d4d1f03..af17971 100644 --- a/gdb-rhbz795424-bitpos-22of25.patch +++ b/gdb-rhbz795424-bitpos-22of25.patch @@ -354,7 +354,7 @@ diff --git a/gdb/ppc-linux-nat.c b/gdb/ppc-linux-nat.c diff --git a/gdb/procfs.c b/gdb/procfs.c --- a/gdb/procfs.c +++ b/gdb/procfs.c -@@ -1541,7 +1541,7 @@ procfs_address_to_host_pointer (CORE_ADDR addr) +@@ -1546,7 +1546,7 @@ procfs_address_to_host_pointer (CORE_ADDR addr) } static int @@ -363,7 +363,7 @@ diff --git a/gdb/procfs.c b/gdb/procfs.c { struct { procfs_ctl_t cmd; -@@ -3233,7 +3233,7 @@ procfs_target::pid_to_exec_file (int pid) +@@ -3238,7 +3238,7 @@ procfs_target::pid_to_exec_file (int pid) /* Insert a watchpoint. */ static int @@ -526,7 +526,7 @@ diff --git a/gdb/target.c b/gdb/target.c static int default_region_ok_for_hw_watchpoint (struct target_ops *, CORE_ADDR, LONGEST); -@@ -3111,7 +3111,7 @@ default_region_ok_for_hw_watchpoint (struct target_ops *self, +@@ -3122,7 +3122,7 @@ default_region_ok_for_hw_watchpoint (struct target_ops *self, static int default_watchpoint_addr_within_range (struct target_ops *target, CORE_ADDR addr, diff --git a/gdb-rhbz795424-bitpos-23of25.patch b/gdb-rhbz795424-bitpos-23of25.patch index 051906c..e258042 100644 --- a/gdb-rhbz795424-bitpos-23of25.patch +++ b/gdb-rhbz795424-bitpos-23of25.patch @@ -236,7 +236,7 @@ diff --git a/gdb/amd64-windows-tdep.c b/gdb/amd64-windows-tdep.c diff --git a/gdb/arm-tdep.c b/gdb/arm-tdep.c --- a/gdb/arm-tdep.c +++ b/gdb/arm-tdep.c -@@ -3472,7 +3472,7 @@ arm_vfp_cprc_reg_char (enum arm_vfp_cprc_base_type b) +@@ -3440,7 +3440,7 @@ arm_vfp_cprc_reg_char (enum arm_vfp_cprc_base_type b) array). Vector types are not currently supported, matching the generic AAPCS support. */ @@ -245,7 +245,7 @@ diff --git a/gdb/arm-tdep.c b/gdb/arm-tdep.c arm_vfp_cprc_sub_candidate (struct type *t, enum arm_vfp_cprc_base_type *base_type) { -@@ -3555,7 +3555,7 @@ arm_vfp_cprc_sub_candidate (struct type *t, +@@ -3523,7 +3523,7 @@ arm_vfp_cprc_sub_candidate (struct type *t, } else { @@ -254,7 +254,7 @@ diff --git a/gdb/arm-tdep.c b/gdb/arm-tdep.c unsigned unitlen; count = arm_vfp_cprc_sub_candidate (TYPE_TARGET_TYPE (t), -@@ -3578,12 +3578,12 @@ arm_vfp_cprc_sub_candidate (struct type *t, +@@ -3546,12 +3546,12 @@ arm_vfp_cprc_sub_candidate (struct type *t, case TYPE_CODE_STRUCT: { @@ -269,7 +269,7 @@ diff --git a/gdb/arm-tdep.c b/gdb/arm-tdep.c if (!field_is_static (&TYPE_FIELD (t, i))) sub_count = arm_vfp_cprc_sub_candidate (TYPE_FIELD_TYPE (t, i), -@@ -3607,13 +3607,15 @@ arm_vfp_cprc_sub_candidate (struct type *t, +@@ -3575,13 +3575,15 @@ arm_vfp_cprc_sub_candidate (struct type *t, case TYPE_CODE_UNION: { @@ -288,7 +288,7 @@ diff --git a/gdb/arm-tdep.c b/gdb/arm-tdep.c if (sub_count == -1) return -1; count = (count > sub_count ? count : sub_count); -@@ -3649,7 +3651,7 @@ arm_vfp_call_candidate (struct type *t, enum arm_vfp_cprc_base_type *base_type, +@@ -3617,7 +3619,7 @@ arm_vfp_call_candidate (struct type *t, enum arm_vfp_cprc_base_type *base_type, int *count) { enum arm_vfp_cprc_base_type b = VFP_CPRC_UNKNOWN; @@ -297,7 +297,7 @@ diff --git a/gdb/arm-tdep.c b/gdb/arm-tdep.c if (c <= 0 || c > 4) return 0; *base_type = b; -@@ -3731,7 +3733,7 @@ arm_push_dummy_call (struct gdbarch *gdbarch, struct value *function, +@@ -3699,7 +3701,7 @@ arm_push_dummy_call (struct gdbarch *gdbarch, struct value *function, for (argnum = 0; argnum < nargs; argnum++) { @@ -365,7 +365,7 @@ diff --git a/gdb/bfin-tdep.c b/gdb/bfin-tdep.c diff --git a/gdb/cris-tdep.c b/gdb/cris-tdep.c --- a/gdb/cris-tdep.c +++ b/gdb/cris-tdep.c -@@ -663,13 +663,13 @@ static CORE_ADDR cris_unwind_sp (struct gdbarch *gdbarch, +@@ -657,13 +657,13 @@ static CORE_ADDR crisv32_scan_prologue (CORE_ADDR pc, struct stack_item { @@ -381,7 +381,7 @@ diff --git a/gdb/cris-tdep.c b/gdb/cris-tdep.c { struct stack_item *si = XNEW (struct stack_item); si->data = (gdb_byte *) xmalloc (len); -@@ -832,13 +832,13 @@ cris_push_dummy_call (struct gdbarch *gdbarch, struct value *function, +@@ -814,13 +814,13 @@ cris_push_dummy_call (struct gdbarch *gdbarch, struct value *function, for (argnum = 0; argnum < nargs; argnum++) { @@ -402,7 +402,7 @@ diff --git a/gdb/cris-tdep.c b/gdb/cris-tdep.c diff --git a/gdb/h8300-tdep.c b/gdb/h8300-tdep.c --- a/gdb/h8300-tdep.c +++ b/gdb/h8300-tdep.c -@@ -638,7 +638,7 @@ h8300_push_dummy_call (struct gdbarch *gdbarch, struct value *function, +@@ -619,7 +619,7 @@ h8300_push_dummy_call (struct gdbarch *gdbarch, struct value *function, CORE_ADDR struct_addr) { enum bfd_endian byte_order = gdbarch_byte_order (gdbarch); @@ -411,7 +411,7 @@ diff --git a/gdb/h8300-tdep.c b/gdb/h8300-tdep.c int wordsize = BINWORD (gdbarch); int reg = E_ARG0_REGNUM; int argument; -@@ -664,11 +664,11 @@ h8300_push_dummy_call (struct gdbarch *gdbarch, struct value *function, +@@ -645,11 +645,11 @@ h8300_push_dummy_call (struct gdbarch *gdbarch, struct value *function, for (argument = 0; argument < nargs; argument++) { struct type *type = value_type (args[argument]); @@ -425,7 +425,7 @@ diff --git a/gdb/h8300-tdep.c b/gdb/h8300-tdep.c /* Use std::vector here to get zero initialization. */ std::vector padded (padded_len); -@@ -697,7 +697,7 @@ h8300_push_dummy_call (struct gdbarch *gdbarch, struct value *function, +@@ -678,7 +678,7 @@ h8300_push_dummy_call (struct gdbarch *gdbarch, struct value *function, /* Heavens to Betsy --- it's really going in registers! Note that on the h8/300s, there are gaps between the registers in the register file. */ diff --git a/gdb-vla-intel-fortran-strides.patch b/gdb-vla-intel-fortran-strides.patch index f17f717..eb6e58a 100644 --- a/gdb-vla-intel-fortran-strides.patch +++ b/gdb-vla-intel-fortran-strides.patch @@ -143,7 +143,7 @@ diff --git a/gdb/dwarf2loc.h b/gdb/dwarf2loc.h diff --git a/gdb/dwarf2read.c b/gdb/dwarf2read.c --- a/gdb/dwarf2read.c +++ b/gdb/dwarf2read.c -@@ -17753,7 +17753,7 @@ read_subrange_type (struct die_info *die, struct dwarf2_cu *cu) +@@ -17752,7 +17752,7 @@ read_subrange_type (struct die_info *die, struct dwarf2_cu *cu) struct type *base_type, *orig_base_type; struct type *range_type; struct attribute *attr; @@ -152,7 +152,7 @@ diff --git a/gdb/dwarf2read.c b/gdb/dwarf2read.c int low_default_is_valid; int high_bound_is_count = 0; const char *name; -@@ -17773,7 +17773,9 @@ read_subrange_type (struct die_info *die, struct dwarf2_cu *cu) +@@ -17772,7 +17772,9 @@ read_subrange_type (struct die_info *die, struct dwarf2_cu *cu) low.kind = PROP_CONST; high.kind = PROP_CONST; @@ -162,7 +162,7 @@ diff --git a/gdb/dwarf2read.c b/gdb/dwarf2read.c /* Set LOW_DEFAULT_IS_VALID if current language and DWARF version allow omitting DW_AT_lower_bound. */ -@@ -17806,6 +17808,14 @@ read_subrange_type (struct die_info *die, struct dwarf2_cu *cu) +@@ -17805,6 +17807,14 @@ read_subrange_type (struct die_info *die, struct dwarf2_cu *cu) break; } @@ -177,7 +177,7 @@ diff --git a/gdb/dwarf2read.c b/gdb/dwarf2read.c attr = dwarf2_attr (die, DW_AT_lower_bound, cu); if (attr) attr_to_dynamic_prop (attr, die, cu, &low); -@@ -17898,7 +17908,7 @@ read_subrange_type (struct die_info *die, struct dwarf2_cu *cu) +@@ -17897,7 +17907,7 @@ read_subrange_type (struct die_info *die, struct dwarf2_cu *cu) && !TYPE_UNSIGNED (base_type) && (high.data.const_val & negative_mask)) high.data.const_val |= negative_mask; diff --git a/gdb-vla-intel-fortran-vla-strings.patch b/gdb-vla-intel-fortran-vla-strings.patch index c9edd9f..16c24d1 100644 --- a/gdb-vla-intel-fortran-vla-strings.patch +++ b/gdb-vla-intel-fortran-vla-strings.patch @@ -33,7 +33,7 @@ git diff --stat -p gdb/master...gdb/users/bheckel/fortran-vla-strings diff --git a/gdb/NEWS b/gdb/NEWS --- a/gdb/NEWS +++ b/gdb/NEWS -@@ -323,6 +323,8 @@ SH-5/SH64 running OpenBSD SH-5/SH64 support in sh*-*-openbsd* +@@ -335,6 +335,8 @@ SH-5/SH64 running OpenBSD SH-5/SH64 support in sh*-*-openbsd* *** Changes in GDB 8.1 @@ -87,7 +87,7 @@ diff --git a/gdb/dwarf2read.c b/gdb/dwarf2read.c /* memory allocation interface */ -@@ -13758,7 +13759,7 @@ read_func_scope (struct die_info *die, struct dwarf2_cu *cu) +@@ -13757,7 +13758,7 @@ read_func_scope (struct die_info *die, struct dwarf2_cu *cu) { newobj->static_link = XOBNEW (&objfile->objfile_obstack, struct dynamic_prop); @@ -96,7 +96,7 @@ diff --git a/gdb/dwarf2read.c b/gdb/dwarf2read.c } cu->list_in_scope = cu->get_builder ()->get_local_symbols (); -@@ -16496,7 +16497,8 @@ read_array_type (struct die_info *die, struct dwarf2_cu *cu) +@@ -16495,7 +16496,8 @@ read_array_type (struct die_info *die, struct dwarf2_cu *cu) byte_stride_prop = (struct dynamic_prop *) alloca (sizeof (struct dynamic_prop)); @@ -106,7 +106,7 @@ diff --git a/gdb/dwarf2read.c b/gdb/dwarf2read.c if (!stride_ok) { complaint (_("unable to read array DW_AT_byte_stride " -@@ -17257,29 +17259,90 @@ read_tag_string_type (struct die_info *die, struct dwarf2_cu *cu) +@@ -17256,29 +17258,90 @@ read_tag_string_type (struct die_info *die, struct dwarf2_cu *cu) struct gdbarch *gdbarch = get_objfile_arch (objfile); struct type *type, *range_type, *index_type, *char_type; struct attribute *attr; @@ -208,7 +208,7 @@ diff --git a/gdb/dwarf2read.c b/gdb/dwarf2read.c char_type = language_string_char_type (cu->language_defn, gdbarch); type = create_string_type (NULL, char_type, range_type); -@@ -17647,7 +17710,8 @@ read_base_type (struct die_info *die, struct dwarf2_cu *cu) +@@ -17646,7 +17709,8 @@ read_base_type (struct die_info *die, struct dwarf2_cu *cu) static int attr_to_dynamic_prop (const struct attribute *attr, struct die_info *die, @@ -218,7 +218,7 @@ diff --git a/gdb/dwarf2read.c b/gdb/dwarf2read.c { struct dwarf2_property_baton *baton; struct obstack *obstack -@@ -17658,14 +17722,33 @@ attr_to_dynamic_prop (const struct attribute *attr, struct die_info *die, +@@ -17657,14 +17721,33 @@ attr_to_dynamic_prop (const struct attribute *attr, struct die_info *die, if (attr_form_is_block (attr)) { @@ -256,7 +256,7 @@ diff --git a/gdb/dwarf2read.c b/gdb/dwarf2read.c } else if (attr_form_is_ref (attr)) { -@@ -17698,8 +17781,28 @@ attr_to_dynamic_prop (const struct attribute *attr, struct die_info *die, +@@ -17697,8 +17780,28 @@ attr_to_dynamic_prop (const struct attribute *attr, struct die_info *die, baton = XOBNEW (obstack, struct dwarf2_property_baton); baton->referenced_type = die_type (target_die, target_cu); baton->locexpr.per_cu = cu->per_cu; @@ -287,7 +287,7 @@ diff --git a/gdb/dwarf2read.c b/gdb/dwarf2read.c prop->data.baton = baton; prop->kind = PROP_LOCEXPR; gdb_assert (prop->data.baton != NULL); -@@ -17810,7 +17913,7 @@ read_subrange_type (struct die_info *die, struct dwarf2_cu *cu) +@@ -17809,7 +17912,7 @@ read_subrange_type (struct die_info *die, struct dwarf2_cu *cu) attr = dwarf2_attr (die, DW_AT_byte_stride, cu); if (attr) @@ -296,7 +296,7 @@ diff --git a/gdb/dwarf2read.c b/gdb/dwarf2read.c complaint (_("Missing DW_AT_byte_stride " "- DIE at 0x%s [in module %s]"), sect_offset_str (die->sect_off), -@@ -17818,7 +17921,7 @@ read_subrange_type (struct die_info *die, struct dwarf2_cu *cu) +@@ -17817,7 +17920,7 @@ read_subrange_type (struct die_info *die, struct dwarf2_cu *cu) attr = dwarf2_attr (die, DW_AT_lower_bound, cu); if (attr) @@ -305,7 +305,7 @@ diff --git a/gdb/dwarf2read.c b/gdb/dwarf2read.c else if (!low_default_is_valid) complaint (_("Missing DW_AT_lower_bound " "- DIE at %s [in module %s]"), -@@ -17827,10 +17930,10 @@ read_subrange_type (struct die_info *die, struct dwarf2_cu *cu) +@@ -17826,10 +17929,10 @@ read_subrange_type (struct die_info *die, struct dwarf2_cu *cu) struct attribute *attr_ub, *attr_count; attr = attr_ub = dwarf2_attr (die, DW_AT_upper_bound, cu); @@ -318,7 +318,7 @@ diff --git a/gdb/dwarf2read.c b/gdb/dwarf2read.c { /* If bounds are constant do the final calculation here. */ if (low.kind == PROP_CONST && high.kind == PROP_CONST) -@@ -25397,7 +25500,7 @@ set_die_type (struct die_info *die, struct type *type, struct dwarf2_cu *cu) +@@ -25396,7 +25499,7 @@ set_die_type (struct die_info *die, struct type *type, struct dwarf2_cu *cu) attr = dwarf2_attr (die, DW_AT_allocated, cu); if (attr_form_is_block (attr)) { @@ -327,7 +327,7 @@ diff --git a/gdb/dwarf2read.c b/gdb/dwarf2read.c add_dyn_prop (DYN_PROP_ALLOCATED, prop, type); } else if (attr != NULL) -@@ -25411,7 +25514,7 @@ set_die_type (struct die_info *die, struct type *type, struct dwarf2_cu *cu) +@@ -25410,7 +25513,7 @@ set_die_type (struct die_info *die, struct type *type, struct dwarf2_cu *cu) attr = dwarf2_attr (die, DW_AT_associated, cu); if (attr_form_is_block (attr)) { @@ -336,7 +336,7 @@ diff --git a/gdb/dwarf2read.c b/gdb/dwarf2read.c add_dyn_prop (DYN_PROP_ASSOCIATED, prop, type); } else if (attr != NULL) -@@ -25423,7 +25526,7 @@ set_die_type (struct die_info *die, struct type *type, struct dwarf2_cu *cu) +@@ -25422,7 +25525,7 @@ set_die_type (struct die_info *die, struct type *type, struct dwarf2_cu *cu) /* Read DW_AT_data_location and set in type. */ attr = dwarf2_attr (die, DW_AT_data_location, cu); diff --git a/gdb.spec b/gdb.spec index f38f8eb..e4d38a2 100644 --- a/gdb.spec +++ b/gdb.spec @@ -22,15 +22,15 @@ Name: %{?scl_prefix}gdb # Freeze it when GDB gets branched -%global snapsrc 20190219 +%global snapsrc 20190304 # See timestamp of source gnulib installed into gdb/gnulib/ . %global snapgnulib 20161115 %global tarname gdb-%{version} -Version: 8.2.50.%{snapsrc} +Version: 8.3.50.%{snapsrc} # 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: 18%{?dist} +Release: 1%{?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. @@ -1025,6 +1025,14 @@ fi %endif %changelog +* Mon Mar 4 2019 Sergio Durigan Junior - 8.3.50.20190304-1 +- Rebase to FSF GDB 8.3.50.20190304 (8.4pre). +- Rewrite gdb-6.6-buildid-locate.patch. +- Remove gdb-python-gil.patch. + +* Fri Feb 22 2019 Sergio Durigan Junior - 8.2.50.20190222-19 +- Rebase to FSF GDB 8.2.50.20190222 (8.3pre). + * Tue Feb 19 2019 Sergio Durigan Junior - 8.2.50.20190219-18 - Rebase to FSF GDB 8.2.50.20190219 (8.3pre). - BuildRequire on 'source-highlight-devel' and enable styled output. diff --git a/sources b/sources index 6057799..82ca3fc 100644 --- a/sources +++ b/sources @@ -1,3 +1,3 @@ SHA512 (gdb-libstdc++-v3-python-8.1.1-20180626.tar.xz) = a8b1c54dd348cfeb37da73f968742896be3dd13a4215f8d8519870c2abea915f5176c3fa6989ddd10f20020a16f0fab20cbae68ee8d58a82234d8778023520f8 SHA512 (v2.0.tar.gz) = ec63151e842c81cc73ea11ba560b63e005cefbe19d98de24ae5c8caa4de7c9c1d71d1ec5b6214a347592eac675b75a3d2b26d4691ca86f91020ebfea8e912939 -SHA512 (gdb-8.2.50.20190219.tar.xz) = 8c95b02681d3a996f3745d0a838f3837f4dcfad043b61ae24cececd029bbaa392b605841bb8a96f5d4a09d3412480edd8d3f6de5572074692cb5244c697a6358 +SHA512 (gdb-8.3.50.20190304.tar.xz) = 89d6462451e7c70c3c89741e49b765b96ee6d1e34a9857337fc8a6ff2aa160360974a0f3db52bd5a13767a6ae44675f0cdd5de1e664458ad2b543246d14cb0e3 From 96770ac25f2074e0ce0df2f58c938cbf69a2a50e Mon Sep 17 00:00:00 2001 From: Sergio Durigan Junior Date: Tue, 19 Mar 2019 18:06:34 -0400 Subject: [PATCH 2/5] Rebase to FSF GDB 8.3.50.20190319 (8.4pre). --- .gitignore | 2 +- _git_upstream_commit | 2 +- ...337-resolve-tls-without-debuginfo-v2.patch | 2 +- gdb-6.5-bz216711-clone-is-outermost.patch | 4 +- gdb-6.6-buildid-locate-core-as-arg.patch | 6 +- ...buildid-locate-rpm-librpm-workaround.patch | 2 +- gdb-6.6-buildid-locate-rpm-scl.patch | 21 ++- gdb-6.6-buildid-locate-rpm.patch | 87 +++++++++---- ...6.6-buildid-locate-solib-missing-ids.patch | 4 +- gdb-6.6-buildid-locate.patch | 14 +- ....6-scheduler_locking-step-is-default.patch | 2 +- gdb-archer-pie-addons-keep-disabled.patch | 4 +- gdb-archer.patch | 92 +++---------- gdb-attach-fail-reasons-5of5.patch | 2 +- gdb-bz1219747-attach-kills.patch | 2 +- gdb-bz533176-fortran-omp-step.patch | 4 +- gdb-bz541866-rwatch-before-run.patch | 4 +- gdb-bz568248-oom-is-error.patch | 2 +- gdb-container-rh-pkg.patch | 2 +- gdb-follow-child-stale-parent.patch | 2 +- gdb-gnat-dwarf-crash-3of3.patch | 16 +-- gdb-moribund-utrace-workaround.patch | 2 +- gdb-rhbz795424-bitpos-20of25.patch | 122 +++++++++--------- gdb-rhbz795424-bitpos-21of25.patch | 4 +- gdb-rhbz795424-bitpos-22of25.patch | 24 ++-- gdb-rhbz795424-bitpos-23of25.patch | 12 +- gdb-vla-intel-fortran-strides.patch | 40 +++--- gdb-vla-intel-fortran-vla-strings.patch | 44 +++---- gdb-vla-intel-stringbt-fix.patch | 2 +- gdb.spec | 7 +- sources | 2 +- 31 files changed, 259 insertions(+), 276 deletions(-) diff --git a/.gitignore b/.gitignore index b365cea..2c2ddad 100644 --- a/.gitignore +++ b/.gitignore @@ -1,3 +1,3 @@ /gdb-libstdc++-v3-python-8.1.1-20180626.tar.xz /v2.0.tar.gz -/gdb-8.3.50.20190304.tar.xz +/gdb-8.3.50.20190319.tar.xz diff --git a/_git_upstream_commit b/_git_upstream_commit index 919fbcf..926106b 100644 --- a/_git_upstream_commit +++ b/_git_upstream_commit @@ -1 +1 @@ -67490c6bad8c8d3fcbcbd5a3012ab5d189fd3981 +4faa59bbb7ad8665b6eb7c93bdb726e412850811 diff --git a/gdb-6.5-bz185337-resolve-tls-without-debuginfo-v2.patch b/gdb-6.5-bz185337-resolve-tls-without-debuginfo-v2.patch index b36e47e..3a1fe0c 100644 --- a/gdb-6.5-bz185337-resolve-tls-without-debuginfo-v2.patch +++ b/gdb-6.5-bz185337-resolve-tls-without-debuginfo-v2.patch @@ -44,7 +44,7 @@ glibc-debuginfo-2.7-2.x86_64: /usr/lib/debug/lib64/libc.so.6.debug: diff --git a/gdb/printcmd.c b/gdb/printcmd.c --- a/gdb/printcmd.c +++ b/gdb/printcmd.c -@@ -1183,6 +1183,10 @@ print_command_1 (const char *exp, int voidprint) +@@ -1182,6 +1182,10 @@ print_command_1 (const char *exp, int voidprint) if (exp && *exp) { diff --git a/gdb-6.5-bz216711-clone-is-outermost.patch b/gdb-6.5-bz216711-clone-is-outermost.patch index abb52b0..16f7fc4 100644 --- a/gdb-6.5-bz216711-clone-is-outermost.patch +++ b/gdb-6.5-bz216711-clone-is-outermost.patch @@ -169,7 +169,7 @@ diff --git a/gdb/amd64-tdep.c b/gdb/amd64-tdep.c diff --git a/gdb/i386-tdep.c b/gdb/i386-tdep.c --- a/gdb/i386-tdep.c +++ b/gdb/i386-tdep.c -@@ -8407,6 +8407,9 @@ i386_gdbarch_init (struct gdbarch_info info, struct gdbarch_list *arches) +@@ -8420,6 +8420,9 @@ i386_gdbarch_init (struct gdbarch_info info, struct gdbarch_list *arches) tdep->xsave_xcr0_offset = -1; @@ -182,7 +182,7 @@ diff --git a/gdb/i386-tdep.c b/gdb/i386-tdep.c diff --git a/gdb/i386-tdep.h b/gdb/i386-tdep.h --- a/gdb/i386-tdep.h +++ b/gdb/i386-tdep.h -@@ -251,6 +251,9 @@ struct gdbarch_tdep +@@ -255,6 +255,9 @@ struct gdbarch_tdep /* Regsets. */ const struct regset *fpregset; diff --git a/gdb-6.6-buildid-locate-core-as-arg.patch b/gdb-6.6-buildid-locate-core-as-arg.patch index a59c2b7..f8a8315 100644 --- a/gdb-6.6-buildid-locate-core-as-arg.patch +++ b/gdb-6.6-buildid-locate-core-as-arg.patch @@ -119,7 +119,7 @@ diff --git a/gdb/exec.c b/gdb/exec.c diff --git a/gdb/main.c b/gdb/main.c --- a/gdb/main.c +++ b/gdb/main.c -@@ -448,6 +448,35 @@ struct cmdarg +@@ -440,6 +440,35 @@ struct cmdarg char *string; }; @@ -155,7 +155,7 @@ diff --git a/gdb/main.c b/gdb/main.c static void captured_main_1 (struct captured_main_args *context) { -@@ -893,6 +922,8 @@ captured_main_1 (struct captured_main_args *context) +@@ -885,6 +914,8 @@ captured_main_1 (struct captured_main_args *context) { symarg = argv[optind]; execarg = argv[optind]; @@ -164,7 +164,7 @@ diff --git a/gdb/main.c b/gdb/main.c optind++; } -@@ -1043,12 +1074,25 @@ captured_main_1 (struct captured_main_args *context) +@@ -1035,12 +1066,25 @@ captured_main_1 (struct captured_main_args *context) && symarg != NULL && strcmp (execarg, symarg) == 0) { diff --git a/gdb-6.6-buildid-locate-rpm-librpm-workaround.patch b/gdb-6.6-buildid-locate-rpm-librpm-workaround.patch index f8dcbeb..61baf82 100644 --- a/gdb-6.6-buildid-locate-rpm-librpm-workaround.patch +++ b/gdb-6.6-buildid-locate-rpm-librpm-workaround.patch @@ -9,7 +9,7 @@ Subject: gdb-6.6-buildid-locate-rpm-librpm-workaround.patch diff --git a/gdb/build-id.c b/gdb/build-id.c --- a/gdb/build-id.c +++ b/gdb/build-id.c -@@ -712,6 +712,19 @@ build_id_to_filename (const struct bfd_build_id *build_id, char **link_return) +@@ -711,6 +711,19 @@ build_id_to_filename (const struct bfd_build_id *build_id, char **link_return) #include #endif diff --git a/gdb-6.6-buildid-locate-rpm-scl.patch b/gdb-6.6-buildid-locate-rpm-scl.patch index 5b3d4ad..12e15eb 100644 --- a/gdb-6.6-buildid-locate-rpm-scl.patch +++ b/gdb-6.6-buildid-locate-rpm-scl.patch @@ -12,7 +12,7 @@ https://bugzilla.redhat.com/show_bug.cgi?id=953585 diff --git a/gdb/build-id.c b/gdb/build-id.c --- a/gdb/build-id.c +++ b/gdb/build-id.c -@@ -746,7 +746,11 @@ static int missing_rpm_list_entries; +@@ -745,7 +745,11 @@ static int missing_rpm_list_entries; /* Returns the count of newly added rpms. */ static int @@ -24,7 +24,7 @@ diff --git a/gdb/build-id.c b/gdb/build-id.c { static int rpm_init_done = 0; rpmts ts; -@@ -853,7 +857,11 @@ missing_rpm_enlist (const char *filename) +@@ -852,7 +856,11 @@ missing_rpm_enlist (const char *filename) mi = rpmtsInitIterator_p (ts, RPMTAG_BASENAMES, filename, 0); if (mi != NULL) { @@ -36,7 +36,7 @@ diff --git a/gdb/build-id.c b/gdb/build-id.c { Header h; char *debuginfo, **slot, *s, *s2; -@@ -971,6 +979,37 @@ missing_rpm_enlist (const char *filename) +@@ -970,6 +978,37 @@ missing_rpm_enlist (const char *filename) xfree (debuginfo); count++; } @@ -74,10 +74,10 @@ diff --git a/gdb/build-id.c b/gdb/build-id.c rpmdbFreeIterator_p (mi); } -@@ -981,6 +1020,21 @@ missing_rpm_enlist (const char *filename) +@@ -979,6 +1018,20 @@ missing_rpm_enlist (const char *filename) + return count; } - static int +#ifdef GDB_INDEX_VERIFY_VENDOR +missing_rpm_enlist (const char *filename) +{ @@ -90,16 +90,15 @@ diff --git a/gdb/build-id.c b/gdb/build-id.c +{ + return missing_rpm_enlist_1 (filename, 1); +} -+ -+static int +#endif - missing_rpm_list_compar (const char *const *ap, const char *const *bp) ++ + static bool + missing_rpm_list_compar (const char *ap, const char *bp) { - return strcoll (*ap, *bp); diff --git a/gdb/dwarf2read.c b/gdb/dwarf2read.c --- a/gdb/dwarf2read.c +++ b/gdb/dwarf2read.c -@@ -3501,6 +3501,16 @@ read_gdb_index_from_buffer (struct objfile *objfile, +@@ -3500,6 +3500,16 @@ read_gdb_index_from_buffer (struct objfile *objfile, "set use-deprecated-index-sections on". */ if (version < 6 && !deprecated_ok) { @@ -116,7 +115,7 @@ diff --git a/gdb/dwarf2read.c b/gdb/dwarf2read.c static int warning_printed = 0; if (!warning_printed) { -@@ -3512,6 +3522,10 @@ to use the section anyway."), +@@ -3511,6 +3521,10 @@ to use the section anyway."), warning_printed = 1; } return 0; diff --git a/gdb-6.6-buildid-locate-rpm.patch b/gdb-6.6-buildid-locate-rpm.patch index 3f7c651..ff2cc65 100644 --- a/gdb-6.6-buildid-locate-rpm.patch +++ b/gdb-6.6-buildid-locate-rpm.patch @@ -244,7 +244,11 @@ diff --git a/gdb/build-id.c b/gdb/build-id.c #define BUILD_ID_VERBOSE_NONE 0 #define BUILD_ID_VERBOSE_FILENAMES 1 -@@ -700,8 +702,366 @@ build_id_to_filename (const struct bfd_build_id *build_id, char **link_return) +@@ -696,12 +698,362 @@ build_id_to_filename (const struct bfd_build_id *build_id, char **link_return) + return NULL; + + result = xstrdup (bfd_get_filename (abfd)); +- abfd.release (); return result; } @@ -513,10 +517,10 @@ diff --git a/gdb/build-id.c b/gdb/build-id.c + return count; +} + -+static int -+missing_rpm_list_compar (const char *const *ap, const char *const *bp) ++static bool ++missing_rpm_list_compar (const char *ap, const char *bp) +{ -+ return strcoll (*ap, *bp); ++ return strcoll (ap, bp); +} + +/* It returns a NULL-terminated array of strings needing to be FREEd. It may @@ -525,37 +529,32 @@ diff --git a/gdb/build-id.c b/gdb/build-id.c +static void +missing_rpm_list_print (void) +{ -+ char **array, **array_iter; + struct missing_rpm *list_iter; -+ struct cleanup *cleanups; + + if (missing_rpm_list_entries == 0) + return; + -+ array = (char **) xmalloc (sizeof (*array) * missing_rpm_list_entries); -+ cleanups = make_cleanup (xfree, array); ++ std::vector array (missing_rpm_list_entries); ++ size_t idx = 0; + -+ array_iter = array; + for (list_iter = missing_rpm_list; list_iter != NULL; + list_iter = list_iter->next) + { -+ *array_iter++ = list_iter->rpm; ++ array[idx++] = list_iter->rpm; + } -+ gdb_assert (array_iter == array + missing_rpm_list_entries); ++ gdb_assert (idx == missing_rpm_list_entries); + -+ qsort (array, missing_rpm_list_entries, sizeof (*array), -+ (int (*) (const void *, const void *)) missing_rpm_list_compar); ++ std::sort (array.begin (), array.end (), missing_rpm_list_compar); + + printf_unfiltered (_("Missing separate debuginfos, use: %s"), +#ifdef DNF_DEBUGINFO_INSTALL + "dnf " +#endif + "debuginfo-install"); -+ for (array_iter = array; array_iter < array + missing_rpm_list_entries; -+ array_iter++) ++ for (const char *el : array) + { + putchar_unfiltered (' '); -+ puts_unfiltered (*array_iter); ++ puts_unfiltered (el); + } + putchar_unfiltered ('\n'); + @@ -566,8 +565,6 @@ diff --git a/gdb/build-id.c b/gdb/build-id.c + xfree (list_iter); + } + missing_rpm_list_entries = 0; -+ -+ do_cleanups (cleanups); +} + +static void @@ -612,7 +609,7 @@ diff --git a/gdb/build-id.c b/gdb/build-id.c avoidance. */ struct missing_filepair -@@ -755,11 +1115,17 @@ missing_filepair_change (void) +@@ -755,11 +1107,17 @@ missing_filepair_change (void) /* All their memory came just from missing_filepair_OBSTACK. */ missing_filepair_hash = NULL; } @@ -630,7 +627,7 @@ diff --git a/gdb/build-id.c b/gdb/build-id.c missing_filepair_change (); } -@@ -826,14 +1192,39 @@ debug_print_missing (const char *binary, const char *debug) +@@ -826,14 +1184,39 @@ debug_print_missing (const char *binary, const char *debug) *slot = missing_filepair; @@ -1459,15 +1456,59 @@ diff --git a/gdb/configure.ac b/gdb/configure.ac diff --git a/gdb/corelow.c b/gdb/corelow.c --- a/gdb/corelow.c +++ b/gdb/corelow.c -@@ -365,7 +365,7 @@ build_id_locate_exec (int from_tty) +@@ -330,10 +330,9 @@ static void + build_id_locate_exec (int from_tty) + { + CORE_ADDR at_entry; +- struct bfd_build_id *build_id; +- char *execfilename; ++ gdb::unique_xmalloc_ptr build_id; ++ gdb::unique_xmalloc_ptr execfilename; + char *build_id_filename; +- struct cleanup *back_to; + + if (exec_bfd != NULL || symfile_objfile != NULL) + return; +@@ -341,10 +340,9 @@ build_id_locate_exec (int from_tty) + if (target_auxv_search (current_top_target (), AT_ENTRY, &at_entry) <= 0) + return; + +- build_id = build_id_addr_get (at_entry); ++ build_id.reset (build_id_addr_get (at_entry)); + if (build_id == NULL) + return; +- back_to = make_cleanup (xfree, build_id); + + /* SYMFILE_OBJFILE should refer to the main executable (not only to its + separate debug info file). gcc44+ keeps .eh_frame only in the main +@@ -352,22 +350,19 @@ build_id_locate_exec (int from_tty) + file - such .eh_frame would not be found if SYMFILE_OBJFILE would refer + directly to the separate debug info file. */ + +- execfilename = build_id_to_filename (build_id, &build_id_filename); +- make_cleanup (xfree, build_id_filename); ++ execfilename.reset (build_id_to_filename (build_id.get (), ++ &build_id_filename)); + + if (execfilename != NULL) + { +- make_cleanup (xfree, execfilename); +- exec_file_attach (execfilename, from_tty); +- symbol_file_add_main (execfilename, ++ exec_file_attach (execfilename.get (), from_tty); ++ symbol_file_add_main (execfilename.get (), + symfile_add_flag (!from_tty ? 0 : SYMFILE_VERBOSE)); + if (symfile_objfile != NULL) symfile_objfile->flags |= OBJF_BUILD_ID_CORE_LOADED; } else - debug_print_missing (_("the main executable file"), build_id_filename); +- +- do_cleanups (back_to); + debug_print_missing (BUILD_ID_MAIN_EXECUTABLE_FILENAME, build_id_filename); - do_cleanups (back_to); - + /* No automatic SOLIB_ADD as the libraries would get read twice. */ + } diff --git a/gdb/event-top.c b/gdb/event-top.c --- a/gdb/event-top.c +++ b/gdb/event-top.c diff --git a/gdb-6.6-buildid-locate-solib-missing-ids.patch b/gdb-6.6-buildid-locate-solib-missing-ids.patch index e86920b..797ded0 100644 --- a/gdb-6.6-buildid-locate-solib-missing-ids.patch +++ b/gdb-6.6-buildid-locate-solib-missing-ids.patch @@ -14,7 +14,7 @@ https://bugzilla.redhat.com/show_bug.cgi?id=1339862 diff --git a/gdb/solib-svr4.c b/gdb/solib-svr4.c --- a/gdb/solib-svr4.c +++ b/gdb/solib-svr4.c -@@ -1347,14 +1347,27 @@ svr4_read_so_list (CORE_ADDR lm, CORE_ADDR prev_lm, +@@ -1348,14 +1348,27 @@ svr4_read_so_list (CORE_ADDR lm, CORE_ADDR prev_lm, } { @@ -44,7 +44,7 @@ diff --git a/gdb/solib-svr4.c b/gdb/solib-svr4.c if (build_id != NULL) { char *name, *build_id_filename; -@@ -1369,23 +1382,7 @@ svr4_read_so_list (CORE_ADDR lm, CORE_ADDR prev_lm, +@@ -1370,23 +1383,7 @@ svr4_read_so_list (CORE_ADDR lm, CORE_ADDR prev_lm, xfree (name); } else diff --git a/gdb-6.6-buildid-locate.patch b/gdb-6.6-buildid-locate.patch index c588eb1..6db8389 100644 --- a/gdb-6.6-buildid-locate.patch +++ b/gdb-6.6-buildid-locate.patch @@ -927,7 +927,7 @@ diff --git a/gdb/build-id.h b/gdb/build-id.h diff --git a/gdb/coffread.c b/gdb/coffread.c --- a/gdb/coffread.c +++ b/gdb/coffread.c -@@ -729,7 +729,8 @@ coff_symfile_read (struct objfile *objfile, symfile_add_flags symfile_flags) +@@ -720,7 +720,8 @@ coff_symfile_read (struct objfile *objfile, symfile_add_flags symfile_flags) /* Try to add separate debug file if no symbols table found. */ if (!objfile_has_partial_symbols (objfile)) { @@ -1021,7 +1021,7 @@ diff --git a/gdb/corelow.c b/gdb/corelow.c post_create_inferior (target, from_tty); /* Now go through the target stack looking for threads since there -@@ -1063,4 +1123,11 @@ void +@@ -1061,4 +1121,11 @@ void _initialize_corelow (void) { add_target (core_target_info, core_target_open, filename_completer); @@ -1079,7 +1079,7 @@ diff --git a/gdb/dwarf-index-cache.c b/gdb/dwarf-index-cache.c diff --git a/gdb/dwarf2read.c b/gdb/dwarf2read.c --- a/gdb/dwarf2read.c +++ b/gdb/dwarf2read.c -@@ -2727,7 +2727,7 @@ dwarf2_get_dwz_file (struct dwarf2_per_objfile *dwarf2_per_objfile) +@@ -2726,7 +2726,7 @@ dwarf2_get_dwz_file (struct dwarf2_per_objfile *dwarf2_per_objfile) } if (dwz_bfd == NULL) @@ -1088,7 +1088,7 @@ diff --git a/gdb/dwarf2read.c b/gdb/dwarf2read.c if (dwz_bfd == NULL) error (_("could not find '.gnu_debugaltlink' file for %s"), -@@ -6237,7 +6237,7 @@ get_gdb_index_contents_from_section (objfile *obj, T *section_owner) +@@ -6236,7 +6236,7 @@ get_gdb_index_contents_from_section (objfile *obj, T *section_owner) static gdb::array_view get_gdb_index_contents_from_cache (objfile *obj, dwarf2_per_objfile *dwarf2_obj) { @@ -1097,7 +1097,7 @@ diff --git a/gdb/dwarf2read.c b/gdb/dwarf2read.c if (build_id == nullptr) return {}; -@@ -6250,7 +6250,7 @@ get_gdb_index_contents_from_cache (objfile *obj, dwarf2_per_objfile *dwarf2_obj) +@@ -6249,7 +6249,7 @@ get_gdb_index_contents_from_cache (objfile *obj, dwarf2_per_objfile *dwarf2_obj) static gdb::array_view get_gdb_index_contents_from_cache_dwz (objfile *obj, dwz_file *dwz) { @@ -1134,7 +1134,7 @@ diff --git a/gdb/elfread.c b/gdb/elfread.c diff --git a/gdb/objfiles.h b/gdb/objfiles.h --- a/gdb/objfiles.h +++ b/gdb/objfiles.h -@@ -554,6 +554,10 @@ struct objfile +@@ -553,6 +553,10 @@ struct objfile htab_t static_links {}; }; @@ -1177,7 +1177,7 @@ diff --git a/gdb/solib-svr4.c b/gdb/solib-svr4.c static struct link_map_offsets *svr4_fetch_link_map_offsets (void); static int svr4_have_link_map_offsets (void); -@@ -1345,9 +1346,51 @@ svr4_read_so_list (CORE_ADDR lm, CORE_ADDR prev_lm, +@@ -1346,9 +1347,51 @@ svr4_read_so_list (CORE_ADDR lm, CORE_ADDR prev_lm, continue; } diff --git a/gdb-6.6-scheduler_locking-step-is-default.patch b/gdb-6.6-scheduler_locking-step-is-default.patch index 0c1acc2..8bf061c 100644 --- a/gdb-6.6-scheduler_locking-step-is-default.patch +++ b/gdb-6.6-scheduler_locking-step-is-default.patch @@ -9,7 +9,7 @@ Subject: gdb-6.6-scheduler_locking-step-is-default.patch diff --git a/gdb/infrun.c b/gdb/infrun.c --- a/gdb/infrun.c +++ b/gdb/infrun.c -@@ -2075,7 +2075,7 @@ static const char *const scheduler_enums[] = { +@@ -2065,7 +2065,7 @@ static const char *const scheduler_enums[] = { schedlock_replay, NULL }; diff --git a/gdb-archer-pie-addons-keep-disabled.patch b/gdb-archer-pie-addons-keep-disabled.patch index df78828..0a40fa4 100644 --- a/gdb-archer-pie-addons-keep-disabled.patch +++ b/gdb-archer-pie-addons-keep-disabled.patch @@ -8,7 +8,7 @@ Subject: gdb-archer-pie-addons-keep-disabled.patch diff --git a/gdb/breakpoint.c b/gdb/breakpoint.c --- a/gdb/breakpoint.c +++ b/gdb/breakpoint.c -@@ -15441,6 +15441,50 @@ static struct cmd_list_element *enablebreaklist = NULL; +@@ -15451,6 +15451,50 @@ static struct cmd_list_element *enablebreaklist = NULL; cmd_list_element *commands_cmd_element = nullptr; @@ -75,7 +75,7 @@ diff --git a/gdb/breakpoint.h b/gdb/breakpoint.h diff --git a/gdb/objfiles.c b/gdb/objfiles.c --- a/gdb/objfiles.c +++ b/gdb/objfiles.c -@@ -875,6 +875,11 @@ objfile_relocate1 (struct objfile *objfile, +@@ -849,6 +849,11 @@ objfile_relocate1 (struct objfile *objfile, obj_section_addr (s)); } diff --git a/gdb-archer.patch b/gdb-archer.patch index 5df4f56..01788c4 100644 --- a/gdb-archer.patch +++ b/gdb-archer.patch @@ -112,7 +112,7 @@ diff --git a/gdb/main.c b/gdb/main.c #include "source.h" #include "cli/cli-cmds.h" #include "objfiles.h" -@@ -478,7 +479,7 @@ exec_or_core_file_attach (const char *filename, int from_tty) +@@ -470,7 +471,7 @@ exec_or_core_file_attach (const char *filename, int from_tty) } static void @@ -121,7 +121,7 @@ diff --git a/gdb/main.c b/gdb/main.c { int argc = context->argc; char **argv = context->argv; -@@ -698,10 +699,14 @@ captured_main_1 (struct captured_main_args *context) +@@ -690,10 +691,14 @@ captured_main_1 (struct captured_main_args *context) {"args", no_argument, &set_args, 1}, {"l", required_argument, 0, 'l'}, {"return-child-result", no_argument, &return_child_result, 1}, @@ -137,7 +137,7 @@ diff --git a/gdb/main.c b/gdb/main.c { int option_index; -@@ -719,6 +724,9 @@ captured_main_1 (struct captured_main_args *context) +@@ -711,6 +716,9 @@ captured_main_1 (struct captured_main_args *context) case 0: /* Long option that just sets a flag. */ break; @@ -147,7 +147,7 @@ diff --git a/gdb/main.c b/gdb/main.c case OPT_SE: symarg = optarg; execarg = optarg; -@@ -898,7 +906,31 @@ captured_main_1 (struct captured_main_args *context) +@@ -890,7 +898,31 @@ captured_main_1 (struct captured_main_args *context) /* Now that gdb_init has created the initial inferior, we're in position to set args for that inferior. */ @@ -180,7 +180,7 @@ diff --git a/gdb/main.c b/gdb/main.c { /* The remaining options are the command-line options for the inferior. The first one is the sym/exec file, and the rest -@@ -1199,7 +1231,8 @@ captured_main_1 (struct captured_main_args *context) +@@ -1191,7 +1223,8 @@ captured_main_1 (struct captured_main_args *context) /* Read in the old history after all the command files have been read. */ @@ -190,7 +190,7 @@ diff --git a/gdb/main.c b/gdb/main.c if (batch_flag) { -@@ -1215,24 +1248,37 @@ static void +@@ -1207,24 +1240,37 @@ static void captured_main (void *data) { struct captured_main_args *context = (struct captured_main_args *) data; @@ -241,7 +241,7 @@ diff --git a/gdb/main.c b/gdb/main.c } /* No exit -- exit is through quit_command. */ } -@@ -1275,6 +1321,12 @@ print_gdb_help (struct ui_file *stream) +@@ -1267,6 +1313,12 @@ print_gdb_help (struct ui_file *stream) fputs_unfiltered (_("\ This is the GNU debugger. Usage:\n\n\ gdb [options] [executable-file [core-file or process-id]]\n\ @@ -254,7 +254,7 @@ diff --git a/gdb/main.c b/gdb/main.c gdb [options] --args executable-file [inferior-arguments ...]\n\n\ "), stream); fputs_unfiltered (_("\ -@@ -1320,6 +1372,13 @@ Output and user interface control:\n\n\ +@@ -1312,6 +1364,13 @@ Output and user interface control:\n\n\ #endif fputs_unfiltered (_("\ --dbx DBX compatibility mode.\n\ @@ -362,19 +362,6 @@ new file mode 100644 + return wanted == found + +InScope () -diff --git a/gdb/python/python-internal.h b/gdb/python/python-internal.h ---- a/gdb/python/python-internal.h -+++ b/gdb/python/python-internal.h -@@ -658,6 +658,9 @@ private: - PyThreadState *m_save; - }; - -+struct cleanup *ensure_python_env (struct gdbarch *gdbarch, -+ const struct language_defn *language); -+ - extern struct gdbarch *python_gdbarch; - extern const struct language_defn *python_language; - diff --git a/gdb/python/python.c b/gdb/python/python.c --- a/gdb/python/python.c +++ b/gdb/python/python.c @@ -387,37 +374,7 @@ diff --git a/gdb/python/python.c b/gdb/python/python.c #include "target.h" #include "gdbthread.h" #include "interps.h" -@@ -235,6 +237,29 @@ gdbpy_enter::~gdbpy_enter () - restore_active_ext_lang (m_previous_active); - } - -+static void -+restore_python_env (void *p) -+{ -+ gdbpy_enter *env = (gdbpy_enter *) p; -+ -+ delete env; -+} -+ -+/* Called before entering the Python interpreter to install the -+ current language and architecture to be used for Python values. -+ Also set the active extension language for GDB so that SIGINT's -+ are directed our way, and if necessary install the right SIGINT -+ handler. */ -+ -+struct cleanup * -+ensure_python_env (struct gdbarch *gdbarch, -+ const struct language_defn *language) -+{ -+ gdbpy_enter *env = new gdbpy_enter (gdbarch, language); -+ -+ return make_cleanup (restore_python_env, env); -+} -+ - /* Set the quit flag. */ - - static void -@@ -1283,6 +1308,92 @@ gdbpy_print_stack_or_quit () +@@ -1283,6 +1285,94 @@ gdbpy_print_stack_or_quit () @@ -461,7 +418,9 @@ diff --git a/gdb/python/python.c b/gdb/python/python.c + FILE *input; + + /* We never free this, since we plan to exit at the end. */ -+ ensure_python_env (get_current_arch (), current_language); ++ gdbpy_enter *env = new gdbpy_enter (get_current_arch (), current_language); ++ /* "Use" env, to suppress GCC warnings. */ ++ (void) env; + + running_python_script = 1; + @@ -510,7 +469,7 @@ diff --git a/gdb/python/python.c b/gdb/python/python.c /* Return a sequence holding all the Progspaces. */ static PyObject * -@@ -1935,6 +2046,8 @@ PyMethodDef python_GdbMethods[] = +@@ -1935,6 +2025,8 @@ PyMethodDef python_GdbMethods[] = Evaluate command, a string, as a gdb CLI command. Optionally returns\n\ a Python String containing the output of the command if to_string is\n\ set to True." }, @@ -575,30 +534,11 @@ diff --git a/gdb/testsuite/gdb.python/py-value.exp b/gdb/testsuite/gdb.python/py diff --git a/gdb/varobj.c b/gdb/varobj.c --- a/gdb/varobj.c +++ b/gdb/varobj.c -@@ -217,6 +217,14 @@ is_root_p (const struct varobj *var) +@@ -217,7 +217,6 @@ is_root_p (const struct varobj *var) } #ifdef HAVE_PYTHON -+/* Helper function to install a Python environment suitable for -+ use during operations on VAR. */ -+struct cleanup * -+varobj_ensure_python_env (const struct varobj *var) -+{ -+ return ensure_python_env (var->root->exp->gdbarch, -+ var->root->exp->language_defn); -+} - +- /* See python-internal.h. */ gdbpy_enter_varobj::gdbpy_enter_varobj (const struct varobj *var) -diff --git a/gdb/varobj.h b/gdb/varobj.h ---- a/gdb/varobj.h -+++ b/gdb/varobj.h -@@ -328,6 +328,8 @@ extern bool varobj_has_more (const struct varobj *var, int to); - - extern bool varobj_is_dynamic_p (const struct varobj *var); - -+extern struct cleanup *varobj_ensure_python_env (const struct varobj *var); -+ - extern bool varobj_default_value_is_changeable_p (const struct varobj *var); - extern bool varobj_value_is_changeable_p (const struct varobj *var); - + : gdbpy_enter (var->root->exp->gdbarch, var->root->exp->language_defn) diff --git a/gdb-attach-fail-reasons-5of5.patch b/gdb-attach-fail-reasons-5of5.patch index 897a557..1ed78da 100644 --- a/gdb-attach-fail-reasons-5of5.patch +++ b/gdb-attach-fail-reasons-5of5.patch @@ -276,7 +276,7 @@ diff --git a/gdb/gdbserver/linux-low.c b/gdb/gdbserver/linux-low.c diff --git a/gdb/linux-nat.c b/gdb/linux-nat.c --- a/gdb/linux-nat.c +++ b/gdb/linux-nat.c -@@ -1099,7 +1099,17 @@ linux_nat_target::create_inferior (const char *exec_file, +@@ -1098,7 +1098,17 @@ linux_nat_target::create_inferior (const char *exec_file, /* Make sure we report all signals during startup. */ pass_signals ({}); diff --git a/gdb-bz1219747-attach-kills.patch b/gdb-bz1219747-attach-kills.patch index 6127999..4ed6c0d 100644 --- a/gdb-bz1219747-attach-kills.patch +++ b/gdb-bz1219747-attach-kills.patch @@ -80,7 +80,7 @@ gdb/testsuite/ChangeLog diff --git a/gdb/main.c b/gdb/main.c --- a/gdb/main.c +++ b/gdb/main.c -@@ -1129,7 +1129,10 @@ captured_main_1 (struct captured_main_args *context) +@@ -1121,7 +1121,10 @@ captured_main_1 (struct captured_main_args *context) { ret = catch_command_errors (attach_command, pid_or_core_arg, !batch_flag); diff --git a/gdb-bz533176-fortran-omp-step.patch b/gdb-bz533176-fortran-omp-step.patch index 07c3e0e..f4515f6 100644 --- a/gdb-bz533176-fortran-omp-step.patch +++ b/gdb-bz533176-fortran-omp-step.patch @@ -30,7 +30,7 @@ debugging problem of GOMP outside of the scope of this Bug. diff --git a/gdb/infrun.c b/gdb/infrun.c --- a/gdb/infrun.c +++ b/gdb/infrun.c -@@ -6510,6 +6510,16 @@ process_event_stop_test (struct execution_control_state *ecs) +@@ -6503,6 +6503,16 @@ process_event_stop_test (struct execution_control_state *ecs) if (ecs->event_thread->control.step_over_calls == STEP_OVER_ALL) { @@ -47,7 +47,7 @@ diff --git a/gdb/infrun.c b/gdb/infrun.c /* We're doing a "next". Normal (forward) execution: set a breakpoint at the -@@ -6543,6 +6553,7 @@ process_event_stop_test (struct execution_control_state *ecs) +@@ -6536,6 +6546,7 @@ process_event_stop_test (struct execution_control_state *ecs) keep_going (ecs); return; diff --git a/gdb-bz541866-rwatch-before-run.patch b/gdb-bz541866-rwatch-before-run.patch index fb90054..b7c8ecf 100644 --- a/gdb-bz541866-rwatch-before-run.patch +++ b/gdb-bz541866-rwatch-before-run.patch @@ -10,7 +10,7 @@ Subject: gdb-bz541866-rwatch-before-run.patch diff --git a/gdb/breakpoint.c b/gdb/breakpoint.c --- a/gdb/breakpoint.c +++ b/gdb/breakpoint.c -@@ -8773,7 +8773,7 @@ init_breakpoint_sal (struct breakpoint *b, struct gdbarch *gdbarch, +@@ -8783,7 +8783,7 @@ init_breakpoint_sal (struct breakpoint *b, struct gdbarch *gdbarch, int enabled, int internal, unsigned flags, int display_canonical) { @@ -19,7 +19,7 @@ diff --git a/gdb/breakpoint.c b/gdb/breakpoint.c if (type == bp_hardware_breakpoint) { -@@ -14271,7 +14271,7 @@ enable_breakpoint_disp (struct breakpoint *bpt, enum bpdisp disposition, +@@ -14281,7 +14281,7 @@ enable_breakpoint_disp (struct breakpoint *bpt, enum bpdisp disposition, if (bpt->type == bp_hardware_breakpoint) { diff --git a/gdb-bz568248-oom-is-error.patch b/gdb-bz568248-oom-is-error.patch index d08aefb..48116f0 100644 --- a/gdb-bz568248-oom-is-error.patch +++ b/gdb-bz568248-oom-is-error.patch @@ -53,7 +53,7 @@ gdb/ diff --git a/gdb/utils.c b/gdb/utils.c --- a/gdb/utils.c +++ b/gdb/utils.c -@@ -721,13 +721,11 @@ malloc_failure (long size) +@@ -692,13 +692,11 @@ malloc_failure (long size) { if (size > 0) { diff --git a/gdb-container-rh-pkg.patch b/gdb-container-rh-pkg.patch index 87c53dd..73955f0 100644 --- a/gdb-container-rh-pkg.patch +++ b/gdb-container-rh-pkg.patch @@ -9,7 +9,7 @@ Subject: gdb-container-rh-pkg.patch diff --git a/gdb/remote.c b/gdb/remote.c --- a/gdb/remote.c +++ b/gdb/remote.c -@@ -13966,7 +13966,17 @@ remote_target::pid_to_exec_file (int pid) +@@ -13922,7 +13922,17 @@ remote_target::pid_to_exec_file (int pid) char *annex = NULL; if (packet_support (PACKET_qXfer_exec_file) != PACKET_ENABLE) diff --git a/gdb-follow-child-stale-parent.patch b/gdb-follow-child-stale-parent.patch index 9b7b0f5..57660ed 100644 --- a/gdb-follow-child-stale-parent.patch +++ b/gdb-follow-child-stale-parent.patch @@ -24,7 +24,7 @@ unwinders try to access it, breaking: diff --git a/gdb/infrun.c b/gdb/infrun.c --- a/gdb/infrun.c +++ b/gdb/infrun.c -@@ -754,6 +754,9 @@ follow_fork (void) +@@ -755,6 +755,9 @@ follow_fork (void) } else { diff --git a/gdb-gnat-dwarf-crash-3of3.patch b/gdb-gnat-dwarf-crash-3of3.patch index 6db7801..4865715 100644 --- a/gdb-gnat-dwarf-crash-3of3.patch +++ b/gdb-gnat-dwarf-crash-3of3.patch @@ -42,7 +42,7 @@ gdb/ diff --git a/gdb/dwarf2read.c b/gdb/dwarf2read.c --- a/gdb/dwarf2read.c +++ b/gdb/dwarf2read.c -@@ -10588,6 +10588,13 @@ private: +@@ -10587,6 +10587,13 @@ private: static void process_die (struct die_info *die, struct dwarf2_cu *cu) { @@ -59,8 +59,8 @@ diff --git a/gdb/dwarf2read.c b/gdb/dwarf2read.c diff --git a/gdb/infrun.c b/gdb/infrun.c --- a/gdb/infrun.c +++ b/gdb/infrun.c -@@ -609,6 +609,13 @@ holding the child stopped. Try \"set detach-on-fork\" or \ - target_pid_to_str (process_ptid)); +@@ -610,6 +610,13 @@ holding the child stopped. Try \"set detach-on-fork\" or \ + target_pid_to_str (process_ptid).c_str ()); } +#ifdef NEED_DETACH_SIGSTOP @@ -89,7 +89,7 @@ diff --git a/gdb/linux-nat.c b/gdb/linux-nat.c static unsigned int debug_linux_nat; static void show_debug_linux_nat (struct ui_file *file, int from_tty, -@@ -1037,6 +1043,9 @@ linux_nat_post_attach_wait (ptid_t ptid, int *signalled) +@@ -1036,6 +1042,9 @@ linux_nat_post_attach_wait (ptid_t ptid, int *signalled) if (debug_linux_nat) fprintf_unfiltered (gdb_stdlog, "LNPAW: Attaching to a stopped process\n"); @@ -99,7 +99,7 @@ diff --git a/gdb/linux-nat.c b/gdb/linux-nat.c /* The process is definitely stopped. It is in a job control stop, unless the kernel predates the TASK_STOPPED / -@@ -1369,6 +1378,25 @@ get_detach_signal (struct lwp_info *lp) +@@ -1368,6 +1377,25 @@ get_detach_signal (struct lwp_info *lp) return gdb_signal_to_host (signo); } @@ -151,9 +151,9 @@ diff --git a/gdb/linux-nat.c b/gdb/linux-nat.c + +#endif if (resume_many) - iterate_over_lwps (ptid, linux_nat_resume_callback, lp); - -@@ -3763,6 +3805,10 @@ linux_nat_target::mourn_inferior () + iterate_over_lwps (ptid, [=] (struct lwp_info *info) + { +@@ -3777,6 +3819,10 @@ linux_nat_target::mourn_inferior () /* Let the arch-specific native code know this process is gone. */ linux_target->low_forget_process (pid); diff --git a/gdb-moribund-utrace-workaround.patch b/gdb-moribund-utrace-workaround.patch index a32f942..4facb74 100644 --- a/gdb-moribund-utrace-workaround.patch +++ b/gdb-moribund-utrace-workaround.patch @@ -14,7 +14,7 @@ Bug in FSF GDB exploited by the ptrace-on-utrace interaction. diff --git a/gdb/breakpoint.c b/gdb/breakpoint.c --- a/gdb/breakpoint.c +++ b/gdb/breakpoint.c -@@ -11929,6 +11929,8 @@ update_global_location_list (enum ugll_insert_mode insert_mode) +@@ -11939,6 +11939,8 @@ update_global_location_list (enum ugll_insert_mode insert_mode) traps we can no longer explain. */ old_loc->events_till_retirement = 3 * (thread_count () + 1); diff --git a/gdb-rhbz795424-bitpos-20of25.patch b/gdb-rhbz795424-bitpos-20of25.patch index 2d64afc..c8d0ed0 100644 --- a/gdb-rhbz795424-bitpos-20of25.patch +++ b/gdb-rhbz795424-bitpos-20of25.patch @@ -665,7 +665,7 @@ diff --git a/gdb/ada-lang.c b/gdb/ada-lang.c val = value_cast (value_type (component), val); -@@ -4445,7 +4446,7 @@ ensure_lval (struct value *val) +@@ -4447,7 +4448,7 @@ ensure_lval (struct value *val) if (VALUE_LVAL (val) == not_lval || VALUE_LVAL (val) == lval_internalvar) { @@ -674,7 +674,7 @@ diff --git a/gdb/ada-lang.c b/gdb/ada-lang.c const CORE_ADDR addr = value_as_long (value_allocate_space_in_inferior (len)); -@@ -4529,7 +4530,7 @@ static CORE_ADDR +@@ -4531,7 +4532,7 @@ static CORE_ADDR value_pointer (struct value *value, struct type *type) { struct gdbarch *gdbarch = get_type_arch (type); @@ -683,7 +683,7 @@ diff --git a/gdb/ada-lang.c b/gdb/ada-lang.c gdb_byte *buf = (gdb_byte *) alloca (len); CORE_ADDR addr; -@@ -6642,7 +6643,7 @@ value_tag_from_contents_and_address (struct type *type, +@@ -6644,7 +6645,7 @@ value_tag_from_contents_and_address (struct type *type, const gdb_byte *valaddr, CORE_ADDR address) { @@ -692,7 +692,7 @@ diff --git a/gdb/ada-lang.c b/gdb/ada-lang.c struct type *tag_type; if (find_struct_field ("_tag", type, 0, &tag_type, &tag_byte_offset, -@@ -7135,7 +7136,7 @@ ada_in_variant (LONGEST val, struct type *type, int field_num) +@@ -7137,7 +7138,7 @@ ada_in_variant (LONGEST val, struct type *type, int field_num) only in that it can handle packed values of arbitrary type. */ static struct value * @@ -701,7 +701,7 @@ diff --git a/gdb/ada-lang.c b/gdb/ada-lang.c struct type *arg_type) { struct type *type; -@@ -7147,7 +7148,7 @@ ada_value_primitive_field (struct value *arg1, int offset, int fieldno, +@@ -7149,7 +7150,7 @@ ada_value_primitive_field (struct value *arg1, int offset, int fieldno, if (TYPE_FIELD_BITSIZE (arg_type, fieldno) != 0) { @@ -710,7 +710,7 @@ diff --git a/gdb/ada-lang.c b/gdb/ada-lang.c int bit_size = TYPE_FIELD_BITSIZE (arg_type, fieldno); return ada_value_primitive_packed_val (arg1, value_contents (arg1), -@@ -7224,9 +7225,9 @@ ada_value_primitive_field (struct value *arg1, int offset, int fieldno, +@@ -7226,9 +7227,9 @@ ada_value_primitive_field (struct value *arg1, int offset, int fieldno, Returns 1 if found, 0 otherwise. */ static int @@ -722,7 +722,7 @@ diff --git a/gdb/ada-lang.c b/gdb/ada-lang.c int *index_p) { int i; -@@ -7245,8 +7246,8 @@ find_struct_field (const char *name, struct type *type, int offset, +@@ -7247,8 +7248,8 @@ find_struct_field (const char *name, struct type *type, int offset, for (i = 0; i < TYPE_NFIELDS (type); i += 1) { @@ -733,7 +733,7 @@ diff --git a/gdb/ada-lang.c b/gdb/ada-lang.c const char *t_field_name = TYPE_FIELD_NAME (type, i); if (t_field_name == NULL) -@@ -7348,7 +7349,7 @@ num_visible_fields (struct type *type) +@@ -7350,7 +7351,7 @@ num_visible_fields (struct type *type) long explanation in find_struct_field's function documentation. */ static struct value * @@ -742,7 +742,7 @@ diff --git a/gdb/ada-lang.c b/gdb/ada-lang.c struct type *type) { int i; -@@ -7396,7 +7397,7 @@ ada_search_struct_field (const char *name, struct value *arg, int offset, +@@ -7398,7 +7399,7 @@ ada_search_struct_field (const char *name, struct value *arg, int offset, int j; struct type *field_type = ada_check_typedef (TYPE_FIELD_TYPE (type, i)); @@ -751,7 +751,7 @@ diff --git a/gdb/ada-lang.c b/gdb/ada-lang.c for (j = 0; j < TYPE_NFIELDS (field_type); j += 1) { -@@ -7428,8 +7429,8 @@ ada_search_struct_field (const char *name, struct value *arg, int offset, +@@ -7430,8 +7431,8 @@ ada_search_struct_field (const char *name, struct value *arg, int offset, return NULL; } @@ -762,7 +762,7 @@ diff --git a/gdb/ada-lang.c b/gdb/ada-lang.c /* Return field #INDEX in ARG, where the index is that returned by -@@ -7438,7 +7439,7 @@ static struct value *ada_index_struct_field_1 (int *, struct value *, +@@ -7440,7 +7441,7 @@ static struct value *ada_index_struct_field_1 (int *, struct value *, * If found, return value, else return NULL. */ static struct value * @@ -771,7 +771,7 @@ diff --git a/gdb/ada-lang.c b/gdb/ada-lang.c struct type *type) { return ada_index_struct_field_1 (&index, arg, offset, type); -@@ -7450,7 +7451,7 @@ ada_index_struct_field (int index, struct value *arg, int offset, +@@ -7452,7 +7453,7 @@ ada_index_struct_field (int index, struct value *arg, int offset, * *INDEX_P. */ static struct value * @@ -780,7 +780,7 @@ diff --git a/gdb/ada-lang.c b/gdb/ada-lang.c struct type *type) { int i; -@@ -7541,7 +7542,8 @@ ada_value_struct_elt (struct value *arg, const char *name, int no_err) +@@ -7543,7 +7544,8 @@ ada_value_struct_elt (struct value *arg, const char *name, int no_err) v = ada_search_struct_field (name, arg, 0, t); else { @@ -790,7 +790,7 @@ diff --git a/gdb/ada-lang.c b/gdb/ada-lang.c struct type *field_type; CORE_ADDR address; -@@ -7890,8 +7892,8 @@ ada_coerce_ref (struct value *val0) +@@ -7892,8 +7894,8 @@ ada_coerce_ref (struct value *val0) /* Return OFF rounded upward if necessary to a multiple of ALIGNMENT (a power of 2). */ @@ -801,7 +801,7 @@ diff --git a/gdb/ada-lang.c b/gdb/ada-lang.c { return (off + alignment - 1) & ~(alignment - 1); } -@@ -8281,10 +8283,9 @@ ada_template_to_fixed_record_type_1 (struct type *type, +@@ -8283,10 +8285,9 @@ ada_template_to_fixed_record_type_1 (struct type *type, struct value *mark = value_mark (); struct value *dval; struct type *rtype; @@ -814,7 +814,7 @@ diff --git a/gdb/ada-lang.c b/gdb/ada-lang.c int f; /* Compute the number of fields in this record type that are going -@@ -8361,7 +8362,7 @@ ada_template_to_fixed_record_type_1 (struct type *type, +@@ -8363,7 +8364,7 @@ ada_template_to_fixed_record_type_1 (struct type *type, that follow this one. */ if (ada_is_aligner_type (field_type)) { @@ -823,7 +823,7 @@ diff --git a/gdb/ada-lang.c b/gdb/ada-lang.c field_valaddr = cond_offset_host (field_valaddr, field_offset); field_address = cond_offset_target (field_address, field_offset); -@@ -8497,11 +8498,11 @@ ada_template_to_fixed_record_type_1 (struct type *type, +@@ -8499,11 +8500,11 @@ ada_template_to_fixed_record_type_1 (struct type *type, if (TYPE_LENGTH (type) <= 0) { if (TYPE_NAME (rtype)) @@ -839,7 +839,7 @@ diff --git a/gdb/ada-lang.c b/gdb/ada-lang.c } else { -@@ -8965,7 +8966,8 @@ to_fixed_array_type (struct type *type0, struct value *dval, +@@ -8967,7 +8968,8 @@ to_fixed_array_type (struct type *type0, struct value *dval, type was a regular (non-packed) array type. As a result, the bitsize of the array elements needs to be set again, and the array length needs to be recomputed based on that bitsize. */ @@ -929,7 +929,7 @@ diff --git a/gdb/ada-valprint.c b/gdb/ada-valprint.c enum bfd_endian byte_order) { if (type_len == 1) -@@ -476,11 +476,11 @@ ada_print_scalar (struct type *type, LONGEST val, struct ui_file *stream) +@@ -475,11 +475,11 @@ ada_print_scalar (struct type *type, LONGEST val, struct ui_file *stream) static void printstr (struct ui_file *stream, struct type *elttype, const gdb_byte *string, @@ -943,7 +943,7 @@ diff --git a/gdb/ada-valprint.c b/gdb/ada-valprint.c unsigned int things_printed = 0; int in_quotes = 0; int need_comma = 0; -@@ -495,9 +495,9 @@ printstr (struct ui_file *stream, struct type *elttype, const gdb_byte *string, +@@ -494,9 +494,9 @@ printstr (struct ui_file *stream, struct type *elttype, const gdb_byte *string, { /* Position of the character we are examining to see whether it is repeated. */ @@ -955,7 +955,7 @@ diff --git a/gdb/ada-valprint.c b/gdb/ada-valprint.c QUIT; -@@ -528,7 +528,8 @@ printstr (struct ui_file *stream, struct type *elttype, const gdb_byte *string, +@@ -527,7 +527,8 @@ printstr (struct ui_file *stream, struct type *elttype, const gdb_byte *string, ada_emit_char (char_at (string, i, type_len, byte_order), elttype, stream, '\'', type_len); fputs_filtered ("'", stream); @@ -965,7 +965,7 @@ diff --git a/gdb/ada-valprint.c b/gdb/ada-valprint.c i = rep1 - 1; things_printed += options->repeat_count_threshold; need_comma = 1; -@@ -556,7 +557,7 @@ printstr (struct ui_file *stream, struct type *elttype, const gdb_byte *string, +@@ -555,7 +556,7 @@ printstr (struct ui_file *stream, struct type *elttype, const gdb_byte *string, void ada_printstr (struct ui_file *stream, struct type *type, @@ -974,7 +974,7 @@ diff --git a/gdb/ada-valprint.c b/gdb/ada-valprint.c const char *encoding, int force_ellipses, const struct value_print_options *options) { -@@ -566,12 +567,12 @@ ada_printstr (struct ui_file *stream, struct type *type, +@@ -565,12 +566,12 @@ ada_printstr (struct ui_file *stream, struct type *type, static int print_variant_part (struct type *type, int field_num, @@ -989,7 +989,7 @@ diff --git a/gdb/ada-valprint.c b/gdb/ada-valprint.c const struct language_defn *language) { struct type *var_type = TYPE_FIELD_TYPE (type, field_num); -@@ -607,11 +608,11 @@ print_variant_part (struct type *type, int field_num, +@@ -606,11 +607,11 @@ print_variant_part (struct type *type, int field_num, static int print_field_values (struct type *type, const gdb_byte *valaddr, @@ -1003,7 +1003,7 @@ diff --git a/gdb/ada-valprint.c b/gdb/ada-valprint.c const struct language_defn *language) { int i, len; -@@ -677,7 +678,7 @@ print_field_values (struct type *type, const gdb_byte *valaddr, +@@ -676,7 +677,7 @@ print_field_values (struct type *type, const gdb_byte *valaddr, else { struct value *v; @@ -1012,7 +1012,7 @@ diff --git a/gdb/ada-valprint.c b/gdb/ada-valprint.c int bit_size = TYPE_FIELD_BITSIZE (type, i); struct value_print_options opts; -@@ -722,8 +723,8 @@ ada_val_print_string (struct type *type, const gdb_byte *valaddr, +@@ -721,8 +722,8 @@ ada_val_print_string (struct type *type, const gdb_byte *valaddr, { enum bfd_endian byte_order = gdbarch_byte_order (get_type_arch (type)); struct type *elttype = TYPE_TARGET_TYPE (type); @@ -1023,7 +1023,7 @@ diff --git a/gdb/ada-valprint.c b/gdb/ada-valprint.c /* We know that ELTTYPE cannot possibly be null, because we assume that we're called only when TYPE is a string-like type. -@@ -742,7 +743,7 @@ ada_val_print_string (struct type *type, const gdb_byte *valaddr, +@@ -741,7 +742,7 @@ ada_val_print_string (struct type *type, const gdb_byte *valaddr, elements up to it. */ if (options->stop_print_at_null) { @@ -1032,7 +1032,7 @@ diff --git a/gdb/ada-valprint.c b/gdb/ada-valprint.c /* Look for a NULL char. */ for (temp_len = 0; -@@ -1115,7 +1116,7 @@ ada_val_print_ref (struct type *type, const gdb_byte *valaddr, +@@ -1114,7 +1115,7 @@ ada_val_print_ref (struct type *type, const gdb_byte *valaddr, static void ada_val_print_1 (struct type *type, @@ -1041,7 +1041,7 @@ diff --git a/gdb/ada-valprint.c b/gdb/ada-valprint.c struct ui_file *stream, int recurse, struct value *original_value, const struct value_print_options *options, -@@ -1199,7 +1200,7 @@ ada_val_print_1 (struct type *type, +@@ -1198,7 +1199,7 @@ ada_val_print_1 (struct type *type, void ada_val_print (struct type *type, @@ -1145,7 +1145,7 @@ diff --git a/gdb/arch-utils.h b/gdb/arch-utils.h diff --git a/gdb/arm-linux-nat.c b/gdb/arm-linux-nat.c --- a/gdb/arm-linux-nat.c +++ b/gdb/arm-linux-nat.c -@@ -1096,7 +1096,7 @@ arm_linux_nat_target::remove_hw_breakpoint (struct gdbarch *gdbarch, +@@ -1090,7 +1090,7 @@ arm_linux_nat_target::remove_hw_breakpoint (struct gdbarch *gdbarch, /* Are we able to use a hardware watchpoint for the LEN bytes starting at ADDR? */ int @@ -1280,7 +1280,7 @@ diff --git a/gdb/ax.h b/gdb/ax.h diff --git a/gdb/breakpoint.c b/gdb/breakpoint.c --- a/gdb/breakpoint.c +++ b/gdb/breakpoint.c -@@ -2056,9 +2056,9 @@ should_be_inserted (struct bp_location *bl) +@@ -2057,9 +2057,9 @@ should_be_inserted (struct bp_location *bl) { fprintf_unfiltered (gdb_stdlog, "infrun: stepping past non-steppable watchpoint. " @@ -1292,7 +1292,7 @@ diff --git a/gdb/breakpoint.c b/gdb/breakpoint.c } return 0; } -@@ -6793,7 +6793,7 @@ breakpoint_address_match (const address_space *aspace1, CORE_ADDR addr1, +@@ -6803,7 +6803,7 @@ breakpoint_address_match (const address_space *aspace1, CORE_ADDR addr1, static int breakpoint_address_match_range (const address_space *aspace1, CORE_ADDR addr1, @@ -1301,7 +1301,7 @@ diff --git a/gdb/breakpoint.c b/gdb/breakpoint.c CORE_ADDR addr2) { return ((gdbarch_has_global_breakpoints (target_gdbarch ()) -@@ -10859,7 +10859,7 @@ can_use_hardware_watchpoint (const std::vector &vals) +@@ -10869,7 +10869,7 @@ can_use_hardware_watchpoint (const std::vector &vals) && TYPE_CODE (vtype) != TYPE_CODE_ARRAY)) { CORE_ADDR vaddr = value_address (v); @@ -1552,7 +1552,7 @@ diff --git a/gdb/d-valprint.c b/gdb/d-valprint.c diff --git a/gdb/dwarf2loc.c b/gdb/dwarf2loc.c --- a/gdb/dwarf2loc.c +++ b/gdb/dwarf2loc.c -@@ -1625,7 +1625,7 @@ rw_pieced_value (struct value *v, struct value *from) +@@ -1624,7 +1624,7 @@ rw_pieced_value (struct value *v, struct value *from) for (; i < c->pieces.size () && offset < max_offset; i++) { struct dwarf_expr_piece *p = &c->pieces[i]; @@ -1561,7 +1561,7 @@ diff --git a/gdb/dwarf2loc.c b/gdb/dwarf2loc.c this_size_bits = p->size - bits_to_skip; if (this_size_bits > max_offset - offset) -@@ -1872,7 +1872,7 @@ write_pieced_value (struct value *to, struct value *from) +@@ -1871,7 +1871,7 @@ write_pieced_value (struct value *to, struct value *from) static int check_pieced_synthetic_pointer (const struct value *value, LONGEST bit_offset, @@ -1570,7 +1570,7 @@ diff --git a/gdb/dwarf2loc.c b/gdb/dwarf2loc.c { struct piece_closure *c = (struct piece_closure *) value_computed_closure (value); -@@ -1885,7 +1885,7 @@ check_pieced_synthetic_pointer (const struct value *value, LONGEST bit_offset, +@@ -1884,7 +1884,7 @@ check_pieced_synthetic_pointer (const struct value *value, LONGEST bit_offset, for (i = 0; i < c->pieces.size () && bit_length > 0; i++) { struct dwarf_expr_piece *p = &c->pieces[i]; @@ -1579,7 +1579,7 @@ diff --git a/gdb/dwarf2loc.c b/gdb/dwarf2loc.c if (bit_offset > 0) { -@@ -1989,8 +1989,8 @@ indirect_pieced_value (struct value *value) +@@ -1988,8 +1988,8 @@ indirect_pieced_value (struct value *value) = (struct piece_closure *) value_computed_closure (value); struct type *type; struct frame_info *frame; @@ -1590,7 +1590,7 @@ diff --git a/gdb/dwarf2loc.c b/gdb/dwarf2loc.c struct dwarf_expr_piece *piece = NULL; LONGEST byte_offset; enum bfd_endian byte_order; -@@ -2007,7 +2007,7 @@ indirect_pieced_value (struct value *value) +@@ -2006,7 +2006,7 @@ indirect_pieced_value (struct value *value) for (i = 0; i < c->pieces.size () && bit_length > 0; i++) { struct dwarf_expr_piece *p = &c->pieces[i]; @@ -1599,7 +1599,7 @@ diff --git a/gdb/dwarf2loc.c b/gdb/dwarf2loc.c if (bit_offset > 0) { -@@ -2296,9 +2296,9 @@ if (frame != NULL) select_frame (frame); +@@ -2295,9 +2295,9 @@ if (frame != NULL) select_frame (frame); case DWARF_VALUE_STACK: { struct value *value = ctx.fetch (0); @@ -1615,7 +1615,7 @@ diff --git a/gdb/dwarf2loc.c b/gdb/dwarf2loc.c diff --git a/gdb/dwarf2read.c b/gdb/dwarf2read.c --- a/gdb/dwarf2read.c +++ b/gdb/dwarf2read.c -@@ -2065,11 +2065,11 @@ dwarf2_complex_location_expr_complaint (void) +@@ -2064,11 +2064,11 @@ dwarf2_complex_location_expr_complaint (void) } static void @@ -1631,7 +1631,7 @@ diff --git a/gdb/dwarf2read.c b/gdb/dwarf2read.c } static void -@@ -15104,8 +15104,8 @@ dwarf2_add_field (struct field_info *fip, struct die_info *die, +@@ -15103,8 +15103,8 @@ dwarf2_add_field (struct field_info *fip, struct die_info *die, object, and then subtract off the number of bits of the field itself. The result is the bit offset of the LSB of the field. */ @@ -1700,7 +1700,7 @@ diff --git a/gdb/eval.c b/gdb/eval.c diff --git a/gdb/f-lang.c b/gdb/f-lang.c --- a/gdb/f-lang.c +++ b/gdb/f-lang.c -@@ -101,7 +101,7 @@ f_printchar (int c, struct type *type, struct ui_file *stream) +@@ -104,7 +104,7 @@ f_printchar (int c, struct type *type, struct ui_file *stream) static void f_printstr (struct ui_file *stream, struct type *type, const gdb_byte *string, @@ -1846,7 +1846,7 @@ diff --git a/gdb/frame.h b/gdb/frame.h diff --git a/gdb/gdbarch.c b/gdb/gdbarch.c --- a/gdb/gdbarch.c +++ b/gdb/gdbarch.c -@@ -1795,7 +1795,7 @@ set_gdbarch_wchar_signed (struct gdbarch *gdbarch, +@@ -1803,7 +1803,7 @@ set_gdbarch_wchar_signed (struct gdbarch *gdbarch, } const struct floatformat ** @@ -1884,7 +1884,7 @@ diff --git a/gdb/gdbarch.sh b/gdb/gdbarch.sh diff --git a/gdb/gdbtypes.c b/gdb/gdbtypes.c --- a/gdb/gdbtypes.c +++ b/gdb/gdbtypes.c -@@ -2889,7 +2889,7 @@ floatformat_from_type (const struct type *type) +@@ -2873,7 +2873,7 @@ floatformat_from_type (const struct type *type) least as long as OBJFILE. */ struct type * @@ -1893,7 +1893,7 @@ diff --git a/gdb/gdbtypes.c b/gdb/gdbtypes.c const char *name) { struct type *type; -@@ -3346,8 +3346,8 @@ is_public_ancestor (struct type *base, struct type *dclass) +@@ -3330,8 +3330,8 @@ is_public_ancestor (struct type *base, struct type *dclass) static int is_unique_ancestor_worker (struct type *base, struct type *dclass, @@ -1904,7 +1904,7 @@ diff --git a/gdb/gdbtypes.c b/gdb/gdbtypes.c CORE_ADDR address, struct value *val) { int i, count = 0; -@@ -3358,7 +3358,7 @@ is_unique_ancestor_worker (struct type *base, struct type *dclass, +@@ -3342,7 +3342,7 @@ is_unique_ancestor_worker (struct type *base, struct type *dclass, for (i = 0; i < TYPE_N_BASECLASSES (dclass) && count < 2; ++i) { struct type *iter; @@ -1913,7 +1913,7 @@ diff --git a/gdb/gdbtypes.c b/gdb/gdbtypes.c iter = check_typedef (TYPE_BASECLASS (dclass, i)); -@@ -3399,7 +3399,7 @@ is_unique_ancestor_worker (struct type *base, struct type *dclass, +@@ -3383,7 +3383,7 @@ is_unique_ancestor_worker (struct type *base, struct type *dclass, int is_unique_ancestor (struct type *base, struct value *val) { @@ -1922,7 +1922,7 @@ diff --git a/gdb/gdbtypes.c b/gdb/gdbtypes.c return is_unique_ancestor_worker (base, value_type (val), &offset, value_contents_for_printing (val), -@@ -4626,7 +4626,7 @@ recursive_dump_type (struct type *type, int spaces) +@@ -4643,7 +4643,7 @@ recursive_dump_type (struct type *type, int spaces) break; } puts_filtered ("\n"); @@ -1931,7 +1931,7 @@ diff --git a/gdb/gdbtypes.c b/gdb/gdbtypes.c if (TYPE_OBJFILE_OWNED (type)) { printfi_filtered (spaces, "objfile "); -@@ -5071,7 +5071,7 @@ copy_type (const struct type *type) +@@ -5088,7 +5088,7 @@ copy_type (const struct type *type) struct type * arch_type (struct gdbarch *gdbarch, @@ -2285,7 +2285,7 @@ diff --git a/gdb/m2-valprint.c b/gdb/m2-valprint.c /* Look for a NULL char. */ for (temp_len = 0; -@@ -415,7 +415,7 @@ m2_val_print (struct type *type, int embedded_offset, +@@ -414,7 +414,7 @@ m2_val_print (struct type *type, int embedded_offset, { struct type *range = elttype; LONGEST low_bound, high_bound; @@ -2603,7 +2603,7 @@ diff --git a/gdb/printcmd.c b/gdb/printcmd.c diff --git a/gdb/procfs.c b/gdb/procfs.c --- a/gdb/procfs.c +++ b/gdb/procfs.c -@@ -3374,7 +3374,7 @@ procfs_target::remove_watchpoint (CORE_ADDR addr, int len, +@@ -3368,7 +3368,7 @@ procfs_target::remove_watchpoint (CORE_ADDR addr, int len, } int @@ -2730,7 +2730,7 @@ diff --git a/gdb/regcache.h b/gdb/regcache.h diff --git a/gdb/remote.c b/gdb/remote.c --- a/gdb/remote.c +++ b/gdb/remote.c -@@ -458,7 +458,7 @@ public: +@@ -448,7 +448,7 @@ public: int remove_hw_breakpoint (struct gdbarch *, struct bp_target_info *) override; @@ -2739,7 +2739,7 @@ diff --git a/gdb/remote.c b/gdb/remote.c int insert_watchpoint (CORE_ADDR, int, enum target_hw_bp_type, struct expression *) override; -@@ -10406,7 +10406,7 @@ int remote_hw_watchpoint_length_limit = -1; +@@ -10369,7 +10369,7 @@ int remote_hw_watchpoint_length_limit = -1; int remote_hw_breakpoint_limit = -1; int @@ -2847,7 +2847,7 @@ diff --git a/gdb/stack.c b/gdb/stack.c diff --git a/gdb/symmisc.c b/gdb/symmisc.c --- a/gdb/symmisc.c +++ b/gdb/symmisc.c -@@ -587,11 +587,11 @@ print_symbol (struct gdbarch *gdbarch, struct symbol *symbol, +@@ -584,11 +584,11 @@ print_symbol (struct gdbarch *gdbarch, struct symbol *symbol, case LOC_CONST_BYTES: { @@ -2927,7 +2927,7 @@ diff --git a/gdb/target.c b/gdb/target.c static void default_rcmd (struct target_ops *, const char *, struct ui_file *); -@@ -3114,7 +3114,7 @@ target_fileio_read_stralloc (struct inferior *inf, const char *filename) +@@ -3117,7 +3117,7 @@ target_fileio_read_stralloc (struct inferior *inf, const char *filename) static int default_region_ok_for_hw_watchpoint (struct target_ops *self, @@ -3218,7 +3218,7 @@ diff --git a/gdb/valprint.c b/gdb/valprint.c struct ui_file *stream, int recurse, struct value *original_value, const struct value_print_options *options, -@@ -1774,7 +1774,7 @@ print_decimal_chars (struct ui_file *stream, const gdb_byte *valaddr, +@@ -1772,7 +1772,7 @@ print_decimal_chars (struct ui_file *stream, const gdb_byte *valaddr, void print_hex_chars (struct ui_file *stream, const gdb_byte *valaddr, @@ -3227,7 +3227,7 @@ diff --git a/gdb/valprint.c b/gdb/valprint.c bool zero_pad) { const gdb_byte *p; -@@ -1927,17 +1927,17 @@ val_print_array_elements (struct type *type, +@@ -1925,17 +1925,17 @@ val_print_array_elements (struct type *type, int recurse, struct value *val, const struct value_print_options *options, @@ -3250,7 +3250,7 @@ diff --git a/gdb/valprint.c b/gdb/valprint.c LONGEST low_bound, high_bound; LONGEST low_pos, high_pos; -@@ -2027,7 +2027,7 @@ val_print_array_elements (struct type *type, +@@ -2025,7 +2025,7 @@ val_print_array_elements (struct type *type, address, stream, recurse + 1, val, options, current_language); annotate_elt_rep (reps); @@ -3259,7 +3259,7 @@ diff --git a/gdb/valprint.c b/gdb/valprint.c annotate_elt_rep_end (); i = rep1 - 1; -@@ -2669,7 +2669,7 @@ print_converted_chars_to_obstack (struct obstack *obstack, +@@ -2667,7 +2667,7 @@ print_converted_chars_to_obstack (struct obstack *obstack, void generic_printstr (struct ui_file *stream, struct type *type, @@ -3372,7 +3372,7 @@ diff --git a/gdb/value.h b/gdb/value.h /* Mark VALUE's content bits starting at OFFSET and extending for LENGTH bits as optimized out. */ -@@ -849,12 +850,11 @@ extern struct value *value_primitive_field (struct value *arg1, LONGEST offset, +@@ -850,12 +851,11 @@ extern struct value *value_primitive_field (struct value *arg1, LONGEST offset, int fieldno, struct type *arg_type); @@ -3386,7 +3386,7 @@ diff --git a/gdb/value.h b/gdb/value.h extern struct value *value_cast_pointers (struct type *, struct value *, int); -@@ -1147,10 +1147,11 @@ extern struct value *value_literal_complex (struct value *, struct value *, +@@ -1148,10 +1148,11 @@ extern struct value *value_literal_complex (struct value *, struct value *, extern struct value *find_function_in_inferior (const char *, struct objfile **); diff --git a/gdb-rhbz795424-bitpos-21of25.patch b/gdb-rhbz795424-bitpos-21of25.patch index fab38d2..b178db2 100644 --- a/gdb-rhbz795424-bitpos-21of25.patch +++ b/gdb-rhbz795424-bitpos-21of25.patch @@ -100,7 +100,7 @@ diff --git a/gdb/defs.h b/gdb/defs.h diff --git a/gdb/p-valprint.c b/gdb/p-valprint.c --- a/gdb/p-valprint.c +++ b/gdb/p-valprint.c -@@ -775,6 +775,7 @@ pascal_object_print_value (struct type *type, const gdb_byte *valaddr, +@@ -773,6 +773,7 @@ pascal_object_print_value (struct type *type, const gdb_byte *valaddr, if (boffset < 0 || boffset >= TYPE_LENGTH (type)) { @@ -111,7 +111,7 @@ diff --git a/gdb/p-valprint.c b/gdb/p-valprint.c diff --git a/gdb/utils.c b/gdb/utils.c --- a/gdb/utils.c +++ b/gdb/utils.c -@@ -2952,6 +2952,17 @@ string_to_core_addr (const char *my_string) +@@ -2932,6 +2932,17 @@ string_to_core_addr (const char *my_string) return addr; } diff --git a/gdb-rhbz795424-bitpos-22of25.patch b/gdb-rhbz795424-bitpos-22of25.patch index af17971..a3d0355 100644 --- a/gdb-rhbz795424-bitpos-22of25.patch +++ b/gdb-rhbz795424-bitpos-22of25.patch @@ -154,7 +154,7 @@ diff --git a/gdb/arm-linux-nat.c b/gdb/arm-linux-nat.c const struct target_desc *read_description () override; -@@ -1203,7 +1203,7 @@ arm_linux_nat_target::stopped_by_watchpoint () +@@ -1197,7 +1197,7 @@ arm_linux_nat_target::stopped_by_watchpoint () bool arm_linux_nat_target::watchpoint_addr_within_range (CORE_ADDR addr, CORE_ADDR start, @@ -188,7 +188,7 @@ diff --git a/gdb/nat/aarch64-linux-hw-point.c b/gdb/nat/aarch64-linux-hw-point.c CORE_ADDR *next_addr_orig_p) { int aligned_len; -@@ -611,7 +612,7 @@ aarch64_handle_aligned_watchpoint (enum target_hw_bp_type type, +@@ -602,7 +603,7 @@ aarch64_handle_aligned_watchpoint (enum target_hw_bp_type type, static int aarch64_handle_unaligned_watchpoint (enum target_hw_bp_type type, @@ -197,7 +197,7 @@ diff --git a/gdb/nat/aarch64-linux-hw-point.c b/gdb/nat/aarch64-linux-hw-point.c struct aarch64_debug_reg_state *state) { CORE_ADDR addr_orig = addr; -@@ -641,12 +642,12 @@ aarch64_handle_unaligned_watchpoint (enum target_hw_bp_type type, +@@ -632,12 +633,12 @@ aarch64_handle_unaligned_watchpoint (enum target_hw_bp_type type, " " "addr_orig: %s\n" " " @@ -212,7 +212,7 @@ diff --git a/gdb/nat/aarch64-linux-hw-point.c b/gdb/nat/aarch64-linux-hw-point.c core_addr_to_string_nz (addr_orig_next)); addr_orig = addr_orig_next; -@@ -660,7 +661,7 @@ aarch64_handle_unaligned_watchpoint (enum target_hw_bp_type type, +@@ -651,7 +652,7 @@ aarch64_handle_unaligned_watchpoint (enum target_hw_bp_type type, int aarch64_handle_watchpoint (enum target_hw_bp_type type, CORE_ADDR addr, @@ -221,7 +221,7 @@ diff --git a/gdb/nat/aarch64-linux-hw-point.c b/gdb/nat/aarch64-linux-hw-point.c struct aarch64_debug_reg_state *state) { if (aarch64_point_is_aligned (1 /* is_watchpoint */ , addr, len)) -@@ -742,14 +743,14 @@ aarch64_linux_any_set_debug_regs_state (aarch64_debug_reg_state *state, +@@ -733,14 +734,14 @@ aarch64_linux_any_set_debug_regs_state (aarch64_debug_reg_state *state, void aarch64_show_debug_reg_state (struct aarch64_debug_reg_state *state, const char *func, CORE_ADDR addr, @@ -239,7 +239,7 @@ diff --git a/gdb/nat/aarch64-linux-hw-point.c b/gdb/nat/aarch64-linux-hw-point.c type == hw_write ? "hw-write-watchpoint" : (type == hw_read ? "hw-read-watchpoint" : (type == hw_access ? "hw-access-watchpoint" -@@ -832,7 +833,7 @@ aarch64_linux_get_debug_reg_capacity (int tid) +@@ -823,7 +824,7 @@ aarch64_linux_get_debug_reg_capacity (int tid) ADDR and whose length is LEN in bytes. */ int @@ -363,7 +363,7 @@ diff --git a/gdb/procfs.c b/gdb/procfs.c { struct { procfs_ctl_t cmd; -@@ -3238,7 +3238,7 @@ procfs_target::pid_to_exec_file (int pid) +@@ -3232,7 +3232,7 @@ procfs_target::pid_to_exec_file (int pid) /* Insert a watchpoint. */ static int @@ -375,7 +375,7 @@ diff --git a/gdb/procfs.c b/gdb/procfs.c diff --git a/gdb/remote.c b/gdb/remote.c --- a/gdb/remote.c +++ b/gdb/remote.c -@@ -450,7 +450,7 @@ public: +@@ -440,7 +440,7 @@ public: bool stopped_data_address (CORE_ADDR *) override; @@ -384,7 +384,7 @@ diff --git a/gdb/remote.c b/gdb/remote.c int can_use_hw_breakpoint (enum bptype, int, int) override; -@@ -10335,7 +10335,7 @@ remote_target::insert_watchpoint (CORE_ADDR addr, int len, +@@ -10298,7 +10298,7 @@ remote_target::insert_watchpoint (CORE_ADDR addr, int len, p = strchr (rs->buf.data (), '\0'); addr = remote_address_masked (addr); p += hexnumstr (p, (ULONGEST) addr); @@ -393,7 +393,7 @@ diff --git a/gdb/remote.c b/gdb/remote.c putpkt (rs->buf); getpkt (&rs->buf, 0); -@@ -10355,7 +10355,7 @@ remote_target::insert_watchpoint (CORE_ADDR addr, int len, +@@ -10318,7 +10318,7 @@ remote_target::insert_watchpoint (CORE_ADDR addr, int len, bool remote_target::watchpoint_addr_within_range (CORE_ADDR addr, @@ -402,7 +402,7 @@ diff --git a/gdb/remote.c b/gdb/remote.c { CORE_ADDR diff = remote_address_masked (addr - start); -@@ -10384,7 +10384,7 @@ remote_target::remove_watchpoint (CORE_ADDR addr, int len, +@@ -10347,7 +10347,7 @@ remote_target::remove_watchpoint (CORE_ADDR addr, int len, p = strchr (rs->buf.data (), '\0'); addr = remote_address_masked (addr); p += hexnumstr (p, (ULONGEST) addr); @@ -526,7 +526,7 @@ diff --git a/gdb/target.c b/gdb/target.c static int default_region_ok_for_hw_watchpoint (struct target_ops *, CORE_ADDR, LONGEST); -@@ -3122,7 +3122,7 @@ default_region_ok_for_hw_watchpoint (struct target_ops *self, +@@ -3125,7 +3125,7 @@ default_region_ok_for_hw_watchpoint (struct target_ops *self, static int default_watchpoint_addr_within_range (struct target_ops *target, CORE_ADDR addr, diff --git a/gdb-rhbz795424-bitpos-23of25.patch b/gdb-rhbz795424-bitpos-23of25.patch index e258042..0500f6d 100644 --- a/gdb-rhbz795424-bitpos-23of25.patch +++ b/gdb-rhbz795424-bitpos-23of25.patch @@ -982,7 +982,7 @@ diff --git a/gdb/sh-tdep.c b/gdb/sh-tdep.c diff --git a/gdb/sparc64-tdep.c b/gdb/sparc64-tdep.c --- a/gdb/sparc64-tdep.c +++ b/gdb/sparc64-tdep.c -@@ -1206,7 +1206,7 @@ sparc64_16_byte_align_p (struct type *type) +@@ -1205,7 +1205,7 @@ sparc64_16_byte_align_p (struct type *type) static void sparc64_store_floating_fields (struct regcache *regcache, struct type *type, @@ -991,7 +991,7 @@ diff --git a/gdb/sparc64-tdep.c b/gdb/sparc64-tdep.c { struct gdbarch *gdbarch = regcache->arch (); int len = TYPE_LENGTH (type); -@@ -1266,7 +1266,7 @@ sparc64_store_floating_fields (struct regcache *regcache, struct type *type, +@@ -1265,7 +1265,7 @@ sparc64_store_floating_fields (struct regcache *regcache, struct type *type, for (i = 0; i < TYPE_NFIELDS (type); i++) { struct type *subtype = check_typedef (TYPE_FIELD_TYPE (type, i)); @@ -1000,7 +1000,7 @@ diff --git a/gdb/sparc64-tdep.c b/gdb/sparc64-tdep.c sparc64_store_floating_fields (regcache, subtype, valbuf, element, subpos); -@@ -1298,7 +1298,7 @@ sparc64_store_floating_fields (struct regcache *regcache, struct type *type, +@@ -1297,7 +1297,7 @@ sparc64_store_floating_fields (struct regcache *regcache, struct type *type, static void sparc64_extract_floating_fields (struct regcache *regcache, struct type *type, @@ -1009,7 +1009,7 @@ diff --git a/gdb/sparc64-tdep.c b/gdb/sparc64-tdep.c { struct gdbarch *gdbarch = regcache->arch (); -@@ -1354,7 +1354,7 @@ sparc64_extract_floating_fields (struct regcache *regcache, struct type *type, +@@ -1353,7 +1353,7 @@ sparc64_extract_floating_fields (struct regcache *regcache, struct type *type, for (i = 0; i < TYPE_NFIELDS (type); i++) { struct type *subtype = check_typedef (TYPE_FIELD_TYPE (type, i)); @@ -1018,7 +1018,7 @@ diff --git a/gdb/sparc64-tdep.c b/gdb/sparc64-tdep.c sparc64_extract_floating_fields (regcache, subtype, valbuf, subpos); } -@@ -1388,7 +1388,7 @@ sparc64_store_arguments (struct regcache *regcache, int nargs, +@@ -1387,7 +1387,7 @@ sparc64_store_arguments (struct regcache *regcache, int nargs, for (i = 0; i < nargs; i++) { struct type *type = value_type (args[i]); @@ -1027,7 +1027,7 @@ diff --git a/gdb/sparc64-tdep.c b/gdb/sparc64-tdep.c if (sparc64_structure_or_union_p (type) || (sparc64_complex_floating_p (type) && len == 32)) -@@ -1488,7 +1488,7 @@ sparc64_store_arguments (struct regcache *regcache, int nargs, +@@ -1487,7 +1487,7 @@ sparc64_store_arguments (struct regcache *regcache, int nargs, { const gdb_byte *valbuf = value_contents (args[i]); struct type *type = value_type (args[i]); diff --git a/gdb-vla-intel-fortran-strides.patch b/gdb-vla-intel-fortran-strides.patch index eb6e58a..7b0fbe3 100644 --- a/gdb-vla-intel-fortran-strides.patch +++ b/gdb-vla-intel-fortran-strides.patch @@ -37,7 +37,7 @@ dbfd7140bf4c0500d1f5d192be781f83f78f7922 diff --git a/gdb/dwarf2loc.c b/gdb/dwarf2loc.c --- a/gdb/dwarf2loc.c +++ b/gdb/dwarf2loc.c -@@ -2429,11 +2429,14 @@ dwarf2_locexpr_baton_eval (const struct dwarf2_locexpr_baton *dlbaton, +@@ -2428,11 +2428,14 @@ dwarf2_locexpr_baton_eval (const struct dwarf2_locexpr_baton *dlbaton, /* See dwarf2loc.h. */ int @@ -54,7 +54,7 @@ diff --git a/gdb/dwarf2loc.c b/gdb/dwarf2loc.c if (prop == NULL) return 0; -@@ -2457,7 +2460,7 @@ dwarf2_evaluate_property (const struct dynamic_prop *prop, +@@ -2456,7 +2459,7 @@ dwarf2_evaluate_property (const struct dynamic_prop *prop, *value = value_as_address (val); } @@ -63,7 +63,7 @@ diff --git a/gdb/dwarf2loc.c b/gdb/dwarf2loc.c } } break; -@@ -2479,7 +2482,7 @@ dwarf2_evaluate_property (const struct dynamic_prop *prop, +@@ -2478,7 +2481,7 @@ dwarf2_evaluate_property (const struct dynamic_prop *prop, if (!value_optimized_out (val)) { *value = value_as_address (val); @@ -72,7 +72,7 @@ diff --git a/gdb/dwarf2loc.c b/gdb/dwarf2loc.c } } } -@@ -2487,8 +2490,8 @@ dwarf2_evaluate_property (const struct dynamic_prop *prop, +@@ -2486,8 +2489,8 @@ dwarf2_evaluate_property (const struct dynamic_prop *prop, case PROP_CONST: *value = prop->data.const_val; @@ -83,7 +83,7 @@ diff --git a/gdb/dwarf2loc.c b/gdb/dwarf2loc.c case PROP_ADDR_OFFSET: { struct dwarf2_property_baton *baton -@@ -2509,11 +2512,38 @@ dwarf2_evaluate_property (const struct dynamic_prop *prop, +@@ -2508,11 +2511,38 @@ dwarf2_evaluate_property (const struct dynamic_prop *prop, val = value_at (baton->offset_info.type, pinfo->addr + baton->offset_info.offset); *value = value_as_address (val); @@ -143,7 +143,7 @@ diff --git a/gdb/dwarf2loc.h b/gdb/dwarf2loc.h diff --git a/gdb/dwarf2read.c b/gdb/dwarf2read.c --- a/gdb/dwarf2read.c +++ b/gdb/dwarf2read.c -@@ -17752,7 +17752,7 @@ read_subrange_type (struct die_info *die, struct dwarf2_cu *cu) +@@ -17751,7 +17751,7 @@ read_subrange_type (struct die_info *die, struct dwarf2_cu *cu) struct type *base_type, *orig_base_type; struct type *range_type; struct attribute *attr; @@ -152,7 +152,7 @@ diff --git a/gdb/dwarf2read.c b/gdb/dwarf2read.c int low_default_is_valid; int high_bound_is_count = 0; const char *name; -@@ -17772,7 +17772,9 @@ read_subrange_type (struct die_info *die, struct dwarf2_cu *cu) +@@ -17771,7 +17771,9 @@ read_subrange_type (struct die_info *die, struct dwarf2_cu *cu) low.kind = PROP_CONST; high.kind = PROP_CONST; @@ -162,7 +162,7 @@ diff --git a/gdb/dwarf2read.c b/gdb/dwarf2read.c /* Set LOW_DEFAULT_IS_VALID if current language and DWARF version allow omitting DW_AT_lower_bound. */ -@@ -17805,6 +17807,14 @@ read_subrange_type (struct die_info *die, struct dwarf2_cu *cu) +@@ -17804,6 +17806,14 @@ read_subrange_type (struct die_info *die, struct dwarf2_cu *cu) break; } @@ -177,7 +177,7 @@ diff --git a/gdb/dwarf2read.c b/gdb/dwarf2read.c attr = dwarf2_attr (die, DW_AT_lower_bound, cu); if (attr) attr_to_dynamic_prop (attr, die, cu, &low); -@@ -17897,7 +17907,7 @@ read_subrange_type (struct die_info *die, struct dwarf2_cu *cu) +@@ -17896,7 +17906,7 @@ read_subrange_type (struct die_info *die, struct dwarf2_cu *cu) && !TYPE_UNSIGNED (base_type) && (high.data.const_val & negative_mask)) high.data.const_val |= negative_mask; @@ -588,7 +588,7 @@ diff --git a/gdb/eval.c b/gdb/eval.c case TYPE_CODE_PTR: case TYPE_CODE_FUNC: -@@ -2372,49 +2629,6 @@ evaluate_subexp_standard (struct type *expect_type, +@@ -2385,49 +2642,6 @@ evaluate_subexp_standard (struct type *expect_type, } return (arg1); @@ -638,7 +638,7 @@ diff --git a/gdb/eval.c b/gdb/eval.c case BINOP_LOGICAL_AND: arg1 = evaluate_subexp (NULL_TYPE, exp, pos, noside); if (noside == EVAL_SKIP) -@@ -3334,6 +3548,9 @@ calc_f77_array_dims (struct type *array_type) +@@ -3347,6 +3561,9 @@ calc_f77_array_dims (struct type *array_type) int ndimen = 1; struct type *tmp_type; @@ -673,7 +673,7 @@ diff --git a/gdb/expprint.c b/gdb/expprint.c print_subexp (exp, pos, stream, PREC_ABOVE_COMMA); fputs_filtered (")", stream); return; -@@ -1105,22 +1102,24 @@ dump_subexp_body_standard (struct expression *exp, +@@ -1106,22 +1103,24 @@ dump_subexp_body_standard (struct expression *exp, switch (range_type) { @@ -706,7 +706,7 @@ diff --git a/gdb/expprint.c b/gdb/expprint.c fputs_filtered ("ExclusiveRange 'EXP..EXP'", stream); break; default: -@@ -1128,11 +1127,9 @@ dump_subexp_body_standard (struct expression *exp, +@@ -1129,11 +1128,9 @@ dump_subexp_body_standard (struct expression *exp, break; } @@ -775,7 +775,7 @@ diff --git a/gdb/expression.h b/gdb/expression.h diff --git a/gdb/f-exp.y b/gdb/f-exp.y --- a/gdb/f-exp.y +++ b/gdb/f-exp.y -@@ -257,31 +257,63 @@ arglist : subrange +@@ -270,31 +270,63 @@ arglist : subrange arglist : arglist ',' exp %prec ABOVE_COMMA { arglist_len++; } @@ -928,7 +928,7 @@ diff --git a/gdb/gdbtypes.c b/gdb/gdbtypes.c else if (bit_stride > 0) TYPE_LENGTH (result_type) = (bit_stride * (high_bound - low_bound + 1) + 7) / 8; -@@ -1990,12 +2000,12 @@ resolve_dynamic_range (struct type *dyn_range_type, +@@ -1974,12 +1984,12 @@ resolve_dynamic_range (struct type *dyn_range_type, CORE_ADDR value; struct type *static_range_type, *static_target_type; const struct dynamic_prop *prop; @@ -943,7 +943,7 @@ diff --git a/gdb/gdbtypes.c b/gdb/gdbtypes.c { low_bound.kind = PROP_CONST; low_bound.data.const_val = value; -@@ -2007,7 +2017,7 @@ resolve_dynamic_range (struct type *dyn_range_type, +@@ -1991,7 +2001,7 @@ resolve_dynamic_range (struct type *dyn_range_type, } prop = &TYPE_RANGE_DATA (dyn_range_type)->high; @@ -952,7 +952,7 @@ diff --git a/gdb/gdbtypes.c b/gdb/gdbtypes.c { high_bound.kind = PROP_CONST; high_bound.data.const_val = value; -@@ -2022,12 +2032,20 @@ resolve_dynamic_range (struct type *dyn_range_type, +@@ -2006,12 +2016,20 @@ resolve_dynamic_range (struct type *dyn_range_type, high_bound.data.const_val = 0; } @@ -1022,7 +1022,7 @@ diff --git a/gdb/gdbtypes.h b/gdb/gdbtypes.h #define TYPE_ARRAY_UPPER_BOUND_VALUE(arraytype) \ (TYPE_HIGH_BOUND(TYPE_INDEX_TYPE((arraytype)))) -@@ -1896,6 +1911,7 @@ extern struct type *create_array_type_with_stride +@@ -1934,6 +1949,7 @@ extern struct type *create_array_type_with_stride struct dynamic_prop *, unsigned int); extern struct type *create_range_type (struct type *, struct type *, @@ -1033,7 +1033,7 @@ diff --git a/gdb/gdbtypes.h b/gdb/gdbtypes.h diff --git a/gdb/parse.c b/gdb/parse.c --- a/gdb/parse.c +++ b/gdb/parse.c -@@ -989,24 +989,20 @@ operator_length_standard (const struct expression *expr, int endpos, +@@ -990,24 +990,20 @@ operator_length_standard (const struct expression *expr, int endpos, case OP_RANGE: oplen = 3; @@ -2047,7 +2047,7 @@ diff --git a/gdb/valops.c b/gdb/valops.c diff --git a/gdb/value.h b/gdb/value.h --- a/gdb/value.h +++ b/gdb/value.h -@@ -1139,6 +1139,8 @@ extern struct value *varying_to_slice (struct value *); +@@ -1140,6 +1140,8 @@ extern struct value *varying_to_slice (struct value *); extern struct value *value_slice (struct value *, int, int); diff --git a/gdb-vla-intel-fortran-vla-strings.patch b/gdb-vla-intel-fortran-vla-strings.patch index 16c24d1..c2494e0 100644 --- a/gdb-vla-intel-fortran-vla-strings.patch +++ b/gdb-vla-intel-fortran-vla-strings.patch @@ -33,7 +33,7 @@ git diff --stat -p gdb/master...gdb/users/bheckel/fortran-vla-strings diff --git a/gdb/NEWS b/gdb/NEWS --- a/gdb/NEWS +++ b/gdb/NEWS -@@ -335,6 +335,8 @@ SH-5/SH64 running OpenBSD SH-5/SH64 support in sh*-*-openbsd* +@@ -352,6 +352,8 @@ SH-5/SH64 running OpenBSD SH-5/SH64 support in sh*-*-openbsd* *** Changes in GDB 8.1 @@ -45,7 +45,7 @@ diff --git a/gdb/NEWS b/gdb/NEWS diff --git a/gdb/c-valprint.c b/gdb/c-valprint.c --- a/gdb/c-valprint.c +++ b/gdb/c-valprint.c -@@ -653,6 +653,28 @@ c_value_print (struct value *val, struct ui_file *stream, +@@ -652,6 +652,28 @@ c_value_print (struct value *val, struct ui_file *stream, else { /* normal case */ @@ -77,7 +77,7 @@ diff --git a/gdb/c-valprint.c b/gdb/c-valprint.c diff --git a/gdb/dwarf2read.c b/gdb/dwarf2read.c --- a/gdb/dwarf2read.c +++ b/gdb/dwarf2read.c -@@ -1833,7 +1833,8 @@ static void read_signatured_type (struct signatured_type *); +@@ -1832,7 +1832,8 @@ static void read_signatured_type (struct signatured_type *); static int attr_to_dynamic_prop (const struct attribute *attr, struct die_info *die, struct dwarf2_cu *cu, @@ -87,7 +87,7 @@ diff --git a/gdb/dwarf2read.c b/gdb/dwarf2read.c /* memory allocation interface */ -@@ -13757,7 +13758,7 @@ read_func_scope (struct die_info *die, struct dwarf2_cu *cu) +@@ -13756,7 +13757,7 @@ read_func_scope (struct die_info *die, struct dwarf2_cu *cu) { newobj->static_link = XOBNEW (&objfile->objfile_obstack, struct dynamic_prop); @@ -96,7 +96,7 @@ diff --git a/gdb/dwarf2read.c b/gdb/dwarf2read.c } cu->list_in_scope = cu->get_builder ()->get_local_symbols (); -@@ -16495,7 +16496,8 @@ read_array_type (struct die_info *die, struct dwarf2_cu *cu) +@@ -16494,7 +16495,8 @@ read_array_type (struct die_info *die, struct dwarf2_cu *cu) byte_stride_prop = (struct dynamic_prop *) alloca (sizeof (struct dynamic_prop)); @@ -106,7 +106,7 @@ diff --git a/gdb/dwarf2read.c b/gdb/dwarf2read.c if (!stride_ok) { complaint (_("unable to read array DW_AT_byte_stride " -@@ -17256,29 +17258,90 @@ read_tag_string_type (struct die_info *die, struct dwarf2_cu *cu) +@@ -17255,29 +17257,90 @@ read_tag_string_type (struct die_info *die, struct dwarf2_cu *cu) struct gdbarch *gdbarch = get_objfile_arch (objfile); struct type *type, *range_type, *index_type, *char_type; struct attribute *attr; @@ -208,7 +208,7 @@ diff --git a/gdb/dwarf2read.c b/gdb/dwarf2read.c char_type = language_string_char_type (cu->language_defn, gdbarch); type = create_string_type (NULL, char_type, range_type); -@@ -17646,7 +17709,8 @@ read_base_type (struct die_info *die, struct dwarf2_cu *cu) +@@ -17645,7 +17708,8 @@ read_base_type (struct die_info *die, struct dwarf2_cu *cu) static int attr_to_dynamic_prop (const struct attribute *attr, struct die_info *die, @@ -218,7 +218,7 @@ diff --git a/gdb/dwarf2read.c b/gdb/dwarf2read.c { struct dwarf2_property_baton *baton; struct obstack *obstack -@@ -17657,14 +17721,33 @@ attr_to_dynamic_prop (const struct attribute *attr, struct die_info *die, +@@ -17656,14 +17720,33 @@ attr_to_dynamic_prop (const struct attribute *attr, struct die_info *die, if (attr_form_is_block (attr)) { @@ -256,7 +256,7 @@ diff --git a/gdb/dwarf2read.c b/gdb/dwarf2read.c } else if (attr_form_is_ref (attr)) { -@@ -17697,8 +17780,28 @@ attr_to_dynamic_prop (const struct attribute *attr, struct die_info *die, +@@ -17696,8 +17779,28 @@ attr_to_dynamic_prop (const struct attribute *attr, struct die_info *die, baton = XOBNEW (obstack, struct dwarf2_property_baton); baton->referenced_type = die_type (target_die, target_cu); baton->locexpr.per_cu = cu->per_cu; @@ -287,7 +287,7 @@ diff --git a/gdb/dwarf2read.c b/gdb/dwarf2read.c prop->data.baton = baton; prop->kind = PROP_LOCEXPR; gdb_assert (prop->data.baton != NULL); -@@ -17809,7 +17912,7 @@ read_subrange_type (struct die_info *die, struct dwarf2_cu *cu) +@@ -17808,7 +17911,7 @@ read_subrange_type (struct die_info *die, struct dwarf2_cu *cu) attr = dwarf2_attr (die, DW_AT_byte_stride, cu); if (attr) @@ -296,7 +296,7 @@ diff --git a/gdb/dwarf2read.c b/gdb/dwarf2read.c complaint (_("Missing DW_AT_byte_stride " "- DIE at 0x%s [in module %s]"), sect_offset_str (die->sect_off), -@@ -17817,7 +17920,7 @@ read_subrange_type (struct die_info *die, struct dwarf2_cu *cu) +@@ -17816,7 +17919,7 @@ read_subrange_type (struct die_info *die, struct dwarf2_cu *cu) attr = dwarf2_attr (die, DW_AT_lower_bound, cu); if (attr) @@ -305,7 +305,7 @@ diff --git a/gdb/dwarf2read.c b/gdb/dwarf2read.c else if (!low_default_is_valid) complaint (_("Missing DW_AT_lower_bound " "- DIE at %s [in module %s]"), -@@ -17826,10 +17929,10 @@ read_subrange_type (struct die_info *die, struct dwarf2_cu *cu) +@@ -17825,10 +17928,10 @@ read_subrange_type (struct die_info *die, struct dwarf2_cu *cu) struct attribute *attr_ub, *attr_count; attr = attr_ub = dwarf2_attr (die, DW_AT_upper_bound, cu); @@ -318,7 +318,7 @@ diff --git a/gdb/dwarf2read.c b/gdb/dwarf2read.c { /* If bounds are constant do the final calculation here. */ if (low.kind == PROP_CONST && high.kind == PROP_CONST) -@@ -25396,7 +25499,7 @@ set_die_type (struct die_info *die, struct type *type, struct dwarf2_cu *cu) +@@ -25394,7 +25497,7 @@ set_die_type (struct die_info *die, struct type *type, struct dwarf2_cu *cu) attr = dwarf2_attr (die, DW_AT_allocated, cu); if (attr_form_is_block (attr)) { @@ -327,7 +327,7 @@ diff --git a/gdb/dwarf2read.c b/gdb/dwarf2read.c add_dyn_prop (DYN_PROP_ALLOCATED, prop, type); } else if (attr != NULL) -@@ -25410,7 +25513,7 @@ set_die_type (struct die_info *die, struct type *type, struct dwarf2_cu *cu) +@@ -25408,7 +25511,7 @@ set_die_type (struct die_info *die, struct type *type, struct dwarf2_cu *cu) attr = dwarf2_attr (die, DW_AT_associated, cu); if (attr_form_is_block (attr)) { @@ -336,7 +336,7 @@ diff --git a/gdb/dwarf2read.c b/gdb/dwarf2read.c add_dyn_prop (DYN_PROP_ASSOCIATED, prop, type); } else if (attr != NULL) -@@ -25422,7 +25525,7 @@ set_die_type (struct die_info *die, struct type *type, struct dwarf2_cu *cu) +@@ -25420,7 +25523,7 @@ set_die_type (struct die_info *die, struct type *type, struct dwarf2_cu *cu) /* Read DW_AT_data_location and set in type. */ attr = dwarf2_attr (die, DW_AT_data_location, cu); @@ -500,7 +500,7 @@ diff --git a/gdb/f-typeprint.c b/gdb/f-typeprint.c diff --git a/gdb/gdbtypes.c b/gdb/gdbtypes.c --- a/gdb/gdbtypes.c +++ b/gdb/gdbtypes.c -@@ -1913,7 +1913,8 @@ is_dynamic_type_internal (struct type *type, int top_level) +@@ -1897,7 +1897,8 @@ is_dynamic_type_internal (struct type *type, int top_level) type = check_typedef (type); /* We only want to recognize references at the outermost level. */ @@ -510,7 +510,7 @@ diff --git a/gdb/gdbtypes.c b/gdb/gdbtypes.c type = check_typedef (TYPE_TARGET_TYPE (type)); /* Types that have a dynamic TYPE_DATA_LOCATION are considered -@@ -1947,6 +1948,7 @@ is_dynamic_type_internal (struct type *type, int top_level) +@@ -1931,6 +1932,7 @@ is_dynamic_type_internal (struct type *type, int top_level) } case TYPE_CODE_ARRAY: @@ -518,7 +518,7 @@ diff --git a/gdb/gdbtypes.c b/gdb/gdbtypes.c { gdb_assert (TYPE_NFIELDS (type) == 1); -@@ -2065,7 +2067,8 @@ resolve_dynamic_array (struct type *type, +@@ -2049,7 +2051,8 @@ resolve_dynamic_array (struct type *type, struct dynamic_prop *prop; unsigned int bit_stride = 0; @@ -528,7 +528,7 @@ diff --git a/gdb/gdbtypes.c b/gdb/gdbtypes.c type = copy_type (type); -@@ -2090,11 +2093,15 @@ resolve_dynamic_array (struct type *type, +@@ -2074,11 +2077,15 @@ resolve_dynamic_array (struct type *type, ary_dim = check_typedef (TYPE_TARGET_TYPE (elt_type)); @@ -545,7 +545,7 @@ diff --git a/gdb/gdbtypes.c b/gdb/gdbtypes.c prop = get_dyn_prop (DYN_PROP_BYTE_STRIDE, type); if (prop != NULL) { -@@ -2249,6 +2256,28 @@ resolve_dynamic_struct (struct type *type, +@@ -2233,6 +2240,28 @@ resolve_dynamic_struct (struct type *type, return resolved_type; } @@ -574,7 +574,7 @@ diff --git a/gdb/gdbtypes.c b/gdb/gdbtypes.c /* Worker for resolved_dynamic_type. */ static struct type * -@@ -2297,7 +2326,12 @@ resolve_dynamic_type_internal (struct type *type, +@@ -2281,7 +2310,12 @@ resolve_dynamic_type_internal (struct type *type, break; } @@ -1339,7 +1339,7 @@ diff --git a/gdb/valops.c b/gdb/valops.c diff --git a/gdb/valprint.c b/gdb/valprint.c --- a/gdb/valprint.c +++ b/gdb/valprint.c -@@ -1108,12 +1108,6 @@ value_check_printable (struct value *val, struct ui_file *stream, +@@ -1106,12 +1106,6 @@ value_check_printable (struct value *val, struct ui_file *stream, return 0; } diff --git a/gdb-vla-intel-stringbt-fix.patch b/gdb-vla-intel-stringbt-fix.patch index 7ef64a5..63be80a 100644 --- a/gdb-vla-intel-stringbt-fix.patch +++ b/gdb-vla-intel-stringbt-fix.patch @@ -38,7 +38,7 @@ diff --git a/gdb/dwarf2loc.c b/gdb/dwarf2loc.c #include "common/underlying.h" #include "common/byte-vector.h" -@@ -2158,6 +2159,20 @@ dwarf2_evaluate_loc_desc_full (struct type *type, struct frame_info *frame, +@@ -2157,6 +2158,20 @@ dwarf2_evaluate_loc_desc_full (struct type *type, struct frame_info *frame, ctx.per_cu = per_cu; ctx.obj_address = 0; diff --git a/gdb.spec b/gdb.spec index e4d38a2..3e6e235 100644 --- a/gdb.spec +++ b/gdb.spec @@ -22,7 +22,7 @@ Name: %{?scl_prefix}gdb # Freeze it when GDB gets branched -%global snapsrc 20190304 +%global snapsrc 20190319 # See timestamp of source gnulib installed into gdb/gnulib/ . %global snapgnulib 20161115 %global tarname gdb-%{version} @@ -30,7 +30,7 @@ Version: 8.3.50.%{snapsrc} # 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: 1%{?dist} +Release: 2%{?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. @@ -1025,6 +1025,9 @@ fi %endif %changelog +* Tue Mar 19 2019 Sergio Durigan Junior - 8.3.50.20190319-2 +- Rebase to FSF GDB 8.3.50.20190319 (8.4pre). + * Mon Mar 4 2019 Sergio Durigan Junior - 8.3.50.20190304-1 - Rebase to FSF GDB 8.3.50.20190304 (8.4pre). - Rewrite gdb-6.6-buildid-locate.patch. diff --git a/sources b/sources index 82ca3fc..fb4519a 100644 --- a/sources +++ b/sources @@ -1,3 +1,3 @@ SHA512 (gdb-libstdc++-v3-python-8.1.1-20180626.tar.xz) = a8b1c54dd348cfeb37da73f968742896be3dd13a4215f8d8519870c2abea915f5176c3fa6989ddd10f20020a16f0fab20cbae68ee8d58a82234d8778023520f8 SHA512 (v2.0.tar.gz) = ec63151e842c81cc73ea11ba560b63e005cefbe19d98de24ae5c8caa4de7c9c1d71d1ec5b6214a347592eac675b75a3d2b26d4691ca86f91020ebfea8e912939 -SHA512 (gdb-8.3.50.20190304.tar.xz) = 89d6462451e7c70c3c89741e49b765b96ee6d1e34a9857337fc8a6ff2aa160360974a0f3db52bd5a13767a6ae44675f0cdd5de1e664458ad2b543246d14cb0e3 +SHA512 (gdb-8.3.50.20190319.tar.xz) = 099f03a5103412940cc10e3628f28d790e124df01e5d79e868284dba04817a9f8c63066b7f4e2b33b4e8c0bcda04a3be85247ca0a5ecb70fdf721f9d2c1365b9 From d1a098601d27184fe25ffe5bab93f9135d397b24 Mon Sep 17 00:00:00 2001 From: Sergio Durigan Junior Date: Tue, 19 Mar 2019 19:19:25 -0400 Subject: [PATCH 3/5] Temporarily add gdb-temporary-fix-arm-build-error.patch. --- _gdb.spec.Patch.include | 4 ++ _gdb.spec.patch.include | 1 + _patch_order | 1 + gdb-temporary-fix-arm-build-error.patch | 75 +++++++++++++++++++++++++ gdb.spec | 1 + 5 files changed, 82 insertions(+) create mode 100644 gdb-temporary-fix-arm-build-error.patch diff --git a/_gdb.spec.Patch.include b/_gdb.spec.Patch.include index 02596be..07c7b93 100644 --- a/_gdb.spec.Patch.include +++ b/_gdb.spec.Patch.include @@ -466,3 +466,7 @@ Patch113: gdb-rhbz1553104-s390x-arch12-test.patch # Author: Sergio Durigan Junior. Patch114: gdb-rhbz795424-bitpos-arrayview.patch +# Temporary patch to fix ARM build error. +# https://kojipkgs.fedoraproject.org//work/tasks/9012/33639012/build.log +Patch115: gdb-temporary-fix-arm-build-error.patch + diff --git a/_gdb.spec.patch.include b/_gdb.spec.patch.include index afc8a74..b65d5b4 100644 --- a/_gdb.spec.patch.include +++ b/_gdb.spec.patch.include @@ -112,3 +112,4 @@ %patch112 -p1 %patch113 -p1 %patch114 -p1 +%patch115 -p1 diff --git a/_patch_order b/_patch_order index 89f69fe..4f86a39 100644 --- a/_patch_order +++ b/_patch_order @@ -112,3 +112,4 @@ gdb-archer.patch gdb-vla-intel-fix-print-char-array.patch gdb-rhbz1553104-s390x-arch12-test.patch gdb-rhbz795424-bitpos-arrayview.patch +gdb-temporary-fix-arm-build-error.patch diff --git a/gdb-temporary-fix-arm-build-error.patch b/gdb-temporary-fix-arm-build-error.patch new file mode 100644 index 0000000..d802c69 --- /dev/null +++ b/gdb-temporary-fix-arm-build-error.patch @@ -0,0 +1,75 @@ +From FEDORA_PATCHES Mon Sep 17 00:00:00 2001 +From: Alan Hayward +Date: Mon, 18 Mar 2019 16:13:12 +0000 +Subject: gdb-temporary-fix-arm-build-error.patch + +;; Temporary patch to fix ARM build error. +;; https://kojipkgs.fedoraproject.org//work/tasks/9012/33639012/build.log + +Fix Arm build error + +The following commit broke the build for Arm: +d3a70e03cf51c8fb6bc183eaff7559edffec2045 +Change iterate_over_lwps to take a gdb::function_view + +Correct the changes made to arm_linux_insert_hw_breakpoint1 and make +similar changes to arm_linux_remove_hw_breakpoint1. + +2019-03-18 Alan Hayward + + * arm-linux-nat.c (arm_linux_insert_hw_breakpoint1): Fix + variable names. + (arm_linux_remove_hw_breakpoint1): Use a gdb::function_view. + +diff --git a/gdb/ChangeLog b/gdb/ChangeLog +--- a/gdb/ChangeLog ++++ b/gdb/ChangeLog +@@ -1,3 +1,9 @@ ++2019-03-18 Alan Hayward ++ ++ * arm-linux-nat.c (arm_linux_insert_hw_breakpoint1): Fix ++ variable names. ++ (arm_linux_remove_hw_breakpoint1): Use a gdb::function_view. ++ + 2019-03-18 Pedro Alves + Eli Zaretskii + +diff --git a/gdb/arm-linux-nat.c b/gdb/arm-linux-nat.c +--- a/gdb/arm-linux-nat.c ++++ b/gdb/arm-linux-nat.c +@@ -1005,8 +1005,8 @@ arm_linux_insert_hw_breakpoint1 (const struct arm_linux_hw_breakpoint* bpt, + iterate_over_lwps (pid_ptid, + [=] (struct lwp_info *info) + { +- return update_registers_callback (info, watch, +- index); ++ return update_registers_callback (info, watchpoint, ++ i); + }); + break; + } +@@ -1024,7 +1024,6 @@ arm_linux_remove_hw_breakpoint1 (const struct arm_linux_hw_breakpoint *bpt, + gdb_byte count, i; + ptid_t pid_ptid; + struct arm_linux_hw_breakpoint* bpts; +- struct update_registers_data data; + + pid = inferior_ptid.pid (); + pid_ptid = ptid_t (pid); +@@ -1043,10 +1042,13 @@ arm_linux_remove_hw_breakpoint1 (const struct arm_linux_hw_breakpoint *bpt, + for (i = 0; i < count; ++i) + if (arm_linux_hw_breakpoint_equal (bpt, bpts + i)) + { +- data.watch = watchpoint; +- data.index = i; + bpts[i].control = arm_hwbp_control_disable (bpts[i].control); +- iterate_over_lwps (pid_ptid, update_registers_callback, &data); ++ iterate_over_lwps (pid_ptid, ++ [=] (struct lwp_info *info) ++ { ++ return update_registers_callback (info, watchpoint, ++ i); ++ }); + break; + } + diff --git a/gdb.spec b/gdb.spec index 3e6e235..777d52c 100644 --- a/gdb.spec +++ b/gdb.spec @@ -1027,6 +1027,7 @@ fi %changelog * Tue Mar 19 2019 Sergio Durigan Junior - 8.3.50.20190319-2 - Rebase to FSF GDB 8.3.50.20190319 (8.4pre). +- Temporarily add gdb-temporary-fix-arm-build-error.patch. * Mon Mar 4 2019 Sergio Durigan Junior - 8.3.50.20190304-1 - Rebase to FSF GDB 8.3.50.20190304 (8.4pre). From 252ce24e08d4735cd5b4caf04caf6742cae1e308 Mon Sep 17 00:00:00 2001 From: Sergio Durigan Junior Date: Thu, 21 Mar 2019 19:59:16 -0400 Subject: [PATCH 4/5] Rebase to FSF GDB 8.3.50.20190321 (8.4pre). Remove gdb-temporary-fix-arm-build-error.patch. Fix "GDB crashes when using Python xmethods" (RH BZ 1690120). --- .gitignore | 2 +- _gdb.spec.Patch.include | 4 -- _gdb.spec.patch.include | 1 - _git_upstream_commit | 2 +- _patch_order | 1 - gdb-bz533176-fortran-omp-step.patch | 4 +- gdb-rhbz795424-bitpos-20of25.patch | 2 +- gdb-rhbz795424-bitpos-22of25.patch | 2 +- gdb-temporary-fix-arm-build-error.patch | 75 ------------------------- gdb.spec | 9 ++- sources | 2 +- 11 files changed, 14 insertions(+), 90 deletions(-) delete mode 100644 gdb-temporary-fix-arm-build-error.patch diff --git a/.gitignore b/.gitignore index 2c2ddad..c1dd31d 100644 --- a/.gitignore +++ b/.gitignore @@ -1,3 +1,3 @@ /gdb-libstdc++-v3-python-8.1.1-20180626.tar.xz /v2.0.tar.gz -/gdb-8.3.50.20190319.tar.xz +/gdb-8.3.50.20190321.tar.xz diff --git a/_gdb.spec.Patch.include b/_gdb.spec.Patch.include index 07c7b93..02596be 100644 --- a/_gdb.spec.Patch.include +++ b/_gdb.spec.Patch.include @@ -466,7 +466,3 @@ Patch113: gdb-rhbz1553104-s390x-arch12-test.patch # Author: Sergio Durigan Junior. Patch114: gdb-rhbz795424-bitpos-arrayview.patch -# Temporary patch to fix ARM build error. -# https://kojipkgs.fedoraproject.org//work/tasks/9012/33639012/build.log -Patch115: gdb-temporary-fix-arm-build-error.patch - diff --git a/_gdb.spec.patch.include b/_gdb.spec.patch.include index b65d5b4..afc8a74 100644 --- a/_gdb.spec.patch.include +++ b/_gdb.spec.patch.include @@ -112,4 +112,3 @@ %patch112 -p1 %patch113 -p1 %patch114 -p1 -%patch115 -p1 diff --git a/_git_upstream_commit b/_git_upstream_commit index 926106b..3a0215e 100644 --- a/_git_upstream_commit +++ b/_git_upstream_commit @@ -1 +1 @@ -4faa59bbb7ad8665b6eb7c93bdb726e412850811 +cc00a5d100973549bf5e4840937529633f4de1fa diff --git a/_patch_order b/_patch_order index 4f86a39..89f69fe 100644 --- a/_patch_order +++ b/_patch_order @@ -112,4 +112,3 @@ gdb-archer.patch gdb-vla-intel-fix-print-char-array.patch gdb-rhbz1553104-s390x-arch12-test.patch gdb-rhbz795424-bitpos-arrayview.patch -gdb-temporary-fix-arm-build-error.patch diff --git a/gdb-bz533176-fortran-omp-step.patch b/gdb-bz533176-fortran-omp-step.patch index f4515f6..69b2552 100644 --- a/gdb-bz533176-fortran-omp-step.patch +++ b/gdb-bz533176-fortran-omp-step.patch @@ -30,7 +30,7 @@ debugging problem of GOMP outside of the scope of this Bug. diff --git a/gdb/infrun.c b/gdb/infrun.c --- a/gdb/infrun.c +++ b/gdb/infrun.c -@@ -6503,6 +6503,16 @@ process_event_stop_test (struct execution_control_state *ecs) +@@ -6492,6 +6492,16 @@ process_event_stop_test (struct execution_control_state *ecs) if (ecs->event_thread->control.step_over_calls == STEP_OVER_ALL) { @@ -47,7 +47,7 @@ diff --git a/gdb/infrun.c b/gdb/infrun.c /* We're doing a "next". Normal (forward) execution: set a breakpoint at the -@@ -6536,6 +6546,7 @@ process_event_stop_test (struct execution_control_state *ecs) +@@ -6525,6 +6535,7 @@ process_event_stop_test (struct execution_control_state *ecs) keep_going (ecs); return; diff --git a/gdb-rhbz795424-bitpos-20of25.patch b/gdb-rhbz795424-bitpos-20of25.patch index c8d0ed0..6f55e28 100644 --- a/gdb-rhbz795424-bitpos-20of25.patch +++ b/gdb-rhbz795424-bitpos-20of25.patch @@ -1145,7 +1145,7 @@ diff --git a/gdb/arch-utils.h b/gdb/arch-utils.h diff --git a/gdb/arm-linux-nat.c b/gdb/arm-linux-nat.c --- a/gdb/arm-linux-nat.c +++ b/gdb/arm-linux-nat.c -@@ -1090,7 +1090,7 @@ arm_linux_nat_target::remove_hw_breakpoint (struct gdbarch *gdbarch, +@@ -1092,7 +1092,7 @@ arm_linux_nat_target::remove_hw_breakpoint (struct gdbarch *gdbarch, /* Are we able to use a hardware watchpoint for the LEN bytes starting at ADDR? */ int diff --git a/gdb-rhbz795424-bitpos-22of25.patch b/gdb-rhbz795424-bitpos-22of25.patch index a3d0355..c83f18c 100644 --- a/gdb-rhbz795424-bitpos-22of25.patch +++ b/gdb-rhbz795424-bitpos-22of25.patch @@ -154,7 +154,7 @@ diff --git a/gdb/arm-linux-nat.c b/gdb/arm-linux-nat.c const struct target_desc *read_description () override; -@@ -1197,7 +1197,7 @@ arm_linux_nat_target::stopped_by_watchpoint () +@@ -1199,7 +1199,7 @@ arm_linux_nat_target::stopped_by_watchpoint () bool arm_linux_nat_target::watchpoint_addr_within_range (CORE_ADDR addr, CORE_ADDR start, diff --git a/gdb-temporary-fix-arm-build-error.patch b/gdb-temporary-fix-arm-build-error.patch deleted file mode 100644 index d802c69..0000000 --- a/gdb-temporary-fix-arm-build-error.patch +++ /dev/null @@ -1,75 +0,0 @@ -From FEDORA_PATCHES Mon Sep 17 00:00:00 2001 -From: Alan Hayward -Date: Mon, 18 Mar 2019 16:13:12 +0000 -Subject: gdb-temporary-fix-arm-build-error.patch - -;; Temporary patch to fix ARM build error. -;; https://kojipkgs.fedoraproject.org//work/tasks/9012/33639012/build.log - -Fix Arm build error - -The following commit broke the build for Arm: -d3a70e03cf51c8fb6bc183eaff7559edffec2045 -Change iterate_over_lwps to take a gdb::function_view - -Correct the changes made to arm_linux_insert_hw_breakpoint1 and make -similar changes to arm_linux_remove_hw_breakpoint1. - -2019-03-18 Alan Hayward - - * arm-linux-nat.c (arm_linux_insert_hw_breakpoint1): Fix - variable names. - (arm_linux_remove_hw_breakpoint1): Use a gdb::function_view. - -diff --git a/gdb/ChangeLog b/gdb/ChangeLog ---- a/gdb/ChangeLog -+++ b/gdb/ChangeLog -@@ -1,3 +1,9 @@ -+2019-03-18 Alan Hayward -+ -+ * arm-linux-nat.c (arm_linux_insert_hw_breakpoint1): Fix -+ variable names. -+ (arm_linux_remove_hw_breakpoint1): Use a gdb::function_view. -+ - 2019-03-18 Pedro Alves - Eli Zaretskii - -diff --git a/gdb/arm-linux-nat.c b/gdb/arm-linux-nat.c ---- a/gdb/arm-linux-nat.c -+++ b/gdb/arm-linux-nat.c -@@ -1005,8 +1005,8 @@ arm_linux_insert_hw_breakpoint1 (const struct arm_linux_hw_breakpoint* bpt, - iterate_over_lwps (pid_ptid, - [=] (struct lwp_info *info) - { -- return update_registers_callback (info, watch, -- index); -+ return update_registers_callback (info, watchpoint, -+ i); - }); - break; - } -@@ -1024,7 +1024,6 @@ arm_linux_remove_hw_breakpoint1 (const struct arm_linux_hw_breakpoint *bpt, - gdb_byte count, i; - ptid_t pid_ptid; - struct arm_linux_hw_breakpoint* bpts; -- struct update_registers_data data; - - pid = inferior_ptid.pid (); - pid_ptid = ptid_t (pid); -@@ -1043,10 +1042,13 @@ arm_linux_remove_hw_breakpoint1 (const struct arm_linux_hw_breakpoint *bpt, - for (i = 0; i < count; ++i) - if (arm_linux_hw_breakpoint_equal (bpt, bpts + i)) - { -- data.watch = watchpoint; -- data.index = i; - bpts[i].control = arm_hwbp_control_disable (bpts[i].control); -- iterate_over_lwps (pid_ptid, update_registers_callback, &data); -+ iterate_over_lwps (pid_ptid, -+ [=] (struct lwp_info *info) -+ { -+ return update_registers_callback (info, watchpoint, -+ i); -+ }); - break; - } - diff --git a/gdb.spec b/gdb.spec index 777d52c..1d0f41d 100644 --- a/gdb.spec +++ b/gdb.spec @@ -22,7 +22,7 @@ Name: %{?scl_prefix}gdb # Freeze it when GDB gets branched -%global snapsrc 20190319 +%global snapsrc 20190321 # See timestamp of source gnulib installed into gdb/gnulib/ . %global snapgnulib 20161115 %global tarname gdb-%{version} @@ -30,7 +30,7 @@ Version: 8.3.50.%{snapsrc} # 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: 2%{?dist} +Release: 3%{?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. @@ -1025,6 +1025,11 @@ fi %endif %changelog +* Thu Mar 21 2019 Sergio Durigan Junior - 8.3.50.20190321-3 +- Rebase to FSF GDB 8.3.50.20190321 (8.4pre). +- Remove gdb-temporary-fix-arm-build-error.patch. +- Fix "GDB crashes when using Python xmethods" (RH BZ 1690120). + * Tue Mar 19 2019 Sergio Durigan Junior - 8.3.50.20190319-2 - Rebase to FSF GDB 8.3.50.20190319 (8.4pre). - Temporarily add gdb-temporary-fix-arm-build-error.patch. diff --git a/sources b/sources index fb4519a..eea1219 100644 --- a/sources +++ b/sources @@ -1,3 +1,3 @@ SHA512 (gdb-libstdc++-v3-python-8.1.1-20180626.tar.xz) = a8b1c54dd348cfeb37da73f968742896be3dd13a4215f8d8519870c2abea915f5176c3fa6989ddd10f20020a16f0fab20cbae68ee8d58a82234d8778023520f8 SHA512 (v2.0.tar.gz) = ec63151e842c81cc73ea11ba560b63e005cefbe19d98de24ae5c8caa4de7c9c1d71d1ec5b6214a347592eac675b75a3d2b26d4691ca86f91020ebfea8e912939 -SHA512 (gdb-8.3.50.20190319.tar.xz) = 099f03a5103412940cc10e3628f28d790e124df01e5d79e868284dba04817a9f8c63066b7f4e2b33b4e8c0bcda04a3be85247ca0a5ecb70fdf721f9d2c1365b9 +SHA512 (gdb-8.3.50.20190321.tar.xz) = 4ab37571398418a3b5bc43cfe103ee585330bc3b076b113e3bf6c6c3ce5266b6e6b5040c1303ad0de62b8f4211df27e75795d7fce4fd1d9a96ec0308ace2fcf8 From 116197567adfde0c3dee39d511b6a53dd10ee099 Mon Sep 17 00:00:00 2001 From: Sergio Durigan Junior Date: Fri, 29 Mar 2019 14:14:19 -0400 Subject: [PATCH 5/5] Fix 'gdb-8.3.50.20190321-3.fc31.x86_64: crashing' (by fixing gdb-6.6-buildid-locate-rpm.patch) (RH BZ 1694091). --- gdb-6.6-buildid-locate-rpm.patch | 2 +- gdb.spec | 6 +++++- 2 files changed, 6 insertions(+), 2 deletions(-) diff --git a/gdb-6.6-buildid-locate-rpm.patch b/gdb-6.6-buildid-locate-rpm.patch index ff2cc65..9506331 100644 --- a/gdb-6.6-buildid-locate-rpm.patch +++ b/gdb-6.6-buildid-locate-rpm.patch @@ -520,7 +520,7 @@ diff --git a/gdb/build-id.c b/gdb/build-id.c +static bool +missing_rpm_list_compar (const char *ap, const char *bp) +{ -+ return strcoll (ap, bp); ++ return strcoll (ap, bp) < 0; +} + +/* It returns a NULL-terminated array of strings needing to be FREEd. It may diff --git a/gdb.spec b/gdb.spec index 1d0f41d..0b753c0 100644 --- a/gdb.spec +++ b/gdb.spec @@ -30,7 +30,7 @@ Version: 8.3.50.%{snapsrc} # 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: 3%{?dist} +Release: 4%{?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. @@ -1025,6 +1025,10 @@ fi %endif %changelog +* Fri Mar 29 2019 Sergio Durigan Junior - 8.3.50.20190321-4 +- Fix 'gdb-8.3.50.20190321-3.fc31.x86_64: crashing' (by fixing + gdb-6.6-buildid-locate-rpm.patch) (RH BZ 1694091). + * Thu Mar 21 2019 Sergio Durigan Junior - 8.3.50.20190321-3 - Rebase to FSF GDB 8.3.50.20190321 (8.4pre). - Remove gdb-temporary-fix-arm-build-error.patch.