diff --git a/.gitignore b/.gitignore
index ee58812..3e874dd 100644
--- a/.gitignore
+++ b/.gitignore
@@ -1,3 +1,3 @@
/gdb-libstdc++-v3-python-8.1.1-20180626.tar.xz
/v2.0.1.tar.gz
-/gdb-9.0.50.20191119.tar.xz
+/gdb-9.1.tar.xz
diff --git a/README.local-patches b/README.local-patches.md
similarity index 53%
rename from README.local-patches
rename to README.local-patches.md
index 725846e..fc2eb90 100644
--- a/README.local-patches
+++ b/README.local-patches.md
@@ -1,5 +1,4 @@
-Fedora GDB local patches policy
-===============================
+# Fedora GDB local patches policy
In order to make things easier for the Fedora GDB maintainer, we
choose to auto-generate the local patches by making use of an upstream
@@ -9,42 +8,42 @@ using this method.
You need to run the following commands from the directory that
contains the "gdb.spec" file.
-### Importing the GDB patches into a git repository
+## Importing the GDB patches into a git repository
-1) The local patches (*.patch) need to be imported into an upstream
+1) The local patches (`*.patch`) need to be imported into an upstream
git repository. For example, let's assume you cloned the repository
by doing:
- $ git clone git://sourceware.org/git/binutils-gdb.git
+`$ git clone git://sourceware.org/git/binutils-gdb.git`
- ## TIP: if you already have the repository cloned somewhere in your
- ## system, you can pass a "--reference
" to the "git clone"
- ## command and it will use your local repository as much as possible
- ## to make the clone, speeding up things.
+> TIP: if you already have the repository cloned somewhere in your
+> system, you can pass a "--reference " to the "git clone"
+> command and it will use your local repository as much as possible
+> to make the clone, speeding up things.
2) After cloning the upstream repository, you can import your patches
by using the script "generate-git-repo-from-patches.sh":
- $ sh generate-git-repo-from-patches.sh
+`$ sh generate-git-repo-from-patches.sh `
The script will basically cd into the repository, checkout the
-revision specified in the file "_git_upstream_commit", iterate through
-the file "_patch_order" and "git-am" every patch *in that order*.
+revision specified in the file `_git_upstream_commit`, iterate through
+the file `_patch_order` and "git-am" every patch *in that order*.
This operation should complete without errors; if you find a problem
-with "git-am", it probably means that the revision specified in the
-file "_git_upstream_commit" is wrong.
+with `git-am`, it probably means that the revision specified in the
+file `_git_upstream_commit` is wrong.
-### Rebasing the patches against a newer version/release
+## Rebasing the patches against a newer version/release
1) First, cd into the upstream repository. All you have to do is
choose the revision against which you plan to rebase the patches, and
-"git rebase ". git will do the rest, and you will be able
+`git rebase `. git will do the rest, and you will be able
to perform conflict resolution by git's algorithm, which is smarter.
-### Creating new patches
+## Creating new patches
1) Create the new patch on top of the the others, as usual. Note that
-you can use "git rebase" whenever you want to reorder patch order, or
+you can use `git rebase` whenever you want to reorder patch order, or
even to delete a patch.
2) When writing the commit log, you must obey a few rules. The
@@ -54,48 +53,52 @@ used when exporting the patches from the git repository, and
specific patch.
3) You can also add comments that will go into the auto-generated
-"Patch:" file (see below). To do that, use the special marker ";;" at
+`Patch:` file (see below). To do that, use the special marker `;;` at
the beginning of the line. This way, a commit log that says:
+~~~~~~~~~~~
test-patch.patch
;; This is a test patch
;; Second line
+~~~~~~~~~~~
-Will generate the following entry in the auto-generated "Patch:" file:
+Will generate the following entry in the auto-generated `Patch:` file:
+~~~~~~~~~~~
# This is a test patch
# Second line
PatchXYZ: test-patch.patch
+~~~~~~~~~~~
-### Exporting the GDB patches from the git repository
+## Exporting the GDB patches from the git repository
1) When you're done working with the patches, go back to the directory
-that contains the "gdb.spec" file, and from there you run:
+that contains the `gdb.spec` file, and from there you run:
- $ sh generate-patches-from-git-repo.sh
+`$ sh generate-patches-from-git-repo.sh `
-This will regenerate all of the *.patch files (excluding the ones that
+This will regenerate all of the `*.patch` files (excluding the ones that
were also excluded from the git repository), and also regenerate a few
control files. These control files are:
- - _gdb.spec.Patch.include: This file contains the "Patch:" directives.
+ - `_gdb.spec.Patch.include`: This file contains the `Patch:` directives.
- - _gdb.spec.patch.include: This file contains the "%patch" directives.
+ - `_gdb.spec.patch.include`: This file contains the `%patch` directives.
- - _patch_order: This file contains the patches, in the exact order
+ - `_patch_order`: This file contains the patches, in the exact order
that they must be applied. It is used when importing the patches
into the git repository.
- - _git_upstream_commit: This file contains the last upstream commit
+ - `_git_upstream_commit`: This file contains the last upstream commit
against which the patches were rebased. It is used when importing
the patches into the git repository.
NOTE: If you did a rebase against a newer upstream version, you need
to specify the commit/tag/branch against which you rebased:
- $ sh generate-patches-from-git-repo.sh
+`$ sh generate-patches-from-git-repo.sh `
-For example, if you rebased against "gdb-8.1-release":
+For example, if you rebased against `gdb-8.1-release`:
- $ sh generate-patches-from-git-repo.sh gdb-8.1-release
+`$ sh generate-patches-from-git-repo.sh gdb-8.1-release`
diff --git a/_gdb.spec.Patch.include b/_gdb.spec.Patch.include
index e2694c6..a3b3538 100644
--- a/_gdb.spec.Patch.include
+++ b/_gdb.spec.Patch.include
@@ -102,281 +102,273 @@ Patch025: gdb-6.6-testsuite-timeouts.patch
#=fedoratest
Patch026: 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?
-Patch027: gdb-6.6-scheduler_locking-step-is-default.patch
-
# Test kernel VDSO decoding while attaching to an i386 process.
#=fedoratest
-Patch028: gdb-6.3-attach-see-vdso-test.patch
+Patch027: gdb-6.3-attach-see-vdso-test.patch
# Test leftover zombie process (BZ 243845).
#=fedoratest
-Patch029: gdb-6.5-bz243845-stale-testing-zombie-test.patch
+Patch028: gdb-6.5-bz243845-stale-testing-zombie-test.patch
# New locating of the matching binaries from the pure core file (build-id).
#=push+jan
-Patch030: gdb-6.6-buildid-locate.patch
+Patch029: 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
-Patch031: gdb-6.6-buildid-locate-solib-missing-ids.patch
+Patch030: gdb-6.6-buildid-locate-solib-missing-ids.patch
#=push+jan
-Patch032: gdb-6.6-buildid-locate-rpm.patch
+Patch031: 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.
-Patch033: gdb-6.7-charsign-test.patch
+Patch032: gdb-6.7-charsign-test.patch
# Test PPC hiding of call-volatile parameter register.
#=fedoratest
-Patch034: gdb-6.7-ppc-clobbered-registers-O2-test.patch
+Patch033: gdb-6.7-ppc-clobbered-registers-O2-test.patch
# Testsuite fixes for more stable/comparable results.
#=fedoratest
-Patch035: gdb-6.7-testsuite-stable-results.patch
+Patch034: gdb-6.7-testsuite-stable-results.patch
# Test ia64 memory leaks of the code using libunwind.
#=fedoratest
-Patch036: gdb-6.5-ia64-libunwind-leak-test.patch
+Patch035: gdb-6.5-ia64-libunwind-leak-test.patch
# Test hiding unexpected breakpoints on intentional step commands.
#=fedoratest
-Patch037: gdb-6.5-missed-trap-on-step-test.patch
+Patch036: gdb-6.5-missed-trap-on-step-test.patch
# Test gcore memory and time requirements for large inferiors.
#=fedoratest
-Patch038: gdb-6.5-gcore-buffer-limit-test.patch
+Patch037: 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.
-Patch039: gdb-6.3-mapping-zero-inode-test.patch
+Patch038: gdb-6.3-mapping-zero-inode-test.patch
# Test a crash on `focus cmd', `focus prev' commands.
#=fedoratest
-Patch040: gdb-6.3-focus-cmd-prev-test.patch
+Patch039: gdb-6.3-focus-cmd-prev-test.patch
# Test various forms of threads tracking across exec() (BZ 442765).
#=fedoratest
-Patch041: gdb-6.8-bz442765-threaded-exec-test.patch
+Patch040: gdb-6.8-bz442765-threaded-exec-test.patch
# Test a crash on libraries missing the .text section.
#=fedoratest
-Patch042: gdb-6.5-section-num-fixup-test.patch
-
-# Fix register assignments with no GDB stack frames (BZ 436037).
-#=push+jan: This fix is incorrect.
-Patch043: gdb-6.8-bz436037-reg-no-longer-active.patch
+Patch041: gdb-6.5-section-num-fixup-test.patch
# Fix resolving of variables at locations lists in prelinked libs (BZ 466901).
#=fedoratest
-Patch044: gdb-6.8-bz466901-backtrace-full-prelinked.patch
+Patch042: gdb-6.8-bz466901-backtrace-full-prelinked.patch
# New test for step-resume breakpoint placed in multiple threads at once.
#=fedoratest
-Patch045: gdb-simultaneous-step-resume-breakpoint-test.patch
+Patch043: 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@.*>
-Patch046: gdb-core-open-vdso-warning.patch
+Patch044: gdb-core-open-vdso-warning.patch
# Fix stepping with OMP parallel Fortran sections (BZ 533176).
#=push+jan: It requires some better DWARF annotations.
-Patch047: gdb-bz533176-fortran-omp-step.patch
+Patch045: gdb-bz533176-fortran-omp-step.patch
# Workaround ccache making lineno non-zero for command-line definitions.
#=fedoratest: ccache is rarely used and it is even fixed now.
-Patch048: gdb-ccache-workaround.patch
+Patch046: gdb-ccache-workaround.patch
#=push+jan: May get obsoleted by Tom's unrelocated objfiles patch.
-Patch049: gdb-archer-pie-addons.patch
+Patch047: gdb-archer-pie-addons.patch
#=push+jan: Breakpoints disabling matching should not be based on address.
-Patch050: gdb-archer-pie-addons-keep-disabled.patch
+Patch048: gdb-archer-pie-addons-keep-disabled.patch
# Testcase for "Do not make up line information" fix by Daniel Jacobowitz.
#=fedoratest
-Patch051: gdb-lineno-makeup-test.patch
+Patch049: gdb-lineno-makeup-test.patch
# Test power7 ppc disassembly.
#=fedoratest
-Patch052: gdb-ppc-power7-test.patch
+Patch050: gdb-ppc-power7-test.patch
# Workaround non-stop moribund locations exploited by kernel utrace (BZ 590623).
#=push+jan: Currently it is still not fully safe.
-Patch053: gdb-moribund-utrace-workaround.patch
+Patch051: gdb-moribund-utrace-workaround.patch
# Fix follow-exec for C++ programs (bugreported by Martin Stransky).
#=fedoratest
-Patch054: gdb-archer-next-over-throw-cxx-exec.patch
+Patch052: gdb-archer-next-over-throw-cxx-exec.patch
# Backport DWARF-4 support (BZ 601887, Tom Tromey).
#=fedoratest
-Patch055: gdb-bz601887-dwarf4-rh-test.patch
+Patch053: gdb-bz601887-dwarf4-rh-test.patch
#=push+jan
-Patch056: gdb-6.6-buildid-locate-core-as-arg.patch
+Patch054: gdb-6.6-buildid-locate-core-as-arg.patch
# Workaround librpm BZ 643031 due to its unexpected exit() calls (BZ 642879).
#=push+jan
-Patch057: gdb-6.6-buildid-locate-rpm-librpm-workaround.patch
+Patch055: gdb-6.6-buildid-locate-rpm-librpm-workaround.patch
# [delayed-symfile] Test a backtrace regression on CFIs without DIE (BZ 614604).
#=fedoratest
-Patch058: gdb-test-bt-cfi-without-die.patch
+Patch056: gdb-test-bt-cfi-without-die.patch
# Verify GDB Python built-in function gdb.solib_address exists (BZ # 634108).
#=fedoratest
-Patch059: gdb-bz634108-solib_address.patch
+Patch057: gdb-bz634108-solib_address.patch
# New test gdb.arch/x86_64-pid0-core.exp for kernel PID 0 cores (BZ 611435).
#=fedoratest
-Patch060: gdb-test-pid0-core.patch
+Patch058: gdb-test-pid0-core.patch
# [archer-tromey-delayed-symfile] New test gdb.dwarf2/dw2-aranges.exp.
#=fedoratest
-Patch061: gdb-test-dw2-aranges.patch
+Patch059: gdb-test-dw2-aranges.patch
# [archer-keiths-expr-cumulative+upstream] Import C++ testcases.
#=fedoratest
-Patch062: gdb-test-expr-cumulative-archer.patch
+Patch060: gdb-test-expr-cumulative-archer.patch
# Fix regressions on C++ names resolving (PR 11734, PR 12273, Keith Seitz).
#=fedoratest
-Patch063: gdb-physname-pr11734-test.patch
+Patch061: gdb-physname-pr11734-test.patch
# Fix regressions on C++ names resolving (PR 11734, PR 12273, Keith Seitz).
#=fedoratest
-Patch064: gdb-physname-pr12273-test.patch
+Patch062: gdb-physname-pr12273-test.patch
# Test GDB opcodes/ disassembly of Intel Ivy Bridge instructions (BZ 696890).
#=fedoratest
-Patch065: gdb-test-ivy-bridge.patch
+Patch063: gdb-test-ivy-bridge.patch
# Hack for proper PIE run of the testsuite.
#=fedoratest
-Patch066: gdb-runtest-pie-override.patch
+Patch064: gdb-runtest-pie-override.patch
# Print reasons for failed attach/spawn incl. SELinux deny_ptrace (BZ 786878).
#=push+jan
-Patch067: gdb-attach-fail-reasons-5of5.patch
+Patch065: gdb-attach-fail-reasons-5of5.patch
# Workaround PR libc/14166 for inferior calls of strstr.
#=fedoratest: Compatibility with RHELs (unchecked which ones).
-Patch068: gdb-glibc-strstr-workaround.patch
+Patch066: gdb-glibc-strstr-workaround.patch
# Include testcase for `Unable to see a variable inside a module (XLF)' (BZ 823789).
#=fedoratest
-Patch069: gdb-rhel5.9-testcase-xlf-var-inside-mod.patch
+Patch067: gdb-rhel5.9-testcase-xlf-var-inside-mod.patch
# Testcase for `Setting solib-absolute-prefix breaks vDSO' (BZ 818343).
#=fedoratest
-Patch070: gdb-rhbz-818343-set-solib-absolute-prefix-testcase.patch
+Patch068: gdb-rhbz-818343-set-solib-absolute-prefix-testcase.patch
# Import regression test for `gdb/findvar.c:417: internal-error:
# read_var_value: Assertion `frame' failed.' (RH BZ 947564) from RHEL 6.5.
#=fedoratest
-Patch071: gdb-rhbz947564-findvar-assertion-frame-failed-testcase.patch
+Patch069: gdb-rhbz947564-findvar-assertion-frame-failed-testcase.patch
# Fix crash of -readnow /usr/lib/debug/usr/bin/gnatbind.debug (BZ 1069211).
#=push+jan
-Patch072: gdb-gnat-dwarf-crash-3of3.patch
+Patch070: gdb-gnat-dwarf-crash-3of3.patch
# Fix 'memory leak in infpy_read_memory()' (RH BZ 1007614)
#=fedoratest
-Patch073: gdb-rhbz1007614-memleak-infpy_read_memory-test.patch
+Patch071: 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
-Patch074: gdb-6.6-buildid-locate-misleading-warning-missing-debuginfo-rhbz981154.patch
+Patch072: gdb-6.6-buildid-locate-misleading-warning-missing-debuginfo-rhbz981154.patch
#=fedoratest
-Patch075: gdb-archer-vla-tests.patch
+Patch073: gdb-archer-vla-tests.patch
#=fedoratest
-Patch076: gdb-vla-intel-tests.patch
+Patch074: gdb-vla-intel-tests.patch
# Continue backtrace even if a frame filter throws an exception (Phil Muldoon).
#=push
-Patch077: gdb-btrobust.patch
+Patch075: gdb-btrobust.patch
# Display Fortran strings in backtraces.
#=fedoratest
-Patch078: gdb-fortran-frame-string.patch
+Patch076: gdb-fortran-frame-string.patch
# Testcase for '[SAP] Recursive dlopen causes SAP HANA installer to
# crash.' (RH BZ 1156192).
#=fedoratest
-Patch079: gdb-rhbz1156192-recursive-dlopen-test.patch
+Patch077: gdb-rhbz1156192-recursive-dlopen-test.patch
# Fix jit-reader.h for multi-lib.
#=push+jan
-Patch080: gdb-jit-reader-multilib.patch
+Patch078: gdb-jit-reader-multilib.patch
# Fix '`catch syscall' doesn't work for parent after `fork' is called'
# (Philippe Waroquiers, RH BZ 1149205).
#=fedoratest
-Patch081: gdb-rhbz1149205-catch-syscall-after-fork-test.patch
+Patch079: 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
-Patch082: gdb-rhbz1186476-internal-error-unqualified-name-re-set-test.patch
+Patch080: gdb-rhbz1186476-internal-error-unqualified-name-re-set-test.patch
# Test 'info type-printers' Python error (RH BZ 1350436).
#=fedoratest
-Patch083: gdb-rhbz1350436-type-printers-error.patch
+Patch081: gdb-rhbz1350436-type-printers-error.patch
# Fix '[ppc64] and [s390x] wrong prologue skip on -O2 -g code' (Jan
# Kratochvil, RH BZ 1084404).
#=fedoratest
-Patch084: gdb-rhbz1084404-ppc64-s390x-wrong-prologue-skip-O2-g-3of3.patch
+Patch082: 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
-Patch085: gdb-bz1219747-attach-kills.patch
+Patch083: gdb-bz1219747-attach-kills.patch
# Force libncursesw over libncurses to match the includes (RH BZ 1270534).
#=push+jan
-Patch086: gdb-fedora-libncursesw.patch
+Patch084: gdb-fedora-libncursesw.patch
# Test clflushopt instruction decode (for RH BZ 1262471).
#=fedoratest
-Patch087: gdb-opcodes-clflushopt-test.patch
+Patch085: gdb-opcodes-clflushopt-test.patch
# [rhel6] DTS backward Python compatibility API (BZ 1020004, Phil Muldoon).
#=fedora
-Patch088: gdb-dts-rhel6-python-compat.patch
+Patch086: gdb-dts-rhel6-python-compat.patch
# [SCL] Skip deprecated .gdb_index warning for Red Hat built files (BZ 953585).
#=push+jan
-Patch089: gdb-6.6-buildid-locate-rpm-scl.patch
+Patch087: gdb-6.6-buildid-locate-rpm-scl.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 .
-Patch090: gdb-6.8-quit-never-aborts.patch
+Patch088: gdb-6.8-quit-never-aborts.patch
# [aarch64] Fix hardware watchpoints (RH BZ 1261564).
#=fedoratest
-Patch091: gdb-rhbz1261564-aarch64-hw-watchpoint-test.patch
+Patch089: gdb-rhbz1261564-aarch64-hw-watchpoint-test.patch
# Add messages suggesting more recent RHEL gdbserver (RH BZ 1321114).
#=fedora
-Patch092: gdb-container-rh-pkg.patch
+Patch090: gdb-container-rh-pkg.patch
# New test for Python "Cannot locate object file for block" (for RH BZ 1325795).
#=fedoratest
-Patch093: gdb-rhbz1325795-framefilters-test.patch
+Patch091: gdb-rhbz1325795-framefilters-test.patch
# [dts+el7] [x86*] Bundle linux_perf.h for libipt (RH BZ 1256513).
#=fedora
-Patch094: gdb-linux_perf-bundle.patch
+Patch092: gdb-linux_perf-bundle.patch
# Fix gdb-headless /usr/bin/ executables (BZ 1390251).
#
@@ -385,20 +377,20 @@ Patch094: gdb-linux_perf-bundle.patch
#
# https://fedoraproject.org/wiki/Changes/Minimal_GDB_in_buildroot
#=fedora
-Patch095: gdb-libexec-add-index.patch
+Patch093: gdb-libexec-add-index.patch
# New testcase for: Fix -completion crash (Gary Benson, RH BZ 1398387).
#=fedoratest
-Patch096: gdb-rhbz1398387-tab-crash-test.patch
+Patch094: gdb-rhbz1398387-tab-crash-test.patch
# Python patches of: http://sourceware.org/gdb/wiki/ProjectArcher
#=push
-Patch097: gdb-archer.patch
+Patch095: gdb-archer.patch
# Revert upstream commit 469412dd9ccc4de5874fd3299b105833f36b34cd
-Patch098: gdb-vla-intel-fix-print-char-array.patch
+Patch096: gdb-vla-intel-fix-print-char-array.patch
# [s390x] Backport arch12 instructions decoding (RH BZ 1553104).
# =fedoratest
-Patch099: gdb-rhbz1553104-s390x-arch12-test.patch
+Patch097: gdb-rhbz1553104-s390x-arch12-test.patch
diff --git a/_gdb.spec.patch.include b/_gdb.spec.patch.include
index dddd45a..8f619ab 100644
--- a/_gdb.spec.patch.include
+++ b/_gdb.spec.patch.include
@@ -95,5 +95,3 @@
%patch095 -p1
%patch096 -p1
%patch097 -p1
-%patch098 -p1
-%patch099 -p1
diff --git a/_git_upstream_commit b/_git_upstream_commit
index 6437e47..07da3f2 100644
--- a/_git_upstream_commit
+++ b/_git_upstream_commit
@@ -1 +1 @@
-58bd3702d7aad95e08bcd05efc4ef4f1585305a9
+899016d49d289757372459f72d642a4c6b3b7732
diff --git a/_patch_order b/_patch_order
index 14442be..a45566e 100644
--- a/_patch_order
+++ b/_patch_order
@@ -24,7 +24,6 @@ gdb-6.6-bz230000-power6-disassembly-test.patch
gdb-6.6-bz229517-gcore-without-terminal.patch
gdb-6.6-testsuite-timeouts.patch
gdb-6.6-bz237572-ppc-atomic-sequence-test.patch
-gdb-6.6-scheduler_locking-step-is-default.patch
gdb-6.3-attach-see-vdso-test.patch
gdb-6.5-bz243845-stale-testing-zombie-test.patch
gdb-6.6-buildid-locate.patch
@@ -40,7 +39,6 @@ gdb-6.3-mapping-zero-inode-test.patch
gdb-6.3-focus-cmd-prev-test.patch
gdb-6.8-bz442765-threaded-exec-test.patch
gdb-6.5-section-num-fixup-test.patch
-gdb-6.8-bz436037-reg-no-longer-active.patch
gdb-6.8-bz466901-backtrace-full-prelinked.patch
gdb-simultaneous-step-resume-breakpoint-test.patch
gdb-core-open-vdso-warning.patch
diff --git a/gdb-6.3-gstack-20050411.patch b/gdb-6.3-gstack-20050411.patch
index a1d48c2..982863a 100644
--- a/gdb-6.3-gstack-20050411.patch
+++ b/gdb-6.3-gstack-20050411.patch
@@ -16,7 +16,7 @@ Subject: gdb-6.3-gstack-20050411.patch
diff --git a/gdb/Makefile.in b/gdb/Makefile.in
--- a/gdb/Makefile.in
+++ b/gdb/Makefile.in
-@@ -1756,7 +1756,7 @@ info install-info clean-info dvi pdf install-pdf html install-html: force
+@@ -1768,7 +1768,7 @@ info install-info clean-info dvi pdf install-pdf html install-html: force
install: all
@$(MAKE) $(FLAGS_TO_PASS) install-only
@@ -25,7 +25,7 @@ diff --git a/gdb/Makefile.in b/gdb/Makefile.in
transformed_name=`t='$(program_transform_name)'; \
echo gdb | sed -e "$$t"` ; \
if test "x$$transformed_name" = x; then \
-@@ -1805,7 +1805,25 @@ install-guile:
+@@ -1817,7 +1817,25 @@ install-guile:
install-python:
$(SHELL) $(srcdir)/../mkinstalldirs $(DESTDIR)$(GDB_DATADIR)/python/gdb
@@ -52,7 +52,7 @@ diff --git a/gdb/Makefile.in b/gdb/Makefile.in
transformed_name=`t='$(program_transform_name)'; \
echo gdb | sed -e $$t` ; \
if test "x$$transformed_name" = x; then \
-@@ -1828,6 +1846,18 @@ uninstall: force $(CONFIG_UNINSTALL)
+@@ -1840,6 +1858,18 @@ uninstall: force $(CONFIG_UNINSTALL)
fi
@$(MAKE) DO=uninstall "DODIRS=$(SUBDIRS)" $(FLAGS_TO_PASS) subdir_do
diff --git a/gdb-6.3-rh-testversion-20041202.patch b/gdb-6.3-rh-testversion-20041202.patch
index daf69c4..48ca4b5 100644
--- a/gdb-6.3-rh-testversion-20041202.patch
+++ b/gdb-6.3-rh-testversion-20041202.patch
@@ -27,7 +27,7 @@ diff --git a/gdb/testsuite/gdb.gdb/selftest.exp b/gdb/testsuite/gdb.gdb/selftest
diff --git a/gdb/top.c b/gdb/top.c
--- a/gdb/top.c
+++ b/gdb/top.c
-@@ -2061,7 +2061,7 @@ init_gdb_version_vars (void)
+@@ -2096,7 +2096,7 @@ init_gdb_version_vars (void)
struct internalvar *major_version_var = create_internalvar ("_gdb_major");
struct internalvar *minor_version_var = create_internalvar ("_gdb_minor");
int vmajor = 0, vminor = 0, vrevision = 0;
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 ca476c4..a89de0a 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
-@@ -1212,6 +1212,10 @@ print_command_1 (const char *args, int voidprint)
+@@ -1214,6 +1214,10 @@ print_command_1 (const char *args, int voidprint)
if (exp != nullptr && *exp)
{
diff --git a/gdb-6.5-bz218379-solib-trampoline-lookup-lock-fix.patch b/gdb-6.5-bz218379-solib-trampoline-lookup-lock-fix.patch
index af2779e..0a66b3d 100644
--- a/gdb-6.5-bz218379-solib-trampoline-lookup-lock-fix.patch
+++ b/gdb-6.5-bz218379-solib-trampoline-lookup-lock-fix.patch
@@ -11,8 +11,8 @@ https://bugzilla.redhat.com/bugzilla/show_bug.cgi?id=218379
diff --git a/gdb/symtab.c b/gdb/symtab.c
--- a/gdb/symtab.c
+++ b/gdb/symtab.c
-@@ -3142,6 +3142,13 @@ find_pc_sect_line (CORE_ADDR pc, struct obj_section *section, int notcurrent)
- SYMBOL_LINKAGE_NAME (msymbol)); */
+@@ -3166,6 +3166,13 @@ find_pc_sect_line (CORE_ADDR pc, struct obj_section *section, int notcurrent)
+ msymbol->linkage_name ()); */
;
/* fall through */
+ /* `msymbol' trampoline may be located before its .text symbol
@@ -20,7 +20,7 @@ diff --git a/gdb/symtab.c b/gdb/symtab.c
+ Avoid `find_pc_sect_line'<->`find_pc_line' infinite loop.
+ Red Hat Bug 218379. */
+ else if (BMSYMBOL_VALUE_ADDRESS (mfunsym) == pc)
-+ warning ("In stub for %s (0x%s); interlocked, please submit the binary to http://bugzilla.redhat.com", MSYMBOL_LINKAGE_NAME (msymbol.minsym), paddress (target_gdbarch (), pc));
++ warning ("In stub for %s (0x%s); interlocked, please submit the binary to http://bugzilla.redhat.com", msymbol.minsym->linkage_name (), paddress (target_gdbarch (), pc));
+ /* fall through */
else
return find_pc_line (BMSYMBOL_VALUE_ADDRESS (mfunsym), 0);
diff --git a/gdb-6.6-buildid-locate-core-as-arg.patch b/gdb-6.6-buildid-locate-core-as-arg.patch
index b254200..d182ae1 100644
--- a/gdb-6.6-buildid-locate-core-as-arg.patch
+++ b/gdb-6.6-buildid-locate-core-as-arg.patch
@@ -94,11 +94,11 @@ diff --git a/gdb/exec.c b/gdb/exec.c
+
+ if (is_core != 0)
+ throw_error (IS_CORE_ERROR,
-+ _("\"%s\" is a core file.\n"
-+ "Please specify an executable to debug."),
-+ scratch_pathname);
++ _("\"%s\" is a core file.\n"
++ "Please specify an executable to debug."),
++ scratch_pathname);
+ else
-+ error (_("\"%s\": not in executable format: %s"),
++ error (_("\"%ss\": not in executable format: %s"),
+ scratch_pathname,
+ gdb_bfd_errmsg (bfd_get_error (), matching).c_str ());
}
@@ -120,7 +120,7 @@ diff --git a/gdb/gdbsupport/common-exceptions.h b/gdb/gdbsupport/common-exceptio
diff --git a/gdb/main.c b/gdb/main.c
--- a/gdb/main.c
+++ b/gdb/main.c
-@@ -489,6 +489,34 @@ struct cmdarg
+@@ -467,6 +467,34 @@ 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)
{
-@@ -929,6 +957,8 @@ captured_main_1 (struct captured_main_args *context)
+@@ -907,6 +935,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++;
}
-@@ -1085,12 +1115,25 @@ captured_main_1 (struct captured_main_args *context)
+@@ -1063,12 +1093,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..abea6e6 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)
+@@ -709,6 +709,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 bed7455..ca683ed 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;
+@@ -743,7 +743,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)
+@@ -850,7 +854,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)
+@@ -968,6 +976,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);
}
-@@ -980,6 +1019,20 @@ missing_rpm_enlist (const char *filename)
+@@ -977,6 +1016,20 @@ missing_rpm_enlist (const char *filename)
return count;
}
@@ -98,7 +98,7 @@ diff --git a/gdb/build-id.c b/gdb/build-id.c
diff --git a/gdb/dwarf2read.c b/gdb/dwarf2read.c
--- a/gdb/dwarf2read.c
+++ b/gdb/dwarf2read.c
-@@ -3494,6 +3494,16 @@ read_gdb_index_from_buffer (struct objfile *objfile,
+@@ -3497,6 +3497,16 @@ read_gdb_index_from_buffer (struct objfile *objfile,
"set use-deprecated-index-sections on". */
if (version < 6 && !deprecated_ok)
{
@@ -115,7 +115,7 @@ diff --git a/gdb/dwarf2read.c b/gdb/dwarf2read.c
static int warning_printed = 0;
if (!warning_printed)
{
-@@ -3505,6 +3515,10 @@ to use the section anyway."),
+@@ -3508,6 +3518,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 30545c9..6e1cef8 100644
--- a/gdb-6.6-buildid-locate-rpm.patch
+++ b/gdb-6.6-buildid-locate-rpm.patch
@@ -243,7 +243,7 @@ diff --git a/gdb/build-id.c b/gdb/build-id.c
#include "libbfd.h"
#include "objfiles.h"
#include "observable.h"
-@@ -701,8 +702,359 @@ build_id_to_filename (const struct bfd_build_id *build_id, char **link_return)
+@@ -698,8 +699,374 @@ build_id_to_filename (const struct bfd_build_id *build_id, char **link_return)
return result;
}
@@ -541,6 +541,22 @@ diff --git a/gdb/build-id.c b/gdb/build-id.c
+
+ std::sort (array.begin (), array.end (), missing_rpm_list_compar);
+
++ /* We zero out the number of missing RPMs here because of a nasty
++ bug (see RHBZ 1801974).
++
++ When we call 'puts_unfiltered' below, if pagination is on and if
++ the number of missing RPMs is big enough to trigger pagination,
++ we will end up in an infinite recursion. The call chain looks
++ like this:
++
++ missing_rpm_list_print -> puts_unfiltered -> fputs_maybe_filtered
++ -> prompt_for_continue -> display_gdb_prompt ->
++ debug_flush_missing -> missing_rpm_list_print ...
++
++ For this reason, we make sure MISSING_RPM_LIST_ENTRIES is zero
++ *before* calling any print function. */
++ missing_rpm_list_entries = 0;
++
+ printf_unfiltered (_("Missing separate debuginfos, use: %s"),
+#ifdef DNF_DEBUGINFO_INSTALL
+ "dnf "
@@ -548,10 +564,10 @@ diff --git a/gdb/build-id.c b/gdb/build-id.c
+ "debuginfo-install");
+ for (const char *el : array)
+ {
-+ putchar_unfiltered (' ');
++ puts_unfiltered (" ");
+ puts_unfiltered (el);
+ }
-+ putchar_unfiltered ('\n');
++ puts_unfiltered ("\n");
+
+ while (missing_rpm_list != NULL)
+ {
@@ -559,7 +575,6 @@ diff --git a/gdb/build-id.c b/gdb/build-id.c
+ missing_rpm_list = list_iter->next;
+ xfree (list_iter);
+ }
-+ missing_rpm_list_entries = 0;
+}
+
+static void
@@ -604,7 +619,7 @@ diff --git a/gdb/build-id.c b/gdb/build-id.c
avoidance. */
struct missing_filepair
-@@ -756,11 +1108,17 @@ missing_filepair_change (void)
+@@ -753,11 +1120,17 @@ missing_filepair_change (void)
/* All their memory came just from missing_filepair_OBSTACK. */
missing_filepair_hash = NULL;
}
@@ -622,7 +637,7 @@ diff --git a/gdb/build-id.c b/gdb/build-id.c
missing_filepair_change ();
}
-@@ -827,14 +1185,39 @@ debug_print_missing (const char *binary, const char *debug)
+@@ -824,14 +1197,38 @@ debug_print_missing (const char *binary, const char *debug)
*slot = missing_filepair;
@@ -631,14 +646,13 @@ diff --git a/gdb/build-id.c b/gdb/build-id.c
+#ifdef HAVE_LIBRPM
+ if (missing_exec == MISSING_EXEC_NOT_TRIED)
+ {
-+ char *execfilename;
++ const char *execfilename = get_exec_file (0);
- fprintf_unfiltered (gdb_stdlog,
- _("Missing separate debuginfo for %s\n"), binary);
- if (debug != NULL)
- fprintf_unfiltered (gdb_stdlog, _("Try to install the hash file %s\n"),
- debug);
-+ execfilename = get_exec_file (0);
+ if (execfilename != NULL)
+ {
+ if (missing_rpm_enlist (execfilename) == 0)
@@ -672,7 +686,7 @@ diff --git a/gdb/build-id.c b/gdb/build-id.c
diff --git a/gdb/config.in b/gdb/config.in
--- a/gdb/config.in
+++ b/gdb/config.in
-@@ -33,6 +33,9 @@
+@@ -36,6 +36,9 @@
/* Define to BFD's default target vector. */
#undef DEFAULT_BFD_VEC
@@ -682,7 +696,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
-@@ -246,6 +249,9 @@
+@@ -245,6 +248,9 @@
/* Define if you have the mpfr library. */
#undef HAVE_LIBMPFR
@@ -695,7 +709,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
-@@ -756,6 +756,11 @@ CODESIGN_CERT
+@@ -761,6 +761,11 @@ CODESIGN_CERT
HAVE_NATIVE_GCORE_TARGET
TARGET_OBS
subdirs
@@ -707,7 +721,7 @@ diff --git a/gdb/configure b/gdb/configure
GDB_DATADIR
DEBUGDIR
MAKEINFO_EXTRA_FLAGS
-@@ -859,6 +864,7 @@ with_gdb_datadir
+@@ -864,6 +869,7 @@ with_gdb_datadir
with_relocated_sources
with_auto_load_dir
with_auto_load_safe_path
@@ -715,7 +729,7 @@ diff --git a/gdb/configure b/gdb/configure
enable_targets
enable_64_bit_bfd
enable_gdbmi
-@@ -921,6 +927,11 @@ CCC
+@@ -926,6 +932,11 @@ CCC
CPP
MAKEINFO
MAKEINFOFLAGS
@@ -727,7 +741,7 @@ diff --git a/gdb/configure b/gdb/configure
YACC
YFLAGS
XMKMF'
-@@ -1593,6 +1604,8 @@ Optional Packages:
+@@ -1598,6 +1609,8 @@ Optional Packages:
[--with-auto-load-dir]
--without-auto-load-safe-path
do not restrict auto-loaded files locations
@@ -736,7 +750,7 @@ diff --git a/gdb/configure b/gdb/configure
--with-libunwind-ia64 use libunwind frame unwinding for ia64 targets
--with-curses use the curses library instead of the termcap
library
-@@ -1656,6 +1669,13 @@ Some influential environment variables:
+@@ -1661,6 +1674,13 @@ Some influential environment variables:
MAKEINFO Parent configure detects if it is of sufficient version.
MAKEINFOFLAGS
Parameters for MAKEINFO.
@@ -750,7 +764,7 @@ diff --git a/gdb/configure b/gdb/configure
YACC The `Yet Another Compiler Compiler' implementation to use.
Defaults to the first program found out of: `bison -y', `byacc',
`yacc'.
-@@ -6515,6 +6535,494 @@ _ACEOF
+@@ -6587,6 +6607,494 @@ _ACEOF
{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $with_auto_load_safe_path" >&5
$as_echo "$with_auto_load_safe_path" >&6; }
@@ -1448,30 +1462,18 @@ diff --git a/gdb/configure.ac b/gdb/configure.ac
AC_CONFIG_SUBDIRS(testsuite)
# Check whether to support alternative target configurations
-diff --git a/gdb/corelow.c b/gdb/corelow.c
---- a/gdb/corelow.c
-+++ b/gdb/corelow.c
-@@ -363,7 +363,7 @@ build_id_locate_exec (int from_tty)
- symfile_objfile->flags |= OBJF_BUILD_ID_CORE_LOADED;
- }
- else
-- debug_print_missing (_("the main executable file"), build_id_filename);
-+ debug_print_missing (BUILD_ID_MAIN_EXECUTABLE_FILENAME, build_id_filename);
-
- /* 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
-@@ -40,6 +40,7 @@
- #include "gdbsupport/buffer.h"
+@@ -41,6 +41,7 @@
#include "ser-event.h"
#include "gdb_select.h"
+ #include "gdbsupport/gdb-sigmask.h"
+#include "symfile.h"
/* readline include files. */
#include "readline/readline.h"
-@@ -362,6 +363,8 @@ display_gdb_prompt (const char *new_prompt)
+@@ -363,6 +364,8 @@ display_gdb_prompt (const char *new_prompt)
/* Reset the nesting depth used when trace-commands is set. */
reset_command_nest_depth ();
@@ -1480,7 +1482,7 @@ diff --git a/gdb/event-top.c b/gdb/event-top.c
/* Do not call the python hook on an explicit prompt change as
passed to this function, as this forms a secondary/local prompt,
IE, displayed but not set. */
-@@ -771,7 +774,10 @@ command_line_handler (gdb::unique_xmalloc_ptr &&rl)
+@@ -772,7 +775,10 @@ command_line_handler (gdb::unique_xmalloc_ptr &&rl)
command_handler (cmd);
if (ui->prompt_state != PROMPTED)
diff --git a/gdb-6.6-buildid-locate.patch b/gdb-6.6-buildid-locate.patch
index a90e5f0..504c6a9 100644
--- a/gdb-6.6-buildid-locate.patch
+++ b/gdb-6.6-buildid-locate.patch
@@ -104,9 +104,9 @@ diff --git a/gdb/build-id.c b/gdb/build-id.c
-build_id_bfd_get (bfd *abfd)
+build_id_bfd_shdr_get (bfd *abfd)
{
- if (!bfd_check_format (abfd, bfd_object))
- return NULL;
-@@ -42,6 +100,348 @@ build_id_bfd_get (bfd *abfd)
+ if (!bfd_check_format (abfd, bfd_object)
+ && !bfd_check_format (abfd, bfd_core))
+@@ -43,6 +101,348 @@ build_id_bfd_get (bfd *abfd)
return NULL;
}
@@ -455,7 +455,7 @@ diff --git a/gdb/build-id.c b/gdb/build-id.c
/* See build-id.h. */
int
-@@ -50,7 +450,7 @@ build_id_verify (bfd *abfd, size_t check_len, const bfd_byte *check)
+@@ -51,7 +451,7 @@ build_id_verify (bfd *abfd, size_t check_len, const bfd_byte *check)
const struct bfd_build_id *found;
int retval = 0;
@@ -464,7 +464,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,62 +465,173 @@ build_id_verify (bfd *abfd, size_t check_len, const bfd_byte *check)
+@@ -66,56 +466,159 @@ build_id_verify (bfd *abfd, size_t check_len, const bfd_byte *check)
return retval;
}
@@ -510,8 +510,7 @@ diff --git a/gdb/build-id.c b/gdb/build-id.c
-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)
++ const bfd_byte *build_id, char **link_return)
{
+ gdb_bfd_ref_ptr ret_bfd = {};
+ std::string ret_link;
@@ -552,10 +551,6 @@ diff --git a/gdb/build-id.c b/gdb/build-id.c
- {
- if (separate_debug_file_debug)
- printf_unfiltered (_(" no, unable to open.\n"));
-+ if (add_debug_suffix)
-+ link += ".debug";
-
-- return {};
+ ret_link = link;
+
+ struct stat statbuf_trash;
@@ -580,7 +575,8 @@ diff --git a/gdb/build-id.c b/gdb/build-id.c
+
+ continue;
+ }
-+
+
+- return {};
+ /* We expect to be silent on the non-existing files. */
+ gdb_bfd_ref_ptr debug_bfd = gdb_bfd_open (filename.get (), gnutarget, -1);
+
@@ -611,6 +607,8 @@ diff --git a/gdb/build-id.c b/gdb/build-id.c
{
if (separate_debug_file_debug)
- printf_unfiltered (_(" no, build-id does not match.\n"));
+-
+- return {};
+ printf_unfiltered (_(" yes!\n"));
+ }
+ else
@@ -619,15 +617,11 @@ diff --git a/gdb/build-id.c b/gdb/build-id.c
+ 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
@@ -656,16 +650,17 @@ diff --git a/gdb/build-id.c b/gdb/build-id.c
+ return ret_bfd;
}
- /* See build-id.h. */
+ /* Common code for finding BFDs of a given build-id. This function
+@@ -124,7 +627,7 @@ build_id_to_debug_bfd_1 (const std::string &link, size_t build_id_len,
- gdb_bfd_ref_ptr
--build_id_to_debug_bfd (size_t build_id_len, const bfd_byte *build_id)
-+build_id_to_debug_bfd (size_t build_id_len, const bfd_byte *build_id,
-+ char **link_return, int add_debug_suffix)
+ static gdb_bfd_ref_ptr
+ build_id_to_bfd_suffix (size_t build_id_len, const bfd_byte *build_id,
+- const char *suffix)
++ const char *suffix, char **link_return)
{
/* Keep backward compatibility so that DEBUG_FILE_DIRECTORY being "" will
cause "/.build-id/..." lookups. */
-@@ -143,16 +654,16 @@ build_id_to_debug_bfd (size_t build_id_len, const bfd_byte *build_id)
+@@ -147,16 +650,17 @@ build_id_to_bfd_suffix (size_t build_id_len, const bfd_byte *build_id,
if (size > 0)
{
size--;
@@ -678,26 +673,25 @@ diff --git a/gdb/build-id.c b/gdb/build-id.c
while (size-- > 0)
string_appendf (link, "%02x", (unsigned) *data++);
-- link += ".debug";
--
+ link += suffix;
+
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);
++ = build_id_to_debug_bfd_1 (link, build_id_len, build_id, link_return);
if (debug_bfd != NULL)
return debug_bfd;
-@@ -166,7 +677,8 @@ build_id_to_debug_bfd (size_t build_id_len, const bfd_byte *build_id)
+@@ -170,7 +674,8 @@ build_id_to_bfd_suffix (size_t build_id_len, const bfd_byte *build_id,
if (strcmp (gdb_sysroot, TARGET_SYSROOT_PREFIX) != 0)
{
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);
++ link_return);
if (debug_bfd != NULL)
return debug_bfd;
}
-@@ -175,22 +687,189 @@ build_id_to_debug_bfd (size_t build_id_len, const bfd_byte *build_id)
+@@ -179,38 +684,208 @@ build_id_to_bfd_suffix (size_t build_id_len, const bfd_byte *build_id,
return {};
}
@@ -707,7 +701,7 @@ diff --git a/gdb/build-id.c b/gdb/build-id.c
+ gdb_bfd_ref_ptr abfd;
+ char *result;
+
-+ abfd = build_id_to_debug_bfd (build_id->size, build_id->data, link_return, 0);
++ abfd = build_id_to_exec_bfd (build_id->size, build_id->data, link_return);
+ if (abfd == NULL)
+ return NULL;
+
@@ -853,6 +847,29 @@ diff --git a/gdb/build-id.c b/gdb/build-id.c
+
/* See build-id.h. */
+ gdb_bfd_ref_ptr
+-build_id_to_debug_bfd (size_t build_id_len, const bfd_byte *build_id)
++build_id_to_debug_bfd (size_t build_id_len, const bfd_byte *build_id,
++ char **link_return)
+ {
+- return build_id_to_bfd_suffix (build_id_len, build_id, ".debug");
++ return build_id_to_bfd_suffix (build_id_len, build_id, ".debug",
++ link_return);
+ }
+
+ /* See build-id.h. */
+
+ gdb_bfd_ref_ptr
+-build_id_to_exec_bfd (size_t build_id_len, const bfd_byte *build_id)
++build_id_to_exec_bfd (size_t build_id_len, const bfd_byte *build_id,
++ char **link_return)
+ {
+- return build_id_to_bfd_suffix (build_id_len, build_id, "");
++ return build_id_to_bfd_suffix (build_id_len, build_id, "", link_return);
+ }
+
+ /* See build-id.h. */
+
std::string
-find_separate_debug_file_by_buildid (struct objfile *objfile)
+find_separate_debug_file_by_buildid (struct objfile *objfile,
@@ -875,7 +892,7 @@ diff --git a/gdb/build-id.c b/gdb/build-id.c
gdb_bfd_ref_ptr abfd (build_id_to_debug_bfd (build_id->size,
- build_id->data));
+ build_id->data,
-+ (!build_id_filename_return ? NULL : &build_id_filename_cstr), 1));
++ (!build_id_filename_return ? NULL : &build_id_filename_cstr)));
+ if (build_id_filename_return)
+ {
+ if (!build_id_filename_cstr)
@@ -890,7 +907,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 ()),
-@@ -203,3 +882,21 @@ find_separate_debug_file_by_buildid (struct objfile *objfile)
+@@ -223,3 +898,21 @@ find_separate_debug_file_by_buildid (struct objfile *objfile)
return std::string ();
}
@@ -928,18 +945,26 @@ diff --git a/gdb/build-id.h b/gdb/build-id.h
/* Return true if ABFD has NT_GNU_BUILD_ID matching the CHECK value.
Otherwise, issue a warning and return false. */
-@@ -39,14 +40,19 @@ extern int build_id_verify (bfd *abfd,
- the caller. */
+@@ -38,21 +39,26 @@ extern int build_id_verify (bfd *abfd,
+ can be found, return NULL. */
extern gdb_bfd_ref_ptr build_id_to_debug_bfd (size_t build_id_len,
- const bfd_byte *build_id);
+ const bfd_byte *build_id,
-+ char **link_return,
-+ int add_debug_suffix);
++ char **link_return);
+
+extern char *build_id_to_filename (const struct bfd_build_id *build_id,
+ char **link_return);
+ /* Find and open a BFD for an executable file given a build-id. If no BFD
+ can be found, return NULL. The returned reference to the BFD must be
+ released by the caller. */
+
+ extern gdb_bfd_ref_ptr build_id_to_exec_bfd (size_t build_id_len,
+- const bfd_byte *build_id);
++ const bfd_byte *build_id,
++ char **link_return);
+
/* Find the separate debug file for OBJFILE, by using the build-id
associated with OBJFILE's BFD. If successful, returns the file name for the
separate debug file, otherwise, return an empty string. */
@@ -978,72 +1003,44 @@ diff --git a/gdb/corelow.c b/gdb/corelow.c
#include "inferior.h"
#include "infrun.h"
#include "symtab.h"
-@@ -321,6 +325,49 @@ add_to_thread_list (bfd *abfd, asection *asect, void *reg_sect_arg)
+@@ -322,6 +326,8 @@ add_to_thread_list (bfd *abfd, asection *asect, void *reg_sect_arg)
inferior_ptid = ptid; /* Yes, make it current. */
}
+static bool build_id_core_loads = true;
-+
-+static void
-+build_id_locate_exec (int from_tty)
-+{
-+ CORE_ADDR at_entry;
-+ gdb::unique_xmalloc_ptr build_id;
-+ gdb::unique_xmalloc_ptr execfilename;
-+ char *build_id_filename;
-+
-+ if (exec_bfd != NULL || symfile_objfile != NULL)
-+ return;
-+
-+ if (target_auxv_search (current_top_target (), AT_ENTRY, &at_entry) <= 0)
-+ return;
-+
-+ build_id.reset (build_id_addr_get (at_entry));
-+ if (build_id == NULL)
-+ return;
-+
-+ /* SYMFILE_OBJFILE should refer to the main executable (not only to its
-+ separate debug info file). gcc44+ keeps .eh_frame only in the main
-+ executable without its duplicate .debug_frame in the separate debug info
-+ file - such .eh_frame would not be found if SYMFILE_OBJFILE would refer
-+ directly to the separate debug info file. */
-+
-+ execfilename.reset (build_id_to_filename (build_id.get (),
-+ &build_id_filename));
-+
-+ if (execfilename != NULL)
-+ {
-+ 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);
-+
-+ /* No automatic SOLIB_ADD as the libraries would get read twice. */
-+}
+
/* Issue a message saying we have no core to debug, if FROM_TTY. */
static void
-@@ -456,6 +503,14 @@ core_target_open (const char *arg, int from_tty)
- switch_to_thread (thread);
+@@ -358,19 +364,25 @@ core_file_command (const char *filename, int from_tty)
+ static void
+ locate_exec_from_corefile_build_id (bfd *abfd, int from_tty)
+ {
+- const bfd_build_id *build_id = build_id_bfd_get (abfd);
++ const bfd_build_id *build_id = build_id_bfd_shdr_get (abfd);
+ if (build_id == nullptr)
+ return;
+
++ char *build_id_filename;
+ gdb_bfd_ref_ptr execbfd
+- = build_id_to_exec_bfd (build_id->size, build_id->data);
++ = build_id_to_exec_bfd (build_id->size, build_id->data,
++ &build_id_filename);
+
+ if (execbfd != nullptr)
+ {
+ exec_file_attach (bfd_get_filename (execbfd.get ()), from_tty);
+ symbol_file_add_main (bfd_get_filename (execbfd.get ()),
+ symfile_add_flag (from_tty ? SYMFILE_VERBOSE : 0));
++ if (symfile_objfile != NULL)
++ symfile_objfile->flags |= OBJF_BUILD_ID_CORE_LOADED;
}
++ else
++ debug_print_missing (BUILD_ID_MAIN_EXECUTABLE_FILENAME, build_id_filename);
+ }
-+ /* Find the build_id identifiers. If it gets executed after
-+ POST_CREATE_INFERIOR we would clash with asking to discard the already
-+ loaded VDSO symbols. If it gets executed before bfd_map_over_sections
-+ INFERIOR_PTID is still not set and libthread_db initialization crashes on
-+ PID == 0 in ps_pglobal_lookup. */
-+ if (build_id_core_loads != false)
-+ build_id_locate_exec (from_tty);
-+
- post_create_inferior (target, from_tty);
-
- /* Now go through the target stack looking for threads since there
-@@ -973,4 +1028,11 @@ void
+ /* See gdbcore.h. */
+@@ -998,4 +1010,11 @@ void
_initialize_corelow (void)
{
add_target (core_target_info, core_target_open, filename_completer);
@@ -1058,7 +1055,7 @@ diff --git a/gdb/corelow.c b/gdb/corelow.c
diff --git a/gdb/doc/gdb.texinfo b/gdb/doc/gdb.texinfo
--- a/gdb/doc/gdb.texinfo
+++ b/gdb/doc/gdb.texinfo
-@@ -20830,6 +20830,27 @@ information files.
+@@ -20862,6 +20862,27 @@ information files.
@end table
@@ -1111,16 +1108,16 @@ 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
-@@ -2715,7 +2715,7 @@ dwarf2_get_dwz_file (struct dwarf2_per_objfile *dwarf2_per_objfile)
+@@ -2718,7 +2718,7 @@ dwarf2_get_dwz_file (struct dwarf2_per_objfile *dwarf2_per_objfile)
}
if (dwz_bfd == NULL)
- dwz_bfd = build_id_to_debug_bfd (buildid_len, buildid);
-+ dwz_bfd = build_id_to_debug_bfd (buildid_len, buildid, NULL, 1);
++ dwz_bfd = build_id_to_debug_bfd (buildid_len, buildid, NULL);
if (dwz_bfd == NULL)
error (_("could not find '.gnu_debugaltlink' file for %s"),
-@@ -6273,7 +6273,7 @@ get_gdb_index_contents_from_section (objfile *obj, T *section_owner)
+@@ -6276,7 +6276,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)
{
@@ -1129,7 +1126,7 @@ diff --git a/gdb/dwarf2read.c b/gdb/dwarf2read.c
if (build_id == nullptr)
return {};
-@@ -6286,7 +6286,7 @@ get_gdb_index_contents_from_cache (objfile *obj, dwarf2_per_objfile *dwarf2_obj)
+@@ -6289,7 +6289,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)
{
diff --git a/gdb-6.6-scheduler_locking-step-is-default.patch b/gdb-6.6-scheduler_locking-step-is-default.patch
deleted file mode 100644
index 9d0896e..0000000
--- a/gdb-6.6-scheduler_locking-step-is-default.patch
+++ /dev/null
@@ -1,78 +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-6.6-scheduler_locking-step-is-default.patch
-
-;; Make upstream `set scheduler-locking step' as default.
-;;=push+jan: How much is scheduler-locking relevant after non-stop?
-
-diff --git a/gdb/infrun.c b/gdb/infrun.c
---- a/gdb/infrun.c
-+++ b/gdb/infrun.c
-@@ -2057,7 +2057,7 @@ static const char *const scheduler_enums[] = {
- schedlock_replay,
- NULL
- };
--static const char *scheduler_mode = schedlock_replay;
-+static const char *scheduler_mode = schedlock_step;
- static void
- show_scheduler_mode (struct ui_file *file, int from_tty,
- struct cmd_list_element *c, const char *value)
-diff --git a/gdb/testsuite/gdb.mi/mi-cli.exp b/gdb/testsuite/gdb.mi/mi-cli.exp
---- a/gdb/testsuite/gdb.mi/mi-cli.exp
-+++ b/gdb/testsuite/gdb.mi/mi-cli.exp
-@@ -199,7 +199,7 @@ mi_expect_stop "breakpoint-hit" "main" "" ".*basics.c" \
- # Test that the token is output even for CLI commands
- # Also test that *stopped includes frame information.
- mi_gdb_test "34 next" \
-- ".*34\\\^running.*\\*running,thread-id=\"all\"" \
-+ ".*34\\\^running.*\\*running,thread-id=\"1\"" \
- "34 next: run"
-
- # Test that the new current source line is output to the console
-diff --git a/gdb/testsuite/gdb.mi/mi-console.exp b/gdb/testsuite/gdb.mi/mi-console.exp
---- a/gdb/testsuite/gdb.mi/mi-console.exp
-+++ b/gdb/testsuite/gdb.mi/mi-console.exp
-@@ -60,6 +60,9 @@ if { [gdb_compile "${srcdir}/${subdir}/${srcfile}" "${binfile}" executable {deb
-
- mi_run_to_main
-
-+# thread-id=\"all\" vs. thread-id=\"1\" below:
-+mi_gdb_test "210-gdb-set scheduler-locking off" "210\\^done" "set scheduler-locking off"
-+
- # The output we get from the target depends on how it is hosted. If
- # we are semihosted (e.g., the sim or a remote target that supports
- # the File I/O remote protocol extension), we see the target I/O
-diff --git a/gdb/testsuite/gdb.mi/mi-logging.exp b/gdb/testsuite/gdb.mi/mi-logging.exp
---- a/gdb/testsuite/gdb.mi/mi-logging.exp
-+++ b/gdb/testsuite/gdb.mi/mi-logging.exp
-@@ -53,7 +53,7 @@ close $chan
-
- set mi_log_prompt "\[(\]gdb\[)\] \[\r\n\]+"
-
--if [regexp "\\^done\[\r\n\]+$mi_log_prompt\\^running\[\r\n\]+\\*running,thread-id=\"all\"\[\r\n\]+$mi_log_prompt\\*stopped,reason=\"end-stepping-range\",.*\[\r\n\]+$mi_log_prompt\\^running\[\r\n\]+\\*running,thread-id=\"all\"\[\r\n\]+$mi_log_prompt\\*stopped,reason=\"end-stepping-range\",.*\[\r\n\]+$mi_log_prompt" $logcontent] {
-+if [regexp "\\^done\[\r\n\]+$mi_log_prompt\\^running\[\r\n\]+\\*running,thread-id=\"1\"\[\r\n\]+$mi_log_prompt\\*stopped,reason=\"end-stepping-range\",.*\[\r\n\]+$mi_log_prompt\\^running\[\r\n\]+\\*running,thread-id=\"1\"\[\r\n\]+$mi_log_prompt\\*stopped,reason=\"end-stepping-range\",.*\[\r\n\]+$mi_log_prompt" $logcontent] {
- pass "log file contents"
- } else {
- fail "log file contents"
-@@ -76,7 +76,7 @@ set chan [open $milogfile]
- set logcontent [read $chan]
- close $chan
-
--if [regexp "1001\\^done\[\r\n\]+$mi_log_prompt.*1002\\^running\[\r\n\]+\\*running,thread-id=\"all\"\[\r\n\]+$mi_log_prompt\\*stopped,reason=\"end-stepping-range\",.*\[\r\n\]+$mi_log_prompt.*1003\\^running\[\r\n\]+\\*running,thread-id=\"all\"\[\r\n\]+$mi_log_prompt\\*stopped,reason=\"end-stepping-range\",.*\[\r\n\]+$mi_log_prompt" $logcontent] {
-+if [regexp "1001\\^done\[\r\n\]+$mi_log_prompt.*1002\\^running\[\r\n\]+\\*running,thread-id=\"1\"\[\r\n\]+$mi_log_prompt\\*stopped,reason=\"end-stepping-range\",.*\[\r\n\]+$mi_log_prompt.*1003\\^running\[\r\n\]+\\*running,thread-id=\"1\"\[\r\n\]+$mi_log_prompt\\*stopped,reason=\"end-stepping-range\",.*\[\r\n\]+$mi_log_prompt" $logcontent] {
- pass "redirect log file contents"
- } else {
- fail "redirect log file contents"
-diff --git a/gdb/testsuite/gdb.opt/inline-cmds.exp b/gdb/testsuite/gdb.opt/inline-cmds.exp
---- a/gdb/testsuite/gdb.opt/inline-cmds.exp
-+++ b/gdb/testsuite/gdb.opt/inline-cmds.exp
-@@ -331,7 +331,7 @@ proc mi_cli_step {cli_output_re message} {
-
- send_gdb "interpreter-exec console \"step\"\n"
- gdb_expect {
-- -re "\\^running\r\n\\*running,thread-id=\"all\"\r\n${mi_gdb_prompt}${cli_output_re}" {
-+ -re "\\^running\r\n\\*running,thread-id=\"1\"\r\n${mi_gdb_prompt}${cli_output_re}" {
- pass $message
- }
- timeout {
diff --git a/gdb-6.8-bz436037-reg-no-longer-active.patch b/gdb-6.8-bz436037-reg-no-longer-active.patch
deleted file mode 100644
index 3731b0f..0000000
--- a/gdb-6.8-bz436037-reg-no-longer-active.patch
+++ /dev/null
@@ -1,37 +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-6.8-bz436037-reg-no-longer-active.patch
-
-;; Fix register assignments with no GDB stack frames (BZ 436037).
-;;=push+jan: This fix is incorrect.
-
-diff --git a/gdb/valops.c b/gdb/valops.c
---- a/gdb/valops.c
-+++ b/gdb/valops.c
-@@ -1093,6 +1093,8 @@ value_assign (struct value *toval, struct value *fromval)
- struct gdbarch *gdbarch;
- int value_reg;
-
-+ value_reg = VALUE_REGNUM (toval);
-+
- /* Figure out which frame this is in currently.
-
- We use VALUE_FRAME_ID for obtaining the value's frame id instead of
-@@ -1102,8 +1104,14 @@ value_assign (struct value *toval, struct value *fromval)
- frame. */
- frame = frame_find_by_id (VALUE_FRAME_ID (toval));
-
-- value_reg = VALUE_REGNUM (toval);
--
-+ /* "set $reg+=1" should work on programs with no debug info,
-+ but frame_find_by_id returns NULL here (RH bug 436037).
-+ Use current frame, it represents CPU state in this case.
-+ If frame_find_by_id is changed to do it internally
-+ (it is contemplated there), remove this. */
-+ if (!frame)
-+ frame = get_current_frame ();
-+ /* Probably never happens. */
- if (!frame)
- error (_("Value being assigned to is no longer active."));
-
diff --git a/gdb-6.8-quit-never-aborts.patch b/gdb-6.8-quit-never-aborts.patch
index c894d45..4dd01c5 100644
--- a/gdb-6.8-quit-never-aborts.patch
+++ b/gdb-6.8-quit-never-aborts.patch
@@ -45,7 +45,7 @@ diff --git a/gdb/extension.c b/gdb/extension.c
diff --git a/gdb/top.c b/gdb/top.c
--- a/gdb/top.c
+++ b/gdb/top.c
-@@ -1668,7 +1668,13 @@ quit_force (int *exit_arg, int from_tty)
+@@ -1703,7 +1703,13 @@ quit_force (int *exit_arg, int from_tty)
qt.from_tty = from_tty;
diff --git a/gdb-archer-pie-addons-keep-disabled.patch b/gdb-archer-pie-addons-keep-disabled.patch
index 450e427..40ab16b 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
-@@ -15372,6 +15372,50 @@ static struct cmd_list_element *enablebreaklist = NULL;
+@@ -15396,6 +15396,51 @@ static struct cmd_list_element *enablebreaklist = NULL;
cmd_list_element *commands_cmd_element = nullptr;
@@ -56,13 +56,14 @@ diff --git a/gdb/breakpoint.c b/gdb/breakpoint.c
+ bp_location_is_less_than);
+}
+
++void _initialize_breakpoint (void);
void
_initialize_breakpoint (void)
{
diff --git a/gdb/breakpoint.h b/gdb/breakpoint.h
--- a/gdb/breakpoint.h
+++ b/gdb/breakpoint.h
-@@ -1690,6 +1690,9 @@ extern const char *ep_parse_optional_if_clause (const char **arg);
+@@ -1696,6 +1696,9 @@ extern const char *ep_parse_optional_if_clause (const char **arg);
UIOUT iff debugging multiple threads. */
extern void maybe_print_thread_hit_breakpoint (struct ui_out *uiout);
@@ -87,3 +88,15 @@ diff --git a/gdb/objfiles.c b/gdb/objfiles.c
/* Data changed. */
return 1;
}
+diff --git a/gdb/value.c b/gdb/value.c
+--- a/gdb/value.c
++++ b/gdb/value.c
+@@ -2840,7 +2840,7 @@ value_static_field (struct type *type, int fieldno)
+ case FIELD_LOC_KIND_PHYSADDR:
+ retval = value_at_lazy (TYPE_FIELD_TYPE (type, fieldno),
+ TYPE_FIELD_STATIC_PHYSADDR (type, fieldno)
+- + (TYPE_OBJFILE (type) == NULL ? 0 : TYPE_OBJFILE (type)->section_offsets[SECT_OFF_TEXT (TYPE_OBJFILE (type))]));
++ + (TYPE_OBJFILE (type) == NULL ? 0 : ANOFFSET (TYPE_OBJFILE (type)->section_offsets, SECT_OFF_TEXT (TYPE_OBJFILE (type)))));
+ break;
+ case FIELD_LOC_KIND_PHYSNAME:
+ {
diff --git a/gdb-archer-pie-addons.patch b/gdb-archer-pie-addons.patch
index de50795..e3af3a9 100644
--- a/gdb-archer-pie-addons.patch
+++ b/gdb-archer-pie-addons.patch
@@ -8,7 +8,7 @@ Subject: gdb-archer-pie-addons.patch
diff --git a/gdb/gdbtypes.h b/gdb/gdbtypes.h
--- a/gdb/gdbtypes.h
+++ b/gdb/gdbtypes.h
-@@ -510,6 +510,7 @@ enum field_loc_kind
+@@ -516,6 +516,7 @@ enum field_loc_kind
{
FIELD_LOC_KIND_BITPOS, /**< bitpos */
FIELD_LOC_KIND_ENUMVAL, /**< enumval */
@@ -16,7 +16,7 @@ diff --git a/gdb/gdbtypes.h b/gdb/gdbtypes.h
FIELD_LOC_KIND_PHYSADDR, /**< physaddr */
FIELD_LOC_KIND_PHYSNAME, /**< physname */
FIELD_LOC_KIND_DWARF_BLOCK /**< dwarf_block */
-@@ -561,6 +562,7 @@ union field_location
+@@ -566,6 +567,7 @@ union field_location
field. Otherwise, physname is the mangled label of the
static field. */
@@ -24,7 +24,7 @@ diff --git a/gdb/gdbtypes.h b/gdb/gdbtypes.h
CORE_ADDR physaddr;
const char *physname;
-@@ -1455,6 +1457,7 @@ extern void set_type_vptr_basetype (struct type *, struct type *);
+@@ -1474,6 +1476,7 @@ extern void set_type_vptr_basetype (struct type *, struct type *);
#define FIELD_ENUMVAL_LVAL(thisfld) ((thisfld).loc.enumval)
#define FIELD_ENUMVAL(thisfld) (FIELD_ENUMVAL_LVAL (thisfld) + 0)
#define FIELD_STATIC_PHYSNAME(thisfld) ((thisfld).loc.physname)
@@ -32,7 +32,7 @@ diff --git a/gdb/gdbtypes.h b/gdb/gdbtypes.h
#define FIELD_STATIC_PHYSADDR(thisfld) ((thisfld).loc.physaddr)
#define FIELD_DWARF_BLOCK(thisfld) ((thisfld).loc.dwarf_block)
#define SET_FIELD_BITPOS(thisfld, bitpos) \
-@@ -1466,6 +1469,7 @@ extern void set_type_vptr_basetype (struct type *, struct type *);
+@@ -1485,6 +1488,7 @@ extern void set_type_vptr_basetype (struct type *, struct type *);
#define SET_FIELD_PHYSNAME(thisfld, name) \
(FIELD_LOC_KIND (thisfld) = FIELD_LOC_KIND_PHYSNAME, \
FIELD_STATIC_PHYSNAME (thisfld) = (name))
@@ -40,7 +40,7 @@ diff --git a/gdb/gdbtypes.h b/gdb/gdbtypes.h
#define SET_FIELD_PHYSADDR(thisfld, addr) \
(FIELD_LOC_KIND (thisfld) = FIELD_LOC_KIND_PHYSADDR, \
FIELD_STATIC_PHYSADDR (thisfld) = (addr))
-@@ -1482,6 +1486,7 @@ extern void set_type_vptr_basetype (struct type *, struct type *);
+@@ -1501,6 +1505,7 @@ extern void set_type_vptr_basetype (struct type *, struct type *);
#define TYPE_FIELD_BITPOS(thistype, n) FIELD_BITPOS (TYPE_FIELD (thistype, n))
#define TYPE_FIELD_ENUMVAL(thistype, n) FIELD_ENUMVAL (TYPE_FIELD (thistype, n))
#define TYPE_FIELD_STATIC_PHYSNAME(thistype, n) FIELD_STATIC_PHYSNAME (TYPE_FIELD (thistype, n))
@@ -51,13 +51,13 @@ diff --git a/gdb/gdbtypes.h b/gdb/gdbtypes.h
diff --git a/gdb/value.c b/gdb/value.c
--- a/gdb/value.c
+++ b/gdb/value.c
-@@ -2829,7 +2829,8 @@ value_static_field (struct type *type, int fieldno)
+@@ -2839,7 +2839,8 @@ value_static_field (struct type *type, int fieldno)
{
case FIELD_LOC_KIND_PHYSADDR:
retval = value_at_lazy (TYPE_FIELD_TYPE (type, fieldno),
- TYPE_FIELD_STATIC_PHYSADDR (type, fieldno));
+ TYPE_FIELD_STATIC_PHYSADDR (type, fieldno)
-+ + (TYPE_OBJFILE (type) == NULL ? 0 : ANOFFSET (TYPE_OBJFILE (type)->section_offsets, SECT_OFF_TEXT (TYPE_OBJFILE (type)))));
++ + (TYPE_OBJFILE (type) == NULL ? 0 : TYPE_OBJFILE (type)->section_offsets[SECT_OFF_TEXT (TYPE_OBJFILE (type))]));
break;
case FIELD_LOC_KIND_PHYSNAME:
{
diff --git a/gdb-attach-fail-reasons-5of5.patch b/gdb-attach-fail-reasons-5of5.patch
index 8c02398..5b3b6d3 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
-@@ -252,6 +252,9 @@
+@@ -251,6 +251,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
-@@ -378,6 +381,9 @@
+@@ -386,6 +389,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
-@@ -15594,6 +15594,64 @@ cat >>confdefs.h <<_ACEOF
+@@ -16434,6 +16434,64 @@ cat >>confdefs.h <<_ACEOF
_ACEOF
@@ -150,7 +150,7 @@ diff --git a/gdb/configure.ac b/gdb/configure.ac
diff --git a/gdb/gdbserver/config.in b/gdb/gdbserver/config.in
--- a/gdb/gdbserver/config.in
+++ b/gdb/gdbserver/config.in
-@@ -126,6 +126,9 @@
+@@ -125,6 +125,9 @@
/* Define to 1 if you have the `dl' library (-ldl). */
#undef HAVE_LIBDL
@@ -160,7 +160,7 @@ diff --git a/gdb/gdbserver/config.in b/gdb/gdbserver/config.in
/* Define if the target supports branch tracing. */
#undef HAVE_LINUX_BTRACE
-@@ -202,6 +205,9 @@
+@@ -210,6 +213,9 @@
/* Define to 1 if you have the `pwrite' function. */
#undef HAVE_PWRITE
@@ -173,7 +173,7 @@ diff --git a/gdb/gdbserver/config.in b/gdb/gdbserver/config.in
diff --git a/gdb/gdbserver/configure b/gdb/gdbserver/configure
--- a/gdb/gdbserver/configure
+++ b/gdb/gdbserver/configure
-@@ -8522,6 +8522,64 @@ if $want_ipa ; then
+@@ -9398,6 +9398,64 @@ if $want_ipa ; then
fi
fi
@@ -255,7 +255,7 @@ diff --git a/gdb/gdbserver/configure.ac b/gdb/gdbserver/configure.ac
diff --git a/gdb/gdbserver/linux-low.c b/gdb/gdbserver/linux-low.c
--- a/gdb/gdbserver/linux-low.c
+++ b/gdb/gdbserver/linux-low.c
-@@ -967,7 +967,16 @@ linux_ptrace_fun ()
+@@ -968,7 +968,16 @@ linux_ptrace_fun ()
{
if (ptrace (PTRACE_TRACEME, 0, (PTRACE_TYPE_ARG3) 0,
(PTRACE_TYPE_ARG4) 0) < 0)
@@ -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
-@@ -1091,7 +1091,16 @@ linux_nat_target::create_inferior (const char *exec_file,
+@@ -1092,7 +1092,16 @@ 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 c8e809f..69c8658 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
-@@ -1170,7 +1170,10 @@ captured_main_1 (struct captured_main_args *context)
+@@ -1148,7 +1148,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 5104e87..ee426ce 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
-@@ -6454,6 +6454,16 @@ process_event_stop_test (struct execution_control_state *ecs)
+@@ -6453,6 +6453,16 @@ process_event_stop_test (struct execution_control_state *ecs)
if (ecs->event_thread->control.step_over_calls == STEP_OVER_ALL)
{
@@ -38,16 +38,16 @@ diff --git a/gdb/infrun.c b/gdb/infrun.c
+ struct minimal_symbol *stopf = lookup_minimal_symbol_by_pc (stop_pc).minsym;
+
+ if ((stop_fn == NULL
-+ || strstr (SYMBOL_LINKAGE_NAME (stop_fn), ".omp_fn.") == NULL)
++ || strstr (stop_fn->linkage_name (), ".omp_fn.") == NULL)
+ /* gcc-4.7.2-9.fc19.x86_64 uses a new format. */
+ && (stopf == NULL
-+ || strstr (MSYMBOL_LINKAGE_NAME (stopf), "._omp_fn.") == NULL))
++ || strstr (stopf->linkage_name (), "._omp_fn.") == NULL))
+{ /* ".omp_fn." */
+
/* We're doing a "next".
Normal (forward) execution: set a breakpoint at the
-@@ -6487,6 +6497,7 @@ process_event_stop_test (struct execution_control_state *ecs)
+@@ -6486,6 +6496,7 @@ process_event_stop_test (struct execution_control_state *ecs)
keep_going (ecs);
return;
diff --git a/gdb-container-rh-pkg.patch b/gdb-container-rh-pkg.patch
index 7d525ea..b095d4b 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
-@@ -13891,7 +13891,17 @@ remote_target::pid_to_exec_file (int pid)
+@@ -13916,7 +13916,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-fedora-libncursesw.patch b/gdb-fedora-libncursesw.patch
index a4c9049..960193f 100644
--- a/gdb-fedora-libncursesw.patch
+++ b/gdb-fedora-libncursesw.patch
@@ -12,7 +12,7 @@ https://bugzilla.redhat.com/show_bug.cgi?id=1270534
diff --git a/gdb/configure b/gdb/configure
--- a/gdb/configure
+++ b/gdb/configure
-@@ -9303,6 +9303,7 @@ if test x"$prefer_curses" = xyes; then
+@@ -9375,6 +9375,7 @@ if test x"$prefer_curses" = xyes; then
# search /usr/local/include, if ncurses is installed in /usr/local. A
# default installation of ncurses on alpha*-dec-osf* will lead to such
# a situation.
@@ -20,7 +20,7 @@ diff --git a/gdb/configure b/gdb/configure
{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for library containing waddstr" >&5
$as_echo_n "checking for library containing waddstr... " >&6; }
if ${ac_cv_search_waddstr+:} false; then :
-@@ -9327,7 +9328,7 @@ return waddstr ();
+@@ -9399,7 +9400,7 @@ return waddstr ();
return 0;
}
_ACEOF
@@ -29,7 +29,7 @@ diff --git a/gdb/configure b/gdb/configure
if test -z "$ac_lib"; then
ac_res="none required"
else
-@@ -9401,6 +9402,7 @@ case $host_os in
+@@ -9473,6 +9474,7 @@ case $host_os in
esac
# These are the libraries checked by Readline.
@@ -37,7 +37,7 @@ diff --git a/gdb/configure b/gdb/configure
{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for library containing tgetent" >&5
$as_echo_n "checking for library containing tgetent... " >&6; }
if ${ac_cv_search_tgetent+:} false; then :
-@@ -9425,7 +9427,7 @@ return tgetent ();
+@@ -9497,7 +9499,7 @@ return tgetent ();
return 0;
}
_ACEOF
diff --git a/gdb-gnat-dwarf-crash-3of3.patch b/gdb-gnat-dwarf-crash-3of3.patch
index 14460bd..52892e4 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
-@@ -10654,6 +10654,13 @@ private:
+@@ -10657,6 +10657,13 @@ private:
static void
process_die (struct die_info *die, struct dwarf2_cu *cu)
{
@@ -59,7 +59,7 @@ 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
-@@ -602,6 +602,13 @@ holding the child stopped. Try \"set detach-on-fork\" or \
+@@ -601,6 +601,13 @@ holding the child stopped. Try \"set detach-on-fork\" or \
target_pid_to_str (process_ptid).c_str ());
}
@@ -76,7 +76,7 @@ diff --git a/gdb/infrun.c b/gdb/infrun.c
diff --git a/gdb/linux-nat.c b/gdb/linux-nat.c
--- a/gdb/linux-nat.c
+++ b/gdb/linux-nat.c
-@@ -188,6 +188,12 @@ struct linux_nat_target *linux_target;
+@@ -189,6 +189,12 @@ struct linux_nat_target *linux_target;
/* Does the current host support PTRACE_GETREGSET? */
enum tribool have_ptrace_getregset = TRIBOOL_UNKNOWN;
@@ -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,
-@@ -1029,6 +1035,9 @@ linux_nat_post_attach_wait (ptid_t ptid, int *signalled)
+@@ -1030,6 +1036,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 /
-@@ -1360,6 +1369,25 @@ get_detach_signal (struct lwp_info *lp)
+@@ -1361,6 +1370,25 @@ get_detach_signal (struct lwp_info *lp)
return gdb_signal_to_host (signo);
}
@@ -125,7 +125,7 @@ diff --git a/gdb/linux-nat.c b/gdb/linux-nat.c
return 0;
}
-@@ -1508,6 +1536,10 @@ linux_nat_target::detach (inferior *inf, int from_tty)
+@@ -1509,6 +1537,10 @@ linux_nat_target::detach (inferior *inf, int from_tty)
detach_one_lwp (main_lwp, &signo);
detach_success (inf);
@@ -136,7 +136,7 @@ diff --git a/gdb/linux-nat.c b/gdb/linux-nat.c
}
}
-@@ -1765,6 +1797,16 @@ linux_nat_target::resume (ptid_t ptid, int step, enum gdb_signal signo)
+@@ -1766,6 +1798,16 @@ linux_nat_target::resume (ptid_t ptid, int step, enum gdb_signal signo)
return;
}
@@ -153,7 +153,7 @@ diff --git a/gdb/linux-nat.c b/gdb/linux-nat.c
if (resume_many)
iterate_over_lwps (ptid, [=] (struct lwp_info *info)
{
-@@ -3769,6 +3811,10 @@ linux_nat_target::mourn_inferior ()
+@@ -3770,6 +3812,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-jit-reader-multilib.patch b/gdb-jit-reader-multilib.patch
index d679c71..ec41f13 100644
--- a/gdb-jit-reader-multilib.patch
+++ b/gdb-jit-reader-multilib.patch
@@ -9,7 +9,7 @@ Subject: gdb-jit-reader-multilib.patch
diff --git a/gdb/configure b/gdb/configure
--- a/gdb/configure
+++ b/gdb/configure
-@@ -9622,10 +9622,12 @@ _ACEOF
+@@ -9694,10 +9694,12 @@ _ACEOF
diff --git a/gdb-linux_perf-bundle.patch b/gdb-linux_perf-bundle.patch
index 3d7dfdf..db9e7c8 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
-@@ -11833,7 +11833,7 @@ else
+@@ -11905,7 +11905,7 @@ else
#include
#ifndef PERF_ATTR_SIZE_VER5
diff --git a/gdb-moribund-utrace-workaround.patch b/gdb-moribund-utrace-workaround.patch
index b6b9050..f2da872 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
-@@ -11872,6 +11872,8 @@ update_global_location_list (enum ugll_insert_mode insert_mode)
+@@ -11904,6 +11904,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-vla-intel-fix-print-char-array.patch b/gdb-vla-intel-fix-print-char-array.patch
index c689058..ce2035c 100644
--- a/gdb-vla-intel-fix-print-char-array.patch
+++ b/gdb-vla-intel-fix-print-char-array.patch
@@ -22,7 +22,7 @@ And adjust its testcase.
diff --git a/gdb/f-valprint.c b/gdb/f-valprint.c
--- a/gdb/f-valprint.c
+++ b/gdb/f-valprint.c
-@@ -314,8 +314,22 @@ f_val_print (struct type *type, int embedded_offset,
+@@ -319,8 +319,22 @@ f_val_print (struct type *type, int embedded_offset,
original_value, &opts, 0, stream);
}
else
diff --git a/gdb-vla-intel-fortran-strides.patch b/gdb-vla-intel-fortran-strides.patch
index 3ce260e..4f468eb 100644
--- a/gdb-vla-intel-fortran-strides.patch
+++ b/gdb-vla-intel-fortran-strides.patch
@@ -34,53 +34,6 @@ dbfd7140bf4c0500d1f5d192be781f83f78f7922
gdb/value.h | 2 +
23 files changed, 1242 insertions(+), 183 deletions(-)
-diff --git a/gdb/dwarf2read.c b/gdb/dwarf2read.c
---- a/gdb/dwarf2read.c
-+++ b/gdb/dwarf2read.c
-@@ -17935,7 +17935,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;
-- struct dynamic_prop low, high;
-+ struct dynamic_prop low, high, stride;
- int low_default_is_valid;
- int high_bound_is_count = 0;
- const char *name;
-@@ -17956,7 +17956,9 @@ read_subrange_type (struct die_info *die, struct dwarf2_cu *cu)
-
- low.kind = PROP_CONST;
- high.kind = PROP_CONST;
-+ stride.kind = PROP_CONST;
- high.data.const_val = 0;
-+ stride.data.const_val = 0;
-
- /* Set LOW_DEFAULT_IS_VALID if current language and DWARF version allow
- omitting DW_AT_lower_bound. */
-@@ -17989,6 +17991,14 @@ read_subrange_type (struct die_info *die, struct dwarf2_cu *cu)
- break;
- }
-
-+ attr = dwarf2_attr (die, DW_AT_byte_stride, cu);
-+ if (attr)
-+ if (!attr_to_dynamic_prop (attr, die, cu, &stride, base_type))
-+ complaint (_("Missing DW_AT_byte_stride "
-+ "- DIE at 0x%s [in module %s]"),
-+ sect_offset_str (die->sect_off),
-+ objfile_name (cu->per_cu->dwarf2_per_objfile->objfile));
-+
- attr = dwarf2_attr (die, DW_AT_lower_bound, cu);
- if (attr)
- attr_to_dynamic_prop (attr, die, cu, &low, base_type);
-@@ -18047,7 +18057,8 @@ 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;
-
-- range_type = create_range_type (NULL, orig_base_type, &low, &high, bias);
-+ range_type = create_range_type (NULL, orig_base_type, &low, &high, bias,
-+ &stride);
-
- if (high_bound_is_count)
- TYPE_RANGE_DATA (range_type)->flag_upper_bound_is_count = 1;
diff --git a/gdb/eval.c b/gdb/eval.c
--- a/gdb/eval.c
+++ b/gdb/eval.c
@@ -670,7 +623,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
-@@ -280,31 +280,63 @@ arglist : subrange
+@@ -282,31 +282,63 @@ arglist : subrange
arglist : arglist ',' exp %prec ABOVE_COMMA
{ pstate->arglist_len++; }
@@ -742,134 +695,52 @@ diff --git a/gdb/f-exp.y b/gdb/f-exp.y
diff --git a/gdb/f-valprint.c b/gdb/f-valprint.c
--- a/gdb/f-valprint.c
+++ b/gdb/f-valprint.c
-@@ -120,8 +120,14 @@ f77_print_array_1 (int nss, int ndimensions, struct type *type,
-
- if (nss != ndimensions)
- {
-- size_t dim_size = TYPE_LENGTH (TYPE_TARGET_TYPE (type));
-+ size_t dim_size;
+@@ -129,6 +129,11 @@ f77_print_array_1 (int nss, int ndimensions, struct type *type,
+ byte_stride = dim_size;
size_t offs = 0;
-+ LONGEST byte_stride = abs (TYPE_BYTE_STRIDE (range_type));
-+
+
+ if (byte_stride)
+ dim_size = byte_stride;
+ else
+ dim_size = TYPE_LENGTH (TYPE_TARGET_TYPE (type));
-
++
for (i = lowerbound;
(i < upperbound + 1 && (*elts) < options->print_max);
+ i++)
diff --git a/gdb/gdbtypes.c b/gdb/gdbtypes.c
--- a/gdb/gdbtypes.c
+++ b/gdb/gdbtypes.c
-@@ -913,7 +913,8 @@ struct type *
- create_range_type (struct type *result_type, struct type *index_type,
- const struct dynamic_prop *low_bound,
- const struct dynamic_prop *high_bound,
-- LONGEST bias)
-+ LONGEST bias,
-+ const struct dynamic_prop *stride)
- {
- /* The INDEX_TYPE should be a type capable of holding the upper and lower
- bounds, as such a zero sized, or void type makes no sense. */
-@@ -934,6 +935,7 @@ create_range_type (struct type *result_type, struct type *index_type,
- TYPE_RANGE_DATA (result_type)->low = *low_bound;
+@@ -936,7 +936,7 @@ create_range_type (struct type *result_type, struct type *index_type,
TYPE_RANGE_DATA (result_type)->high = *high_bound;
TYPE_RANGE_DATA (result_type)->bias = bias;
-+ TYPE_RANGE_DATA (result_type)->stride = *stride;
- if (low_bound->kind == PROP_CONST && low_bound->data.const_val >= 0)
- TYPE_UNSIGNED (result_type) = 1;
-@@ -962,7 +964,7 @@ struct type *
- create_static_range_type (struct type *result_type, struct type *index_type,
- LONGEST low_bound, LONGEST high_bound)
- {
-- struct dynamic_prop low, high;
-+ struct dynamic_prop low, high, stride;
+- /* Initialize the stride to be a constant, the value will already be zero
++ /* bias the stride to be a constant, the value will already be zero
+ thanks to the use of TYPE_ZALLOC above. */
+ TYPE_RANGE_DATA (result_type)->stride.kind = PROP_CONST;
- low.kind = PROP_CONST;
- low.data.const_val = low_bound;
-@@ -970,7 +972,11 @@ create_static_range_type (struct type *result_type, struct type *index_type,
+@@ -1001,7 +1001,8 @@ create_static_range_type (struct type *result_type, struct type *index_type,
high.kind = PROP_CONST;
high.data.const_val = high_bound;
- result_type = create_range_type (result_type, index_type, &low, &high, 0);
-+ stride.kind = PROP_CONST;
-+ stride.data.const_val = 0;
-+
+ result_type = create_range_type (result_type, index_type,
-+ &low, &high, 0, &stride);
++ &low, &high, 0);
return result_type;
}
-@@ -1188,16 +1194,20 @@ create_array_type_with_stride (struct type *result_type,
- && (!type_not_associated (result_type)
- && !type_not_allocated (result_type)))
- {
-- LONGEST low_bound, high_bound;
-+ LONGEST low_bound, high_bound, byte_stride;
-
+@@ -1236,6 +1237,7 @@ create_array_type_with_stride (struct type *result_type,
if (get_discrete_bounds (range_type, &low_bound, &high_bound) < 0)
low_bound = high_bound = 0;
element_type = check_typedef (element_type);
-+ byte_stride = abs (TYPE_BYTE_STRIDE (range_type));
+
/* Be careful when setting the array length. Ada arrays can be
empty arrays with the high_bound being smaller than the low_bound.
In such cases, the array length should be zero. */
- if (high_bound < low_bound)
- TYPE_LENGTH (result_type) = 0;
-+ else if (byte_stride > 0)
-+ TYPE_LENGTH (result_type) = byte_stride * (high_bound - low_bound + 1);
- else if (bit_stride > 0)
- TYPE_LENGTH (result_type) =
- (bit_stride * (high_bound - low_bound + 1) + 7) / 8;
-@@ -1982,7 +1992,7 @@ resolve_dynamic_range (struct type *dyn_range_type,
- CORE_ADDR value;
- struct type *static_range_type, *static_target_type;
- const struct dynamic_prop *prop;
-- struct dynamic_prop low_bound, high_bound;
-+ struct dynamic_prop low_bound, high_bound, stride;
-
- gdb_assert (TYPE_CODE (dyn_range_type) == TYPE_CODE_RANGE);
-
-@@ -2014,13 +2024,21 @@ resolve_dynamic_range (struct type *dyn_range_type,
- high_bound.data.const_val = 0;
- }
-
-+ prop = &TYPE_RANGE_DATA (dyn_range_type)->stride;
-+ if (dwarf2_evaluate_property (prop, NULL, addr_stack, &value))
-+ {
-+ stride.kind = PROP_CONST;
-+ stride.data.const_val = value;
-+ }
-+
- static_target_type
- = resolve_dynamic_type_internal (TYPE_TARGET_TYPE (dyn_range_type),
- addr_stack, 0);
- LONGEST bias = TYPE_RANGE_DATA (dyn_range_type)->bias;
- static_range_type = create_range_type (copy_type (dyn_range_type),
- static_target_type,
-- &low_bound, &high_bound, bias);
-+ &low_bound, &high_bound, bias,
-+ &stride);
- TYPE_RANGE_DATA (static_range_type)->flag_bound_evaluated = 1;
- return static_range_type;
- }
diff --git a/gdb/gdbtypes.h b/gdb/gdbtypes.h
--- a/gdb/gdbtypes.h
+++ b/gdb/gdbtypes.h
-@@ -622,6 +622,10 @@ struct range_bounds
-
- LONGEST bias;
-
-+ /* * Stride of range. */
-+
-+ struct dynamic_prop stride;
-+
- /* True if HIGH range bound contains the number of elements in the
- subrange. This affects how the final high bound is computed. */
-
-@@ -786,7 +790,6 @@ struct main_type
+@@ -803,7 +803,6 @@ struct main_type
/* * Union member used for range types. */
struct range_bounds *bounds;
@@ -877,10 +748,10 @@ diff --git a/gdb/gdbtypes.h b/gdb/gdbtypes.h
} flds_bnds;
/* * Slot to point to additional language-specific fields of this
-@@ -1345,6 +1348,15 @@ extern bool set_type_align (struct type *, ULONGEST);
- TYPE_RANGE_DATA(range_type)->high.kind
- #define TYPE_LOW_BOUND_KIND(range_type) \
- TYPE_RANGE_DATA(range_type)->low.kind
+@@ -1365,6 +1364,15 @@ extern bool set_type_align (struct type *, ULONGEST);
+ #define TYPE_BIT_STRIDE(range_type) \
+ (TYPE_RANGE_DATA(range_type)->stride.data.const_val \
+ * (TYPE_RANGE_DATA(range_type)->flag_is_byte_stride ? 8 : 1))
+#define TYPE_BYTE_STRIDE(range_type) \
+ TYPE_RANGE_DATA(range_type)->stride.data.const_val
+#define TYPE_BYTE_STRIDE_BLOCK(range_type) \
@@ -893,7 +764,7 @@ diff --git a/gdb/gdbtypes.h b/gdb/gdbtypes.h
/* Property accessors for the type data location. */
#define TYPE_DATA_LOCATION(thistype) \
-@@ -1380,6 +1392,9 @@ extern bool set_type_align (struct type *, ULONGEST);
+@@ -1400,6 +1408,9 @@ extern bool set_type_align (struct type *, ULONGEST);
TYPE_HIGH_BOUND_UNDEFINED(TYPE_INDEX_TYPE(arraytype))
#define TYPE_ARRAY_LOWER_BOUND_IS_UNDEFINED(arraytype) \
TYPE_LOW_BOUND_UNDEFINED(TYPE_INDEX_TYPE(arraytype))
@@ -903,16 +774,6 @@ diff --git a/gdb/gdbtypes.h b/gdb/gdbtypes.h
#define TYPE_ARRAY_UPPER_BOUND_VALUE(arraytype) \
(TYPE_HIGH_BOUND(TYPE_INDEX_TYPE((arraytype))))
-@@ -1957,7 +1972,8 @@ extern struct type *create_array_type_with_stride
- extern struct type *create_range_type (struct type *, struct type *,
- const struct dynamic_prop *,
- const struct dynamic_prop *,
-- LONGEST);
-+ LONGEST,
-+ const struct dynamic_prop *);
-
- extern struct type *create_array_type (struct type *, struct type *,
- struct type *);
diff --git a/gdb/parse.c b/gdb/parse.c
--- a/gdb/parse.c
+++ b/gdb/parse.c
@@ -1598,7 +1459,7 @@ diff --git a/gdb/testsuite/gdb.fortran/vla-stride.exp b/gdb/testsuite/gdb.fortra
new file mode 100644
--- /dev/null
+++ b/gdb/testsuite/gdb.fortran/vla-stride.exp
-@@ -0,0 +1,44 @@
+@@ -0,0 +1,47 @@
+# Copyright 2016 Free Software Foundation, Inc.
+
+# This program is free software; you can redistribute it and/or modify
@@ -1626,6 +1487,9 @@ new file mode 100644
+ continue
+}
+
++gdb_test_no_output "set max-value-size unlimited" \
++ "set max-value-size to unlimited"
++
+gdb_breakpoint [gdb_get_line_number "re-reverse-elements"]
+gdb_continue_to_breakpoint "re-reverse-elements"
+gdb_test "print pvla" " = \\\(1, 2, 3, 4, 5, 6, 7, 8, 9, 10\\\)" \
@@ -1677,33 +1541,10 @@ new file mode 100644
+
+ pvla => null() ! single-element
+end program vla_stride
-diff --git a/gdb/valarith.c b/gdb/valarith.c
---- a/gdb/valarith.c
-+++ b/gdb/valarith.c
-@@ -188,11 +188,17 @@ value_subscripted_rvalue (struct value *array, LONGEST index, LONGEST lowerbound
- struct type *array_type = check_typedef (value_type (array));
- struct type *elt_type = check_typedef (TYPE_TARGET_TYPE (array_type));
- ULONGEST elt_size = type_length_units (elt_type);
-- ULONGEST elt_offs = elt_size * (index - lowerbound);
-+ LONGEST elt_offs = index - lowerbound;
-+ LONGEST elt_stride = TYPE_BYTE_STRIDE (TYPE_INDEX_TYPE (array_type));
-+
-+ if (elt_stride != 0)
-+ elt_offs *= elt_stride;
-+ else
-+ elt_offs *= elt_size;
-
- if (index < lowerbound
- || (!TYPE_ARRAY_UPPER_BOUND_IS_UNDEFINED (array_type)
-- && elt_offs >= type_length_units (array_type))
-+ && abs (elt_offs) >= type_length_units (array_type))
- || (VALUE_LVAL (array) != lval_memory
- && TYPE_ARRAY_UPPER_BOUND_IS_UNDEFINED (array_type)))
- {
diff --git a/gdb/valops.c b/gdb/valops.c
--- a/gdb/valops.c
+++ b/gdb/valops.c
-@@ -3790,13 +3790,42 @@ value_of_this_silent (const struct language_defn *lang)
+@@ -3797,13 +3797,42 @@ value_of_this_silent (const struct language_defn *lang)
struct value *
value_slice (struct value *array, int lowbound, int length)
@@ -1750,7 +1591,7 @@ diff --git a/gdb/valops.c b/gdb/valops.c
if (TYPE_CODE (array_type) != TYPE_CODE_ARRAY
&& TYPE_CODE (array_type) != TYPE_CODE_STRING)
error (_("cannot take slice of non-array"));
-@@ -3806,45 +3835,155 @@ value_slice (struct value *array, int lowbound, int length)
+@@ -3813,45 +3842,155 @@ value_slice (struct value *array, int lowbound, int length)
if (type_not_associated (array_type))
error (_("array not associated"));
diff --git a/gdb-vla-intel-fortran-vla-strings.patch b/gdb-vla-intel-fortran-vla-strings.patch
index 62b00cd..deea4b5 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
-@@ -745,6 +745,8 @@ SH-5/SH64 running OpenBSD SH-5/SH64 support in sh*-*-openbsd*
+@@ -805,6 +805,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
-@@ -651,6 +651,28 @@ c_value_print (struct value *val, struct ui_file *stream,
+@@ -649,6 +649,28 @@ c_value_print (struct value *val, struct ui_file *stream,
else
{
/* normal case */
@@ -89,7 +89,7 @@ diff --git a/gdb/dwarf2read.c b/gdb/dwarf2read.c
/* memory allocation interface */
-@@ -13793,7 +13796,7 @@ read_func_scope (struct die_info *die, struct dwarf2_cu *cu)
+@@ -13799,7 +13802,7 @@ read_func_scope (struct die_info *die, struct dwarf2_cu *cu)
newobj->static_link
= XOBNEW (&objfile->objfile_obstack, struct dynamic_prop);
attr_to_dynamic_prop (attr, die, cu, newobj->static_link,
@@ -98,7 +98,7 @@ diff --git a/gdb/dwarf2read.c b/gdb/dwarf2read.c
}
cu->list_in_scope = cu->get_builder ()->get_local_symbols ();
-@@ -16554,7 +16557,7 @@ read_array_type (struct die_info *die, struct dwarf2_cu *cu)
+@@ -16565,7 +16568,7 @@ read_array_type (struct die_info *die, struct dwarf2_cu *cu)
byte_stride_prop
= (struct dynamic_prop *) alloca (sizeof (struct dynamic_prop));
stride_ok = attr_to_dynamic_prop (attr, die, cu, byte_stride_prop,
@@ -107,21 +107,38 @@ diff --git a/gdb/dwarf2read.c b/gdb/dwarf2read.c
if (!stride_ok)
{
complaint (_("unable to read array DW_AT_byte_stride "
-@@ -17312,29 +17315,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;
+@@ -17325,7 +17328,7 @@ read_tag_string_type (struct die_info *die, struct dwarf2_cu *cu)
struct attribute *attr;
-- unsigned int length;
-+ unsigned int length = UINT_MAX;
-+
+ struct dynamic_prop prop;
+ bool length_is_constant = true;
+- LONGEST length;
++ ULONGEST length = UINT_MAX;
+
+ /* There are a couple of places where bit sizes might be made use of
+ when parsing a DW_TAG_string_type, however, no producer that we know
+@@ -17346,6 +17349,10 @@ read_tag_string_type (struct die_info *die, struct dwarf2_cu *cu)
+ }
+ }
+
+ index_type = objfile_type (objfile)->builtin_int;
+ range_type = create_static_range_type (NULL, index_type, 1, length);
-
++
+ /* If DW_AT_string_length is defined, the length is stored in memory. */
attr = dwarf2_attr (die, DW_AT_string_length, cu);
- if (attr)
+ if (attr != nullptr && !attr_form_is_constant (attr))
+ {
+@@ -17372,13 +17379,71 @@ read_tag_string_type (struct die_info *die, struct dwarf2_cu *cu)
+ }
+
+ /* Convert the attribute into a dynamic property. */
+- if (!attr_to_dynamic_prop (attr, die, cu, &prop, prop_type))
++ if (!attr_to_dynamic_prop (attr, die, cu, &prop, prop_type, NULL, 0))
+ length = 1;
+ else
+ length_is_constant = false;
+ }
+ else if (attr != nullptr)
{
-- length = DW_UNSND (attr);
+ if (attr_form_is_block (attr))
+ {
+ struct attribute *byte_size, *bit_size;
@@ -179,37 +196,40 @@ diff --git a/gdb/dwarf2read.c b/gdb/dwarf2read.c
+ TYPE_HIGH_BOUND (range_type) = DW_UNSND(attr);
+ TYPE_HIGH_BOUND_KIND (range_type) = PROP_CONST;
+ }
++
+ /* This DW_AT_string_length just contains the length with no
+ indirection. There's no need to create a dynamic property in this
+ case. Pass 0 for the default value as we know it will not be
+@@ -17392,6 +17457,20 @@ read_tag_string_type (struct die_info *die, struct dwarf2_cu *cu)
}
else
{
-- /* Check for the DW_AT_byte_size attribute. */
+ /* Check for the DW_AT_byte_size attribute, which represents the length
+ in this case. */
- attr = dwarf2_attr (die, DW_AT_byte_size, cu);
- if (attr)
-- {
-- length = DW_UNSND (attr);
-- }
++ attr = dwarf2_attr (die, DW_AT_byte_size, cu);
++ if (attr)
+ {
+ TYPE_HIGH_BOUND (range_type) = DW_UNSND(attr);
+ TYPE_HIGH_BOUND_KIND (range_type) = PROP_CONST;
+ }
- else
-- {
-- length = 1;
-- }
++ else
+ {
+ TYPE_HIGH_BOUND (range_type) = 1;
+ TYPE_HIGH_BOUND_KIND (range_type) = PROP_CONST;
+ }
++
+ /* Use 1 as a fallback length if we have nothing else. */
+ length = 1;
}
-
-- index_type = objfile_type (objfile)->builtin_int;
-- range_type = create_static_range_type (NULL, index_type, 1, length);
+@@ -17407,6 +17486,7 @@ read_tag_string_type (struct die_info *die, struct dwarf2_cu *cu)
+ low_bound.data.const_val = 1;
+ range_type = create_range_type (NULL, index_type, &low_bound, &prop, 0);
+ }
++
char_type = language_string_char_type (cu->language_defn, gdbarch);
type = create_string_type (NULL, char_type, range_type);
-@@ -17767,7 +17831,8 @@ read_base_type (struct die_info *die, struct dwarf2_cu *cu)
+@@ -17858,7 +17938,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,
struct dwarf2_cu *cu, struct dynamic_prop *prop,
@@ -219,10 +239,10 @@ diff --git a/gdb/dwarf2read.c b/gdb/dwarf2read.c
{
struct dwarf2_property_baton *baton;
struct obstack *obstack
-@@ -17786,9 +17851,30 @@ attr_to_dynamic_prop (const struct attribute *attr, struct die_info *die,
- baton->locexpr.size = DW_BLOCK (attr)->size;
- baton->locexpr.data = DW_BLOCK (attr)->data;
- baton->locexpr.is_reference = false;
+@@ -17885,9 +17966,30 @@ attr_to_dynamic_prop (const struct attribute *attr, struct die_info *die,
+ baton->locexpr.is_reference = false;
+ break;
+ }
+
+ if (additional_data != NULL && additional_data_size > 0)
+ {
@@ -251,7 +271,7 @@ diff --git a/gdb/dwarf2read.c b/gdb/dwarf2read.c
}
else if (attr_form_is_ref (attr))
{
-@@ -17821,9 +17907,29 @@ attr_to_dynamic_prop (const struct attribute *attr, struct die_info *die,
+@@ -17920,9 +18022,29 @@ attr_to_dynamic_prop (const struct attribute *attr, struct die_info *die,
baton = XOBNEW (obstack, struct dwarf2_property_baton);
baton->property_type = die_type (target_die, target_cu);
baton->locexpr.per_cu = cu->per_cu;
@@ -283,26 +303,18 @@ diff --git a/gdb/dwarf2read.c b/gdb/dwarf2read.c
prop->data.baton = baton;
prop->kind = PROP_LOCEXPR;
gdb_assert (prop->data.baton != NULL);
-@@ -17993,7 +18099,8 @@ read_subrange_type (struct die_info *die, struct dwarf2_cu *cu)
-
- attr = dwarf2_attr (die, DW_AT_byte_stride, cu);
- if (attr)
-- if (!attr_to_dynamic_prop (attr, die, cu, &stride, base_type))
-+ if (!attr_to_dynamic_prop (attr, die, cu, &stride, base_type,
-+ NULL, 0))
- complaint (_("Missing DW_AT_byte_stride "
- "- DIE at 0x%s [in module %s]"),
- sect_offset_str (die->sect_off),
-@@ -18001,7 +18108,7 @@ read_subrange_type (struct die_info *die, struct dwarf2_cu *cu)
+@@ -18099,8 +18221,8 @@ read_subrange_type (struct die_info *die, struct dwarf2_cu *cu)
+ }
attr = dwarf2_attr (die, DW_AT_lower_bound, cu);
- if (attr)
+- if (attr != nullptr)
- attr_to_dynamic_prop (attr, die, cu, &low, base_type);
++ if (attr)
+ attr_to_dynamic_prop (attr, die, cu, &low, base_type, NULL, 0);
else if (!low_default_is_valid)
complaint (_("Missing DW_AT_lower_bound "
"- DIE at %s [in module %s]"),
-@@ -18010,10 +18117,10 @@ read_subrange_type (struct die_info *die, struct dwarf2_cu *cu)
+@@ -18109,10 +18231,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);
@@ -315,7 +327,25 @@ 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)
-@@ -25736,7 +25843,7 @@ set_die_type (struct die_info *die, struct type *type, struct dwarf2_cu *cu)
+@@ -18164,7 +18286,7 @@ read_subrange_type (struct die_info *die, struct dwarf2_cu *cu)
+ struct type *prop_type
+ = dwarf2_per_cu_addr_sized_int_type (cu->per_cu, false);
+ attr_to_dynamic_prop (attr_byte_stride, die, cu, &byte_stride_prop,
+- prop_type);
++ prop_type, NULL, 0);
+ }
+
+ struct dynamic_prop bit_stride_prop;
+@@ -18185,7 +18307,7 @@ read_subrange_type (struct die_info *die, struct dwarf2_cu *cu)
+ struct type *prop_type
+ = dwarf2_per_cu_addr_sized_int_type (cu->per_cu, false);
+ attr_to_dynamic_prop (attr_bit_stride, die, cu, &bit_stride_prop,
+- prop_type);
++ prop_type, NULL, 0);
+ }
+ }
+
+@@ -25879,7 +26001,7 @@ set_die_type (struct die_info *die, struct type *type, struct dwarf2_cu *cu)
{
struct type *prop_type
= dwarf2_per_cu_addr_sized_int_type (cu->per_cu, false);
@@ -324,7 +354,7 @@ diff --git a/gdb/dwarf2read.c b/gdb/dwarf2read.c
add_dyn_prop (DYN_PROP_ALLOCATED, prop, type);
}
else if (attr != NULL)
-@@ -25752,7 +25859,7 @@ set_die_type (struct die_info *die, struct type *type, struct dwarf2_cu *cu)
+@@ -25895,7 +26017,7 @@ set_die_type (struct die_info *die, struct type *type, struct dwarf2_cu *cu)
{
struct type *prop_type
= dwarf2_per_cu_addr_sized_int_type (cu->per_cu, false);
@@ -333,7 +363,7 @@ diff --git a/gdb/dwarf2read.c b/gdb/dwarf2read.c
add_dyn_prop (DYN_PROP_ASSOCIATED, prop, type);
}
else if (attr != NULL)
-@@ -25765,7 +25872,7 @@ set_die_type (struct die_info *die, struct type *type, struct dwarf2_cu *cu)
+@@ -25908,7 +26030,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);
if (attr_to_dynamic_prop (attr, die, cu, &prop,
@@ -401,7 +431,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
-@@ -1905,7 +1905,8 @@ is_dynamic_type_internal (struct type *type, int top_level)
+@@ -1939,7 +1939,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. */
@@ -411,32 +441,26 @@ 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
-@@ -1939,6 +1940,7 @@ is_dynamic_type_internal (struct type *type, int top_level)
+@@ -1972,10 +1973,10 @@ is_dynamic_type_internal (struct type *type, int top_level)
+ || is_dynamic_type_internal (TYPE_TARGET_TYPE (type), 0));
}
+- case TYPE_CODE_STRING:
+ /* Strings are very much like an array of characters, and can be
+ treated as one here. */
case TYPE_CODE_ARRAY:
+ case TYPE_CODE_STRING:
{
gdb_assert (TYPE_NFIELDS (type) == 1);
-@@ -2058,7 +2060,8 @@ resolve_dynamic_array (struct type *type,
- struct dynamic_prop *prop;
- unsigned int bit_stride = 0;
-
-- gdb_assert (TYPE_CODE (type) == TYPE_CODE_ARRAY);
-+ gdb_assert (TYPE_CODE (type) == TYPE_CODE_ARRAY
-+ || TYPE_CODE (type) == TYPE_CODE_STRING);
-
- type = copy_type (type);
-
-@@ -2083,11 +2086,15 @@ resolve_dynamic_array (struct type *type,
+@@ -2139,11 +2140,15 @@ resolve_dynamic_array_or_string (struct type *type,
ary_dim = check_typedef (TYPE_TARGET_TYPE (elt_type));
- if (ary_dim != NULL && TYPE_CODE (ary_dim) == TYPE_CODE_ARRAY)
+ if (ary_dim != NULL && (TYPE_CODE (ary_dim) == TYPE_CODE_ARRAY
+ || TYPE_CODE (ary_dim) == TYPE_CODE_STRING))
- elt_type = resolve_dynamic_array (ary_dim, addr_stack);
+ elt_type = resolve_dynamic_array_or_string (ary_dim, addr_stack);
else
elt_type = TYPE_TARGET_TYPE (type);
@@ -446,7 +470,7 @@ diff --git a/gdb/gdbtypes.c b/gdb/gdbtypes.c
prop = get_dyn_prop (DYN_PROP_BYTE_STRIDE, type);
if (prop != NULL)
{
-@@ -2239,6 +2246,28 @@ resolve_dynamic_struct (struct type *type,
+@@ -2295,6 +2300,28 @@ resolve_dynamic_struct (struct type *type,
return resolved_type;
}
@@ -475,19 +499,16 @@ diff --git a/gdb/gdbtypes.c b/gdb/gdbtypes.c
/* Worker for resolved_dynamic_type. */
static struct type *
-@@ -2287,7 +2316,12 @@ resolve_dynamic_type_internal (struct type *type,
- break;
- }
-
+@@ -2349,6 +2376,9 @@ resolve_dynamic_type_internal (struct type *type,
+ case TYPE_CODE_ARRAY:
+ resolved_type = resolve_dynamic_array_or_string (type, addr_stack);
+ break;
+ case TYPE_CODE_PTR:
+ resolved_type = resolve_dynamic_pointer (type, addr_stack);
+ break;
-+
- case TYPE_CODE_ARRAY:
-+ case TYPE_CODE_STRING:
- resolved_type = resolve_dynamic_array (type, addr_stack);
- break;
+ case TYPE_CODE_RANGE:
+ resolved_type = resolve_dynamic_range (type, addr_stack);
diff --git a/gdb/testsuite/gdb.cp/vla-cxx.cc b/gdb/testsuite/gdb.cp/vla-cxx.cc
--- a/gdb/testsuite/gdb.cp/vla-cxx.cc
+++ b/gdb/testsuite/gdb.cp/vla-cxx.cc
@@ -777,7 +798,7 @@ diff --git a/gdb/testsuite/gdb.fortran/print_type.exp b/gdb/testsuite/gdb.fortra
--- a/gdb/testsuite/gdb.fortran/print_type.exp
+++ b/gdb/testsuite/gdb.fortran/print_type.exp
@@ -1,5 +1,6 @@
- # Copyright 2019 Free Software Foundation, Inc.
+ # Copyright 2019-2020 Free Software Foundation, Inc.
#
+
# This program is free software; you can redistribute it and/or modify
diff --git a/gdb-vla-intel-stringbt-fix.patch b/gdb-vla-intel-stringbt-fix.patch
index 084b747..aedc7b1 100644
--- a/gdb-vla-intel-stringbt-fix.patch
+++ b/gdb-vla-intel-stringbt-fix.patch
@@ -30,7 +30,7 @@ Jan
diff --git a/gdb/dwarf2loc.c b/gdb/dwarf2loc.c
--- a/gdb/dwarf2loc.c
+++ b/gdb/dwarf2loc.c
-@@ -2155,6 +2155,20 @@ dwarf2_evaluate_loc_desc_full (struct type *type, struct frame_info *frame,
+@@ -2154,6 +2154,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 d6083d6..7cdc20a 100644
--- a/gdb.spec
+++ b/gdb.spec
@@ -27,22 +27,22 @@
Name: %{?scl_prefix}gdb
# Freeze it when GDB gets branched
-%global snapsrc 20191119
-# See timestamp of source gnulib installed into gdb/gnulib/ .
-%global snapgnulib 20161115
+%global snapsrc 20200208
+# See timestamp of source gnulib installed into gnulib/ .
+%global snapgnulib 20191216
%global tarname gdb-%{version}
-Version: 9.0.50.%{snapsrc}
+Version: 9.1
# The release always contains a leading reserved number, start it at 1.
# `upstream' is not a part of `name' to stay fully rpm dependencies compatible for the testing.
-Release: 2.0.riscv64%{?dist}
+Release: 4.0.riscv64%{?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.
# ftp://sourceware.org/pub/gdb/releases/FIXME{tarname}.tar.xz
-Source: %{tarname}.tar.xz
-#Source: ftp://sourceware.org/pub/gdb/releases/%{tarname}.tar.xz
-URL: http://gnu.org/software/gdb/
+#Source: %{tarname}.tar.xz
+Source: ftp://sourceware.org/pub/gdb/releases/%{tarname}.tar.xz
+URL: https://gnu.org/software/gdb/
# For our convenience
%global gdb_src %{tarname}
@@ -241,7 +241,7 @@ BuildRequires: texlive-collection-latexrecommended
BuildRequires: /usr/bin/pod2man
%if 0%{!?rhel:1} || 0%{?rhel} > 7
BuildRequires: libbabeltrace-devel%{buildisa}
-#BuildRequires: guile-devel%{buildisa}
+BuildRequires: guile-devel%{buildisa}
%endif
%global have_libipt 0
%if 0%{!?rhel:1} || 0%{?rhel} > 7 || (0%{?rhel} == 7 && 0%{?scl:1})
@@ -261,6 +261,7 @@ BuildRequires: libipt-devel%{buildisa}
BuildRequires: mpfr-devel%{buildisa}
%endif
BuildRequires: source-highlight-devel
+BuildRequires: xxhash-devel
%if 0%{?_with_testsuite:1}
@@ -541,7 +542,6 @@ COMMON_GDB_CONFIGURE_FLAGS="\
--disable-rpath \
--without-stage1-ldflags \
--disable-libmcheck \
- --without-guile \
%if 0%{!?rhel:1} || 0%{?rhel} > 6
--with-system-readline \
%else
@@ -584,6 +584,7 @@ GDB_MINIMAL_CONFIGURE_FLAGS="\
--without-expat \
--disable-tui \
--without-python \
+ --without-guile \
--disable-inprocess-agent \
--without-intel-pt \
--disable-unit-tests \
@@ -690,6 +691,11 @@ $(: ppc64 host build crashes on ppc variant of libexpat.so ) \
%else
--without-python \
%endif
+%if 0%{!?rhel:1} || 0%{?rhel} > 7
+ --with-guile \
+%else
+ --without-guile \
+%endif
%if %{have_inproctrace}
--enable-inprocess-agent \
%else
@@ -699,6 +705,9 @@ $(: ppc64 host build crashes on ppc variant of libexpat.so ) \
--with-intel-pt \
%else
--without-intel-pt \
+%endif
+%if 0%{!?rhel:1} || 0%{?rhel} > 8
+ --with-xxhash \
%endif
--with-rpm=librpm.so.%{librpmver} \
--enable-unit-tests"
@@ -1151,9 +1160,38 @@ fi
%endif
%changelog
-* Sat Nov 30 2019 David Abdurachmanov - 9.0.50.20191119-2.0.riscv64
+* Sat Mar 21 2020 David Abdurachmanov - 9.1-4.0.riscv64
- Add support for RISC-V (riscv64)
+* Mon Mar 2 2020 Sergio Durigan Junior - 9.1-4
+- Add '--without-guile' to GDB_MINIMAL_CONFIGURE_FLAGS.
+
+* Thu Feb 13 2020 Sergio Durigan Junior - 9.1-3
+- Fix 'Recursive call to 'missing_rpm_list_print' when pagination is
+ on and missing RPM list is big' (RHBZ 1801974, Sergio Durigan
+ Junior).
+
+* Mon Feb 10 2020 Sergio Durigan Junior - 9.1-2
+- Enable libxxhash during build.
+
+* Sat Feb 8 2020 Sergio Durigan Junior - 9.1-1
+- Rebase to FSF GDB 9.1.
+
+* Tue Feb 4 2020 Dan Čermák - 9.0.90.20200203-5
+- Re-enable guile support.
+
+* Mon Feb 3 2020 Sergio Durigan Junior - 9.0.90.20200203-4
+- Rebase to FSF GDB 9.0.90.20200203 (9.1pre).
+- Bump 'snapgnulib' date.
+- Update URL to 'https'.
+- Adjust build-id patchset.
+- Adjust VLA patchset.
+- Drop 'gdb-6.8-bz436037-reg-no-longer-active.patch'.
+- Drop 'gdb-6.6-scheduler_locking-step-is-default.patch'.
+
+* Tue Jan 28 2020 Fedora Release Engineering
+- Rebuilt for https://fedoraproject.org/wiki/Fedora_32_Mass_Rebuild
+
* Tue Nov 19 2019 Sergio Durigan Junior - 9.0.50.20191119-2
- Rebase to FSF GDB 9.0.50.20191119 (9.1pre).
- Drop 'gdb-readline62-ask-more-rh.patch'.
diff --git a/sources b/sources
index d70188c..16b9bed 100644
--- a/sources
+++ b/sources
@@ -1,3 +1,3 @@
SHA512 (gdb-libstdc++-v3-python-8.1.1-20180626.tar.xz) = a8b1c54dd348cfeb37da73f968742896be3dd13a4215f8d8519870c2abea915f5176c3fa6989ddd10f20020a16f0fab20cbae68ee8d58a82234d8778023520f8
SHA512 (v2.0.1.tar.gz) = e38e93908c3fbf1f2384cfca381eaf4bf667033de678041bd440adac8bbce4757b77304868896256ed72c202ee22ba1646aada90125029f14f5bffaf828a7df4
-SHA512 (gdb-9.0.50.20191119.tar.xz) = 1163bc264580fcb3896ad2868da1e1e715e9b1fbfd03e007168e173d50f76e9592a65d3f1bd11957cdd41d87587c9db8c5681cdce989a2257d4cb61f9b4587d4
+SHA512 (gdb-9.1.tar.xz) = 84cdd408d80a3fc5779de459c5b26154d31b329ebde7e3aa78799fb1eb245d8b64b8c8ee7242382a1dbd95b4e6f9d84fef41d12a0646aa75d3dee4709ea1f6e7