Rebase to FSF GDB 8.3.50.20190304 (8.4pre).

Rewrite gdb-6.6-buildid-locate.patch.
Remove gdb-python-gil.patch.
This commit is contained in:
Sergio Durigan Junior 2019-03-05 11:27:44 -05:00
parent b1bf7bc649
commit 29841d1068
25 changed files with 364 additions and 632 deletions

2
.gitignore vendored
View File

@ -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

View File

@ -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 <tab>-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

View File

@ -112,5 +112,3 @@
%patch112 -p1
%patch113 -p1
%patch114 -p1
%patch115 -p1
%patch116 -p1

View File

@ -1 +1 @@
c72e75a64030b0f6535a80481f37968ad55c333a
67490c6bad8c8d3fcbcbd5a3012ab5d189fd3981

View File

@ -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

View File

@ -1,35 +0,0 @@
From FEDORA_PATCHES Mon Sep 17 00:00:00 2001
From: Andrew Cagney <cagney@gnu.org>
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 <cagney@gnu.org>
* 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 <cagney@gnu.org>
* 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
# `</dev/null' to avoid touching interactive terminal if it is
# available but not accessible as GDB would get stopped on SIGTTIN.
- "$binary_path/@GDB_TRANSFORM_NAME@" </dev/null --nx --batch \
+ "$binary_path/@GDB_TRANSFORM_NAME@" </dev/null --nx --batch --readnever \
-ex "set pagination off" -ex "set height 0" -ex "set width 0" \
"${dump_all_cmds[@]}" \
-ex "attach $pid" -ex "gcore $prefix.$pid" -ex detach -ex quit

View File

@ -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
@@ -447,6 +447,35 @@ struct cmdarg
@@ -448,6 +448,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)
{
@@ -887,6 +916,8 @@ captured_main_1 (struct captured_main_args *context)
@@ -893,6 +922,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++;
}
@@ -1037,12 +1068,25 @@ captured_main_1 (struct captured_main_args *context)
@@ -1043,12 +1074,25 @@ captured_main_1 (struct captured_main_args *context)
&& symarg != NULL
&& strcmp (execarg, symarg) == 0)
{

View File

@ -25,17 +25,6 @@ Comments by Sergio Durigan Junior <sergiodj@redhat.com>:
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

View File

@ -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 <dlfcn.h>
#endif

View File

@ -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

View File

@ -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

View File

@ -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<char> 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<char> 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<char> 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<char> 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))
{

View File

@ -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

View File

@ -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 <libunwind-ia64.h> 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.])

View File

@ -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);

View File

@ -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 <linux/perf_event.h>
#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 <linux/perf_event.h>
#ifndef PERF_ATTR_SIZE_VER5

View File

@ -1,243 +0,0 @@
From FEDORA_PATCHES Mon Sep 17 00:00:00 2001
From: Fedora GDB patches <invalid@email.com>
Date: Fri, 27 Oct 2017 21:07:50 +0200
Subject: gdb-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 (&current_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 <stdio.h>
+#include <unistd.h>
+
+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 <http://www.gnu.org/licenses/>.
+
+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

View File

@ -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,

View File

@ -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;
}

View File

@ -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,

View File

@ -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<gdb_byte> 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. */

View File

@ -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;

View File

@ -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);

View File

@ -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 <sergiodj@redhat.com> - 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 <sergiodj@redhat.com> - 8.2.50.20190222-19
- Rebase to FSF GDB 8.2.50.20190222 (8.3pre).
* Tue Feb 19 2019 Sergio Durigan Junior <sergiodj@redhat.com> - 8.2.50.20190219-18
- Rebase to FSF GDB 8.2.50.20190219 (8.3pre).
- BuildRequire on 'source-highlight-devel' and enable styled output.

View File

@ -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