Compare commits
No commits in common. "master" and "f28" have entirely different histories.
7
.gitignore
vendored
7
.gitignore
vendored
@ -1,4 +1,3 @@
|
||||
/binutils-gdb
|
||||
/gdb-libstdc++-v3-python-8.1.1-20180626.tar.xz
|
||||
/v2.0.2.tar.gz
|
||||
/gdb-10.1.tar.xz
|
||||
/gdb-libstdc++-v3-python-7.1.1-20170526.tar.xz
|
||||
/v1.6.1.tar.gz
|
||||
/gdb-8.1.tar.xz
|
||||
|
105
README.local-patches
Normal file
105
README.local-patches
Normal file
@ -0,0 +1,105 @@
|
||||
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
|
||||
git repository. Below you can find a few instructions on how to work
|
||||
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
|
||||
|
||||
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
|
||||
|
||||
## TIP: if you already have the repository cloned somewhere in your
|
||||
## system, you can pass a "--reference <dir>" 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 <REPOSITORY_DIR>
|
||||
|
||||
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*.
|
||||
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.
|
||||
|
||||
### 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 <REVISION>". git will do the rest, and you will be able
|
||||
to perform conflict resolution by git's algorithm, which is smarter.
|
||||
|
||||
### 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
|
||||
even to delete a patch.
|
||||
|
||||
2) When writing the commit log, you must obey a few rules. The
|
||||
subject line can be anything, but the body *must* have the following
|
||||
special line:
|
||||
|
||||
FileName: name-of-the-patch.patch
|
||||
|
||||
This line will be used when exporting the patches from the git
|
||||
repository, and (obviously) it gives the filename that should be used
|
||||
for this 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
|
||||
the beginning of the line. This way, a commit log that says:
|
||||
|
||||
FileName: test-patch.patch
|
||||
|
||||
;; This is a test patch
|
||||
;; Second line
|
||||
|
||||
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
|
||||
|
||||
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:
|
||||
|
||||
$ sh generate-patches-from-git-repo.sh <REPOSITORY_DIR>
|
||||
|
||||
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.
|
||||
|
||||
- _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
|
||||
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 <REPOSITORY_DIR> <COMMIT_OR_TAG_OR_BRANCH>
|
||||
|
||||
For example, if you rebased against "gdb-8.1-release":
|
||||
|
||||
$ sh generate-patches-from-git-repo.sh <REPOSITORY_DIR> gdb-8.1-release
|
@ -1,104 +0,0 @@
|
||||
# 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
|
||||
git repository. Below you can find a few instructions on how to work
|
||||
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
|
||||
|
||||
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`
|
||||
|
||||
> TIP: if you already have the repository cloned somewhere in your
|
||||
> system, you can pass a "--reference <dir>" 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 <REPOSITORY_DIR>`
|
||||
|
||||
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*.
|
||||
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.
|
||||
|
||||
## 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 <REVISION>`. git will do the rest, and you will be able
|
||||
to perform conflict resolution by git's algorithm, which is smarter.
|
||||
|
||||
## 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
|
||||
even to delete a patch.
|
||||
|
||||
2) When writing the commit log, you must obey a few rules. The
|
||||
subject line *must* be the filename of the patch. This line will be
|
||||
used when exporting the patches from the git repository, and
|
||||
(obviously) it gives the filename that should be used for this
|
||||
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
|
||||
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:
|
||||
|
||||
~~~~~~~~~~~
|
||||
# This is a test patch
|
||||
# Second line
|
||||
PatchXYZ: test-patch.patch
|
||||
~~~~~~~~~~~
|
||||
|
||||
## 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:
|
||||
|
||||
`$ sh generate-patches-from-git-repo.sh <REPOSITORY_DIR>`
|
||||
|
||||
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.
|
||||
|
||||
- `_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
|
||||
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 <REPOSITORY_DIR> <COMMIT_OR_TAG_OR_BRANCH>`
|
||||
|
||||
For example, if you rebased against `gdb-8.1-release`:
|
||||
|
||||
`$ sh generate-patches-from-git-repo.sh <REPOSITORY_DIR> gdb-8.1-release`
|
@ -12,373 +12,518 @@ Patch003: gdb-vla-intel-fortran-vla-strings.patch
|
||||
#=push+jan
|
||||
Patch004: gdb-vla-intel-stringbt-fix.patch
|
||||
|
||||
# Better parse 64-bit PPC system call prologues.
|
||||
#=push: Write new testcase.
|
||||
Patch005: gdb-6.3-ppc64syscall-20040622.patch
|
||||
|
||||
# Include the pc's section when doing a symbol lookup so that the
|
||||
# correct symbol is found.
|
||||
#=push: Write new testcase.
|
||||
Patch006: gdb-6.3-ppc64displaysymbol-20041124.patch
|
||||
|
||||
# Add a wrapper script to GDB that implements pstack using the
|
||||
# --readnever option.
|
||||
#=push
|
||||
Patch005: gdb-6.3-gstack-20050411.patch
|
||||
Patch007: gdb-6.3-gstack-20050411.patch
|
||||
|
||||
# VSYSCALL and PIE
|
||||
#=fedoratest
|
||||
Patch006: gdb-6.3-test-pie-20050107.patch
|
||||
Patch008: gdb-6.3-test-pie-20050107.patch
|
||||
|
||||
# Get selftest working with sep-debug-info
|
||||
#=fedoratest
|
||||
Patch007: gdb-6.3-test-self-20050110.patch
|
||||
Patch009: gdb-6.3-test-self-20050110.patch
|
||||
|
||||
# Test support of multiple destructors just like multiple constructors
|
||||
#=fedoratest
|
||||
Patch008: gdb-6.3-test-dtorfix-20050121.patch
|
||||
Patch010: gdb-6.3-test-dtorfix-20050121.patch
|
||||
|
||||
# Fix to support executable moving
|
||||
#=fedoratest
|
||||
Patch009: gdb-6.3-test-movedir-20050125.patch
|
||||
Patch011: gdb-6.3-test-movedir-20050125.patch
|
||||
|
||||
# Test sibling threads to set threaded watchpoints for x86 and x86-64
|
||||
#=fedoratest
|
||||
Patch010: gdb-6.3-threaded-watchpoints2-20050225.patch
|
||||
Patch012: gdb-6.3-threaded-watchpoints2-20050225.patch
|
||||
|
||||
# Notify observers that the inferior has been created
|
||||
#=fedoratest
|
||||
Patch013: gdb-6.3-inferior-notification-20050721.patch
|
||||
|
||||
# Verify printing of inherited members test
|
||||
#=fedoratest
|
||||
Patch012: gdb-6.3-inheritancetest-20050726.patch
|
||||
Patch014: gdb-6.3-inheritancetest-20050726.patch
|
||||
|
||||
# Add readnever option
|
||||
#=push
|
||||
Patch015: gdb-6.3-readnever-20050907.patch
|
||||
|
||||
# Fix debuginfo addresses resolving for --emit-relocs Linux kernels (BZ 203661).
|
||||
#=push+jan: There was some mail thread about it, this patch may be a hack.
|
||||
Patch016: gdb-6.5-bz203661-emit-relocs.patch
|
||||
|
||||
# Support TLS symbols (+`errno' suggestion if no pthread is found) (BZ 185337).
|
||||
#=push+jan: It should be replaced by Infinity project.
|
||||
Patch013: gdb-6.5-bz185337-resolve-tls-without-debuginfo-v2.patch
|
||||
Patch017: gdb-6.5-bz185337-resolve-tls-without-debuginfo-v2.patch
|
||||
|
||||
# Fix TLS symbols resolving for shared libraries with a relative pathname.
|
||||
# The testsuite needs `gdb-6.5-tls-of-separate-debuginfo.patch'.
|
||||
#=fedoratest: One should recheck if it is really fixed upstream.
|
||||
Patch014: gdb-6.5-sharedlibrary-path.patch
|
||||
Patch018: gdb-6.5-sharedlibrary-path.patch
|
||||
|
||||
# Improved testsuite results by the testsuite provided by the courtesy of BEA.
|
||||
#=fedoratest: For upstream it should be rewritten as a dejagnu test, the test of no "??" was useful.
|
||||
Patch015: gdb-6.5-BEA-testsuite.patch
|
||||
Patch019: gdb-6.5-BEA-testsuite.patch
|
||||
|
||||
# Testcase for deadlocking on last address space byte; for corrupted backtraces.
|
||||
#=fedoratest
|
||||
Patch016: gdb-6.5-last-address-space-byte-test.patch
|
||||
Patch020: gdb-6.5-last-address-space-byte-test.patch
|
||||
|
||||
# Fix readline segfault on excessively long hand-typed lines.
|
||||
#=fedoratest
|
||||
Patch017: gdb-6.5-readline-long-line-crash-test.patch
|
||||
Patch021: gdb-6.5-readline-long-line-crash-test.patch
|
||||
|
||||
# Fix bogus 0x0 unwind of the thread's topmost function clone(3) (BZ 216711).
|
||||
#=fedora
|
||||
Patch022: gdb-6.5-bz216711-clone-is-outermost.patch
|
||||
|
||||
# Test sideeffects of skipping ppc .so libs trampolines (BZ 218379).
|
||||
#=fedoratest
|
||||
Patch018: gdb-6.5-bz218379-ppc-solib-trampoline-test.patch
|
||||
Patch023: gdb-6.5-bz218379-ppc-solib-trampoline-test.patch
|
||||
|
||||
# Fix lockup on trampoline vs. its function lookup; unreproducible (BZ 218379).
|
||||
#=fedora
|
||||
Patch019: gdb-6.5-bz218379-solib-trampoline-lookup-lock-fix.patch
|
||||
Patch024: gdb-6.5-bz218379-solib-trampoline-lookup-lock-fix.patch
|
||||
|
||||
# Find symbols properly at their original (included) file (BZ 109921).
|
||||
#=fedoratest
|
||||
Patch020: gdb-6.5-bz109921-DW_AT_decl_file-test.patch
|
||||
Patch025: gdb-6.5-bz109921-DW_AT_decl_file-test.patch
|
||||
|
||||
# Update PPC unwinding patches to their upstream variants (BZ 140532).
|
||||
#=fedoratest
|
||||
Patch021: gdb-6.3-bz140532-ppc-unwinding-test.patch
|
||||
Patch026: gdb-6.3-bz140532-ppc-unwinding-test.patch
|
||||
|
||||
# Testcase for exec() from threaded program (BZ 202689).
|
||||
#=fedoratest
|
||||
Patch022: gdb-6.3-bz202689-exec-from-pthread-test.patch
|
||||
Patch027: gdb-6.3-bz202689-exec-from-pthread-test.patch
|
||||
|
||||
# Testcase for PPC Power6/DFP instructions disassembly (BZ 230000).
|
||||
#=fedoratest
|
||||
Patch023: gdb-6.6-bz230000-power6-disassembly-test.patch
|
||||
Patch028: gdb-6.6-bz230000-power6-disassembly-test.patch
|
||||
|
||||
# Allow running `/usr/bin/gcore' with provided but inaccessible tty (BZ 229517).
|
||||
#=fedoratest
|
||||
Patch024: gdb-6.6-bz229517-gcore-without-terminal.patch
|
||||
Patch029: gdb-6.6-bz229517-gcore-without-terminal.patch
|
||||
|
||||
# Notify user of a child forked process being detached (BZ 235197).
|
||||
#=push+jan: This is more about discussion if/what should be printed.
|
||||
Patch030: gdb-6.6-bz235197-fork-detach-info.patch
|
||||
|
||||
# Avoid too long timeouts on failing cases of "annota1.exp annota3.exp".
|
||||
#=fedoratest
|
||||
Patch025: gdb-6.6-testsuite-timeouts.patch
|
||||
Patch031: gdb-6.6-testsuite-timeouts.patch
|
||||
|
||||
# Support for stepping over PPC atomic instruction sequences (BZ 237572).
|
||||
#=fedoratest
|
||||
Patch026: gdb-6.6-bz237572-ppc-atomic-sequence-test.patch
|
||||
Patch032: 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?
|
||||
Patch033: gdb-6.6-scheduler_locking-step-is-default.patch
|
||||
|
||||
# Test kernel VDSO decoding while attaching to an i386 process.
|
||||
#=fedoratest
|
||||
Patch034: gdb-6.3-attach-see-vdso-test.patch
|
||||
|
||||
# Test leftover zombie process (BZ 243845).
|
||||
#=fedoratest
|
||||
Patch028: gdb-6.5-bz243845-stale-testing-zombie-test.patch
|
||||
Patch035: gdb-6.5-bz243845-stale-testing-zombie-test.patch
|
||||
|
||||
# New locating of the matching binaries from the pure core file (build-id).
|
||||
#=push+jan
|
||||
Patch029: gdb-6.6-buildid-locate.patch
|
||||
Patch036: 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
|
||||
Patch030: gdb-6.6-buildid-locate-solib-missing-ids.patch
|
||||
Patch037: gdb-6.6-buildid-locate-solib-missing-ids.patch
|
||||
|
||||
#=push+jan
|
||||
Patch031: gdb-6.6-buildid-locate-rpm.patch
|
||||
Patch038: 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.
|
||||
Patch032: gdb-6.7-charsign-test.patch
|
||||
Patch039: gdb-6.7-charsign-test.patch
|
||||
|
||||
# Test PPC hiding of call-volatile parameter register.
|
||||
#=fedoratest
|
||||
Patch033: gdb-6.7-ppc-clobbered-registers-O2-test.patch
|
||||
Patch040: gdb-6.7-ppc-clobbered-registers-O2-test.patch
|
||||
|
||||
# Testsuite fixes for more stable/comparable results.
|
||||
#=fedoratest
|
||||
Patch034: gdb-6.7-testsuite-stable-results.patch
|
||||
Patch041: gdb-6.7-testsuite-stable-results.patch
|
||||
|
||||
# Test ia64 memory leaks of the code using libunwind.
|
||||
#=fedoratest
|
||||
Patch035: gdb-6.5-ia64-libunwind-leak-test.patch
|
||||
Patch042: gdb-6.5-ia64-libunwind-leak-test.patch
|
||||
|
||||
# Test hiding unexpected breakpoints on intentional step commands.
|
||||
#=fedoratest
|
||||
Patch036: gdb-6.5-missed-trap-on-step-test.patch
|
||||
Patch043: gdb-6.5-missed-trap-on-step-test.patch
|
||||
|
||||
# Test gcore memory and time requirements for large inferiors.
|
||||
#=fedoratest
|
||||
Patch044: 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.
|
||||
Patch038: gdb-6.3-mapping-zero-inode-test.patch
|
||||
Patch045: gdb-6.3-mapping-zero-inode-test.patch
|
||||
|
||||
# Test a crash on `focus cmd', `focus prev' commands.
|
||||
#=fedoratest
|
||||
Patch039: gdb-6.3-focus-cmd-prev-test.patch
|
||||
Patch046: gdb-6.3-focus-cmd-prev-test.patch
|
||||
|
||||
# Test various forms of threads tracking across exec() (BZ 442765).
|
||||
#=fedoratest
|
||||
Patch040: gdb-6.8-bz442765-threaded-exec-test.patch
|
||||
Patch047: gdb-6.8-bz442765-threaded-exec-test.patch
|
||||
|
||||
# Silence memcpy check which returns false positive (sparc64)
|
||||
#=push: But it is just a GCC workaround, look up the existing GCC PR for it.
|
||||
Patch048: gdb-6.8-sparc64-silence-memcpy-check.patch
|
||||
|
||||
# Test a crash on libraries missing the .text section.
|
||||
#=fedoratest
|
||||
Patch041: gdb-6.5-section-num-fixup-test.patch
|
||||
Patch049: gdb-6.5-section-num-fixup-test.patch
|
||||
|
||||
# Fix register assignments with no GDB stack frames (BZ 436037).
|
||||
#=push+jan: This fix is incorrect.
|
||||
Patch050: gdb-6.8-bz436037-reg-no-longer-active.patch
|
||||
|
||||
# Test the watchpoints conditionals works.
|
||||
#=fedoratest
|
||||
Patch051: gdb-6.8-watchpoint-conditionals-test.patch
|
||||
|
||||
# Fix resolving of variables at locations lists in prelinked libs (BZ 466901).
|
||||
#=fedoratest
|
||||
Patch042: gdb-6.8-bz466901-backtrace-full-prelinked.patch
|
||||
Patch052: gdb-6.8-bz466901-backtrace-full-prelinked.patch
|
||||
|
||||
# New test for step-resume breakpoint placed in multiple threads at once.
|
||||
#=fedoratest
|
||||
Patch043: gdb-simultaneous-step-resume-breakpoint-test.patch
|
||||
Patch053: 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@.*>
|
||||
Patch044: gdb-core-open-vdso-warning.patch
|
||||
Patch054: gdb-core-open-vdso-warning.patch
|
||||
|
||||
# Fix syscall restarts for amd64->i386 biarch.
|
||||
#=push+jan
|
||||
Patch055: gdb-x86_64-i386-syscall-restart.patch
|
||||
|
||||
# Fix stepping with OMP parallel Fortran sections (BZ 533176).
|
||||
#=push+jan: It requires some better DWARF annotations.
|
||||
Patch045: gdb-bz533176-fortran-omp-step.patch
|
||||
Patch056: gdb-bz533176-fortran-omp-step.patch
|
||||
|
||||
# Fix regression by python on ia64 due to stale current frame.
|
||||
#=push+jan
|
||||
Patch057: gdb-follow-child-stale-parent.patch
|
||||
|
||||
# Workaround ccache making lineno non-zero for command-line definitions.
|
||||
#=fedoratest: ccache is rarely used and it is even fixed now.
|
||||
Patch046: gdb-ccache-workaround.patch
|
||||
Patch058: gdb-ccache-workaround.patch
|
||||
|
||||
#=push+jan: May get obsoleted by Tom's unrelocated objfiles patch.
|
||||
Patch047: gdb-archer-pie-addons.patch
|
||||
Patch059: gdb-archer-pie-addons.patch
|
||||
|
||||
#=push+jan: Breakpoints disabling matching should not be based on address.
|
||||
Patch048: gdb-archer-pie-addons-keep-disabled.patch
|
||||
Patch060: gdb-archer-pie-addons-keep-disabled.patch
|
||||
|
||||
# Testcase for "Do not make up line information" fix by Daniel Jacobowitz.
|
||||
#=fedoratest
|
||||
Patch049: gdb-lineno-makeup-test.patch
|
||||
Patch061: gdb-lineno-makeup-test.patch
|
||||
|
||||
# Test power7 ppc disassembly.
|
||||
#=fedoratest
|
||||
Patch050: gdb-ppc-power7-test.patch
|
||||
Patch062: gdb-ppc-power7-test.patch
|
||||
|
||||
# Fix i386+x86_64 rwatch+awatch before run, regression against 6.8 (BZ 541866).
|
||||
# Fix i386 rwatch+awatch before run (BZ 688788, on top of BZ 541866).
|
||||
#=push+jan: It should be fixed properly instead.
|
||||
Patch063: gdb-bz541866-rwatch-before-run.patch
|
||||
|
||||
# Workaround non-stop moribund locations exploited by kernel utrace (BZ 590623).
|
||||
#=push+jan: Currently it is still not fully safe.
|
||||
Patch051: gdb-moribund-utrace-workaround.patch
|
||||
Patch064: gdb-moribund-utrace-workaround.patch
|
||||
|
||||
# Fix follow-exec for C++ programs (bugreported by Martin Stransky).
|
||||
#=fedoratest
|
||||
Patch052: gdb-archer-next-over-throw-cxx-exec.patch
|
||||
Patch065: gdb-archer-next-over-throw-cxx-exec.patch
|
||||
|
||||
# Backport DWARF-4 support (BZ 601887, Tom Tromey).
|
||||
#=fedoratest
|
||||
Patch053: gdb-bz601887-dwarf4-rh-test.patch
|
||||
Patch066: gdb-bz601887-dwarf4-rh-test.patch
|
||||
|
||||
#=push+jan
|
||||
Patch054: gdb-6.6-buildid-locate-core-as-arg.patch
|
||||
Patch067: gdb-6.6-buildid-locate-core-as-arg.patch
|
||||
|
||||
# Workaround librpm BZ 643031 due to its unexpected exit() calls (BZ 642879).
|
||||
#=push+jan
|
||||
Patch055: gdb-6.6-buildid-locate-rpm-librpm-workaround.patch
|
||||
Patch068: gdb-6.6-buildid-locate-rpm-librpm-workaround.patch
|
||||
|
||||
# [delayed-symfile] Test a backtrace regression on CFIs without DIE (BZ 614604).
|
||||
#=fedoratest
|
||||
Patch056: gdb-test-bt-cfi-without-die.patch
|
||||
Patch069: gdb-test-bt-cfi-without-die.patch
|
||||
|
||||
# Provide /usr/bin/gdb-add-index for rpm-build (Tom Tromey).
|
||||
#=push: Re-check against the upstream version.
|
||||
Patch070: gdb-gdb-add-index-script.patch
|
||||
|
||||
# Out of memory is just an error, not fatal (uninitialized VLS vars, BZ 568248).
|
||||
#=push+jan: Inferior objects should be read in parts, then this patch gets obsoleted.
|
||||
Patch071: gdb-bz568248-oom-is-error.patch
|
||||
|
||||
# Verify GDB Python built-in function gdb.solib_address exists (BZ # 634108).
|
||||
#=fedoratest
|
||||
Patch057: gdb-bz634108-solib_address.patch
|
||||
Patch072: gdb-bz634108-solib_address.patch
|
||||
|
||||
# New test gdb.arch/x86_64-pid0-core.exp for kernel PID 0 cores (BZ 611435).
|
||||
#=fedoratest
|
||||
Patch058: gdb-test-pid0-core.patch
|
||||
Patch073: gdb-test-pid0-core.patch
|
||||
|
||||
# [archer-tromey-delayed-symfile] New test gdb.dwarf2/dw2-aranges.exp.
|
||||
#=fedoratest
|
||||
Patch059: gdb-test-dw2-aranges.patch
|
||||
Patch074: gdb-test-dw2-aranges.patch
|
||||
|
||||
# [archer-keiths-expr-cumulative+upstream] Import C++ testcases.
|
||||
#=fedoratest
|
||||
Patch060: gdb-test-expr-cumulative-archer.patch
|
||||
Patch075: gdb-test-expr-cumulative-archer.patch
|
||||
|
||||
# Fix regressions on C++ names resolving (PR 11734, PR 12273, Keith Seitz).
|
||||
#=fedoratest
|
||||
Patch061: gdb-physname-pr11734-test.patch
|
||||
Patch076: gdb-physname-pr11734-test.patch
|
||||
|
||||
# Fix regressions on C++ names resolving (PR 11734, PR 12273, Keith Seitz).
|
||||
#=fedoratest
|
||||
Patch062: gdb-physname-pr12273-test.patch
|
||||
Patch077: gdb-physname-pr12273-test.patch
|
||||
|
||||
# Toolchain on sparc is slightly broken and debuginfo files are generated
|
||||
# with non 64bit aligned tables/offsets.
|
||||
# See for example readelf -S ../Xvnc.debug.
|
||||
#
|
||||
# As a consenquence calculation of sectp->filepos as used in
|
||||
# dwarf2_read_section (gdb/dwarf2read.c:1525) will return a non aligned buffer
|
||||
# that cannot be used directly as done with MMAP.
|
||||
# Usage will result in a BusError.
|
||||
#
|
||||
# While we figure out what's wrong in the toolchain and do a full archive
|
||||
# rebuild to fix it, we need to be able to use gdb :)
|
||||
#=push
|
||||
Patch078: gdb-7.2.50-sparc-add-workaround-to-broken-debug-files.patch
|
||||
|
||||
# Test GDB opcodes/ disassembly of Intel Ivy Bridge instructions (BZ 696890).
|
||||
#=fedoratest
|
||||
Patch063: gdb-test-ivy-bridge.patch
|
||||
Patch079: gdb-test-ivy-bridge.patch
|
||||
|
||||
# Hack for proper PIE run of the testsuite.
|
||||
#=fedoratest
|
||||
Patch064: gdb-runtest-pie-override.patch
|
||||
Patch080: gdb-runtest-pie-override.patch
|
||||
|
||||
# Print reasons for failed attach/spawn incl. SELinux deny_ptrace (BZ 786878).
|
||||
#=push+jan
|
||||
Patch065: gdb-attach-fail-reasons-5of5.patch
|
||||
Patch081: gdb-attach-fail-reasons-5of5.patch
|
||||
|
||||
# Workaround crashes from stale frame_info pointer (BZ 804256).
|
||||
#=push+jan
|
||||
Patch082: gdb-stale-frame_info.patch
|
||||
|
||||
# Workaround PR libc/14166 for inferior calls of strstr.
|
||||
#=fedoratest: Compatibility with RHELs (unchecked which ones).
|
||||
Patch066: gdb-glibc-strstr-workaround.patch
|
||||
#=fedora: Compatibility with RHELs (unchecked which ones).
|
||||
Patch083: gdb-glibc-strstr-workaround.patch
|
||||
|
||||
# Include testcase for `Unable to see a variable inside a module (XLF)' (BZ 823789).
|
||||
#=fedoratest
|
||||
Patch067: gdb-rhel5.9-testcase-xlf-var-inside-mod.patch
|
||||
Patch084: gdb-rhel5.9-testcase-xlf-var-inside-mod.patch
|
||||
|
||||
# Testcase for `Setting solib-absolute-prefix breaks vDSO' (BZ 818343).
|
||||
#=fedoratest
|
||||
Patch068: gdb-rhbz-818343-set-solib-absolute-prefix-testcase.patch
|
||||
Patch085: gdb-rhbz-818343-set-solib-absolute-prefix-testcase.patch
|
||||
|
||||
# Fix `GDB cannot access struct member whose offset is larger than 256MB'
|
||||
# (RH BZ 795424).
|
||||
#=push
|
||||
Patch086: gdb-rhbz795424-bitpos-20of25.patch
|
||||
|
||||
# Fix `GDB cannot access struct member whose offset is larger than 256MB'
|
||||
# (RH BZ 795424).
|
||||
#=push
|
||||
Patch087: gdb-rhbz795424-bitpos-21of25.patch
|
||||
|
||||
# Fix `GDB cannot access struct member whose offset is larger than 256MB'
|
||||
# (RH BZ 795424).
|
||||
#=push
|
||||
Patch088: gdb-rhbz795424-bitpos-22of25.patch
|
||||
|
||||
# Fix `GDB cannot access struct member whose offset is larger than 256MB'
|
||||
# (RH BZ 795424).
|
||||
#=push
|
||||
Patch089: gdb-rhbz795424-bitpos-23of25.patch
|
||||
|
||||
# Fix `GDB cannot access struct member whose offset is larger than 256MB'
|
||||
# (RH BZ 795424).
|
||||
#=push
|
||||
Patch090: gdb-rhbz795424-bitpos-25of25.patch
|
||||
|
||||
# Fix `GDB cannot access struct member whose offset is larger than 256MB'
|
||||
# (RH BZ 795424).
|
||||
#=push
|
||||
Patch091: gdb-rhbz795424-bitpos-25of25-test.patch
|
||||
|
||||
# Fix `GDB cannot access struct member whose offset is larger than 256MB'
|
||||
# (RH BZ 795424).
|
||||
#=push
|
||||
Patch092: gdb-rhbz795424-bitpos-lazyvalue.patch
|
||||
|
||||
# Import regression test for `gdb/findvar.c:417: internal-error:
|
||||
# read_var_value: Assertion `frame' failed.' (RH BZ 947564) from RHEL 6.5.
|
||||
#=fedoratest
|
||||
Patch069: gdb-rhbz947564-findvar-assertion-frame-failed-testcase.patch
|
||||
Patch093: gdb-rhbz947564-findvar-assertion-frame-failed-testcase.patch
|
||||
|
||||
# Fix crash of -readnow /usr/lib/debug/usr/bin/gnatbind.debug (BZ 1069211).
|
||||
#=push+jan
|
||||
Patch070: gdb-gnat-dwarf-crash-3of3.patch
|
||||
Patch094: gdb-gnat-dwarf-crash-3of3.patch
|
||||
|
||||
# Fix 'memory leak in infpy_read_memory()' (RH BZ 1007614)
|
||||
#=fedoratest
|
||||
Patch071: gdb-rhbz1007614-memleak-infpy_read_memory-test.patch
|
||||
Patch095: 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
|
||||
Patch072: gdb-6.6-buildid-locate-misleading-warning-missing-debuginfo-rhbz981154.patch
|
||||
Patch096: gdb-6.6-buildid-locate-misleading-warning-missing-debuginfo-rhbz981154.patch
|
||||
|
||||
#=fedoratest
|
||||
Patch073: gdb-archer-vla-tests.patch
|
||||
Patch097: gdb-archer-vla-tests.patch
|
||||
|
||||
#=fedoratest
|
||||
Patch074: gdb-vla-intel-tests.patch
|
||||
Patch098: gdb-vla-intel-tests.patch
|
||||
|
||||
# Continue backtrace even if a frame filter throws an exception (Phil Muldoon).
|
||||
#=push
|
||||
Patch075: gdb-btrobust.patch
|
||||
Patch099: gdb-btrobust.patch
|
||||
|
||||
# Display Fortran strings in backtraces.
|
||||
#=fedoratest
|
||||
Patch076: gdb-fortran-frame-string.patch
|
||||
Patch100: gdb-fortran-frame-string.patch
|
||||
|
||||
# Fix Python GIL with gdb.execute("continue") (Phil Muldoon, BZ 1116957).
|
||||
#=push
|
||||
Patch101: gdb-python-gil.patch
|
||||
|
||||
# Testcase for '[SAP] Recursive dlopen causes SAP HANA installer to
|
||||
# crash.' (RH BZ 1156192).
|
||||
#=fedoratest
|
||||
Patch077: gdb-rhbz1156192-recursive-dlopen-test.patch
|
||||
Patch102: gdb-rhbz1156192-recursive-dlopen-test.patch
|
||||
|
||||
# Fix jit-reader.h for multi-lib.
|
||||
#=push+jan
|
||||
Patch078: gdb-jit-reader-multilib.patch
|
||||
Patch103: gdb-jit-reader-multilib.patch
|
||||
|
||||
# Fix '`catch syscall' doesn't work for parent after `fork' is called'
|
||||
# (Philippe Waroquiers, RH BZ 1149205).
|
||||
#=fedoratest
|
||||
Patch079: gdb-rhbz1149205-catch-syscall-after-fork-test.patch
|
||||
Patch104: 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
|
||||
Patch080: gdb-rhbz1186476-internal-error-unqualified-name-re-set-test.patch
|
||||
Patch105: gdb-rhbz1186476-internal-error-unqualified-name-re-set-test.patch
|
||||
|
||||
# Test 'info type-printers' Python error (RH BZ 1350436).
|
||||
#=fedoratest
|
||||
Patch081: gdb-rhbz1350436-type-printers-error.patch
|
||||
Patch106: gdb-rhbz1350436-type-printers-error.patch
|
||||
|
||||
# Fix '[ppc64] and [s390x] wrong prologue skip on -O2 -g code' (Jan
|
||||
# Kratochvil, RH BZ 1084404).
|
||||
#=fedoratest
|
||||
Patch082: gdb-rhbz1084404-ppc64-s390x-wrong-prologue-skip-O2-g-3of3.patch
|
||||
Patch107: 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
|
||||
Patch083: gdb-bz1219747-attach-kills.patch
|
||||
Patch108: gdb-bz1219747-attach-kills.patch
|
||||
|
||||
# Force libncursesw over libncurses to match the includes (RH BZ 1270534).
|
||||
#=push+jan
|
||||
Patch084: gdb-fedora-libncursesw.patch
|
||||
Patch109: gdb-fedora-libncursesw.patch
|
||||
|
||||
# Test clflushopt instruction decode (for RH BZ 1262471).
|
||||
#=fedoratest
|
||||
Patch085: gdb-opcodes-clflushopt-test.patch
|
||||
Patch110: gdb-opcodes-clflushopt-test.patch
|
||||
|
||||
# [rhel6] DTS backward Python compatibility API (BZ 1020004, Phil Muldoon).
|
||||
#=fedora
|
||||
Patch086: gdb-dts-rhel6-python-compat.patch
|
||||
Patch111: gdb-dts-rhel6-python-compat.patch
|
||||
|
||||
# [SCL] Skip deprecated .gdb_index warning for Red Hat built files (BZ 953585).
|
||||
#=push+jan
|
||||
Patch087: gdb-6.6-buildid-locate-rpm-scl.patch
|
||||
Patch112: gdb-6.6-buildid-locate-rpm-scl.patch
|
||||
|
||||
# Work around readline-6.2 incompatibility not asking for --more-- (BZ 701131).
|
||||
#=fedora
|
||||
Patch113: gdb-readline62-ask-more-rh.patch
|
||||
|
||||
# [RHEL5,RHEL6] Fix attaching to stopped processes.
|
||||
# [RHEL5] Workaround kernel for detaching SIGSTOPped processes (BZ 809382).
|
||||
#=fedora
|
||||
Patch114: gdb-6.8-attach-signalled-detach-stopped.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 .
|
||||
Patch088: gdb-6.8-quit-never-aborts.patch
|
||||
Patch115: gdb-6.8-quit-never-aborts.patch
|
||||
|
||||
# [aarch64] Fix hardware watchpoints (RH BZ 1261564).
|
||||
#=fedoratest
|
||||
Patch089: gdb-rhbz1261564-aarch64-hw-watchpoint-test.patch
|
||||
Patch116: gdb-rhbz1261564-aarch64-hw-watchpoint-test.patch
|
||||
|
||||
# Add messages suggesting more recent RHEL gdbserver (RH BZ 1321114).
|
||||
#=fedora
|
||||
Patch090: gdb-container-rh-pkg.patch
|
||||
Patch117: gdb-container-rh-pkg.patch
|
||||
|
||||
# New test for Python "Cannot locate object file for block" (for RH BZ 1325795).
|
||||
#=fedoratest
|
||||
Patch091: gdb-rhbz1325795-framefilters-test.patch
|
||||
Patch118: gdb-rhbz1325795-framefilters-test.patch
|
||||
|
||||
# [dts+el7] [x86*] Bundle linux_perf.h for libipt (RH BZ 1256513).
|
||||
#=fedora
|
||||
Patch092: gdb-linux_perf-bundle.patch
|
||||
Patch119: gdb-linux_perf-bundle.patch
|
||||
|
||||
# Fix gdb-headless /usr/bin/ executables (BZ 1390251).
|
||||
#
|
||||
# Also, make /usr/bin/gdb.minimal be the default GDB used, if it's
|
||||
# present. For rationale, see:
|
||||
#
|
||||
# https://fedoraproject.org/wiki/Changes/Minimal_GDB_in_buildroot
|
||||
#=fedora
|
||||
Patch093: gdb-libexec-add-index.patch
|
||||
Patch120: gdb-libexec-add-index.patch
|
||||
|
||||
# New testcase for: Fix <tab>-completion crash (Gary Benson, RH BZ 1398387).
|
||||
#=fedoratest
|
||||
Patch094: gdb-rhbz1398387-tab-crash-test.patch
|
||||
Patch121: gdb-rhbz1398387-tab-crash-test.patch
|
||||
|
||||
# [testsuite] Fix false selftest.exp FAIL from system readline-6.3+ (Patrick Palka).
|
||||
#=fedoratest
|
||||
Patch122: gdb-testsuite-readline63-sigint.patch
|
||||
|
||||
# Python patches of: http://sourceware.org/gdb/wiki/ProjectArcher
|
||||
#=push
|
||||
Patch095: gdb-archer.patch
|
||||
Patch123: gdb-archer.patch
|
||||
|
||||
# Revert upstream commit 469412dd9ccc4de5874fd3299b105833f36b34cd
|
||||
Patch096: gdb-vla-intel-fix-print-char-array.patch
|
||||
Patch124: gdb-vla-intel-fix-print-char-array.patch
|
||||
|
||||
# Fix -D_GLIBCXX_DEBUG gdb-add-index regression (RH BZ 1540559).
|
||||
Patch125: gdb-rhbz1540559-gdbaddindex-glibcdebug-regression.patch
|
||||
|
||||
# Fix ppc64 stwux encoding as found by gcc-8.0 -Werror=tautological-compare.
|
||||
Patch126: gdb-ppc64-stwux-tautological-compare.patch
|
||||
|
||||
# [s390x] Backport arch12 instructions decoding (RH BZ 1553104).
|
||||
# =fedoratest
|
||||
Patch097: gdb-rhbz1553104-s390x-arch12-test.patch
|
||||
Patch127: gdb-rhbz1553104-s390x-arch12-test.patch
|
||||
|
||||
|
@ -8,6 +8,7 @@
|
||||
%patch008 -p1
|
||||
%patch009 -p1
|
||||
%patch010 -p1
|
||||
%patch011 -p1
|
||||
%patch012 -p1
|
||||
%patch013 -p1
|
||||
%patch014 -p1
|
||||
@ -23,6 +24,7 @@
|
||||
%patch024 -p1
|
||||
%patch025 -p1
|
||||
%patch026 -p1
|
||||
%patch027 -p1
|
||||
%patch028 -p1
|
||||
%patch029 -p1
|
||||
%patch030 -p1
|
||||
@ -32,6 +34,7 @@
|
||||
%patch034 -p1
|
||||
%patch035 -p1
|
||||
%patch036 -p1
|
||||
%patch037 -p1
|
||||
%patch038 -p1
|
||||
%patch039 -p1
|
||||
%patch040 -p1
|
||||
@ -92,3 +95,33 @@
|
||||
%patch095 -p1
|
||||
%patch096 -p1
|
||||
%patch097 -p1
|
||||
%patch098 -p1
|
||||
%patch099 -p1
|
||||
%patch100 -p1
|
||||
%patch101 -p1
|
||||
%patch102 -p1
|
||||
%patch103 -p1
|
||||
%patch104 -p1
|
||||
%patch105 -p1
|
||||
%patch106 -p1
|
||||
%patch107 -p1
|
||||
%patch108 -p1
|
||||
%patch109 -p1
|
||||
%patch110 -p1
|
||||
%patch111 -p1
|
||||
%patch112 -p1
|
||||
%patch113 -p1
|
||||
%patch114 -p1
|
||||
%patch115 -p1
|
||||
%patch116 -p1
|
||||
%patch117 -p1
|
||||
%patch118 -p1
|
||||
%patch119 -p1
|
||||
%patch120 -p1
|
||||
%patch121 -p1
|
||||
%patch122 -p1
|
||||
%patch123 -p1
|
||||
%patch124 -p1
|
||||
%patch125 -p1
|
||||
%patch126 -p1
|
||||
%patch127 -p1
|
||||
|
@ -1 +1 @@
|
||||
606e3fd147ed9a00df165e46f30fe5c46dcda345
|
||||
b755db3c98137baaff8a154d936d326d9a9c72a7
|
||||
|
30
_patch_order
30
_patch_order
@ -2,6 +2,8 @@ gdb-6.3-rh-testversion-20041202.patch
|
||||
gdb-vla-intel-fortran-strides.patch
|
||||
gdb-vla-intel-fortran-vla-strings.patch
|
||||
gdb-vla-intel-stringbt-fix.patch
|
||||
gdb-6.3-ppc64syscall-20040622.patch
|
||||
gdb-6.3-ppc64displaysymbol-20041124.patch
|
||||
gdb-6.3-gstack-20050411.patch
|
||||
gdb-6.3-test-pie-20050107.patch
|
||||
gdb-6.3-test-self-20050110.patch
|
||||
@ -10,11 +12,14 @@ gdb-6.3-test-movedir-20050125.patch
|
||||
gdb-6.3-threaded-watchpoints2-20050225.patch
|
||||
gdb-6.3-inferior-notification-20050721.patch
|
||||
gdb-6.3-inheritancetest-20050726.patch
|
||||
gdb-6.3-readnever-20050907.patch
|
||||
gdb-6.5-bz203661-emit-relocs.patch
|
||||
gdb-6.5-bz185337-resolve-tls-without-debuginfo-v2.patch
|
||||
gdb-6.5-sharedlibrary-path.patch
|
||||
gdb-6.5-BEA-testsuite.patch
|
||||
gdb-6.5-last-address-space-byte-test.patch
|
||||
gdb-6.5-readline-long-line-crash-test.patch
|
||||
gdb-6.5-bz216711-clone-is-outermost.patch
|
||||
gdb-6.5-bz218379-ppc-solib-trampoline-test.patch
|
||||
gdb-6.5-bz218379-solib-trampoline-lookup-lock-fix.patch
|
||||
gdb-6.5-bz109921-DW_AT_decl_file-test.patch
|
||||
@ -22,8 +27,10 @@ gdb-6.3-bz140532-ppc-unwinding-test.patch
|
||||
gdb-6.3-bz202689-exec-from-pthread-test.patch
|
||||
gdb-6.6-bz230000-power6-disassembly-test.patch
|
||||
gdb-6.6-bz229517-gcore-without-terminal.patch
|
||||
gdb-6.6-bz235197-fork-detach-info.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
|
||||
@ -38,34 +45,51 @@ gdb-6.5-gcore-buffer-limit-test.patch
|
||||
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.8-sparc64-silence-memcpy-check.patch
|
||||
gdb-6.5-section-num-fixup-test.patch
|
||||
gdb-6.8-bz436037-reg-no-longer-active.patch
|
||||
gdb-6.8-watchpoint-conditionals-test.patch
|
||||
gdb-6.8-bz466901-backtrace-full-prelinked.patch
|
||||
gdb-simultaneous-step-resume-breakpoint-test.patch
|
||||
gdb-core-open-vdso-warning.patch
|
||||
gdb-x86_64-i386-syscall-restart.patch
|
||||
gdb-bz533176-fortran-omp-step.patch
|
||||
gdb-follow-child-stale-parent.patch
|
||||
gdb-ccache-workaround.patch
|
||||
gdb-archer-pie-addons.patch
|
||||
gdb-archer-pie-addons-keep-disabled.patch
|
||||
gdb-lineno-makeup-test.patch
|
||||
gdb-ppc-power7-test.patch
|
||||
gdb-bz541866-rwatch-before-run.patch
|
||||
gdb-moribund-utrace-workaround.patch
|
||||
gdb-archer-next-over-throw-cxx-exec.patch
|
||||
gdb-bz601887-dwarf4-rh-test.patch
|
||||
gdb-6.6-buildid-locate-core-as-arg.patch
|
||||
gdb-6.6-buildid-locate-rpm-librpm-workaround.patch
|
||||
gdb-test-bt-cfi-without-die.patch
|
||||
gdb-gdb-add-index-script.patch
|
||||
gdb-bz568248-oom-is-error.patch
|
||||
gdb-bz634108-solib_address.patch
|
||||
gdb-test-pid0-core.patch
|
||||
gdb-test-dw2-aranges.patch
|
||||
gdb-test-expr-cumulative-archer.patch
|
||||
gdb-physname-pr11734-test.patch
|
||||
gdb-physname-pr12273-test.patch
|
||||
gdb-7.2.50-sparc-add-workaround-to-broken-debug-files.patch
|
||||
gdb-test-ivy-bridge.patch
|
||||
gdb-runtest-pie-override.patch
|
||||
gdb-attach-fail-reasons-5of5.patch
|
||||
gdb-stale-frame_info.patch
|
||||
gdb-glibc-strstr-workaround.patch
|
||||
gdb-rhel5.9-testcase-xlf-var-inside-mod.patch
|
||||
gdb-rhbz-818343-set-solib-absolute-prefix-testcase.patch
|
||||
gdb-rhbz795424-bitpos-20of25.patch
|
||||
gdb-rhbz795424-bitpos-21of25.patch
|
||||
gdb-rhbz795424-bitpos-22of25.patch
|
||||
gdb-rhbz795424-bitpos-23of25.patch
|
||||
gdb-rhbz795424-bitpos-25of25.patch
|
||||
gdb-rhbz795424-bitpos-25of25-test.patch
|
||||
gdb-rhbz795424-bitpos-lazyvalue.patch
|
||||
gdb-rhbz947564-findvar-assertion-frame-failed-testcase.patch
|
||||
gdb-gnat-dwarf-crash-3of3.patch
|
||||
gdb-rhbz1007614-memleak-infpy_read_memory-test.patch
|
||||
@ -74,6 +98,7 @@ gdb-archer-vla-tests.patch
|
||||
gdb-vla-intel-tests.patch
|
||||
gdb-btrobust.patch
|
||||
gdb-fortran-frame-string.patch
|
||||
gdb-python-gil.patch
|
||||
gdb-rhbz1156192-recursive-dlopen-test.patch
|
||||
gdb-jit-reader-multilib.patch
|
||||
gdb-rhbz1149205-catch-syscall-after-fork-test.patch
|
||||
@ -85,6 +110,8 @@ gdb-fedora-libncursesw.patch
|
||||
gdb-opcodes-clflushopt-test.patch
|
||||
gdb-dts-rhel6-python-compat.patch
|
||||
gdb-6.6-buildid-locate-rpm-scl.patch
|
||||
gdb-readline62-ask-more-rh.patch
|
||||
gdb-6.8-attach-signalled-detach-stopped.patch
|
||||
gdb-6.8-quit-never-aborts.patch
|
||||
gdb-rhbz1261564-aarch64-hw-watchpoint-test.patch
|
||||
gdb-container-rh-pkg.patch
|
||||
@ -92,6 +119,9 @@ gdb-rhbz1325795-framefilters-test.patch
|
||||
gdb-linux_perf-bundle.patch
|
||||
gdb-libexec-add-index.patch
|
||||
gdb-rhbz1398387-tab-crash-test.patch
|
||||
gdb-testsuite-readline63-sigint.patch
|
||||
gdb-archer.patch
|
||||
gdb-vla-intel-fix-print-char-array.patch
|
||||
gdb-rhbz1540559-gdbaddindex-glibcdebug-regression.patch
|
||||
gdb-ppc64-stwux-tautological-compare.patch
|
||||
gdb-rhbz1553104-s390x-arch12-test.patch
|
||||
|
@ -3,11 +3,20 @@ From: Fedora GDB patches <invalid@email.com>
|
||||
Date: Fri, 27 Oct 2017 21:07:50 +0200
|
||||
Subject: gdb-6.3-attach-see-vdso-test.patch
|
||||
|
||||
FileName: gdb-6.3-attach-see-vdso-test.patch
|
||||
|
||||
;; Test kernel VDSO decoding while attaching to an i386 process.
|
||||
;;=fedoratest
|
||||
---
|
||||
gdb/testsuite/gdb.base/attach-see-vdso.c | 25 +++++++++++
|
||||
gdb/testsuite/gdb.base/attach-see-vdso.exp | 72 ++++++++++++++++++++++++++++++
|
||||
2 files changed, 97 insertions(+)
|
||||
create mode 100644 gdb/testsuite/gdb.base/attach-see-vdso.c
|
||||
create mode 100644 gdb/testsuite/gdb.base/attach-see-vdso.exp
|
||||
|
||||
diff --git a/gdb/testsuite/gdb.base/attach-see-vdso.c b/gdb/testsuite/gdb.base/attach-see-vdso.c
|
||||
new file mode 100644
|
||||
index 0000000000..cf3c7207a5
|
||||
--- /dev/null
|
||||
+++ b/gdb/testsuite/gdb.base/attach-see-vdso.c
|
||||
@@ -0,0 +1,25 @@
|
||||
@ -38,6 +47,7 @@ new file mode 100644
|
||||
+}
|
||||
diff --git a/gdb/testsuite/gdb.base/attach-see-vdso.exp b/gdb/testsuite/gdb.base/attach-see-vdso.exp
|
||||
new file mode 100644
|
||||
index 0000000000..e8a538097e
|
||||
--- /dev/null
|
||||
+++ b/gdb/testsuite/gdb.base/attach-see-vdso.exp
|
||||
@@ -0,0 +1,72 @@
|
||||
@ -113,3 +123,6 @@ new file mode 100644
|
||||
+# work.
|
||||
+
|
||||
+remote_exec build "kill -9 ${testpid}"
|
||||
--
|
||||
2.14.3
|
||||
|
||||
|
@ -3,11 +3,25 @@ From: Fedora GDB patches <invalid@email.com>
|
||||
Date: Fri, 27 Oct 2017 21:07:50 +0200
|
||||
Subject: gdb-6.3-bz140532-ppc-unwinding-test.patch
|
||||
|
||||
FileName: gdb-6.3-bz140532-ppc-unwinding-test.patch
|
||||
|
||||
;; Update PPC unwinding patches to their upstream variants (BZ 140532).
|
||||
;;=fedoratest
|
||||
---
|
||||
.../gdb.arch/powerpc-bcl-prologue-asm32.S | 78 +++++++++++++++++
|
||||
.../gdb.arch/powerpc-bcl-prologue-asm64.S | 98 ++++++++++++++++++++++
|
||||
gdb/testsuite/gdb.arch/powerpc-bcl-prologue.c | 29 +++++++
|
||||
gdb/testsuite/gdb.arch/powerpc-bcl-prologue.exp | 72 ++++++++++++++++
|
||||
gdb/testsuite/gdb.arch/powerpc-prologue.exp | 5 +-
|
||||
5 files changed, 280 insertions(+), 2 deletions(-)
|
||||
create mode 100644 gdb/testsuite/gdb.arch/powerpc-bcl-prologue-asm32.S
|
||||
create mode 100644 gdb/testsuite/gdb.arch/powerpc-bcl-prologue-asm64.S
|
||||
create mode 100644 gdb/testsuite/gdb.arch/powerpc-bcl-prologue.c
|
||||
create mode 100644 gdb/testsuite/gdb.arch/powerpc-bcl-prologue.exp
|
||||
|
||||
diff --git a/gdb/testsuite/gdb.arch/powerpc-bcl-prologue-asm32.S b/gdb/testsuite/gdb.arch/powerpc-bcl-prologue-asm32.S
|
||||
new file mode 100644
|
||||
index 0000000000..1e4301af89
|
||||
--- /dev/null
|
||||
+++ b/gdb/testsuite/gdb.arch/powerpc-bcl-prologue-asm32.S
|
||||
@@ -0,0 +1,78 @@
|
||||
@ -91,6 +105,7 @@ new file mode 100644
|
||||
+*/
|
||||
diff --git a/gdb/testsuite/gdb.arch/powerpc-bcl-prologue-asm64.S b/gdb/testsuite/gdb.arch/powerpc-bcl-prologue-asm64.S
|
||||
new file mode 100644
|
||||
index 0000000000..1af5c19a16
|
||||
--- /dev/null
|
||||
+++ b/gdb/testsuite/gdb.arch/powerpc-bcl-prologue-asm64.S
|
||||
@@ -0,0 +1,98 @@
|
||||
@ -194,6 +209,7 @@ new file mode 100644
|
||||
+*/
|
||||
diff --git a/gdb/testsuite/gdb.arch/powerpc-bcl-prologue.c b/gdb/testsuite/gdb.arch/powerpc-bcl-prologue.c
|
||||
new file mode 100644
|
||||
index 0000000000..6b5bb08d0f
|
||||
--- /dev/null
|
||||
+++ b/gdb/testsuite/gdb.arch/powerpc-bcl-prologue.c
|
||||
@@ -0,0 +1,29 @@
|
||||
@ -228,6 +244,7 @@ new file mode 100644
|
||||
+}
|
||||
diff --git a/gdb/testsuite/gdb.arch/powerpc-bcl-prologue.exp b/gdb/testsuite/gdb.arch/powerpc-bcl-prologue.exp
|
||||
new file mode 100644
|
||||
index 0000000000..5f50c4ef43
|
||||
--- /dev/null
|
||||
+++ b/gdb/testsuite/gdb.arch/powerpc-bcl-prologue.exp
|
||||
@@ -0,0 +1,72 @@
|
||||
@ -304,6 +321,7 @@ new file mode 100644
|
||||
+ }
|
||||
+}
|
||||
diff --git a/gdb/testsuite/gdb.arch/powerpc-prologue.exp b/gdb/testsuite/gdb.arch/powerpc-prologue.exp
|
||||
index 5251dfa9c3..f3933e2295 100644
|
||||
--- a/gdb/testsuite/gdb.arch/powerpc-prologue.exp
|
||||
+++ b/gdb/testsuite/gdb.arch/powerpc-prologue.exp
|
||||
@@ -16,8 +16,9 @@
|
||||
@ -318,3 +336,6 @@ diff --git a/gdb/testsuite/gdb.arch/powerpc-prologue.exp b/gdb/testsuite/gdb.arc
|
||||
verbose "Skipping PowerPC prologue tests."
|
||||
return
|
||||
}
|
||||
--
|
||||
2.14.3
|
||||
|
||||
|
@ -3,15 +3,24 @@ From: Jan Kratochvil <jan.kratochvil@redhat.com>
|
||||
Date: Fri, 27 Oct 2017 21:07:50 +0200
|
||||
Subject: gdb-6.3-bz202689-exec-from-pthread-test.patch
|
||||
|
||||
FileName: gdb-6.3-bz202689-exec-from-pthread-test.patch
|
||||
|
||||
;; Testcase for exec() from threaded program (BZ 202689).
|
||||
;;=fedoratest
|
||||
|
||||
2007-01-17 Jan Kratochvil <jan.kratochvil@redhat.com>
|
||||
|
||||
* gdb.threads/threaded-exec.exp, gdb.threads/threaded-exec.c: New files.
|
||||
---
|
||||
gdb/testsuite/gdb.threads/threaded-exec.c | 46 +++++++++++++++++++++++++++++
|
||||
gdb/testsuite/gdb.threads/threaded-exec.exp | 41 +++++++++++++++++++++++++
|
||||
2 files changed, 87 insertions(+)
|
||||
create mode 100644 gdb/testsuite/gdb.threads/threaded-exec.c
|
||||
create mode 100644 gdb/testsuite/gdb.threads/threaded-exec.exp
|
||||
|
||||
diff --git a/gdb/testsuite/gdb.threads/threaded-exec.c b/gdb/testsuite/gdb.threads/threaded-exec.c
|
||||
new file mode 100644
|
||||
index 0000000000..522b24671d
|
||||
--- /dev/null
|
||||
+++ b/gdb/testsuite/gdb.threads/threaded-exec.c
|
||||
@@ -0,0 +1,46 @@
|
||||
@ -63,6 +72,7 @@ new file mode 100644
|
||||
+}
|
||||
diff --git a/gdb/testsuite/gdb.threads/threaded-exec.exp b/gdb/testsuite/gdb.threads/threaded-exec.exp
|
||||
new file mode 100644
|
||||
index 0000000000..77c8a7dc85
|
||||
--- /dev/null
|
||||
+++ b/gdb/testsuite/gdb.threads/threaded-exec.exp
|
||||
@@ -0,0 +1,41 @@
|
||||
@ -107,3 +117,6 @@ new file mode 100644
|
||||
+ pass "Program exited"
|
||||
+ }
|
||||
+}
|
||||
--
|
||||
2.14.3
|
||||
|
||||
|
@ -3,11 +3,18 @@ From: Fedora GDB patches <invalid@email.com>
|
||||
Date: Fri, 27 Oct 2017 21:07:50 +0200
|
||||
Subject: gdb-6.3-focus-cmd-prev-test.patch
|
||||
|
||||
FileName: gdb-6.3-focus-cmd-prev-test.patch
|
||||
|
||||
;; Test a crash on `focus cmd', `focus prev' commands.
|
||||
;;=fedoratest
|
||||
---
|
||||
gdb/testsuite/gdb.base/focus-cmd-prev.exp | 40 +++++++++++++++++++++++++++++++
|
||||
1 file changed, 40 insertions(+)
|
||||
create mode 100644 gdb/testsuite/gdb.base/focus-cmd-prev.exp
|
||||
|
||||
diff --git a/gdb/testsuite/gdb.base/focus-cmd-prev.exp b/gdb/testsuite/gdb.base/focus-cmd-prev.exp
|
||||
new file mode 100644
|
||||
index 0000000000..d5a653f684
|
||||
--- /dev/null
|
||||
+++ b/gdb/testsuite/gdb.base/focus-cmd-prev.exp
|
||||
@@ -0,0 +1,40 @@
|
||||
@ -51,3 +58,6 @@ new file mode 100644
|
||||
+ pass $test
|
||||
+ }
|
||||
+}
|
||||
--
|
||||
2.14.3
|
||||
|
||||
|
@ -3,6 +3,8 @@ From: Andrew Cagney <cagney@gnu.org>
|
||||
Date: Fri, 27 Oct 2017 21:07:50 +0200
|
||||
Subject: gdb-6.3-gstack-20050411.patch
|
||||
|
||||
FileName: gdb-6.3-gstack-20050411.patch
|
||||
|
||||
;; Add a wrapper script to GDB that implements pstack using the
|
||||
;; --readnever option.
|
||||
;;=push
|
||||
@ -12,11 +14,21 @@ Subject: gdb-6.3-gstack-20050411.patch
|
||||
* Makefile.in (uninstall-gstack, install-gstack): New rules, add
|
||||
to install and uninstall.
|
||||
* gstack.sh, gstack.1: New files.
|
||||
---
|
||||
gdb/Makefile.in | 34 ++++++++++++++++++--
|
||||
gdb/gstack.sh | 43 +++++++++++++++++++++++++
|
||||
gdb/testsuite/gdb.base/gstack.c | 43 +++++++++++++++++++++++++
|
||||
gdb/testsuite/gdb.base/gstack.exp | 66 +++++++++++++++++++++++++++++++++++++++
|
||||
4 files changed, 184 insertions(+), 2 deletions(-)
|
||||
create mode 100644 gdb/gstack.sh
|
||||
create mode 100644 gdb/testsuite/gdb.base/gstack.c
|
||||
create mode 100644 gdb/testsuite/gdb.base/gstack.exp
|
||||
|
||||
diff --git a/gdb/Makefile.in b/gdb/Makefile.in
|
||||
index 17b71c6e7c..e77d6a5c03 100644
|
||||
--- a/gdb/Makefile.in
|
||||
+++ b/gdb/Makefile.in
|
||||
@@ -1726,7 +1726,7 @@ info install-info clean-info dvi pdf install-pdf html install-html: force
|
||||
@@ -1744,7 +1744,7 @@ info install-info clean-info dvi pdf install-pdf html install-html: force
|
||||
install: all
|
||||
@$(MAKE) $(FLAGS_TO_PASS) install-only
|
||||
|
||||
@ -25,7 +37,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 \
|
||||
@@ -1775,7 +1775,25 @@ install-guile:
|
||||
@@ -1784,7 +1784,25 @@ install-guile:
|
||||
install-python:
|
||||
$(SHELL) $(srcdir)/../mkinstalldirs $(DESTDIR)$(GDB_DATADIR)/python/gdb
|
||||
|
||||
@ -52,7 +64,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 \
|
||||
@@ -1798,6 +1816,18 @@ uninstall: force $(CONFIG_UNINSTALL)
|
||||
@@ -1807,6 +1825,18 @@ uninstall: force $(CONFIG_UNINSTALL)
|
||||
fi
|
||||
@$(MAKE) DO=uninstall "DODIRS=$(SUBDIRS)" $(FLAGS_TO_PASS) subdir_do
|
||||
|
||||
@ -73,6 +85,7 @@ diff --git a/gdb/Makefile.in b/gdb/Makefile.in
|
||||
$(COMPILE) -DTEST_CPNAMES cp-name-parser.c
|
||||
diff --git a/gdb/gstack.sh b/gdb/gstack.sh
|
||||
new file mode 100644
|
||||
index 0000000000..f7f07248f7
|
||||
--- /dev/null
|
||||
+++ b/gdb/gstack.sh
|
||||
@@ -0,0 +1,43 @@
|
||||
@ -121,6 +134,7 @@ new file mode 100644
|
||||
+ -e '/^Thread/p'
|
||||
diff --git a/gdb/testsuite/gdb.base/gstack.c b/gdb/testsuite/gdb.base/gstack.c
|
||||
new file mode 100644
|
||||
index 0000000000..dc10813f04
|
||||
--- /dev/null
|
||||
+++ b/gdb/testsuite/gdb.base/gstack.c
|
||||
@@ -0,0 +1,43 @@
|
||||
@ -169,9 +183,10 @@ new file mode 100644
|
||||
+}
|
||||
diff --git a/gdb/testsuite/gdb.base/gstack.exp b/gdb/testsuite/gdb.base/gstack.exp
|
||||
new file mode 100644
|
||||
index 0000000000..1186ec57bc
|
||||
--- /dev/null
|
||||
+++ b/gdb/testsuite/gdb.base/gstack.exp
|
||||
@@ -0,0 +1,84 @@
|
||||
@@ -0,0 +1,66 @@
|
||||
+# Copyright (C) 2012 Free Software Foundation, Inc.
|
||||
+
|
||||
+# This program is free software; you can redistribute it and/or modify
|
||||
@ -202,10 +217,6 @@ new file mode 100644
|
||||
+ fail $test
|
||||
+ return
|
||||
+}
|
||||
+
|
||||
+# The spawn id of the test inferior.
|
||||
+set test_spawn_id $res
|
||||
+
|
||||
+set use_gdb_stub 1
|
||||
+set pid [exp_pid -i $res]
|
||||
+gdb_expect {
|
||||
@ -221,6 +232,7 @@ new file mode 100644
|
||||
+ return
|
||||
+ }
|
||||
+}
|
||||
+gdb_exit
|
||||
+
|
||||
+# Testcase uses the most simple notification not to get caught by attach on
|
||||
+# exiting the function. Still we could retry the gstack command if we fail.
|
||||
@ -232,27 +244,15 @@ new file mode 100644
|
||||
+ perror "Spawning $command failed."
|
||||
+ fail $test
|
||||
+}
|
||||
+
|
||||
+set gdb_spawn_id $res
|
||||
+
|
||||
+set pid [exp_pid -i $res]
|
||||
+gdb_test_multiple "" $test {
|
||||
+ -re "^#0 +(0x\[0-9a-f\]+ in )?\\.?func \\(\\) at \[^\r\n\]*\r\n#1 +0x\[0-9a-f\]+ in \\.?main \\(\\) at \[^\r\n\]*\r\nGSTACK-END\r\n\$" {
|
||||
+ pass $test
|
||||
+ }
|
||||
+}
|
||||
+gdb_exit
|
||||
+
|
||||
+gdb_test_multiple "" "gstack exits" {
|
||||
+ eof {
|
||||
+ set result [wait -i $gdb_spawn_id]
|
||||
+ verbose $result
|
||||
+
|
||||
+ gdb_assert { [lindex $result 2] == 0 } "gstack exits with no error"
|
||||
+ gdb_assert { [lindex $result 3] == 0 } "gstack's exit status is 0"
|
||||
+
|
||||
+ remote_close host
|
||||
+ clear_gdb_spawn_id
|
||||
+ }
|
||||
+}
|
||||
+
|
||||
+# Kill the test inferior.
|
||||
+kill_wait_spawned_process $test_spawn_id
|
||||
+remote_exec host "kill -9 $pid"
|
||||
--
|
||||
2.14.3
|
||||
|
||||
|
@ -3,6 +3,8 @@ From: Jeff Johnston <jjohnstn@redhat.com>
|
||||
Date: Fri, 27 Oct 2017 21:07:50 +0200
|
||||
Subject: gdb-6.3-inferior-notification-20050721.patch
|
||||
|
||||
FileName: gdb-6.3-inferior-notification-20050721.patch
|
||||
|
||||
;; Notify observers that the inferior has been created
|
||||
;;=fedoratest
|
||||
|
||||
@ -16,9 +18,18 @@ Subject: gdb-6.3-inferior-notification-20050721.patch
|
||||
2007-12-26 Jan Kratochvil <jan.kratochvil@redhat.com>
|
||||
|
||||
* gdb.base/attach-32.exp: Fix forgotten $GDBFLAGS as set.
|
||||
---
|
||||
gdb/testsuite/gdb.base/attach-32.c | 20 +++
|
||||
gdb/testsuite/gdb.base/attach-32.exp | 245 +++++++++++++++++++++++++++++++++++
|
||||
gdb/testsuite/gdb.base/attach-32b.c | 24 ++++
|
||||
3 files changed, 289 insertions(+)
|
||||
create mode 100644 gdb/testsuite/gdb.base/attach-32.c
|
||||
create mode 100644 gdb/testsuite/gdb.base/attach-32.exp
|
||||
create mode 100644 gdb/testsuite/gdb.base/attach-32b.c
|
||||
|
||||
diff --git a/gdb/testsuite/gdb.base/attach-32.c b/gdb/testsuite/gdb.base/attach-32.c
|
||||
new file mode 100644
|
||||
index 0000000000..0041b4732d
|
||||
--- /dev/null
|
||||
+++ b/gdb/testsuite/gdb.base/attach-32.c
|
||||
@@ -0,0 +1,20 @@
|
||||
@ -44,6 +55,7 @@ new file mode 100644
|
||||
+}
|
||||
diff --git a/gdb/testsuite/gdb.base/attach-32.exp b/gdb/testsuite/gdb.base/attach-32.exp
|
||||
new file mode 100644
|
||||
index 0000000000..67ded02ccf
|
||||
--- /dev/null
|
||||
+++ b/gdb/testsuite/gdb.base/attach-32.exp
|
||||
@@ -0,0 +1,245 @@
|
||||
@ -262,7 +274,7 @@ new file mode 100644
|
||||
+}
|
||||
+
|
||||
+set GDBFLAGS_orig $GDBFLAGS
|
||||
+set GDBFLAGS "-iex \"set height 0\" --pid=$testpid"
|
||||
+set GDBFLAGS "--pid=$testpid"
|
||||
+gdb_start
|
||||
+set GDBFLAGS $GDBFLAGS_orig
|
||||
+
|
||||
@ -284,7 +296,7 @@ new file mode 100644
|
||||
+}
|
||||
+
|
||||
+set GDBFLAGS_orig $GDBFLAGS
|
||||
+set GDBFLAGS "-iex \"set height 0\" --pid=$testpid"
|
||||
+set GDBFLAGS "--pid=$testpid"
|
||||
+gdb_start
|
||||
+set GDBFLAGS $GDBFLAGS_orig
|
||||
+
|
||||
@ -294,6 +306,7 @@ new file mode 100644
|
||||
+return 0
|
||||
diff --git a/gdb/testsuite/gdb.base/attach-32b.c b/gdb/testsuite/gdb.base/attach-32b.c
|
||||
new file mode 100644
|
||||
index 0000000000..a78037ed38
|
||||
--- /dev/null
|
||||
+++ b/gdb/testsuite/gdb.base/attach-32b.c
|
||||
@@ -0,0 +1,24 @@
|
||||
@ -321,3 +334,6 @@ new file mode 100644
|
||||
+ }
|
||||
+ return (0);
|
||||
+}
|
||||
--
|
||||
2.14.3
|
||||
|
||||
|
@ -3,6 +3,8 @@ From: Jeff Johnston <jjohnstn@redhat.com>
|
||||
Date: Fri, 27 Oct 2017 21:07:50 +0200
|
||||
Subject: gdb-6.3-inheritancetest-20050726.patch
|
||||
|
||||
FileName: gdb-6.3-inheritancetest-20050726.patch
|
||||
|
||||
;; Verify printing of inherited members test
|
||||
;;=fedoratest
|
||||
|
||||
@ -12,9 +14,20 @@ Subject: gdb-6.3-inheritancetest-20050726.patch
|
||||
* gdb.cp/b146835.cc: Ditto.
|
||||
* gdb.cp/b146835b.cc: Ditto.
|
||||
* gdb.cp/b146835.h: Ditto.
|
||||
---
|
||||
gdb/testsuite/gdb.cp/b146835.cc | 32 +++++++++++++++++++++++++++
|
||||
gdb/testsuite/gdb.cp/b146835.exp | 47 ++++++++++++++++++++++++++++++++++++++++
|
||||
gdb/testsuite/gdb.cp/b146835.h | 36 ++++++++++++++++++++++++++++++
|
||||
gdb/testsuite/gdb.cp/b146835b.cc | 11 ++++++++++
|
||||
4 files changed, 126 insertions(+)
|
||||
create mode 100644 gdb/testsuite/gdb.cp/b146835.cc
|
||||
create mode 100644 gdb/testsuite/gdb.cp/b146835.exp
|
||||
create mode 100644 gdb/testsuite/gdb.cp/b146835.h
|
||||
create mode 100644 gdb/testsuite/gdb.cp/b146835b.cc
|
||||
|
||||
diff --git a/gdb/testsuite/gdb.cp/b146835.cc b/gdb/testsuite/gdb.cp/b146835.cc
|
||||
new file mode 100644
|
||||
index 0000000000..4161d523f5
|
||||
--- /dev/null
|
||||
+++ b/gdb/testsuite/gdb.cp/b146835.cc
|
||||
@@ -0,0 +1,32 @@
|
||||
@ -52,6 +65,7 @@ new file mode 100644
|
||||
+
|
||||
diff --git a/gdb/testsuite/gdb.cp/b146835.exp b/gdb/testsuite/gdb.cp/b146835.exp
|
||||
new file mode 100644
|
||||
index 0000000000..d03815bcff
|
||||
--- /dev/null
|
||||
+++ b/gdb/testsuite/gdb.cp/b146835.exp
|
||||
@@ -0,0 +1,47 @@
|
||||
@ -104,6 +118,7 @@ new file mode 100644
|
||||
+gdb_test "p d" " = \\(D \\*\\) *0x0" "Verify inherited member d accessible"
|
||||
diff --git a/gdb/testsuite/gdb.cp/b146835.h b/gdb/testsuite/gdb.cp/b146835.h
|
||||
new file mode 100644
|
||||
index 0000000000..48df7a2935
|
||||
--- /dev/null
|
||||
+++ b/gdb/testsuite/gdb.cp/b146835.h
|
||||
@@ -0,0 +1,36 @@
|
||||
@ -145,6 +160,7 @@ new file mode 100644
|
||||
+};
|
||||
diff --git a/gdb/testsuite/gdb.cp/b146835b.cc b/gdb/testsuite/gdb.cp/b146835b.cc
|
||||
new file mode 100644
|
||||
index 0000000000..1853c1fa38
|
||||
--- /dev/null
|
||||
+++ b/gdb/testsuite/gdb.cp/b146835b.cc
|
||||
@@ -0,0 +1,11 @@
|
||||
@ -159,3 +175,6 @@ new file mode 100644
|
||||
+void A::funcD (class E *e, class D *d) {}
|
||||
+void A::funcE (E *e, D *d) {}
|
||||
+void A::funcF (unsigned long x, D *d) {}
|
||||
--
|
||||
2.14.3
|
||||
|
||||
|
@ -3,11 +3,20 @@ From: Fedora GDB patches <invalid@email.com>
|
||||
Date: Fri, 27 Oct 2017 21:07:50 +0200
|
||||
Subject: gdb-6.3-mapping-zero-inode-test.patch
|
||||
|
||||
FileName: gdb-6.3-mapping-zero-inode-test.patch
|
||||
|
||||
;; Test GCORE for shmid 0 shared memory mappings.
|
||||
;;=fedoratest: But it is broken anyway, sometimes the case being tested is not reproducible.
|
||||
---
|
||||
gdb/testsuite/gdb.base/gcore-shmid0.c | 128 ++++++++++++++++++++++++++++++++
|
||||
gdb/testsuite/gdb.base/gcore-shmid0.exp | 101 +++++++++++++++++++++++++
|
||||
2 files changed, 229 insertions(+)
|
||||
create mode 100644 gdb/testsuite/gdb.base/gcore-shmid0.c
|
||||
create mode 100644 gdb/testsuite/gdb.base/gcore-shmid0.exp
|
||||
|
||||
diff --git a/gdb/testsuite/gdb.base/gcore-shmid0.c b/gdb/testsuite/gdb.base/gcore-shmid0.c
|
||||
new file mode 100644
|
||||
index 0000000000..bb9709a75c
|
||||
--- /dev/null
|
||||
+++ b/gdb/testsuite/gdb.base/gcore-shmid0.c
|
||||
@@ -0,0 +1,128 @@
|
||||
@ -141,6 +150,7 @@ new file mode 100644
|
||||
+}
|
||||
diff --git a/gdb/testsuite/gdb.base/gcore-shmid0.exp b/gdb/testsuite/gdb.base/gcore-shmid0.exp
|
||||
new file mode 100644
|
||||
index 0000000000..b1fec682aa
|
||||
--- /dev/null
|
||||
+++ b/gdb/testsuite/gdb.base/gcore-shmid0.exp
|
||||
@@ -0,0 +1,101 @@
|
||||
@ -245,3 +255,6 @@ new file mode 100644
|
||||
+ fail $test
|
||||
+ }
|
||||
+}
|
||||
--
|
||||
2.14.3
|
||||
|
||||
|
41
gdb-6.3-ppc64displaysymbol-20041124.patch
Normal file
41
gdb-6.3-ppc64displaysymbol-20041124.patch
Normal file
@ -0,0 +1,41 @@
|
||||
From FEDORA_PATCHES Mon Sep 17 00:00:00 2001
|
||||
From: Andrew Cagney <cagney@gnu.org>
|
||||
Date: Fri, 27 Oct 2017 21:07:50 +0200
|
||||
Subject: gdb-6.3-ppc64displaysymbol-20041124.patch
|
||||
|
||||
FileName: gdb-6.3-ppc64displaysymbol-20041124.patch
|
||||
|
||||
;; Include the pc's section when doing a symbol lookup so that the
|
||||
;; correct symbol is found.
|
||||
;;=push: Write new testcase.
|
||||
|
||||
2004-11-24 Andrew Cagney <cagney@gnu.org>
|
||||
|
||||
* printcmd.c (build_address_symbolic): Find a section for the
|
||||
address.
|
||||
---
|
||||
gdb/printcmd.c | 8 ++++++++
|
||||
1 file changed, 8 insertions(+)
|
||||
|
||||
diff --git a/gdb/printcmd.c b/gdb/printcmd.c
|
||||
index 6256f35baa..c52e39f7fc 100644
|
||||
--- a/gdb/printcmd.c
|
||||
+++ b/gdb/printcmd.c
|
||||
@@ -602,6 +602,14 @@ build_address_symbolic (struct gdbarch *gdbarch,
|
||||
addr = overlay_mapped_address (addr, section);
|
||||
}
|
||||
}
|
||||
+ /* To ensure that the symbol returned belongs to the correct setion
|
||||
+ (and that the last [random] symbol from the previous section
|
||||
+ isn't returned) try to find the section containing PC. First try
|
||||
+ the overlay code (which by default returns NULL); and second try
|
||||
+ the normal section code (which almost always succeeds). */
|
||||
+ section = find_pc_overlay (addr);
|
||||
+ if (section == NULL)
|
||||
+ section = find_pc_section (addr);
|
||||
|
||||
/* First try to find the address in the symbol table, then
|
||||
in the minsyms. Take the closest one. */
|
||||
--
|
||||
2.14.3
|
||||
|
127
gdb-6.3-ppc64syscall-20040622.patch
Normal file
127
gdb-6.3-ppc64syscall-20040622.patch
Normal file
@ -0,0 +1,127 @@
|
||||
From FEDORA_PATCHES Mon Sep 17 00:00:00 2001
|
||||
From: Andrew Cagney <cagney@gnu.org>
|
||||
Date: Fri, 27 Oct 2017 21:07:50 +0200
|
||||
Subject: gdb-6.3-ppc64syscall-20040622.patch
|
||||
|
||||
FileName: gdb-6.3-ppc64syscall-20040622.patch
|
||||
|
||||
;; Better parse 64-bit PPC system call prologues.
|
||||
;;=push: Write new testcase.
|
||||
|
||||
2004-06-22 Andrew Cagney <cagney@gnu.org>
|
||||
|
||||
* rs6000-tdep.c (struct rs6000_framedata): Add field "func_start".
|
||||
(skip_prologue): Delete local variable "orig_pc", use
|
||||
"func_start". Add local variable "num_skip_linux_syscall_insn",
|
||||
use to skip over first half of a GNU/Linux syscall and update
|
||||
"func_start".
|
||||
---
|
||||
gdb/rs6000-tdep.c | 57 ++++++++++++++++++++++++++++++++++++++++++++++++++++---
|
||||
1 file changed, 54 insertions(+), 3 deletions(-)
|
||||
|
||||
diff --git a/gdb/rs6000-tdep.c b/gdb/rs6000-tdep.c
|
||||
index e5a265dbcb..23d0db3b8f 100644
|
||||
--- a/gdb/rs6000-tdep.c
|
||||
+++ b/gdb/rs6000-tdep.c
|
||||
@@ -134,6 +134,7 @@ static const char *powerpc_vector_abi_string = "auto";
|
||||
|
||||
struct rs6000_framedata
|
||||
{
|
||||
+ CORE_ADDR func_start; /* True function start. */
|
||||
int offset; /* total size of frame --- the distance
|
||||
by which we decrement sp to allocate
|
||||
the frame */
|
||||
@@ -1577,7 +1578,6 @@ static CORE_ADDR
|
||||
skip_prologue (struct gdbarch *gdbarch, CORE_ADDR pc, CORE_ADDR lim_pc,
|
||||
struct rs6000_framedata *fdata)
|
||||
{
|
||||
- CORE_ADDR orig_pc = pc;
|
||||
CORE_ADDR last_prologue_pc = pc;
|
||||
CORE_ADDR li_found_pc = 0;
|
||||
gdb_byte buf[4];
|
||||
@@ -1595,12 +1595,14 @@ skip_prologue (struct gdbarch *gdbarch, CORE_ADDR pc, CORE_ADDR lim_pc,
|
||||
int minimal_toc_loaded = 0;
|
||||
int prev_insn_was_prologue_insn = 1;
|
||||
int num_skip_non_prologue_insns = 0;
|
||||
+ int num_skip_ppc64_gnu_linux_syscall_insn = 0;
|
||||
int r0_contains_arg = 0;
|
||||
const struct bfd_arch_info *arch_info = gdbarch_bfd_arch_info (gdbarch);
|
||||
struct gdbarch_tdep *tdep = gdbarch_tdep (gdbarch);
|
||||
enum bfd_endian byte_order = gdbarch_byte_order (gdbarch);
|
||||
|
||||
memset (fdata, 0, sizeof (struct rs6000_framedata));
|
||||
+ fdata->func_start = pc;
|
||||
fdata->saved_gpr = -1;
|
||||
fdata->saved_fpr = -1;
|
||||
fdata->saved_vr = -1;
|
||||
@@ -1634,6 +1636,55 @@ skip_prologue (struct gdbarch *gdbarch, CORE_ADDR pc, CORE_ADDR lim_pc,
|
||||
break;
|
||||
op = extract_unsigned_integer (buf, 4, byte_order);
|
||||
|
||||
+ /* A PPC64 GNU/Linux system call function is split into two
|
||||
+ sub-functions: a non-threaded fast-path (__NAME_nocancel)
|
||||
+ which does not use a frame; and a threaded slow-path
|
||||
+ (Lpseudo_cancel) that does create a frame. Ref:
|
||||
+ nptl/sysdeps/unix/sysv/linux/powerpc/powerpc32/sysdep-cancel.h
|
||||
+
|
||||
+ *INDENT-OFF*
|
||||
+ NAME:
|
||||
+ SINGLE_THREAD_P
|
||||
+ bne- .Lpseudo_cancel
|
||||
+ __NAME_nocancel:
|
||||
+ li r0,162
|
||||
+ sc
|
||||
+ bnslr+
|
||||
+ b 0x7fe014ef64 <.__syscall_error>
|
||||
+ Lpseudo_cancel:
|
||||
+ stdu r1,-128(r1)
|
||||
+ ...
|
||||
+ *INDENT-ON*
|
||||
+
|
||||
+ Unfortunatly, because the latter case uses a local label (not
|
||||
+ in the symbol table) a PC in "Lpseudo_cancel" appears to be
|
||||
+ in "__NAME_nocancel". The following code recognizes this,
|
||||
+ adjusting FUNC_START to point to where "Lpseudo_cancel"
|
||||
+ should be, and parsing the prologue sequence as if
|
||||
+ "Lpseudo_cancel" was the entry point. */
|
||||
+
|
||||
+ if (((op & 0xffff0000) == 0x38000000 /* li r0,N */
|
||||
+ && pc == fdata->func_start + 0
|
||||
+ && num_skip_ppc64_gnu_linux_syscall_insn == 0)
|
||||
+ || (op == 0x44000002 /* sc */
|
||||
+ && pc == fdata->func_start + 4
|
||||
+ && num_skip_ppc64_gnu_linux_syscall_insn == 1)
|
||||
+ || (op == 0x4ca30020 /* bnslr+ */
|
||||
+ && pc == fdata->func_start + 8
|
||||
+ && num_skip_ppc64_gnu_linux_syscall_insn == 2))
|
||||
+ {
|
||||
+ num_skip_ppc64_gnu_linux_syscall_insn++;
|
||||
+ continue;
|
||||
+ }
|
||||
+ else if ((op & 0xfc000003) == 0x48000000 /* b __syscall_error */
|
||||
+ && pc == fdata->func_start + 12
|
||||
+ && num_skip_ppc64_gnu_linux_syscall_insn == 3)
|
||||
+ {
|
||||
+ num_skip_ppc64_gnu_linux_syscall_insn = -1;
|
||||
+ fdata->func_start = pc;
|
||||
+ continue;
|
||||
+ }
|
||||
+
|
||||
if ((op & 0xfc1fffff) == 0x7c0802a6)
|
||||
{ /* mflr Rx */
|
||||
/* Since shared library / PIC code, which needs to get its
|
||||
@@ -1825,9 +1876,9 @@ skip_prologue (struct gdbarch *gdbarch, CORE_ADDR pc, CORE_ADDR lim_pc,
|
||||
we have no line table information or the line info tells
|
||||
us that the subroutine call is not part of the line
|
||||
associated with the prologue. */
|
||||
- if ((pc - orig_pc) > 8)
|
||||
+ if ((pc - fdata->func_start) > 8)
|
||||
{
|
||||
- struct symtab_and_line prologue_sal = find_pc_line (orig_pc, 0);
|
||||
+ struct symtab_and_line prologue_sal = find_pc_line (fdata->func_start, 0);
|
||||
struct symtab_and_line this_sal = find_pc_line (pc, 0);
|
||||
|
||||
if ((prologue_sal.line == 0)
|
||||
--
|
||||
2.14.3
|
||||
|
44
gdb-6.3-readnever-20050907.patch
Normal file
44
gdb-6.3-readnever-20050907.patch
Normal file
@ -0,0 +1,44 @@
|
||||
From FEDORA_PATCHES Mon Sep 17 00:00:00 2001
|
||||
From: Andrew Cagney <cagney@gnu.org>
|
||||
Date: Fri, 27 Oct 2017 21:07:50 +0200
|
||||
Subject: gdb-6.3-readnever-20050907.patch
|
||||
|
||||
FileName: gdb-6.3-readnever-20050907.patch
|
||||
|
||||
;; Add readnever option
|
||||
;;=push
|
||||
|
||||
2004-11-18 Andrew Cagney <cagney@gnu.org>
|
||||
|
||||
* dwarf2read.c: Include "top.c".
|
||||
(dwarf2_has_info): Check for readnever_symbol_files.
|
||||
* symfile.c (readnever_symbol_files): Define.
|
||||
* top.h (readnever_symbol_files): Declare.
|
||||
* main.c (captured_main): Add --readnever option.
|
||||
(print_gdb_help): Ditto.
|
||||
|
||||
2004-11-18 Andrew Cagney <cagney@gnu.org>
|
||||
|
||||
* gdb.texinfo (File Options): Document --readnever.
|
||||
|
||||
Pushed upstream: https://sourceware.org/ml/gdb-cvs/2017-12/msg00007.html
|
||||
---
|
||||
gdb/gcore.in | 2 +-
|
||||
1 file changed, 1 insertion(+), 1 deletion(-)
|
||||
|
||||
diff --git a/gdb/gcore.in b/gdb/gcore.in
|
||||
index b7f57cd341..c7e0dec574 100644
|
||||
--- a/gdb/gcore.in
|
||||
+++ b/gdb/gcore.in
|
||||
@@ -97,7 +97,7 @@ for pid in $*
|
||||
do
|
||||
# `</dev/null' to avoid touching interactive terminal if it is
|
||||
# available but not accessible as GDB would get stopped on SIGTTIN.
|
||||
- $binary_path/@GDB_TRANSFORM_NAME@ </dev/null --nx --batch \
|
||||
+ $binary_path/@GDB_TRANSFORM_NAME@ </dev/null --nx --batch --readnever \
|
||||
-ex "set pagination off" -ex "set height 0" -ex "set width 0" \
|
||||
"${dump_all_cmds[@]}" \
|
||||
-ex "attach $pid" -ex "gcore $name.$pid" -ex detach -ex quit
|
||||
--
|
||||
2.14.3
|
||||
|
@ -1,7 +1,10 @@
|
||||
From FEDORA_PATCHES Mon Sep 17 00:00:00 2001
|
||||
From: Elena Zannoni <ezannoni@redhat.com>
|
||||
Date: Fri, 27 Oct 2017 21:07:50 +0200
|
||||
Subject: gdb-6.3-rh-testversion-20041202.patch
|
||||
Subject: gdb.gdb/selftest.exp: Add matching on specific Red Hat only version
|
||||
string
|
||||
|
||||
FileName: gdb-6.3-rh-testversion-20041202.patch
|
||||
|
||||
;; Match the Fedora's version info.
|
||||
;;=fedora
|
||||
@ -10,8 +13,12 @@ Subject: gdb-6.3-rh-testversion-20041202.patch
|
||||
|
||||
* gdb.gdb/selftest.exp: Add matching on specific Red Hat only version
|
||||
string.
|
||||
---
|
||||
gdb/testsuite/gdb.gdb/selftest.exp | 3 +++
|
||||
1 file changed, 3 insertions(+)
|
||||
|
||||
diff --git a/gdb/testsuite/gdb.gdb/selftest.exp b/gdb/testsuite/gdb.gdb/selftest.exp
|
||||
index 20f34983ef..4108e088a9 100644
|
||||
--- a/gdb/testsuite/gdb.gdb/selftest.exp
|
||||
+++ b/gdb/testsuite/gdb.gdb/selftest.exp
|
||||
@@ -53,6 +53,9 @@ proc test_with_self { } {
|
||||
@ -24,15 +31,6 @@ diff --git a/gdb/testsuite/gdb.gdb/selftest.exp b/gdb/testsuite/gdb.gdb/selftest
|
||||
}
|
||||
|
||||
# start the "xgdb" process
|
||||
diff --git a/gdb/top.c b/gdb/top.c
|
||||
--- a/gdb/top.c
|
||||
+++ b/gdb/top.c
|
||||
@@ -2163,7 +2163,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;
|
||||
- sscanf (version, "%d.%d.%d", &vmajor, &vminor, &vrevision);
|
||||
+ sscanf (version, "Fedora %d.%d.%d", &vmajor, &vminor, &vrevision);
|
||||
set_internalvar_integer (major_version_var, vmajor);
|
||||
set_internalvar_integer (minor_version_var, vminor + (vrevision > 0));
|
||||
}
|
||||
--
|
||||
2.14.3
|
||||
|
||||
|
@ -3,11 +3,20 @@ From: Fedora GDB patches <invalid@email.com>
|
||||
Date: Fri, 27 Oct 2017 21:07:50 +0200
|
||||
Subject: gdb-6.3-test-dtorfix-20050121.patch
|
||||
|
||||
FileName: gdb-6.3-test-dtorfix-20050121.patch
|
||||
|
||||
;; Test support of multiple destructors just like multiple constructors
|
||||
;;=fedoratest
|
||||
---
|
||||
gdb/testsuite/gdb.cp/constructortest.cc | 99 +++++++++++++++++++++++
|
||||
gdb/testsuite/gdb.cp/constructortest.exp | 130 +++++++++++++++++++++++++++++++
|
||||
2 files changed, 229 insertions(+)
|
||||
create mode 100644 gdb/testsuite/gdb.cp/constructortest.cc
|
||||
create mode 100644 gdb/testsuite/gdb.cp/constructortest.exp
|
||||
|
||||
diff --git a/gdb/testsuite/gdb.cp/constructortest.cc b/gdb/testsuite/gdb.cp/constructortest.cc
|
||||
new file mode 100644
|
||||
index 0000000000..9ac8793e50
|
||||
--- /dev/null
|
||||
+++ b/gdb/testsuite/gdb.cp/constructortest.cc
|
||||
@@ -0,0 +1,99 @@
|
||||
@ -112,6 +121,7 @@ new file mode 100644
|
||||
+}
|
||||
diff --git a/gdb/testsuite/gdb.cp/constructortest.exp b/gdb/testsuite/gdb.cp/constructortest.exp
|
||||
new file mode 100644
|
||||
index 0000000000..341f6c99ad
|
||||
--- /dev/null
|
||||
+++ b/gdb/testsuite/gdb.cp/constructortest.exp
|
||||
@@ -0,0 +1,130 @@
|
||||
@ -245,3 +255,6 @@ new file mode 100644
|
||||
+}
|
||||
+
|
||||
+gdb_continue_to_breakpoint "First line ~C"
|
||||
--
|
||||
2.14.3
|
||||
|
||||
|
@ -3,6 +3,8 @@ From: Elena Zannoni <ezannoni@redhat.com>
|
||||
Date: Fri, 27 Oct 2017 21:07:50 +0200
|
||||
Subject: gdb-6.3-test-movedir-20050125.patch
|
||||
|
||||
FileName: gdb-6.3-test-movedir-20050125.patch
|
||||
|
||||
;; Fix to support executable moving
|
||||
;;=fedoratest
|
||||
|
||||
@ -11,9 +13,18 @@ Subject: gdb-6.3-test-movedir-20050125.patch
|
||||
* gdb.base/move-dir.exp: New test.
|
||||
* gdb.base/move-dir.c: Ditto.
|
||||
* gdb.base/move-dir.h: Ditto.
|
||||
---
|
||||
gdb/testsuite/gdb.base/move-dir.c | 10 +++++++
|
||||
gdb/testsuite/gdb.base/move-dir.exp | 57 +++++++++++++++++++++++++++++++++++++
|
||||
gdb/testsuite/gdb.base/move-dir.h | 7 +++++
|
||||
3 files changed, 74 insertions(+)
|
||||
create mode 100644 gdb/testsuite/gdb.base/move-dir.c
|
||||
create mode 100644 gdb/testsuite/gdb.base/move-dir.exp
|
||||
create mode 100644 gdb/testsuite/gdb.base/move-dir.h
|
||||
|
||||
diff --git a/gdb/testsuite/gdb.base/move-dir.c b/gdb/testsuite/gdb.base/move-dir.c
|
||||
new file mode 100644
|
||||
index 0000000000..89b65b4b6a
|
||||
--- /dev/null
|
||||
+++ b/gdb/testsuite/gdb.base/move-dir.c
|
||||
@@ -0,0 +1,10 @@
|
||||
@ -29,6 +40,7 @@ new file mode 100644
|
||||
+
|
||||
diff --git a/gdb/testsuite/gdb.base/move-dir.exp b/gdb/testsuite/gdb.base/move-dir.exp
|
||||
new file mode 100644
|
||||
index 0000000000..f189ea77b9
|
||||
--- /dev/null
|
||||
+++ b/gdb/testsuite/gdb.base/move-dir.exp
|
||||
@@ -0,0 +1,57 @@
|
||||
@ -91,6 +103,7 @@ new file mode 100644
|
||||
+return 0
|
||||
diff --git a/gdb/testsuite/gdb.base/move-dir.h b/gdb/testsuite/gdb.base/move-dir.h
|
||||
new file mode 100644
|
||||
index 0000000000..4a99725a00
|
||||
--- /dev/null
|
||||
+++ b/gdb/testsuite/gdb.base/move-dir.h
|
||||
@@ -0,0 +1,7 @@
|
||||
@ -101,3 +114,6 @@ new file mode 100644
|
||||
+ printf ("%s\n", ostring);;
|
||||
+}
|
||||
+
|
||||
--
|
||||
2.14.3
|
||||
|
||||
|
@ -3,11 +3,32 @@ From: Fedora GDB patches <invalid@email.com>
|
||||
Date: Fri, 27 Oct 2017 21:07:50 +0200
|
||||
Subject: gdb-6.3-test-pie-20050107.patch
|
||||
|
||||
FileName: gdb-6.3-test-pie-20050107.patch
|
||||
|
||||
;; VSYSCALL and PIE
|
||||
;;=fedoratest
|
||||
---
|
||||
gdb/testsuite/gdb.pie/attach.c | 20 +
|
||||
gdb/testsuite/gdb.pie/attach.exp | 416 ++++++++++++++++
|
||||
gdb/testsuite/gdb.pie/attach2.c | 24 +
|
||||
gdb/testsuite/gdb.pie/break.c | 146 ++++++
|
||||
gdb/testsuite/gdb.pie/break.exp | 954 +++++++++++++++++++++++++++++++++++++
|
||||
gdb/testsuite/gdb.pie/break1.c | 44 ++
|
||||
gdb/testsuite/gdb.pie/corefile.exp | 233 +++++++++
|
||||
gdb/testsuite/gdb.pie/coremaker.c | 142 ++++++
|
||||
8 files changed, 1979 insertions(+)
|
||||
create mode 100644 gdb/testsuite/gdb.pie/attach.c
|
||||
create mode 100644 gdb/testsuite/gdb.pie/attach.exp
|
||||
create mode 100644 gdb/testsuite/gdb.pie/attach2.c
|
||||
create mode 100644 gdb/testsuite/gdb.pie/break.c
|
||||
create mode 100644 gdb/testsuite/gdb.pie/break.exp
|
||||
create mode 100644 gdb/testsuite/gdb.pie/break1.c
|
||||
create mode 100644 gdb/testsuite/gdb.pie/corefile.exp
|
||||
create mode 100644 gdb/testsuite/gdb.pie/coremaker.c
|
||||
|
||||
diff --git a/gdb/testsuite/gdb.pie/attach.c b/gdb/testsuite/gdb.pie/attach.c
|
||||
new file mode 100644
|
||||
index 0000000000..0041b4732d
|
||||
--- /dev/null
|
||||
+++ b/gdb/testsuite/gdb.pie/attach.c
|
||||
@@ -0,0 +1,20 @@
|
||||
@ -33,6 +54,7 @@ new file mode 100644
|
||||
+}
|
||||
diff --git a/gdb/testsuite/gdb.pie/attach.exp b/gdb/testsuite/gdb.pie/attach.exp
|
||||
new file mode 100644
|
||||
index 0000000000..648c92608c
|
||||
--- /dev/null
|
||||
+++ b/gdb/testsuite/gdb.pie/attach.exp
|
||||
@@ -0,0 +1,416 @@
|
||||
@ -454,6 +476,7 @@ new file mode 100644
|
||||
+return 0
|
||||
diff --git a/gdb/testsuite/gdb.pie/attach2.c b/gdb/testsuite/gdb.pie/attach2.c
|
||||
new file mode 100644
|
||||
index 0000000000..a78037ed38
|
||||
--- /dev/null
|
||||
+++ b/gdb/testsuite/gdb.pie/attach2.c
|
||||
@@ -0,0 +1,24 @@
|
||||
@ -483,6 +506,7 @@ new file mode 100644
|
||||
+}
|
||||
diff --git a/gdb/testsuite/gdb.pie/break.c b/gdb/testsuite/gdb.pie/break.c
|
||||
new file mode 100644
|
||||
index 0000000000..bf398fcca9
|
||||
--- /dev/null
|
||||
+++ b/gdb/testsuite/gdb.pie/break.c
|
||||
@@ -0,0 +1,146 @@
|
||||
@ -634,6 +658,7 @@ new file mode 100644
|
||||
+}
|
||||
diff --git a/gdb/testsuite/gdb.pie/break.exp b/gdb/testsuite/gdb.pie/break.exp
|
||||
new file mode 100644
|
||||
index 0000000000..97b87397c2
|
||||
--- /dev/null
|
||||
+++ b/gdb/testsuite/gdb.pie/break.exp
|
||||
@@ -0,0 +1,954 @@
|
||||
@ -1593,6 +1618,7 @@ new file mode 100644
|
||||
+}
|
||||
diff --git a/gdb/testsuite/gdb.pie/break1.c b/gdb/testsuite/gdb.pie/break1.c
|
||||
new file mode 100644
|
||||
index 0000000000..2ed8b2a4a0
|
||||
--- /dev/null
|
||||
+++ b/gdb/testsuite/gdb.pie/break1.c
|
||||
@@ -0,0 +1,44 @@
|
||||
@ -1642,6 +1668,7 @@ new file mode 100644
|
||||
+#endif
|
||||
diff --git a/gdb/testsuite/gdb.pie/corefile.exp b/gdb/testsuite/gdb.pie/corefile.exp
|
||||
new file mode 100644
|
||||
index 0000000000..ca4b01be3e
|
||||
--- /dev/null
|
||||
+++ b/gdb/testsuite/gdb.pie/corefile.exp
|
||||
@@ -0,0 +1,233 @@
|
||||
@ -1880,6 +1907,7 @@ new file mode 100644
|
||||
+gdb_test "core" "No core file now."
|
||||
diff --git a/gdb/testsuite/gdb.pie/coremaker.c b/gdb/testsuite/gdb.pie/coremaker.c
|
||||
new file mode 100644
|
||||
index 0000000000..a7fbd94141
|
||||
--- /dev/null
|
||||
+++ b/gdb/testsuite/gdb.pie/coremaker.c
|
||||
@@ -0,0 +1,142 @@
|
||||
@ -2025,3 +2053,6 @@ new file mode 100644
|
||||
+ return 0;
|
||||
+}
|
||||
+
|
||||
--
|
||||
2.14.3
|
||||
|
||||
|
@ -3,6 +3,8 @@ From: Elena Zannoni <ezannoni@redhat.com>
|
||||
Date: Fri, 27 Oct 2017 21:07:50 +0200
|
||||
Subject: gdb-6.3-test-self-20050110.patch
|
||||
|
||||
FileName: gdb-6.3-test-self-20050110.patch
|
||||
|
||||
;; Get selftest working with sep-debug-info
|
||||
;;=fedoratest
|
||||
|
||||
@ -13,11 +15,15 @@ Subject: gdb-6.3-test-self-20050110.patch
|
||||
* gdb.gdb/complaints.exp: Ditto.
|
||||
* gdb.gdb/xfullpath.exp: Ditto.
|
||||
* gdb.gdb/observer.exp: Ditto.
|
||||
---
|
||||
gdb/testsuite/lib/selftest-support.exp | 8 ++++----
|
||||
1 file changed, 4 insertions(+), 4 deletions(-)
|
||||
|
||||
diff --git a/gdb/testsuite/lib/selftest-support.exp b/gdb/testsuite/lib/selftest-support.exp
|
||||
index 89e2e3f4ef..ea027a6f7d 100644
|
||||
--- a/gdb/testsuite/lib/selftest-support.exp
|
||||
+++ b/gdb/testsuite/lib/selftest-support.exp
|
||||
@@ -152,18 +152,18 @@ proc do_self_tests {function body} {
|
||||
@@ -156,18 +156,18 @@ proc do_self_tests {function body} {
|
||||
}
|
||||
|
||||
# Remove any old copy lying around.
|
||||
@ -40,3 +46,6 @@ diff --git a/gdb/testsuite/lib/selftest-support.exp b/gdb/testsuite/lib/selftest
|
||||
|
||||
if {$result < 0} then {
|
||||
warning "Couldn't test self"
|
||||
--
|
||||
2.14.3
|
||||
|
||||
|
@ -3,6 +3,8 @@ From: Jeff Johnston <jjohnstn@redhat.com>
|
||||
Date: Fri, 27 Oct 2017 21:07:50 +0200
|
||||
Subject: gdb-6.3-threaded-watchpoints2-20050225.patch
|
||||
|
||||
FileName: gdb-6.3-threaded-watchpoints2-20050225.patch
|
||||
|
||||
;; Test sibling threads to set threaded watchpoints for x86 and x86-64
|
||||
;;=fedoratest
|
||||
|
||||
@ -49,9 +51,16 @@ Subject: gdb-6.3-threaded-watchpoints2-20050225.patch
|
||||
testcase of the same name. ]
|
||||
|
||||
FIXME: The testcase does not expects multiple watchpoints hits per one stop.
|
||||
---
|
||||
gdb/testsuite/gdb.threads/watchthreads-threaded.c | 66 +++++++++++
|
||||
.../gdb.threads/watchthreads-threaded.exp | 126 +++++++++++++++++++++
|
||||
2 files changed, 192 insertions(+)
|
||||
create mode 100644 gdb/testsuite/gdb.threads/watchthreads-threaded.c
|
||||
create mode 100644 gdb/testsuite/gdb.threads/watchthreads-threaded.exp
|
||||
|
||||
diff --git a/gdb/testsuite/gdb.threads/watchthreads-threaded.c b/gdb/testsuite/gdb.threads/watchthreads-threaded.c
|
||||
new file mode 100644
|
||||
index 0000000000..1402640ccf
|
||||
--- /dev/null
|
||||
+++ b/gdb/testsuite/gdb.threads/watchthreads-threaded.c
|
||||
@@ -0,0 +1,66 @@
|
||||
@ -123,6 +132,7 @@ new file mode 100644
|
||||
+
|
||||
diff --git a/gdb/testsuite/gdb.threads/watchthreads-threaded.exp b/gdb/testsuite/gdb.threads/watchthreads-threaded.exp
|
||||
new file mode 100644
|
||||
index 0000000000..e9cdd59771
|
||||
--- /dev/null
|
||||
+++ b/gdb/testsuite/gdb.threads/watchthreads-threaded.exp
|
||||
@@ -0,0 +1,126 @@
|
||||
@ -252,3 +262,6 @@ new file mode 100644
|
||||
+} else {
|
||||
+ fail $message
|
||||
+}
|
||||
--
|
||||
2.14.3
|
||||
|
||||
|
@ -3,11 +3,24 @@ From: Fedora GDB patches <invalid@email.com>
|
||||
Date: Fri, 27 Oct 2017 21:07:50 +0200
|
||||
Subject: gdb-6.5-BEA-testsuite.patch
|
||||
|
||||
FileName: gdb-6.5-BEA-testsuite.patch
|
||||
|
||||
;; Improved testsuite results by the testsuite provided by the courtesy of BEA.
|
||||
;;=fedoratest: For upstream it should be rewritten as a dejagnu test, the test of no "??" was useful.
|
||||
---
|
||||
gdb/testsuite/gdb.threads/threadcrash.c | 301 ++++++++++++++++++++++++
|
||||
gdb/testsuite/gdb.threads/threadcrash.exp | 37 +++
|
||||
gdb/testsuite/gdb.threads/threadcrash.sh | 324 ++++++++++++++++++++++++++
|
||||
gdb/testsuite/gdb.threads/threadcrash.sh-orig | 248 ++++++++++++++++++++
|
||||
4 files changed, 910 insertions(+)
|
||||
create mode 100644 gdb/testsuite/gdb.threads/threadcrash.c
|
||||
create mode 100644 gdb/testsuite/gdb.threads/threadcrash.exp
|
||||
create mode 100644 gdb/testsuite/gdb.threads/threadcrash.sh
|
||||
create mode 100644 gdb/testsuite/gdb.threads/threadcrash.sh-orig
|
||||
|
||||
diff --git a/gdb/testsuite/gdb.threads/threadcrash.c b/gdb/testsuite/gdb.threads/threadcrash.c
|
||||
new file mode 100644
|
||||
index 0000000000..80c599d0fb
|
||||
--- /dev/null
|
||||
+++ b/gdb/testsuite/gdb.threads/threadcrash.c
|
||||
@@ -0,0 +1,301 @@
|
||||
@ -314,6 +327,7 @@ new file mode 100644
|
||||
+}
|
||||
diff --git a/gdb/testsuite/gdb.threads/threadcrash.exp b/gdb/testsuite/gdb.threads/threadcrash.exp
|
||||
new file mode 100644
|
||||
index 0000000000..af6b919f58
|
||||
--- /dev/null
|
||||
+++ b/gdb/testsuite/gdb.threads/threadcrash.exp
|
||||
@@ -0,0 +1,37 @@
|
||||
@ -356,6 +370,7 @@ new file mode 100644
|
||||
+return 0
|
||||
diff --git a/gdb/testsuite/gdb.threads/threadcrash.sh b/gdb/testsuite/gdb.threads/threadcrash.sh
|
||||
new file mode 100644
|
||||
index 0000000000..7f7e6520d6
|
||||
--- /dev/null
|
||||
+++ b/gdb/testsuite/gdb.threads/threadcrash.sh
|
||||
@@ -0,0 +1,324 @@
|
||||
@ -685,6 +700,7 @@ new file mode 100644
|
||||
+exit $FAILURES
|
||||
diff --git a/gdb/testsuite/gdb.threads/threadcrash.sh-orig b/gdb/testsuite/gdb.threads/threadcrash.sh-orig
|
||||
new file mode 100644
|
||||
index 0000000000..eb602036c2
|
||||
--- /dev/null
|
||||
+++ b/gdb/testsuite/gdb.threads/threadcrash.sh-orig
|
||||
@@ -0,0 +1,248 @@
|
||||
@ -936,3 +952,6 @@ new file mode 100644
|
||||
+rm -rf $WORKDIR
|
||||
+
|
||||
+exit $FAILURES
|
||||
--
|
||||
2.14.3
|
||||
|
||||
|
@ -3,6 +3,8 @@ From: Jan Kratochvil <jan.kratochvil@redhat.com>
|
||||
Date: Fri, 27 Oct 2017 21:07:50 +0200
|
||||
Subject: gdb-6.5-bz109921-DW_AT_decl_file-test.patch
|
||||
|
||||
FileName: gdb-6.5-bz109921-DW_AT_decl_file-test.patch
|
||||
|
||||
;; Find symbols properly at their original (included) file (BZ 109921).
|
||||
;;=fedoratest
|
||||
|
||||
@ -23,9 +25,18 @@ http://sourceware.org/ml/gdb-patches/2007-01/msg00434.html
|
||||
|
||||
* gdb.dwarf2/dw2-included.exp, gdb.dwarf2/dw2-included.c,
|
||||
gdb.dwarf2/dw2-included.h: New files.
|
||||
---
|
||||
gdb/testsuite/gdb.dwarf2/dw2-included.c | 26 +++++++++++++++++
|
||||
gdb/testsuite/gdb.dwarf2/dw2-included.exp | 47 +++++++++++++++++++++++++++++++
|
||||
gdb/testsuite/gdb.dwarf2/dw2-included.h | 20 +++++++++++++
|
||||
3 files changed, 93 insertions(+)
|
||||
create mode 100644 gdb/testsuite/gdb.dwarf2/dw2-included.c
|
||||
create mode 100644 gdb/testsuite/gdb.dwarf2/dw2-included.exp
|
||||
create mode 100644 gdb/testsuite/gdb.dwarf2/dw2-included.h
|
||||
|
||||
diff --git a/gdb/testsuite/gdb.dwarf2/dw2-included.c b/gdb/testsuite/gdb.dwarf2/dw2-included.c
|
||||
new file mode 100644
|
||||
index 0000000000..28e54fb932
|
||||
--- /dev/null
|
||||
+++ b/gdb/testsuite/gdb.dwarf2/dw2-included.c
|
||||
@@ -0,0 +1,26 @@
|
||||
@ -57,6 +68,7 @@ new file mode 100644
|
||||
+}
|
||||
diff --git a/gdb/testsuite/gdb.dwarf2/dw2-included.exp b/gdb/testsuite/gdb.dwarf2/dw2-included.exp
|
||||
new file mode 100644
|
||||
index 0000000000..9aaf8e9772
|
||||
--- /dev/null
|
||||
+++ b/gdb/testsuite/gdb.dwarf2/dw2-included.exp
|
||||
@@ -0,0 +1,47 @@
|
||||
@ -106,9 +118,10 @@ new file mode 100644
|
||||
+gdb_test "list integer" "int integer;\r"
|
||||
+gdb_test "ptype integer" "type = int\r"
|
||||
+# Path varies depending on the build location.
|
||||
+gdb_test "info variables integer" "\r\nFile \[^\r\n\]*/gdb.dwarf2/dw2-included.h:\r\n${decimal}:.*int integer;\r"
|
||||
+gdb_test "info variables integer" "\r\nFile \[^\r\n\]*/gdb.dwarf2/dw2-included.h:\r\nint integer;\r"
|
||||
diff --git a/gdb/testsuite/gdb.dwarf2/dw2-included.h b/gdb/testsuite/gdb.dwarf2/dw2-included.h
|
||||
new file mode 100644
|
||||
index 0000000000..f31348ab4f
|
||||
--- /dev/null
|
||||
+++ b/gdb/testsuite/gdb.dwarf2/dw2-included.h
|
||||
@@ -0,0 +1,20 @@
|
||||
@ -132,3 +145,6 @@ new file mode 100644
|
||||
+ USA. */
|
||||
+
|
||||
+int integer;
|
||||
--
|
||||
2.14.3
|
||||
|
||||
|
@ -3,6 +3,8 @@ From: Jan Kratochvil <jan.kratochvil@redhat.com>
|
||||
Date: Fri, 27 Oct 2017 21:07:50 +0200
|
||||
Subject: gdb-6.5-bz185337-resolve-tls-without-debuginfo-v2.patch
|
||||
|
||||
FileName: gdb-6.5-bz185337-resolve-tls-without-debuginfo-v2.patch
|
||||
|
||||
;; Support TLS symbols (+`errno' suggestion if no pthread is found) (BZ 185337).
|
||||
;;=push+jan: It should be replaced by Infinity project.
|
||||
|
||||
@ -40,13 +42,25 @@ https://bugzilla.redhat.com/show_bug.cgi?id=1166549
|
||||
glibc-debuginfo-2.7-2.x86_64: /usr/lib/debug/lib64/libc.so.6.debug:
|
||||
<81a2> DW_AT_name : (indirect string, offset: 0x280e): __errno_location
|
||||
<81a8> DW_AT_MIPS_linkage_name: (indirect string, offset: 0x2808): *__GI___errno_location
|
||||
---
|
||||
gdb/printcmd.c | 4 ++
|
||||
gdb/testsuite/gdb.dwarf2/dw2-errno.c | 28 +++++++++++++
|
||||
gdb/testsuite/gdb.dwarf2/dw2-errno.exp | 60 ++++++++++++++++++++++++++++
|
||||
gdb/testsuite/gdb.dwarf2/dw2-errno2.c | 28 +++++++++++++
|
||||
gdb/testsuite/gdb.dwarf2/dw2-errno2.exp | 71 +++++++++++++++++++++++++++++++++
|
||||
5 files changed, 191 insertions(+)
|
||||
create mode 100644 gdb/testsuite/gdb.dwarf2/dw2-errno.c
|
||||
create mode 100644 gdb/testsuite/gdb.dwarf2/dw2-errno.exp
|
||||
create mode 100644 gdb/testsuite/gdb.dwarf2/dw2-errno2.c
|
||||
create mode 100644 gdb/testsuite/gdb.dwarf2/dw2-errno2.exp
|
||||
|
||||
diff --git a/gdb/printcmd.c b/gdb/printcmd.c
|
||||
index c52e39f7fc..ad80b1bebf 100644
|
||||
--- a/gdb/printcmd.c
|
||||
+++ b/gdb/printcmd.c
|
||||
@@ -1210,6 +1210,10 @@ print_command_1 (const char *args, int voidprint)
|
||||
@@ -1210,6 +1210,10 @@ print_command_1 (const char *exp, int voidprint)
|
||||
|
||||
if (exp != nullptr && *exp)
|
||||
if (exp && *exp)
|
||||
{
|
||||
+ /* '*((int *(*) (void)) __errno_location) ()' is incompatible with
|
||||
+ function descriptors. */
|
||||
@ -57,6 +71,7 @@ diff --git a/gdb/printcmd.c b/gdb/printcmd.c
|
||||
}
|
||||
diff --git a/gdb/testsuite/gdb.dwarf2/dw2-errno.c b/gdb/testsuite/gdb.dwarf2/dw2-errno.c
|
||||
new file mode 100644
|
||||
index 0000000000..7bd10d0978
|
||||
--- /dev/null
|
||||
+++ b/gdb/testsuite/gdb.dwarf2/dw2-errno.c
|
||||
@@ -0,0 +1,28 @@
|
||||
@ -90,6 +105,7 @@ new file mode 100644
|
||||
+}
|
||||
diff --git a/gdb/testsuite/gdb.dwarf2/dw2-errno.exp b/gdb/testsuite/gdb.dwarf2/dw2-errno.exp
|
||||
new file mode 100644
|
||||
index 0000000000..1f13cc1323
|
||||
--- /dev/null
|
||||
+++ b/gdb/testsuite/gdb.dwarf2/dw2-errno.exp
|
||||
@@ -0,0 +1,60 @@
|
||||
@ -155,6 +171,7 @@ new file mode 100644
|
||||
+# Just how to find the current libc filename?
|
||||
diff --git a/gdb/testsuite/gdb.dwarf2/dw2-errno2.c b/gdb/testsuite/gdb.dwarf2/dw2-errno2.c
|
||||
new file mode 100644
|
||||
index 0000000000..7bd10d0978
|
||||
--- /dev/null
|
||||
+++ b/gdb/testsuite/gdb.dwarf2/dw2-errno2.c
|
||||
@@ -0,0 +1,28 @@
|
||||
@ -188,6 +205,7 @@ new file mode 100644
|
||||
+}
|
||||
diff --git a/gdb/testsuite/gdb.dwarf2/dw2-errno2.exp b/gdb/testsuite/gdb.dwarf2/dw2-errno2.exp
|
||||
new file mode 100644
|
||||
index 0000000000..0f6e66870b
|
||||
--- /dev/null
|
||||
+++ b/gdb/testsuite/gdb.dwarf2/dw2-errno2.exp
|
||||
@@ -0,0 +1,71 @@
|
||||
@ -262,3 +280,6 @@ new file mode 100644
|
||||
+
|
||||
+# TODO: Test the error on resolving ERRNO with only libc loaded.
|
||||
+# Just how to find the current libc filename?
|
||||
--
|
||||
2.14.3
|
||||
|
||||
|
33
gdb-6.5-bz203661-emit-relocs.patch
Normal file
33
gdb-6.5-bz203661-emit-relocs.patch
Normal file
@ -0,0 +1,33 @@
|
||||
From FEDORA_PATCHES Mon Sep 17 00:00:00 2001
|
||||
From: Fedora GDB patches <invalid@email.com>
|
||||
Date: Fri, 27 Oct 2017 21:07:50 +0200
|
||||
Subject: gdb-6.5-bz203661-emit-relocs.patch
|
||||
|
||||
FileName: gdb-6.5-bz203661-emit-relocs.patch
|
||||
|
||||
;; Fix debuginfo addresses resolving for --emit-relocs Linux kernels (BZ 203661).
|
||||
;;=push+jan: There was some mail thread about it, this patch may be a hack.
|
||||
---
|
||||
gdb/symfile.c | 6 ++++++
|
||||
1 file changed, 6 insertions(+)
|
||||
|
||||
diff --git a/gdb/symfile.c b/gdb/symfile.c
|
||||
index f7f75b05d3..7cda615e74 100644
|
||||
--- a/gdb/symfile.c
|
||||
+++ b/gdb/symfile.c
|
||||
@@ -3629,6 +3629,12 @@ default_symfile_relocate (struct objfile *objfile, asection *sectp,
|
||||
DWO file. */
|
||||
bfd *abfd = sectp->owner;
|
||||
|
||||
+ /* Executable files have all the relocations already resolved.
|
||||
+ Handle files linked with --emit-relocs.
|
||||
+ http://sources.redhat.com/ml/gdb/2006-08/msg00137.html */
|
||||
+ if ((abfd->flags & EXEC_P) != 0)
|
||||
+ return NULL;
|
||||
+
|
||||
/* We're only interested in sections with relocation
|
||||
information. */
|
||||
if ((sectp->flags & SEC_RELOC) == 0)
|
||||
--
|
||||
2.14.3
|
||||
|
325
gdb-6.5-bz216711-clone-is-outermost.patch
Normal file
325
gdb-6.5-bz216711-clone-is-outermost.patch
Normal file
@ -0,0 +1,325 @@
|
||||
From FEDORA_PATCHES Mon Sep 17 00:00:00 2001
|
||||
From: Jan Kratochvil <jan.kratochvil@redhat.com>
|
||||
Date: Fri, 27 Oct 2017 21:07:50 +0200
|
||||
Subject: gdb-6.5-bz216711-clone-is-outermost.patch
|
||||
|
||||
FileName: gdb-6.5-bz216711-clone-is-outermost.patch
|
||||
|
||||
;; Fix bogus 0x0 unwind of the thread's topmost function clone(3) (BZ 216711).
|
||||
;;=fedora
|
||||
|
||||
https://bugzilla.redhat.com/bugzilla/show_bug.cgi?id=216711
|
||||
|
||||
FIXME: This workaround should be dropped and
|
||||
glibc/sysdeps/unix/sysv/linux/x86_64/clone.S should get CFI for the child
|
||||
instead.
|
||||
|
||||
2006-12-17 Jan Kratochvil <jan.kratochvil@redhat.com>
|
||||
|
||||
* gdb/amd64-linux-tdep.c (linux_clone_code): New variable.
|
||||
(LINUX_CLONE_LEN): New definition.
|
||||
(amd64_linux_clone_running, amd64_linux_outermost_frame): New function.
|
||||
(amd64_linux_init_abi): Initialize `outermost_frame_p'.
|
||||
* gdb/i386-tdep.c (i386_gdbarch_init): Likewise.
|
||||
* gdb/i386-tdep.h (gdbarch_tdep): Add `outermost_frame_p' member.
|
||||
* gdb/amd64-tdep.c (amd64_frame_this_id): Call `outermost_frame_p'.
|
||||
|
||||
2006-12-17 Jan Kratochvil <jan.kratochvil@redhat.com>
|
||||
|
||||
* gdb.threads/bt-clone-stop.exp, gdb.threads/bt-clone-stop.c:
|
||||
New file.
|
||||
|
||||
2007-10-16 Jan Kratochvil <jan.kratochvil@redhat.com>
|
||||
|
||||
Port to GDB-6.7.
|
||||
---
|
||||
gdb/amd64-linux-tdep.c | 76 +++++++++++++++++++++++++++++
|
||||
gdb/amd64-tdep.c | 11 +++++
|
||||
gdb/i386-tdep.c | 3 ++
|
||||
gdb/i386-tdep.h | 3 ++
|
||||
gdb/testsuite/gdb.threads/bt-clone-stop.c | 39 +++++++++++++++
|
||||
gdb/testsuite/gdb.threads/bt-clone-stop.exp | 61 +++++++++++++++++++++++
|
||||
6 files changed, 193 insertions(+)
|
||||
create mode 100644 gdb/testsuite/gdb.threads/bt-clone-stop.c
|
||||
create mode 100644 gdb/testsuite/gdb.threads/bt-clone-stop.exp
|
||||
|
||||
diff --git a/gdb/amd64-linux-tdep.c b/gdb/amd64-linux-tdep.c
|
||||
index 2bd3d31b75..2623bae42d 100644
|
||||
--- a/gdb/amd64-linux-tdep.c
|
||||
+++ b/gdb/amd64-linux-tdep.c
|
||||
@@ -291,6 +291,80 @@ amd64_linux_register_reggroup_p (struct gdbarch *gdbarch, int regnum,
|
||||
|
||||
/* Set the program counter for process PTID to PC. */
|
||||
|
||||
+/* Detect the outermost frame; during unwind of
|
||||
+ #5 0x000000305cec68c3 in clone () from /lib64/tls/libc.so.6
|
||||
+ avoid the additional bogus frame
|
||||
+ #6 0x0000000000000000 in ??
|
||||
+ We compare if the `linux_clone_code' block is _before_ unwound PC. */
|
||||
+
|
||||
+static const unsigned char linux_clone_code[] =
|
||||
+{
|
||||
+/* libc/sysdeps/unix/sysv/linux/x86_64/clone.S */
|
||||
+/* #ifdef RESET_PID */
|
||||
+/* ... */
|
||||
+/* mov $SYS_ify(getpid), %eax */
|
||||
+/* 0xb8, 0x27, 0x00, 0x00, 0x00 */
|
||||
+/* OR */
|
||||
+/* mov $SYS_ify(getpid), %rax */
|
||||
+/* 0x48, 0xc7, 0xc0, 0x27, 0x00, 0x00, 0x00 */
|
||||
+/* so just: */
|
||||
+ 0x27, 0x00, 0x00, 0x00,
|
||||
+/* syscall */
|
||||
+ 0x0f, 0x05,
|
||||
+/* movl %eax, %fs:PID */
|
||||
+ 0x64, 0x89, 0x04, 0x25, 0x94, 0x00, 0x00, 0x00,
|
||||
+/* movl %eax, %fs:TID */
|
||||
+ 0x64, 0x89, 0x04, 0x25, 0x90, 0x00, 0x00, 0x00,
|
||||
+/* #endif */
|
||||
+/* |* Set up arguments for the function call. *| */
|
||||
+/* popq %rax |* Function to call. *| */
|
||||
+ 0x58,
|
||||
+/* popq %rdi |* Argument. *| */
|
||||
+ 0x5f,
|
||||
+/* call *%rax$ */
|
||||
+ 0xff, 0xd0
|
||||
+};
|
||||
+
|
||||
+#define LINUX_CLONE_LEN (sizeof linux_clone_code)
|
||||
+
|
||||
+static int
|
||||
+amd64_linux_clone_running (struct frame_info *this_frame)
|
||||
+{
|
||||
+ CORE_ADDR pc = get_frame_pc (this_frame);
|
||||
+ unsigned char buf[LINUX_CLONE_LEN];
|
||||
+
|
||||
+ if (!safe_frame_unwind_memory (this_frame, pc - LINUX_CLONE_LEN, buf,
|
||||
+ LINUX_CLONE_LEN))
|
||||
+ return 0;
|
||||
+
|
||||
+ if (memcmp (buf, linux_clone_code, LINUX_CLONE_LEN) != 0)
|
||||
+ return 0;
|
||||
+
|
||||
+ return 1;
|
||||
+}
|
||||
+
|
||||
+static int
|
||||
+amd64_linux_outermost_frame (struct frame_info *this_frame)
|
||||
+{
|
||||
+ CORE_ADDR pc = get_frame_pc (this_frame);
|
||||
+ const char *name;
|
||||
+
|
||||
+ find_pc_partial_function (pc, &name, NULL, NULL);
|
||||
+
|
||||
+ /* If we have NAME, we can optimize the search.
|
||||
+ `clone' NAME still needs to have the code checked as its name may be
|
||||
+ present in the user code.
|
||||
+ `__clone' NAME should not be present in the user code but in the initial
|
||||
+ parts of the `__clone' implementation the unwind still makes sense.
|
||||
+ More detailed unwinding decision would be too much sensitive to possible
|
||||
+ subtle changes in specific glibc revisions. */
|
||||
+ if (name == NULL || strcmp (name, "clone") == 0
|
||||
+ || strcmp ("__clone", name) == 0)
|
||||
+ return (amd64_linux_clone_running (this_frame) != 0);
|
||||
+
|
||||
+ return 0;
|
||||
+}
|
||||
+
|
||||
static void
|
||||
amd64_linux_write_pc (struct regcache *regcache, CORE_ADDR pc)
|
||||
{
|
||||
@@ -1807,6 +1881,8 @@ amd64_linux_init_abi_common(struct gdbarch_info info, struct gdbarch *gdbarch)
|
||||
|
||||
tdep->xsave_xcr0_offset = I386_LINUX_XSAVE_XCR0_OFFSET;
|
||||
|
||||
+ tdep->outermost_frame_p = amd64_linux_outermost_frame;
|
||||
+
|
||||
/* Add the %orig_rax register used for syscall restarting. */
|
||||
set_gdbarch_write_pc (gdbarch, amd64_linux_write_pc);
|
||||
|
||||
diff --git a/gdb/amd64-tdep.c b/gdb/amd64-tdep.c
|
||||
index 7b2851f0a6..7c70792b3f 100644
|
||||
--- a/gdb/amd64-tdep.c
|
||||
+++ b/gdb/amd64-tdep.c
|
||||
@@ -2595,6 +2595,7 @@ amd64_frame_unwind_stop_reason (struct frame_info *this_frame,
|
||||
{
|
||||
struct amd64_frame_cache *cache =
|
||||
amd64_frame_cache (this_frame, this_cache);
|
||||
+ struct gdbarch_tdep *tdep = gdbarch_tdep (get_frame_arch (this_frame));
|
||||
|
||||
if (!cache->base_p)
|
||||
return UNWIND_UNAVAILABLE;
|
||||
@@ -2603,6 +2604,10 @@ amd64_frame_unwind_stop_reason (struct frame_info *this_frame,
|
||||
if (cache->base == 0)
|
||||
return UNWIND_OUTERMOST;
|
||||
|
||||
+ /* Detect OS dependent outermost frames; such as `clone'. */
|
||||
+ if (tdep->outermost_frame_p && tdep->outermost_frame_p (this_frame))
|
||||
+ return UNWIND_OUTERMOST;
|
||||
+
|
||||
return UNWIND_NO_REASON;
|
||||
}
|
||||
|
||||
@@ -2737,6 +2742,7 @@ amd64_sigtramp_frame_this_id (struct frame_info *this_frame,
|
||||
{
|
||||
struct amd64_frame_cache *cache =
|
||||
amd64_sigtramp_frame_cache (this_frame, this_cache);
|
||||
+ struct gdbarch_tdep *tdep = gdbarch_tdep (get_frame_arch (this_frame));
|
||||
|
||||
if (!cache->base_p)
|
||||
(*this_id) = frame_id_build_unavailable_stack (get_frame_pc (this_frame));
|
||||
@@ -2745,6 +2751,11 @@ amd64_sigtramp_frame_this_id (struct frame_info *this_frame,
|
||||
/* This marks the outermost frame. */
|
||||
return;
|
||||
}
|
||||
+ else if (tdep->outermost_frame_p && tdep->outermost_frame_p (this_frame))
|
||||
+ {
|
||||
+ /* Detect OS dependent outermost frames; such as `clone'. */
|
||||
+ return;
|
||||
+ }
|
||||
else
|
||||
(*this_id) = frame_id_build (cache->base + 16, get_frame_pc (this_frame));
|
||||
}
|
||||
diff --git a/gdb/i386-tdep.c b/gdb/i386-tdep.c
|
||||
index 9ce329eb20..d1b461b538 100644
|
||||
--- a/gdb/i386-tdep.c
|
||||
+++ b/gdb/i386-tdep.c
|
||||
@@ -8401,6 +8401,9 @@ i386_gdbarch_init (struct gdbarch_info info, struct gdbarch_list *arches)
|
||||
|
||||
tdep->xsave_xcr0_offset = -1;
|
||||
|
||||
+ /* Unwinding stops on i386 automatically. */
|
||||
+ tdep->outermost_frame_p = NULL;
|
||||
+
|
||||
tdep->record_regmap = i386_record_regmap;
|
||||
|
||||
set_gdbarch_long_long_align_bit (gdbarch, 32);
|
||||
diff --git a/gdb/i386-tdep.h b/gdb/i386-tdep.h
|
||||
index a71c103a88..5ee336b8cb 100644
|
||||
--- a/gdb/i386-tdep.h
|
||||
+++ b/gdb/i386-tdep.h
|
||||
@@ -251,6 +251,9 @@ struct gdbarch_tdep
|
||||
|
||||
/* Regsets. */
|
||||
const struct regset *fpregset;
|
||||
+
|
||||
+ /* Detect OS dependent outermost frames; such as `clone'. */
|
||||
+ int (*outermost_frame_p) (struct frame_info *this_frame);
|
||||
};
|
||||
|
||||
/* Floating-point registers. */
|
||||
diff --git a/gdb/testsuite/gdb.threads/bt-clone-stop.c b/gdb/testsuite/gdb.threads/bt-clone-stop.c
|
||||
new file mode 100644
|
||||
index 0000000000..2ac93f8664
|
||||
--- /dev/null
|
||||
+++ b/gdb/testsuite/gdb.threads/bt-clone-stop.c
|
||||
@@ -0,0 +1,39 @@
|
||||
+/* This testcase is part of GDB, the GNU debugger.
|
||||
+
|
||||
+ Copyright 2006 Free Software Foundation, Inc.
|
||||
+
|
||||
+ This program is free software; you can redistribute it and/or modify
|
||||
+ it under the terms of the GNU General Public License as published by
|
||||
+ the Free Software Foundation; either version 2 of the License, or
|
||||
+ (at your option) any later version.
|
||||
+
|
||||
+ This program is distributed in the hope that it will be useful,
|
||||
+ but WITHOUT ANY WARRANTY; without even the implied warranty of
|
||||
+ MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
|
||||
+ GNU General Public License for more details.
|
||||
+
|
||||
+ You should have received a copy of the GNU General Public License
|
||||
+ along with this program; if not, write to the Free Software
|
||||
+ Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston,
|
||||
+ MA 02110-1301, USA. */
|
||||
+
|
||||
+
|
||||
+#include <pthread.h>
|
||||
+#include <unistd.h>
|
||||
+#include <assert.h>
|
||||
+
|
||||
+
|
||||
+void *threader (void *arg)
|
||||
+{
|
||||
+ assert (0);
|
||||
+ return NULL;
|
||||
+}
|
||||
+
|
||||
+int main (void)
|
||||
+{
|
||||
+ pthread_t t1;
|
||||
+
|
||||
+ pthread_create (&t1, NULL, threader, (void *) NULL);
|
||||
+ for (;;)
|
||||
+ pause();
|
||||
+}
|
||||
diff --git a/gdb/testsuite/gdb.threads/bt-clone-stop.exp b/gdb/testsuite/gdb.threads/bt-clone-stop.exp
|
||||
new file mode 100644
|
||||
index 0000000000..02728e05b9
|
||||
--- /dev/null
|
||||
+++ b/gdb/testsuite/gdb.threads/bt-clone-stop.exp
|
||||
@@ -0,0 +1,61 @@
|
||||
+# Copyright 2006 Free Software Foundation, Inc.
|
||||
+
|
||||
+# This program is free software; you can redistribute it and/or modify
|
||||
+# it under the terms of the GNU General Public License as published by
|
||||
+# the Free Software Foundation; either version 2 of the License, or
|
||||
+# (at your option) any later version.
|
||||
+#
|
||||
+# This program is distributed in the hope that it will be useful,
|
||||
+# but WITHOUT ANY WARRANTY; without even the implied warranty of
|
||||
+# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
|
||||
+# GNU General Public License for more details.
|
||||
+#
|
||||
+# You should have received a copy of the GNU General Public License
|
||||
+# along with this program; if not, write to the Free Software
|
||||
+# Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA.
|
||||
+
|
||||
+# Backtraced `clone' must not have `PC == 0' as its previous frame.
|
||||
+
|
||||
+if $tracelevel then {
|
||||
+ strace $tracelevel
|
||||
+}
|
||||
+
|
||||
+set testfile bt-clone-stop
|
||||
+set srcfile ${testfile}.c
|
||||
+set binfile [standard_output_file ${testfile}]
|
||||
+if { [gdb_compile_pthreads "${srcdir}/${subdir}/${srcfile}" "${binfile}" executable {debug}] != "" } {
|
||||
+ untested "Couldn't compile test program"
|
||||
+ return -1
|
||||
+}
|
||||
+
|
||||
+# Get things started.
|
||||
+
|
||||
+gdb_exit
|
||||
+gdb_start
|
||||
+gdb_reinitialize_dir $srcdir/$subdir
|
||||
+gdb_load ${binfile}
|
||||
+
|
||||
+# threader: threader.c:8: threader: Assertion `0' failed.
|
||||
+# Program received signal SIGABRT, Aborted.
|
||||
+
|
||||
+gdb_test "run" \
|
||||
+ {Thread 2 "bt-clone-stop" received signal SIGABRT.*} \
|
||||
+ "run"
|
||||
+
|
||||
+# Former gdb unwind (the first function is `clone'):
|
||||
+# #5 0x0000003421ecd62d in ?? () from /lib64/libc.so.6
|
||||
+# #6 0x0000000000000000 in ?? ()
|
||||
+# (gdb)
|
||||
+# Tested `amd64_linux_outermost_frame' functionality should omit the line `#6'.
|
||||
+#
|
||||
+# Two `-re' cases below must be in this order (1st is a subset of the 2nd one).
|
||||
+# Unhandled case below should not happen and it is fortunately handled by
|
||||
+# `amd64_linux_outermost_frame' as FAIL (and result `0x0 entry output invalid').
|
||||
+gdb_test_multiple "bt" "0x0 entry output invalid" {
|
||||
+ -re "in threader \\(.*\n#\[0-9\]* *0x0* in .*$gdb_prompt $" {
|
||||
+ fail "0x0 entry found"
|
||||
+ }
|
||||
+ -re "in threader \\(.*$gdb_prompt $" {
|
||||
+ pass "0x0 entry not found"
|
||||
+ }
|
||||
+}
|
||||
--
|
||||
2.14.3
|
||||
|
@ -3,13 +3,22 @@ From: Fedora GDB patches <invalid@email.com>
|
||||
Date: Fri, 27 Oct 2017 21:07:50 +0200
|
||||
Subject: gdb-6.5-bz218379-ppc-solib-trampoline-test.patch
|
||||
|
||||
FileName: gdb-6.5-bz218379-ppc-solib-trampoline-test.patch
|
||||
|
||||
;; Test sideeffects of skipping ppc .so libs trampolines (BZ 218379).
|
||||
;;=fedoratest
|
||||
|
||||
https://bugzilla.redhat.com/bugzilla/show_bug.cgi?id=218379
|
||||
---
|
||||
gdb/testsuite/gdb.base/step-over-trampoline.c | 28 +++++++++++++
|
||||
gdb/testsuite/gdb.base/step-over-trampoline.exp | 54 +++++++++++++++++++++++++
|
||||
2 files changed, 82 insertions(+)
|
||||
create mode 100644 gdb/testsuite/gdb.base/step-over-trampoline.c
|
||||
create mode 100644 gdb/testsuite/gdb.base/step-over-trampoline.exp
|
||||
|
||||
diff --git a/gdb/testsuite/gdb.base/step-over-trampoline.c b/gdb/testsuite/gdb.base/step-over-trampoline.c
|
||||
new file mode 100644
|
||||
index 0000000000..a012da1031
|
||||
--- /dev/null
|
||||
+++ b/gdb/testsuite/gdb.base/step-over-trampoline.c
|
||||
@@ -0,0 +1,28 @@
|
||||
@ -43,6 +52,7 @@ new file mode 100644
|
||||
+}
|
||||
diff --git a/gdb/testsuite/gdb.base/step-over-trampoline.exp b/gdb/testsuite/gdb.base/step-over-trampoline.exp
|
||||
new file mode 100644
|
||||
index 0000000000..a183e36263
|
||||
--- /dev/null
|
||||
+++ b/gdb/testsuite/gdb.base/step-over-trampoline.exp
|
||||
@@ -0,0 +1,54 @@
|
||||
@ -100,3 +110,6 @@ new file mode 100644
|
||||
+ fail "stepped into trampoline"
|
||||
+ }
|
||||
+}
|
||||
--
|
||||
2.14.3
|
||||
|
||||
|
@ -3,16 +3,22 @@ From: Fedora GDB patches <invalid@email.com>
|
||||
Date: Fri, 27 Oct 2017 21:07:50 +0200
|
||||
Subject: gdb-6.5-bz218379-solib-trampoline-lookup-lock-fix.patch
|
||||
|
||||
FileName: gdb-6.5-bz218379-solib-trampoline-lookup-lock-fix.patch
|
||||
|
||||
;; Fix lockup on trampoline vs. its function lookup; unreproducible (BZ 218379).
|
||||
;;=fedora
|
||||
|
||||
https://bugzilla.redhat.com/bugzilla/show_bug.cgi?id=218379
|
||||
---
|
||||
gdb/symtab.c | 7 +++++++
|
||||
1 file changed, 7 insertions(+)
|
||||
|
||||
diff --git a/gdb/symtab.c b/gdb/symtab.c
|
||||
index 81f4fc9ec5..a7e8431cfe 100644
|
||||
--- a/gdb/symtab.c
|
||||
+++ b/gdb/symtab.c
|
||||
@@ -3169,6 +3169,13 @@ find_pc_sect_line (CORE_ADDR pc, struct obj_section *section, int notcurrent)
|
||||
msymbol->linkage_name ()); */
|
||||
@@ -3166,6 +3166,13 @@ find_pc_sect_line (CORE_ADDR pc, struct obj_section *section, int notcurrent)
|
||||
SYMBOL_LINKAGE_NAME (msymbol)); */
|
||||
;
|
||||
/* fall through */
|
||||
+ /* `msymbol' trampoline may be located before its .text symbol
|
||||
@ -20,8 +26,11 @@ 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.minsym->linkage_name (), paddress (target_gdbarch (), 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));
|
||||
+ /* fall through */
|
||||
else
|
||||
{
|
||||
/* Detect an obvious case of infinite recursion. If this
|
||||
return find_pc_line (BMSYMBOL_VALUE_ADDRESS (mfunsym), 0);
|
||||
}
|
||||
--
|
||||
2.14.3
|
||||
|
||||
|
@ -3,11 +3,18 @@ From: Fedora GDB patches <invalid@email.com>
|
||||
Date: Fri, 27 Oct 2017 21:07:50 +0200
|
||||
Subject: gdb-6.5-bz243845-stale-testing-zombie-test.patch
|
||||
|
||||
FileName: gdb-6.5-bz243845-stale-testing-zombie-test.patch
|
||||
|
||||
;; Test leftover zombie process (BZ 243845).
|
||||
;;=fedoratest
|
||||
---
|
||||
gdb/testsuite/gdb.base/tracefork-zombie.exp | 75 +++++++++++++++++++++++++++++
|
||||
1 file changed, 75 insertions(+)
|
||||
create mode 100644 gdb/testsuite/gdb.base/tracefork-zombie.exp
|
||||
|
||||
diff --git a/gdb/testsuite/gdb.base/tracefork-zombie.exp b/gdb/testsuite/gdb.base/tracefork-zombie.exp
|
||||
new file mode 100644
|
||||
index 0000000000..5807040840
|
||||
--- /dev/null
|
||||
+++ b/gdb/testsuite/gdb.base/tracefork-zombie.exp
|
||||
@@ -0,0 +1,75 @@
|
||||
@ -86,3 +93,6 @@ new file mode 100644
|
||||
+} else {
|
||||
+ fail $test
|
||||
+}
|
||||
--
|
||||
2.14.3
|
||||
|
||||
|
@ -3,11 +3,20 @@ From: Fedora GDB patches <invalid@email.com>
|
||||
Date: Fri, 27 Oct 2017 21:07:50 +0200
|
||||
Subject: gdb-6.5-gcore-buffer-limit-test.patch
|
||||
|
||||
FileName: gdb-6.5-gcore-buffer-limit-test.patch
|
||||
|
||||
;; Test gcore memory and time requirements for large inferiors.
|
||||
;;=fedoratest
|
||||
---
|
||||
gdb/testsuite/gdb.base/gcore-excessive-memory.c | 37 +++++++++
|
||||
gdb/testsuite/gdb.base/gcore-excessive-memory.exp | 94 +++++++++++++++++++++++
|
||||
2 files changed, 131 insertions(+)
|
||||
create mode 100644 gdb/testsuite/gdb.base/gcore-excessive-memory.c
|
||||
create mode 100644 gdb/testsuite/gdb.base/gcore-excessive-memory.exp
|
||||
|
||||
diff --git a/gdb/testsuite/gdb.base/gcore-excessive-memory.c b/gdb/testsuite/gdb.base/gcore-excessive-memory.c
|
||||
new file mode 100644
|
||||
index 0000000000..56b4d3a63a
|
||||
--- /dev/null
|
||||
+++ b/gdb/testsuite/gdb.base/gcore-excessive-memory.c
|
||||
@@ -0,0 +1,37 @@
|
||||
@ -50,6 +59,7 @@ new file mode 100644
|
||||
+}
|
||||
diff --git a/gdb/testsuite/gdb.base/gcore-excessive-memory.exp b/gdb/testsuite/gdb.base/gcore-excessive-memory.exp
|
||||
new file mode 100644
|
||||
index 0000000000..4e71b5534e
|
||||
--- /dev/null
|
||||
+++ b/gdb/testsuite/gdb.base/gcore-excessive-memory.exp
|
||||
@@ -0,0 +1,94 @@
|
||||
@ -147,3 +157,6 @@ new file mode 100644
|
||||
+
|
||||
+# Cleanup.
|
||||
+exec kill -9 $pid_of_bin
|
||||
--
|
||||
2.14.3
|
||||
|
||||
|
@ -3,11 +3,20 @@ From: Fedora GDB patches <invalid@email.com>
|
||||
Date: Fri, 27 Oct 2017 21:07:50 +0200
|
||||
Subject: gdb-6.5-ia64-libunwind-leak-test.patch
|
||||
|
||||
FileName: gdb-6.5-ia64-libunwind-leak-test.patch
|
||||
|
||||
;; Test ia64 memory leaks of the code using libunwind.
|
||||
;;=fedoratest
|
||||
---
|
||||
gdb/testsuite/gdb.base/unwind-leak.c | 29 ++++++++++++
|
||||
gdb/testsuite/gdb.base/unwind-leak.exp | 83 ++++++++++++++++++++++++++++++++++
|
||||
2 files changed, 112 insertions(+)
|
||||
create mode 100644 gdb/testsuite/gdb.base/unwind-leak.c
|
||||
create mode 100644 gdb/testsuite/gdb.base/unwind-leak.exp
|
||||
|
||||
diff --git a/gdb/testsuite/gdb.base/unwind-leak.c b/gdb/testsuite/gdb.base/unwind-leak.c
|
||||
new file mode 100644
|
||||
index 0000000000..58e34fb264
|
||||
--- /dev/null
|
||||
+++ b/gdb/testsuite/gdb.base/unwind-leak.c
|
||||
@@ -0,0 +1,29 @@
|
||||
@ -42,6 +51,7 @@ new file mode 100644
|
||||
+}
|
||||
diff --git a/gdb/testsuite/gdb.base/unwind-leak.exp b/gdb/testsuite/gdb.base/unwind-leak.exp
|
||||
new file mode 100644
|
||||
index 0000000000..098962a57c
|
||||
--- /dev/null
|
||||
+++ b/gdb/testsuite/gdb.base/unwind-leak.exp
|
||||
@@ -0,0 +1,83 @@
|
||||
@ -128,3 +138,6 @@ new file mode 100644
|
||||
+ fail $test
|
||||
+ }
|
||||
+}
|
||||
--
|
||||
2.14.3
|
||||
|
||||
|
@ -3,11 +3,18 @@ From: Fedora GDB patches <invalid@email.com>
|
||||
Date: Fri, 27 Oct 2017 21:07:50 +0200
|
||||
Subject: gdb-6.5-last-address-space-byte-test.patch
|
||||
|
||||
FileName: gdb-6.5-last-address-space-byte-test.patch
|
||||
|
||||
;; Testcase for deadlocking on last address space byte; for corrupted backtraces.
|
||||
;;=fedoratest
|
||||
---
|
||||
.../gdb.base/largecore-last-address-lock.exp | 49 ++++++++++++++++++++++
|
||||
1 file changed, 49 insertions(+)
|
||||
create mode 100644 gdb/testsuite/gdb.base/largecore-last-address-lock.exp
|
||||
|
||||
diff --git a/gdb/testsuite/gdb.base/largecore-last-address-lock.exp b/gdb/testsuite/gdb.base/largecore-last-address-lock.exp
|
||||
new file mode 100644
|
||||
index 0000000000..8a597e9b15
|
||||
--- /dev/null
|
||||
+++ b/gdb/testsuite/gdb.base/largecore-last-address-lock.exp
|
||||
@@ -0,0 +1,49 @@
|
||||
@ -60,3 +67,6 @@ new file mode 100644
|
||||
+ "Read the last address space byte"
|
||||
+
|
||||
+set timeout ${timeoutold}
|
||||
--
|
||||
2.14.3
|
||||
|
||||
|
@ -3,14 +3,23 @@ From: Fedora GDB patches <invalid@email.com>
|
||||
Date: Fri, 27 Oct 2017 21:07:50 +0200
|
||||
Subject: gdb-6.5-missed-trap-on-step-test.patch
|
||||
|
||||
FileName: gdb-6.5-missed-trap-on-step-test.patch
|
||||
|
||||
;; Test hiding unexpected breakpoints on intentional step commands.
|
||||
;;=fedoratest
|
||||
|
||||
Fix has been committed to:
|
||||
gdb-6.6-scheduler_locking-step-sw-watchpoints2.patch
|
||||
---
|
||||
gdb/testsuite/gdb.base/watchpoint-during-step.c | 30 ++++++++++++++++
|
||||
gdb/testsuite/gdb.base/watchpoint-during-step.exp | 44 +++++++++++++++++++++++
|
||||
2 files changed, 74 insertions(+)
|
||||
create mode 100644 gdb/testsuite/gdb.base/watchpoint-during-step.c
|
||||
create mode 100644 gdb/testsuite/gdb.base/watchpoint-during-step.exp
|
||||
|
||||
diff --git a/gdb/testsuite/gdb.base/watchpoint-during-step.c b/gdb/testsuite/gdb.base/watchpoint-during-step.c
|
||||
new file mode 100644
|
||||
index 0000000000..107eae45a0
|
||||
--- /dev/null
|
||||
+++ b/gdb/testsuite/gdb.base/watchpoint-during-step.c
|
||||
@@ -0,0 +1,30 @@
|
||||
@ -46,6 +55,7 @@ new file mode 100644
|
||||
+}
|
||||
diff --git a/gdb/testsuite/gdb.base/watchpoint-during-step.exp b/gdb/testsuite/gdb.base/watchpoint-during-step.exp
|
||||
new file mode 100644
|
||||
index 0000000000..12ba99f1a9
|
||||
--- /dev/null
|
||||
+++ b/gdb/testsuite/gdb.base/watchpoint-during-step.exp
|
||||
@@ -0,0 +1,44 @@
|
||||
@ -93,3 +103,6 @@ new file mode 100644
|
||||
+# we step from as in this case it is a valid upstream KFAIL gdb/38
|
||||
+
|
||||
+gdb_test "step" ".*Old value = 2.*New value = 3.*" "Catch the watchpoint"
|
||||
--
|
||||
2.14.3
|
||||
|
||||
|
@ -3,16 +3,23 @@ From: Fedora GDB patches <invalid@email.com>
|
||||
Date: Fri, 27 Oct 2017 21:07:50 +0200
|
||||
Subject: gdb-6.5-readline-long-line-crash-test.patch
|
||||
|
||||
FileName: gdb-6.5-readline-long-line-crash-test.patch
|
||||
|
||||
;; Fix readline segfault on excessively long hand-typed lines.
|
||||
;;=fedoratest
|
||||
|
||||
https://bugzilla.redhat.com/bugzilla/show_bug.cgi?id=214196
|
||||
---
|
||||
gdb/testsuite/gdb.base/readline-overflow.exp | 126 +++++++++++++++++++++++++++
|
||||
1 file changed, 126 insertions(+)
|
||||
create mode 100644 gdb/testsuite/gdb.base/readline-overflow.exp
|
||||
|
||||
diff --git a/gdb/testsuite/gdb.base/readline-overflow.exp b/gdb/testsuite/gdb.base/readline-overflow.exp
|
||||
new file mode 100644
|
||||
index 0000000000..5e46816d21
|
||||
--- /dev/null
|
||||
+++ b/gdb/testsuite/gdb.base/readline-overflow.exp
|
||||
@@ -0,0 +1,104 @@
|
||||
@@ -0,0 +1,126 @@
|
||||
+# Copyright 2006 Free Software Foundation, Inc.
|
||||
+
|
||||
+# This program is free software; you can redistribute it and/or modify
|
||||
@ -44,24 +51,27 @@ new file mode 100644
|
||||
+ strace $tracelevel
|
||||
+}
|
||||
+
|
||||
+global env
|
||||
+
|
||||
+save_vars { env(INPUTRC) env(GDBHISTFILE) env(HISTSIZE) TERM timeout } {
|
||||
+ # The arrow key test relies on the standard VT100 bindings, so
|
||||
+ # make sure that an appropriate terminal is selected. The same
|
||||
+ # bug doesn't show up if we use ^P / ^N instead.
|
||||
+ setenv TERM vt100
|
||||
+
|
||||
+# Don't let a .inputrc file or an existing setting of INPUTRC mess up
|
||||
+# the test results. Even if /dev/null doesn't exist on the particular
|
||||
+# platform, the readline library will use the default setting just by
|
||||
+# failing to open the file. OTOH, opening /dev/null successfully will
|
||||
+# also result in the default settings being used since nothing will be
|
||||
+# read from this file.
|
||||
+global env
|
||||
+if [info exists env(INPUTRC)] {
|
||||
+ set old_inputrc $env(INPUTRC)
|
||||
+}
|
||||
+set env(INPUTRC) "/dev/null"
|
||||
+
|
||||
+set oldtimeout1 $timeout
|
||||
+set timeout 600
|
||||
+
|
||||
+if [info exists env(GDBHISTFILE)] {
|
||||
+ set old_gdbhistfile $env(GDBHISTFILE)
|
||||
+}
|
||||
+if [info exists env(HISTSIZE)] {
|
||||
+ set old_histsize $env(HISTSIZE)
|
||||
+}
|
||||
+set env(GDBHISTFILE) "${srcdir}/${subdir}/gdb_history"
|
||||
+set env(HISTSIZE) "10"
|
||||
+
|
||||
@ -116,4 +126,26 @@ new file mode 100644
|
||||
+gdb_test "" \
|
||||
+ "No executable file specified..*" \
|
||||
+ "All the characters transferred"
|
||||
+
|
||||
+
|
||||
+# Restore globals modified in this test...
|
||||
+if [info exists old_inputrc] {
|
||||
+ set env(INPUTRC) $old_inputrc
|
||||
+} else {
|
||||
+ unset env(INPUTRC)
|
||||
+}
|
||||
+if [info exists old_gdbhistfile] {
|
||||
+ set env(GDBHISTFILE) $old_gdbhistfile
|
||||
+} else {
|
||||
+ unset env(GDBHISTFILE)
|
||||
+}
|
||||
+if [info exists old_histsize] {
|
||||
+ set env(HISTSIZE) $old_histsize
|
||||
+} else {
|
||||
+ unset env(HISTSIZE)
|
||||
+}
|
||||
+set timeout $oldtimeout1
|
||||
+
|
||||
--
|
||||
2.14.3
|
||||
|
||||
|
@ -3,11 +3,22 @@ From: Fedora GDB patches <invalid@email.com>
|
||||
Date: Fri, 27 Oct 2017 21:07:50 +0200
|
||||
Subject: gdb-6.5-section-num-fixup-test.patch
|
||||
|
||||
FileName: gdb-6.5-section-num-fixup-test.patch
|
||||
|
||||
;; Test a crash on libraries missing the .text section.
|
||||
;;=fedoratest
|
||||
---
|
||||
gdb/testsuite/gdb.base/datalib-lib.c | 22 +++++++++++++++
|
||||
gdb/testsuite/gdb.base/datalib-main.c | 26 ++++++++++++++++++
|
||||
gdb/testsuite/gdb.base/datalib.exp | 51 +++++++++++++++++++++++++++++++++++
|
||||
3 files changed, 99 insertions(+)
|
||||
create mode 100644 gdb/testsuite/gdb.base/datalib-lib.c
|
||||
create mode 100644 gdb/testsuite/gdb.base/datalib-main.c
|
||||
create mode 100644 gdb/testsuite/gdb.base/datalib.exp
|
||||
|
||||
diff --git a/gdb/testsuite/gdb.base/datalib-lib.c b/gdb/testsuite/gdb.base/datalib-lib.c
|
||||
new file mode 100644
|
||||
index 0000000000..dd39e23746
|
||||
--- /dev/null
|
||||
+++ b/gdb/testsuite/gdb.base/datalib-lib.c
|
||||
@@ -0,0 +1,22 @@
|
||||
@ -35,6 +46,7 @@ new file mode 100644
|
||||
+int var;
|
||||
diff --git a/gdb/testsuite/gdb.base/datalib-main.c b/gdb/testsuite/gdb.base/datalib-main.c
|
||||
new file mode 100644
|
||||
index 0000000000..4e0b80d2d6
|
||||
--- /dev/null
|
||||
+++ b/gdb/testsuite/gdb.base/datalib-main.c
|
||||
@@ -0,0 +1,26 @@
|
||||
@ -66,6 +78,7 @@ new file mode 100644
|
||||
+}
|
||||
diff --git a/gdb/testsuite/gdb.base/datalib.exp b/gdb/testsuite/gdb.base/datalib.exp
|
||||
new file mode 100644
|
||||
index 0000000000..385716d901
|
||||
--- /dev/null
|
||||
+++ b/gdb/testsuite/gdb.base/datalib.exp
|
||||
@@ -0,0 +1,51 @@
|
||||
@ -120,3 +133,6 @@ new file mode 100644
|
||||
+gdb_test "start" \
|
||||
+ "main \\(\\) at .*${srcfilemain}.*" \
|
||||
+ "start"
|
||||
--
|
||||
2.14.3
|
||||
|
||||
|
@ -3,6 +3,8 @@ From: Jan Kratochvil <jan.kratochvil@redhat.com>
|
||||
Date: Fri, 27 Oct 2017 21:07:50 +0200
|
||||
Subject: gdb-6.5-sharedlibrary-path.patch
|
||||
|
||||
FileName: gdb-6.5-sharedlibrary-path.patch
|
||||
|
||||
;; Fix TLS symbols resolving for shared libraries with a relative pathname.
|
||||
;; The testsuite needs `gdb-6.5-tls-of-separate-debuginfo.patch'.
|
||||
;;=fedoratest: One should recheck if it is really fixed upstream.
|
||||
@ -28,9 +30,18 @@ The testsuite needs `gdb-6.5-tls-of-separate-debuginfo.patch'.
|
||||
2008-02-27 Jan Kratochvil <jan.kratochvil@redhat.com>
|
||||
|
||||
Port to gdb-6.7.50.20080227.
|
||||
---
|
||||
gdb/testsuite/gdb.threads/tls-sepdebug-main.c | 25 +++++++
|
||||
gdb/testsuite/gdb.threads/tls-sepdebug-shared.c | 22 +++++++
|
||||
gdb/testsuite/gdb.threads/tls-sepdebug.exp | 87 +++++++++++++++++++++++++
|
||||
3 files changed, 134 insertions(+)
|
||||
create mode 100644 gdb/testsuite/gdb.threads/tls-sepdebug-main.c
|
||||
create mode 100644 gdb/testsuite/gdb.threads/tls-sepdebug-shared.c
|
||||
create mode 100644 gdb/testsuite/gdb.threads/tls-sepdebug.exp
|
||||
|
||||
diff --git a/gdb/testsuite/gdb.threads/tls-sepdebug-main.c b/gdb/testsuite/gdb.threads/tls-sepdebug-main.c
|
||||
new file mode 100644
|
||||
index 0000000000..ea5d0174d6
|
||||
--- /dev/null
|
||||
+++ b/gdb/testsuite/gdb.threads/tls-sepdebug-main.c
|
||||
@@ -0,0 +1,25 @@
|
||||
@ -61,6 +72,7 @@ new file mode 100644
|
||||
+}
|
||||
diff --git a/gdb/testsuite/gdb.threads/tls-sepdebug-shared.c b/gdb/testsuite/gdb.threads/tls-sepdebug-shared.c
|
||||
new file mode 100644
|
||||
index 0000000000..61b49251ba
|
||||
--- /dev/null
|
||||
+++ b/gdb/testsuite/gdb.threads/tls-sepdebug-shared.c
|
||||
@@ -0,0 +1,22 @@
|
||||
@ -88,6 +100,7 @@ new file mode 100644
|
||||
+__thread int var = 42;
|
||||
diff --git a/gdb/testsuite/gdb.threads/tls-sepdebug.exp b/gdb/testsuite/gdb.threads/tls-sepdebug.exp
|
||||
new file mode 100644
|
||||
index 0000000000..00773f78f2
|
||||
--- /dev/null
|
||||
+++ b/gdb/testsuite/gdb.threads/tls-sepdebug.exp
|
||||
@@ -0,0 +1,87 @@
|
||||
@ -178,3 +191,6 @@ new file mode 100644
|
||||
+ "\\\$1 = \[0-9\].*" \
|
||||
+ "print TLS variable from a shared library with $name-directory separate debug info file"
|
||||
+}
|
||||
--
|
||||
2.14.3
|
||||
|
||||
|
@ -1,7 +1,9 @@
|
||||
From FEDORA_PATCHES Mon Sep 17 00:00:00 2001
|
||||
From: Fedora GDB patches <invalid@email.com>
|
||||
Date: Fri, 27 Oct 2017 21:07:50 +0200
|
||||
Subject: gdb-6.6-buildid-locate-core-as-arg.patch
|
||||
Subject: print a more useful error message for "gdb core"
|
||||
|
||||
FileName: gdb-6.6-buildid-locate-core-as-arg.patch
|
||||
|
||||
;;=push+jan
|
||||
|
||||
@ -60,20 +62,39 @@ Http://sourceware.org/ml/gdb-patches/2010-01/msg00517.html
|
||||
|
||||
* exec.c (exec_file_attach): Print a more useful error message if the
|
||||
user did "gdb core".
|
||||
---
|
||||
gdb/common/common-exceptions.h | 3 +++
|
||||
gdb/exec.c | 22 +++++++++++++++---
|
||||
gdb/main.c | 53 +++++++++++++++++++++++++++++++++++++++---
|
||||
3 files changed, 72 insertions(+), 6 deletions(-)
|
||||
|
||||
diff --git a/gdb/common/common-exceptions.h b/gdb/common/common-exceptions.h
|
||||
index 15c85e28ab..9fe2375bce 100644
|
||||
--- a/gdb/common/common-exceptions.h
|
||||
+++ b/gdb/common/common-exceptions.h
|
||||
@@ -104,6 +104,9 @@ enum errors {
|
||||
"_ERROR" is appended to the name. */
|
||||
MAX_COMPLETIONS_REACHED_ERROR,
|
||||
|
||||
+ /* Attempt to load a core file as executable. */
|
||||
+ IS_CORE_ERROR,
|
||||
+
|
||||
/* Add more errors here. */
|
||||
NR_ERRORS
|
||||
};
|
||||
diff --git a/gdb/exec.c b/gdb/exec.c
|
||||
index c8c32ecc27..b329e2b834 100644
|
||||
--- a/gdb/exec.c
|
||||
+++ b/gdb/exec.c
|
||||
@@ -18,6 +18,8 @@
|
||||
along with this program. If not, see <http://www.gnu.org/licenses/>. */
|
||||
|
||||
#include "defs.h"
|
||||
+#include "arch-utils.h"
|
||||
@@ -35,6 +35,7 @@
|
||||
#include "progspace.h"
|
||||
#include "gdb_bfd.h"
|
||||
#include "gcore.h"
|
||||
+#include "exceptions.h"
|
||||
#include "frame.h"
|
||||
#include "inferior.h"
|
||||
#include "target.h"
|
||||
@@ -495,12 +497,27 @@ exec_file_attach (const char *filename, int from_tty)
|
||||
|
||||
#include <fcntl.h>
|
||||
#include "readline/readline.h"
|
||||
@@ -346,12 +347,27 @@ exec_file_attach (const char *filename, int from_tty)
|
||||
|
||||
if (!bfd_check_format_matches (exec_bfd, bfd_object, &matching))
|
||||
{
|
||||
@ -88,9 +109,9 @@ diff --git a/gdb/exec.c b/gdb/exec.c
|
||||
/* Make sure to close exec_bfd, or else "run" might try to use
|
||||
it. */
|
||||
exec_close ();
|
||||
- error (_("\"%ps\": not in executable format: %s"),
|
||||
- styled_string (file_name_style.style (), scratch_pathname),
|
||||
- gdb_bfd_errmsg (bfd_get_error (), matching).c_str ());
|
||||
- error (_("\"%s\": not in executable format: %s"),
|
||||
- scratch_pathname,
|
||||
- gdb_bfd_errmsg (bfd_get_error (), matching));
|
||||
+
|
||||
+ if (is_core != 0)
|
||||
+ throw_error (IS_CORE_ERROR,
|
||||
@ -98,16 +119,17 @@ diff --git a/gdb/exec.c b/gdb/exec.c
|
||||
+ "Please specify an executable to debug."),
|
||||
+ scratch_pathname);
|
||||
+ else
|
||||
+ error (_("\"%ps\": not in executable format: %s"),
|
||||
+ styled_string (file_name_style.style (), scratch_pathname),
|
||||
+ gdb_bfd_errmsg (bfd_get_error (), matching).c_str ());
|
||||
+ error (_("\"%s\": not in executable format: %s"),
|
||||
+ scratch_pathname,
|
||||
+ gdb_bfd_errmsg (bfd_get_error (), matching));
|
||||
}
|
||||
|
||||
if (build_section_table (exec_bfd, §ions, §ions_end))
|
||||
diff --git a/gdb/main.c b/gdb/main.c
|
||||
index 3c98787edb..17d35f4a8a 100644
|
||||
--- a/gdb/main.c
|
||||
+++ b/gdb/main.c
|
||||
@@ -524,6 +524,34 @@ struct cmdarg
|
||||
@@ -446,6 +446,37 @@ struct cmdarg
|
||||
char *string;
|
||||
};
|
||||
|
||||
@ -118,13 +140,15 @@ diff --git a/gdb/main.c b/gdb/main.c
|
||||
+static void
|
||||
+exec_or_core_file_attach (const char *filename, int from_tty)
|
||||
+{
|
||||
+ volatile struct gdb_exception e;
|
||||
+
|
||||
+ gdb_assert (exec_bfd == NULL);
|
||||
+
|
||||
+ try
|
||||
+ TRY
|
||||
+ {
|
||||
+ exec_file_attach (filename, from_tty);
|
||||
+ }
|
||||
+ catch (gdb_exception_error &e)
|
||||
+ CATCH (e, RETURN_MASK_ALL)
|
||||
+ {
|
||||
+ if (e.error == IS_CORE_ERROR)
|
||||
+ {
|
||||
@ -135,14 +159,15 @@ diff --git a/gdb/main.c b/gdb/main.c
|
||||
+ if (exec_bfd != NULL)
|
||||
+ return;
|
||||
+ }
|
||||
+ throw_exception (std::move (e));
|
||||
+ throw_exception (e);
|
||||
+ }
|
||||
+ END_CATCH
|
||||
+}
|
||||
+
|
||||
static void
|
||||
captured_main_1 (struct captured_main_args *context)
|
||||
{
|
||||
@@ -959,6 +987,8 @@ captured_main_1 (struct captured_main_args *context)
|
||||
@@ -882,6 +913,8 @@ captured_main_1 (struct captured_main_args *context)
|
||||
{
|
||||
symarg = argv[optind];
|
||||
execarg = argv[optind];
|
||||
@ -151,7 +176,7 @@ diff --git a/gdb/main.c b/gdb/main.c
|
||||
optind++;
|
||||
}
|
||||
|
||||
@@ -1114,12 +1144,25 @@ captured_main_1 (struct captured_main_args *context)
|
||||
@@ -1032,11 +1065,25 @@ captured_main_1 (struct captured_main_args *context)
|
||||
&& symarg != NULL
|
||||
&& strcmp (execarg, symarg) == 0)
|
||||
{
|
||||
@ -170,27 +195,16 @@ diff --git a/gdb/main.c b/gdb/main.c
|
||||
/* The exec file and the symbol-file are the same. If we can't
|
||||
open it, better only print one error message.
|
||||
- catch_command_errors returns non-zero on success! */
|
||||
- ret = catch_command_errors (exec_file_attach, execarg,
|
||||
- !batch_flag);
|
||||
- if (ret != 0)
|
||||
- if (catch_command_errors (exec_file_attach, execarg,
|
||||
- !batch_flag))
|
||||
+ catch_command_errors returns non-zero on success!
|
||||
+ Do not load EXECARG as a symbol file if it has been already processed
|
||||
+ as a core file. */
|
||||
+ ret = catch_command_errors (func, execarg, !batch_flag);
|
||||
+ if (ret != 0 && core_bfd == NULL)
|
||||
ret = catch_command_errors (symbol_file_add_main_adapter,
|
||||
symarg, !batch_flag);
|
||||
+ if (catch_command_errors (func, execarg, !batch_flag)
|
||||
+ && core_bfd == NULL)
|
||||
catch_command_errors (symbol_file_add_main_adapter, symarg,
|
||||
!batch_flag);
|
||||
}
|
||||
diff --git a/gdbsupport/common-exceptions.h b/gdbsupport/common-exceptions.h
|
||||
--- a/gdbsupport/common-exceptions.h
|
||||
+++ b/gdbsupport/common-exceptions.h
|
||||
@@ -106,6 +106,9 @@ enum errors {
|
||||
"_ERROR" is appended to the name. */
|
||||
MAX_COMPLETIONS_REACHED_ERROR,
|
||||
--
|
||||
2.14.3
|
||||
|
||||
+ /* Attempt to load a core file as executable. */
|
||||
+ IS_CORE_ERROR,
|
||||
+
|
||||
/* Add more errors here. */
|
||||
NR_ERRORS
|
||||
};
|
||||
|
@ -4,6 +4,8 @@ Date: Fri, 27 Oct 2017 21:07:50 +0200
|
||||
Subject:
|
||||
gdb-6.6-buildid-locate-misleading-warning-missing-debuginfo-rhbz981154.patch
|
||||
|
||||
FileName: gdb-6.6-buildid-locate-misleading-warning-missing-debuginfo-rhbz981154.patch
|
||||
|
||||
;; Fix 'gdb gives highly misleading error when debuginfo pkg is present,
|
||||
;; but not corresponding binary pkg' (RH BZ 981154).
|
||||
;;=push+jan
|
||||
@ -24,9 +26,31 @@ Comments by Sergio Durigan Junior <sergiodj@redhat.com>:
|
||||
and had a little thinko there. The variable 'filename' needs to be set to
|
||||
NULL after it is free'd, otherwise the code below thinks that it is still
|
||||
valid and doesn't print the necessary warning ("Try: yum install ...").
|
||||
---
|
||||
gdb/build-id.c | 5 +-
|
||||
.../rhbz981154-misleading-yum-install-warning.exp | 97 ++++++++++++++++++++++
|
||||
2 files changed, 101 insertions(+), 1 deletion(-)
|
||||
create mode 100644 gdb/testsuite/gdb.base/rhbz981154-misleading-yum-install-warning.exp
|
||||
|
||||
diff --git a/gdb/build-id.c b/gdb/build-id.c
|
||||
index 409a5b8c54..e2c1e81266 100644
|
||||
--- a/gdb/build-id.c
|
||||
+++ b/gdb/build-id.c
|
||||
@@ -592,7 +592,10 @@ build_id_to_debug_bfd (size_t build_id_len, const bfd_byte *build_id,
|
||||
do_cleanups (inner);
|
||||
|
||||
if (abfd == NULL)
|
||||
- continue;
|
||||
+ {
|
||||
+ filename = NULL;
|
||||
+ continue;
|
||||
+ }
|
||||
|
||||
if (build_id_verify (abfd.get(), build_id_len, build_id))
|
||||
break;
|
||||
diff --git a/gdb/testsuite/gdb.base/rhbz981154-misleading-yum-install-warning.exp b/gdb/testsuite/gdb.base/rhbz981154-misleading-yum-install-warning.exp
|
||||
new file mode 100644
|
||||
index 0000000000..bb70c5cf44
|
||||
--- /dev/null
|
||||
+++ b/gdb/testsuite/gdb.base/rhbz981154-misleading-yum-install-warning.exp
|
||||
@@ -0,0 +1,97 @@
|
||||
@ -127,3 +151,6 @@ new file mode 100644
|
||||
+
|
||||
+# Leaving the link there will cause breakage in the next run.
|
||||
+remote_exec build "rm -f [standard_output_file ${build_id_without_debug}]"
|
||||
--
|
||||
2.14.3
|
||||
|
||||
|
@ -3,13 +3,20 @@ From: Fedora GDB patches <invalid@email.com>
|
||||
Date: Fri, 27 Oct 2017 21:07:50 +0200
|
||||
Subject: gdb-6.6-buildid-locate-rpm-librpm-workaround.patch
|
||||
|
||||
FileName: gdb-6.6-buildid-locate-rpm-librpm-workaround.patch
|
||||
|
||||
;; Workaround librpm BZ 643031 due to its unexpected exit() calls (BZ 642879).
|
||||
;;=push+jan
|
||||
---
|
||||
gdb/build-id.c | 13 +++++++++++++
|
||||
gdb/proc-service.list | 3 +++
|
||||
2 files changed, 16 insertions(+)
|
||||
|
||||
diff --git a/gdb/build-id.c b/gdb/build-id.c
|
||||
index d60cf622dc..409a5b8c54 100644
|
||||
--- a/gdb/build-id.c
|
||||
+++ b/gdb/build-id.c
|
||||
@@ -708,6 +708,19 @@ build_id_to_filename (const struct bfd_build_id *build_id, char **link_return)
|
||||
@@ -678,6 +678,19 @@ build_id_to_filename (const struct bfd_build_id *build_id, char **link_return)
|
||||
#include <dlfcn.h>
|
||||
#endif
|
||||
|
||||
@ -30,6 +37,7 @@ diff --git a/gdb/build-id.c b/gdb/build-id.c
|
||||
and avoid their duplicities during a single inferior run. */
|
||||
|
||||
diff --git a/gdb/proc-service.list b/gdb/proc-service.list
|
||||
index 53f7ed8b1e..323f5e83c2 100644
|
||||
--- a/gdb/proc-service.list
|
||||
+++ b/gdb/proc-service.list
|
||||
@@ -37,4 +37,7 @@
|
||||
@ -40,3 +48,6 @@ diff --git a/gdb/proc-service.list b/gdb/proc-service.list
|
||||
+ /* gdb-6.6-buildid-locate-rpm.patch */
|
||||
+ rpmsqEnable;
|
||||
};
|
||||
--
|
||||
2.14.3
|
||||
|
||||
|
@ -3,16 +3,23 @@ From: Fedora GDB patches <invalid@email.com>
|
||||
Date: Fri, 27 Oct 2017 21:07:50 +0200
|
||||
Subject: gdb-6.6-buildid-locate-rpm-scl.patch
|
||||
|
||||
FileName: gdb-6.6-buildid-locate-rpm-scl.patch
|
||||
|
||||
;; [SCL] Skip deprecated .gdb_index warning for Red Hat built files (BZ 953585).
|
||||
;;=push+jan
|
||||
|
||||
warning: Skipping deprecated .gdb_index section
|
||||
https://bugzilla.redhat.com/show_bug.cgi?id=953585
|
||||
---
|
||||
gdb/build-id.c | 54 ++++++++++++++++++++++++++++++++++++++++++++++++++++++
|
||||
gdb/dwarf2read.c | 14 ++++++++++++++
|
||||
2 files changed, 68 insertions(+)
|
||||
|
||||
diff --git a/gdb/build-id.c b/gdb/build-id.c
|
||||
index e2c1e81266..1b75530f91 100644
|
||||
--- a/gdb/build-id.c
|
||||
+++ b/gdb/build-id.c
|
||||
@@ -742,7 +742,11 @@ static int missing_rpm_list_entries;
|
||||
@@ -715,7 +715,11 @@ static int missing_rpm_list_entries;
|
||||
/* Returns the count of newly added rpms. */
|
||||
|
||||
static int
|
||||
@ -24,7 +31,7 @@ diff --git a/gdb/build-id.c b/gdb/build-id.c
|
||||
{
|
||||
static int rpm_init_done = 0;
|
||||
rpmts ts;
|
||||
@@ -849,7 +853,11 @@ missing_rpm_enlist (const char *filename)
|
||||
@@ -822,7 +826,11 @@ missing_rpm_enlist (const char *filename)
|
||||
mi = rpmtsInitIterator_p (ts, RPMTAG_BASENAMES, filename, 0);
|
||||
if (mi != NULL)
|
||||
{
|
||||
@ -36,7 +43,7 @@ diff --git a/gdb/build-id.c b/gdb/build-id.c
|
||||
{
|
||||
Header h;
|
||||
char *debuginfo, **slot, *s, *s2;
|
||||
@@ -967,6 +975,37 @@ missing_rpm_enlist (const char *filename)
|
||||
@@ -940,6 +948,37 @@ missing_rpm_enlist (const char *filename)
|
||||
xfree (debuginfo);
|
||||
count++;
|
||||
}
|
||||
@ -74,10 +81,10 @@ diff --git a/gdb/build-id.c b/gdb/build-id.c
|
||||
|
||||
rpmdbFreeIterator_p (mi);
|
||||
}
|
||||
@@ -976,6 +1015,20 @@ missing_rpm_enlist (const char *filename)
|
||||
return count;
|
||||
@@ -950,6 +989,21 @@ missing_rpm_enlist (const char *filename)
|
||||
}
|
||||
|
||||
static int
|
||||
+#ifdef GDB_INDEX_VERIFY_VENDOR
|
||||
+missing_rpm_enlist (const char *filename)
|
||||
+{
|
||||
@ -90,15 +97,17 @@ diff --git a/gdb/build-id.c b/gdb/build-id.c
|
||||
+{
|
||||
+ return missing_rpm_enlist_1 (filename, 1);
|
||||
+}
|
||||
+#endif
|
||||
+
|
||||
static bool
|
||||
missing_rpm_list_compar (const char *ap, const char *bp)
|
||||
+static int
|
||||
+#endif
|
||||
missing_rpm_list_compar (const char *const *ap, const char *const *bp)
|
||||
{
|
||||
diff --git a/gdb/dwarf2/read.c b/gdb/dwarf2/read.c
|
||||
--- a/gdb/dwarf2/read.c
|
||||
+++ b/gdb/dwarf2/read.c
|
||||
@@ -3025,6 +3025,16 @@ read_gdb_index_from_buffer (const char *filename,
|
||||
return strcoll (*ap, *bp);
|
||||
diff --git a/gdb/dwarf2read.c b/gdb/dwarf2read.c
|
||||
index 2c972d5e74..64329af71e 100644
|
||||
--- a/gdb/dwarf2read.c
|
||||
+++ b/gdb/dwarf2read.c
|
||||
@@ -3725,6 +3725,16 @@ read_index_from_section (struct objfile *objfile,
|
||||
"set use-deprecated-index-sections on". */
|
||||
if (version < 6 && !deprecated_ok)
|
||||
{
|
||||
@ -115,7 +124,7 @@ diff --git a/gdb/dwarf2/read.c b/gdb/dwarf2/read.c
|
||||
static int warning_printed = 0;
|
||||
if (!warning_printed)
|
||||
{
|
||||
@@ -3036,6 +3046,10 @@ to use the section anyway."),
|
||||
@@ -3736,6 +3746,10 @@ to use the section anyway."),
|
||||
warning_printed = 1;
|
||||
}
|
||||
return 0;
|
||||
@ -126,3 +135,6 @@ diff --git a/gdb/dwarf2/read.c b/gdb/dwarf2/read.c
|
||||
}
|
||||
/* Version 7 indices generated by gold refer to the CU for a symbol instead
|
||||
of the TU (for symbols coming from TUs),
|
||||
--
|
||||
2.14.3
|
||||
|
||||
|
@ -3,12 +3,25 @@ From: Fedora GDB patches <invalid@email.com>
|
||||
Date: Fri, 27 Oct 2017 21:07:50 +0200
|
||||
Subject: gdb-6.6-buildid-locate-rpm.patch
|
||||
|
||||
FileName: gdb-6.6-buildid-locate-rpm.patch
|
||||
|
||||
;;=push+jan
|
||||
---
|
||||
gdb/aclocal.m4 | 215 +++++++++++++++++++++++
|
||||
gdb/build-id.c | 407 +++++++++++++++++++++++++++++++++++++++++++-
|
||||
gdb/config.in | 6 +
|
||||
gdb/configure | 508 +++++++++++++++++++++++++++++++++++++++++++++++++++++++
|
||||
gdb/configure.ac | 193 +++++++++++++++++++++
|
||||
gdb/corelow.c | 2 +-
|
||||
gdb/event-top.c | 8 +-
|
||||
gdb/symfile.h | 2 +
|
||||
8 files changed, 1331 insertions(+), 10 deletions(-)
|
||||
|
||||
diff --git a/gdb/aclocal.m4 b/gdb/aclocal.m4
|
||||
index e0d38ea267..da5ac313e3 100644
|
||||
--- a/gdb/aclocal.m4
|
||||
+++ b/gdb/aclocal.m4
|
||||
@@ -11,7 +11,223 @@
|
||||
@@ -12,6 +12,221 @@
|
||||
# even the implied warranty of MERCHANTABILITY or FITNESS FOR A
|
||||
# PARTICULAR PURPOSE.
|
||||
|
||||
@ -226,24 +239,24 @@ diff --git a/gdb/aclocal.m4 b/gdb/aclocal.m4
|
||||
+
|
||||
+AS_VAR_IF([$1], [""], [$5], [$4])dnl
|
||||
+])# PKG_CHECK_VAR
|
||||
+
|
||||
m4_ifndef([AC_CONFIG_MACRO_DIRS], [m4_defun([_AM_CONFIG_MACRO_DIRS], [])m4_defun([AC_CONFIG_MACRO_DIRS], [_AM_CONFIG_MACRO_DIRS($@)])])
|
||||
+
|
||||
# AM_AUX_DIR_EXPAND -*- Autoconf -*-
|
||||
|
||||
# Copyright (C) 2001-2017 Free Software Foundation, Inc.
|
||||
# Copyright (C) 2001, 2003, 2005, 2011 Free Software Foundation, Inc.
|
||||
diff --git a/gdb/build-id.c b/gdb/build-id.c
|
||||
index 5740628386..d60cf622dc 100644
|
||||
--- a/gdb/build-id.c
|
||||
+++ b/gdb/build-id.c
|
||||
@@ -33,6 +33,7 @@
|
||||
#include "gdb_bfd.h"
|
||||
#include "gdbcmd.h"
|
||||
#include "gdbcore.h"
|
||||
@@ -35,6 +35,8 @@
|
||||
#include "elf/common.h"
|
||||
#include "elf-bfd.h"
|
||||
#include <sys/stat.h>
|
||||
+#include "elf/external.h"
|
||||
+#include "inferior.h"
|
||||
#include "objfiles.h"
|
||||
#include "observable.h"
|
||||
#include "symfile.h"
|
||||
@@ -697,8 +698,374 @@ build_id_to_filename (const struct bfd_build_id *build_id, char **link_return)
|
||||
|
||||
#define BUILD_ID_VERBOSE_NONE 0
|
||||
#define BUILD_ID_VERBOSE_FILENAMES 1
|
||||
@@ -666,8 +668,366 @@ build_id_to_filename (const struct bfd_build_id *build_id, char **link_return)
|
||||
return result;
|
||||
}
|
||||
|
||||
@ -512,10 +525,10 @@ diff --git a/gdb/build-id.c b/gdb/build-id.c
|
||||
+ return count;
|
||||
+}
|
||||
+
|
||||
+static bool
|
||||
+missing_rpm_list_compar (const char *ap, const char *bp)
|
||||
+static int
|
||||
+missing_rpm_list_compar (const char *const *ap, const char *const *bp)
|
||||
+{
|
||||
+ return strcoll (ap, bp) < 0;
|
||||
+ return strcoll (*ap, *bp);
|
||||
+}
|
||||
+
|
||||
+/* It returns a NULL-terminated array of strings needing to be FREEd. It may
|
||||
@ -524,50 +537,39 @@ diff --git a/gdb/build-id.c b/gdb/build-id.c
|
||||
+static void
|
||||
+missing_rpm_list_print (void)
|
||||
+{
|
||||
+ char **array, **array_iter;
|
||||
+ struct missing_rpm *list_iter;
|
||||
+ struct cleanup *cleanups;
|
||||
+
|
||||
+ if (missing_rpm_list_entries == 0)
|
||||
+ return;
|
||||
+
|
||||
+ std::vector<const char *> array (missing_rpm_list_entries);
|
||||
+ size_t idx = 0;
|
||||
+ array = (char **) xmalloc (sizeof (*array) * missing_rpm_list_entries);
|
||||
+ cleanups = make_cleanup (xfree, array);
|
||||
+
|
||||
+ array_iter = array;
|
||||
+ for (list_iter = missing_rpm_list; list_iter != NULL;
|
||||
+ list_iter = list_iter->next)
|
||||
+ {
|
||||
+ array[idx++] = list_iter->rpm;
|
||||
+ *array_iter++ = list_iter->rpm;
|
||||
+ }
|
||||
+ gdb_assert (idx == missing_rpm_list_entries);
|
||||
+ gdb_assert (array_iter == array + missing_rpm_list_entries);
|
||||
+
|
||||
+ 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;
|
||||
+ qsort (array, missing_rpm_list_entries, sizeof (*array),
|
||||
+ (int (*) (const void *, const void *)) missing_rpm_list_compar);
|
||||
+
|
||||
+ printf_unfiltered (_("Missing separate debuginfos, use: %s"),
|
||||
+#ifdef DNF_DEBUGINFO_INSTALL
|
||||
+ "dnf "
|
||||
+#endif
|
||||
+ "debuginfo-install");
|
||||
+ for (const char *el : array)
|
||||
+ for (array_iter = array; array_iter < array + missing_rpm_list_entries;
|
||||
+ array_iter++)
|
||||
+ {
|
||||
+ puts_unfiltered (" ");
|
||||
+ puts_unfiltered (el);
|
||||
+ putchar_unfiltered (' ');
|
||||
+ puts_unfiltered (*array_iter);
|
||||
+ }
|
||||
+ puts_unfiltered ("\n");
|
||||
+ putchar_unfiltered ('\n');
|
||||
+
|
||||
+ while (missing_rpm_list != NULL)
|
||||
+ {
|
||||
@ -575,6 +577,9 @@ 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;
|
||||
+
|
||||
+ do_cleanups (cleanups);
|
||||
+}
|
||||
+
|
||||
+static void
|
||||
@ -619,7 +624,7 @@ diff --git a/gdb/build-id.c b/gdb/build-id.c
|
||||
avoidance. */
|
||||
|
||||
struct missing_filepair
|
||||
@@ -752,11 +1119,17 @@ missing_filepair_change (void)
|
||||
@@ -721,11 +1081,17 @@ missing_filepair_change (void)
|
||||
/* All their memory came just from missing_filepair_OBSTACK. */
|
||||
missing_filepair_hash = NULL;
|
||||
}
|
||||
@ -637,7 +642,7 @@ diff --git a/gdb/build-id.c b/gdb/build-id.c
|
||||
missing_filepair_change ();
|
||||
}
|
||||
|
||||
@@ -823,14 +1196,38 @@ debug_print_missing (const char *binary, const char *debug)
|
||||
@@ -792,14 +1158,39 @@ debug_print_missing (const char *binary, const char *debug)
|
||||
|
||||
*slot = missing_filepair;
|
||||
|
||||
@ -646,13 +651,14 @@ diff --git a/gdb/build-id.c b/gdb/build-id.c
|
||||
+#ifdef HAVE_LIBRPM
|
||||
+ if (missing_exec == MISSING_EXEC_NOT_TRIED)
|
||||
+ {
|
||||
+ const char *execfilename = get_exec_file (0);
|
||||
+ char *execfilename;
|
||||
|
||||
- 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)
|
||||
@ -684,11 +690,12 @@ diff --git a/gdb/build-id.c b/gdb/build-id.c
|
||||
|
||||
/* See build-id.h. */
|
||||
diff --git a/gdb/config.in b/gdb/config.in
|
||||
index 1d11a97080..edd7028f76 100644
|
||||
--- a/gdb/config.in
|
||||
+++ b/gdb/config.in
|
||||
@@ -39,6 +39,9 @@
|
||||
/* Handle .ctf type-info sections */
|
||||
#undef ENABLE_LIBCTF
|
||||
@@ -33,6 +33,9 @@
|
||||
/* Define to BFD's default target vector. */
|
||||
#undef DEFAULT_BFD_VEC
|
||||
|
||||
+/* librpm version specific library name to dlopen. */
|
||||
+#undef DLOPEN_LIBRPM
|
||||
@ -696,9 +703,9 @@ 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
|
||||
@@ -247,6 +250,9 @@
|
||||
/* Define if you have the mpfr library. */
|
||||
#undef HAVE_LIBMPFR
|
||||
@@ -264,6 +267,9 @@
|
||||
/* Define if Python 2.7 is being used. */
|
||||
#undef HAVE_LIBPYTHON2_7
|
||||
|
||||
+/* Define if librpm library is being used. */
|
||||
+#undef HAVE_LIBRPM
|
||||
@ -707,9 +714,10 @@ diff --git a/gdb/config.in b/gdb/config.in
|
||||
#undef HAVE_LIBUNWIND_IA64_H
|
||||
|
||||
diff --git a/gdb/configure b/gdb/configure
|
||||
index 092893d757..1cecdbc3b5 100755
|
||||
--- a/gdb/configure
|
||||
+++ b/gdb/configure
|
||||
@@ -769,6 +769,11 @@ PKG_CONFIG
|
||||
@@ -716,6 +716,11 @@ PKGVERSION
|
||||
HAVE_NATIVE_GCORE_TARGET
|
||||
TARGET_OBS
|
||||
subdirs
|
||||
@ -721,42 +729,50 @@ diff --git a/gdb/configure b/gdb/configure
|
||||
GDB_DATADIR
|
||||
DEBUGDIR
|
||||
MAKEINFO_EXTRA_FLAGS
|
||||
@@ -873,6 +878,7 @@ with_gdb_datadir
|
||||
@@ -820,6 +825,7 @@ with_gdb_datadir
|
||||
with_relocated_sources
|
||||
with_auto_load_dir
|
||||
with_auto_load_safe_path
|
||||
+with_rpm
|
||||
enable_targets
|
||||
enable_64_bit_bfd
|
||||
enable_gdbmi
|
||||
@@ -949,6 +955,8 @@ PKG_CONFIG_PATH
|
||||
PKG_CONFIG_LIBDIR
|
||||
DEBUGINFOD_CFLAGS
|
||||
DEBUGINFOD_LIBS
|
||||
enable_gdbcli
|
||||
@@ -878,6 +884,11 @@ CCC
|
||||
CPP
|
||||
MAKEINFO
|
||||
MAKEINFOFLAGS
|
||||
+PKG_CONFIG
|
||||
+PKG_CONFIG_PATH
|
||||
+PKG_CONFIG_LIBDIR
|
||||
+RPM_CFLAGS
|
||||
+RPM_LIBS
|
||||
YACC
|
||||
YFLAGS
|
||||
XMKMF'
|
||||
@@ -1621,6 +1629,8 @@ Optional Packages:
|
||||
@@ -1548,6 +1559,8 @@ Optional Packages:
|
||||
[--with-auto-load-dir]
|
||||
--without-auto-load-safe-path
|
||||
do not restrict auto-loaded files locations
|
||||
--with-debuginfod Enable debuginfo lookups with debuginfod
|
||||
(auto/yes/no)
|
||||
+ --with-rpm query rpm database for missing debuginfos (yes/no,
|
||||
+ def. auto=librpm.so)
|
||||
--with-libunwind-ia64 use libunwind frame unwinding for ia64 targets
|
||||
--with-curses use the curses library instead of the termcap
|
||||
library
|
||||
@@ -1702,6 +1712,8 @@ Some influential environment variables:
|
||||
C compiler flags for DEBUGINFOD, overriding pkg-config
|
||||
DEBUGINFOD_LIBS
|
||||
linker flags for DEBUGINFOD, overriding pkg-config
|
||||
@@ -1605,6 +1618,13 @@ Some influential environment variables:
|
||||
MAKEINFO Parent configure detects if it is of sufficient version.
|
||||
MAKEINFOFLAGS
|
||||
Parameters for MAKEINFO.
|
||||
+ PKG_CONFIG path to pkg-config utility
|
||||
+ PKG_CONFIG_PATH
|
||||
+ directories to add to pkg-config's search path
|
||||
+ PKG_CONFIG_LIBDIR
|
||||
+ path overriding pkg-config's built-in search path
|
||||
+ RPM_CFLAGS C compiler flags for RPM, overriding pkg-config
|
||||
+ RPM_LIBS linker flags for RPM, overriding pkg-config
|
||||
YACC The `Yet Another Compiler Compiler' implementation to use.
|
||||
Defaults to the first program found out of: `bison -y', `byacc',
|
||||
`yacc'.
|
||||
@@ -6666,6 +6678,494 @@ _ACEOF
|
||||
YACC The `Yet Another C Compiler' implementation to use. Defaults to
|
||||
the first program found out of: `bison -y', `byacc', `yacc'.
|
||||
YFLAGS The list of arguments that will be passed by default to $YACC.
|
||||
@@ -6486,6 +6506,494 @@ _ACEOF
|
||||
{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $with_auto_load_safe_path" >&5
|
||||
$as_echo "$with_auto_load_safe_path" >&6; }
|
||||
|
||||
@ -1252,9 +1268,10 @@ diff --git a/gdb/configure b/gdb/configure
|
||||
|
||||
subdirs="$subdirs testsuite"
|
||||
diff --git a/gdb/configure.ac b/gdb/configure.ac
|
||||
index d4133ea71e..e232c1adcb 100644
|
||||
--- a/gdb/configure.ac
|
||||
+++ b/gdb/configure.ac
|
||||
@@ -143,6 +143,199 @@ AC_DEFINE_DIR(AUTO_LOAD_SAFE_PATH, escape_dir,
|
||||
@@ -167,6 +167,199 @@ AC_DEFINE_DIR(AUTO_LOAD_SAFE_PATH, escape_dir,
|
||||
[Directories safe to hold auto-loaded files.])
|
||||
AC_MSG_RESULT([$with_auto_load_safe_path])
|
||||
|
||||
@ -1454,18 +1471,32 @@ 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
|
||||
index c5b642db81..6e027c12e2 100644
|
||||
--- a/gdb/corelow.c
|
||||
+++ b/gdb/corelow.c
|
||||
@@ -309,7 +309,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);
|
||||
|
||||
do_cleanups (back_to);
|
||||
|
||||
diff --git a/gdb/event-top.c b/gdb/event-top.c
|
||||
index 0c1528e5eb..0d668f35e0 100644
|
||||
--- a/gdb/event-top.c
|
||||
+++ b/gdb/event-top.c
|
||||
@@ -42,6 +42,7 @@
|
||||
#include "gdbsupport/gdb_select.h"
|
||||
#include "gdbsupport/gdb-sigmask.h"
|
||||
#include "async-event.h"
|
||||
@@ -40,6 +40,7 @@
|
||||
#include "buffer.h"
|
||||
#include "ser-event.h"
|
||||
#include "gdb_select.h"
|
||||
+#include "symfile.h"
|
||||
|
||||
/* readline include files. */
|
||||
#include "readline/readline.h"
|
||||
@@ -364,6 +365,8 @@ display_gdb_prompt (const char *new_prompt)
|
||||
@@ -359,6 +360,8 @@ display_gdb_prompt (const char *new_prompt)
|
||||
/* Reset the nesting depth used when trace-commands is set. */
|
||||
reset_command_nest_depth ();
|
||||
|
||||
@ -1474,7 +1505,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. */
|
||||
@@ -773,7 +776,10 @@ command_line_handler (gdb::unique_xmalloc_ptr<char> &&rl)
|
||||
@@ -774,7 +777,10 @@ command_line_handler (char *rl)
|
||||
command_handler (cmd);
|
||||
|
||||
if (ui->prompt_state != PROMPTED)
|
||||
@ -1487,13 +1518,18 @@ diff --git a/gdb/event-top.c b/gdb/event-top.c
|
||||
}
|
||||
|
||||
diff --git a/gdb/symfile.h b/gdb/symfile.h
|
||||
index 0d51f46d78..82c76431e1 100644
|
||||
--- a/gdb/symfile.h
|
||||
+++ b/gdb/symfile.h
|
||||
@@ -560,6 +560,7 @@ extern void generic_load (const char *args, int from_tty);
|
||||
@@ -546,6 +546,8 @@ void map_symbol_filenames (symbol_filename_ftype *fun, void *data,
|
||||
/* build-id support. */
|
||||
extern struct bfd_build_id *build_id_addr_get (CORE_ADDR addr);
|
||||
extern void debug_print_missing (const char *binary, const char *debug);
|
||||
+extern void debug_flush_missing (void);
|
||||
#define BUILD_ID_MAIN_EXECUTABLE_FILENAME _("the main executable file")
|
||||
+#define BUILD_ID_MAIN_EXECUTABLE_FILENAME _("the main executable file")
|
||||
|
||||
/* From dwarf2read.c */
|
||||
|
||||
--
|
||||
2.14.3
|
||||
|
||||
|
@ -3,6 +3,8 @@ From: Fedora GDB patches <invalid@email.com>
|
||||
Date: Fri, 27 Oct 2017 21:07:50 +0200
|
||||
Subject: gdb-6.6-buildid-locate-solib-missing-ids.patch
|
||||
|
||||
FileName: gdb-6.6-buildid-locate-solib-missing-ids.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).
|
||||
@ -10,23 +12,33 @@ Subject: gdb-6.6-buildid-locate-solib-missing-ids.patch
|
||||
|
||||
gdb returns an incorrect back trace when applying a debuginfo
|
||||
https://bugzilla.redhat.com/show_bug.cgi?id=1339862
|
||||
---
|
||||
gdb/solib-svr4.c | 35 ++++---
|
||||
.../gcore-buildid-exec-but-not-solib-lib.c | 21 +++++
|
||||
.../gcore-buildid-exec-but-not-solib-main.c | 25 +++++
|
||||
.../gdb.base/gcore-buildid-exec-but-not-solib.exp | 105 +++++++++++++++++++++
|
||||
4 files changed, 167 insertions(+), 19 deletions(-)
|
||||
create mode 100644 gdb/testsuite/gdb.base/gcore-buildid-exec-but-not-solib-lib.c
|
||||
create mode 100644 gdb/testsuite/gdb.base/gcore-buildid-exec-but-not-solib-main.c
|
||||
create mode 100644 gdb/testsuite/gdb.base/gcore-buildid-exec-but-not-solib.exp
|
||||
|
||||
diff --git a/gdb/solib-svr4.c b/gdb/solib-svr4.c
|
||||
index a3399ad8f7..d7eeb6350d 100644
|
||||
--- a/gdb/solib-svr4.c
|
||||
+++ b/gdb/solib-svr4.c
|
||||
@@ -1340,14 +1340,27 @@ svr4_read_so_list (svr4_info *info, CORE_ADDR lm, CORE_ADDR prev_lm,
|
||||
@@ -1387,14 +1387,27 @@ svr4_read_so_list (CORE_ADDR lm, CORE_ADDR prev_lm,
|
||||
}
|
||||
|
||||
{
|
||||
- struct bfd_build_id *build_id;
|
||||
+ struct bfd_build_id *build_id = NULL;
|
||||
|
||||
strncpy (newobj->so_original_name, buffer.get (), SO_NAME_MAX_PATH_SIZE - 1);
|
||||
strncpy (newobj->so_original_name, buffer, SO_NAME_MAX_PATH_SIZE - 1);
|
||||
newobj->so_original_name[SO_NAME_MAX_PATH_SIZE - 1] = '\0';
|
||||
/* May get overwritten below. */
|
||||
strcpy (newobj->so_name, newobj->so_original_name);
|
||||
|
||||
- build_id = build_id_addr_get (((lm_info_svr4 *) newobj->lm_info)->l_ld);
|
||||
- build_id = build_id_addr_get (newobj->lm_info->l_ld);
|
||||
+ /* In the case the main executable was found according to its build-id
|
||||
+ (from a core file) prevent loading a different build of a library
|
||||
+ with accidentally the same SO_NAME.
|
||||
@ -44,7 +56,7 @@ diff --git a/gdb/solib-svr4.c b/gdb/solib-svr4.c
|
||||
if (build_id != NULL)
|
||||
{
|
||||
char *name, *build_id_filename;
|
||||
@@ -1362,23 +1375,7 @@ svr4_read_so_list (svr4_info *info, CORE_ADDR lm, CORE_ADDR prev_lm,
|
||||
@@ -1409,23 +1422,7 @@ svr4_read_so_list (CORE_ADDR lm, CORE_ADDR prev_lm,
|
||||
xfree (name);
|
||||
}
|
||||
else
|
||||
@ -71,6 +83,7 @@ diff --git a/gdb/solib-svr4.c b/gdb/solib-svr4.c
|
||||
xfree (build_id);
|
||||
diff --git a/gdb/testsuite/gdb.base/gcore-buildid-exec-but-not-solib-lib.c b/gdb/testsuite/gdb.base/gcore-buildid-exec-but-not-solib-lib.c
|
||||
new file mode 100644
|
||||
index 0000000000..d74b690c73
|
||||
--- /dev/null
|
||||
+++ b/gdb/testsuite/gdb.base/gcore-buildid-exec-but-not-solib-lib.c
|
||||
@@ -0,0 +1,21 @@
|
||||
@ -97,6 +110,7 @@ new file mode 100644
|
||||
+}
|
||||
diff --git a/gdb/testsuite/gdb.base/gcore-buildid-exec-but-not-solib-main.c b/gdb/testsuite/gdb.base/gcore-buildid-exec-but-not-solib-main.c
|
||||
new file mode 100644
|
||||
index 0000000000..46b9dfe161
|
||||
--- /dev/null
|
||||
+++ b/gdb/testsuite/gdb.base/gcore-buildid-exec-but-not-solib-main.c
|
||||
@@ -0,0 +1,25 @@
|
||||
@ -127,6 +141,7 @@ new file mode 100644
|
||||
+}
|
||||
diff --git a/gdb/testsuite/gdb.base/gcore-buildid-exec-but-not-solib.exp b/gdb/testsuite/gdb.base/gcore-buildid-exec-but-not-solib.exp
|
||||
new file mode 100644
|
||||
index 0000000000..0c46489f31
|
||||
--- /dev/null
|
||||
+++ b/gdb/testsuite/gdb.base/gcore-buildid-exec-but-not-solib.exp
|
||||
@@ -0,0 +1,105 @@
|
||||
@ -235,3 +250,6 @@ new file mode 100644
|
||||
+
|
||||
+gdb_test "bt"
|
||||
+gdb_test "info shared"
|
||||
--
|
||||
2.14.3
|
||||
|
||||
|
File diff suppressed because it is too large
Load Diff
@ -3,6 +3,8 @@ From: Jan Kratochvil <jan.kratochvil@redhat.com>
|
||||
Date: Fri, 27 Oct 2017 21:07:50 +0200
|
||||
Subject: gdb-6.6-bz229517-gcore-without-terminal.patch
|
||||
|
||||
FileName: gdb-6.6-bz229517-gcore-without-terminal.patch
|
||||
|
||||
;; Allow running `/usr/bin/gcore' with provided but inaccessible tty (BZ 229517).
|
||||
;;=fedoratest
|
||||
|
||||
@ -13,9 +15,16 @@ Subject: gdb-6.6-bz229517-gcore-without-terminal.patch
|
||||
2007-04-22 Jan Kratochvil <jan.kratochvil@redhat.com>
|
||||
|
||||
* gdb.base/gcorebg.exp, gdb.base/gcorebg.c: New files.
|
||||
---
|
||||
gdb/testsuite/gdb.base/gcorebg.c | 49 ++++++++++++++++
|
||||
gdb/testsuite/gdb.base/gcorebg.exp | 113 +++++++++++++++++++++++++++++++++++++
|
||||
2 files changed, 162 insertions(+)
|
||||
create mode 100644 gdb/testsuite/gdb.base/gcorebg.c
|
||||
create mode 100644 gdb/testsuite/gdb.base/gcorebg.exp
|
||||
|
||||
diff --git a/gdb/testsuite/gdb.base/gcorebg.c b/gdb/testsuite/gdb.base/gcorebg.c
|
||||
new file mode 100644
|
||||
index 0000000000..427ebe9b4f
|
||||
--- /dev/null
|
||||
+++ b/gdb/testsuite/gdb.base/gcorebg.c
|
||||
@@ -0,0 +1,49 @@
|
||||
@ -70,6 +79,7 @@ new file mode 100644
|
||||
+}
|
||||
diff --git a/gdb/testsuite/gdb.base/gcorebg.exp b/gdb/testsuite/gdb.base/gcorebg.exp
|
||||
new file mode 100644
|
||||
index 0000000000..a5471ba5df
|
||||
--- /dev/null
|
||||
+++ b/gdb/testsuite/gdb.base/gcorebg.exp
|
||||
@@ -0,0 +1,113 @@
|
||||
@ -186,3 +196,6 @@ new file mode 100644
|
||||
+
|
||||
+set env(PATH) $oldpath
|
||||
+remote_file target delete "./gdb"
|
||||
--
|
||||
2.14.3
|
||||
|
||||
|
@ -3,6 +3,8 @@ From: Fedora GDB patches <invalid@email.com>
|
||||
Date: Fri, 27 Oct 2017 21:07:50 +0200
|
||||
Subject: gdb-6.6-bz230000-power6-disassembly-test.patch
|
||||
|
||||
FileName: gdb-6.6-bz230000-power6-disassembly-test.patch
|
||||
|
||||
;; Testcase for PPC Power6/DFP instructions disassembly (BZ 230000).
|
||||
;;=fedoratest
|
||||
|
||||
@ -11,9 +13,16 @@ https://bugzilla.redhat.com/bugzilla/show_bug.cgi?id=230000
|
||||
The original testcase
|
||||
https://bugzilla.redhat.com/bugzilla/show_bug.cgi?id=230000#c1
|
||||
requires too recent GCC.
|
||||
---
|
||||
gdb/testsuite/gdb.arch/powerpc-power6.exp | 54 +++++++++++++++++++++++++++++++
|
||||
gdb/testsuite/gdb.arch/powerpc-power6.s | 16 +++++++++
|
||||
2 files changed, 70 insertions(+)
|
||||
create mode 100644 gdb/testsuite/gdb.arch/powerpc-power6.exp
|
||||
create mode 100644 gdb/testsuite/gdb.arch/powerpc-power6.s
|
||||
|
||||
diff --git a/gdb/testsuite/gdb.arch/powerpc-power6.exp b/gdb/testsuite/gdb.arch/powerpc-power6.exp
|
||||
new file mode 100644
|
||||
index 0000000000..082a4b7802
|
||||
--- /dev/null
|
||||
+++ b/gdb/testsuite/gdb.arch/powerpc-power6.exp
|
||||
@@ -0,0 +1,54 @@
|
||||
@ -73,6 +82,7 @@ new file mode 100644
|
||||
+gdb_test "disass func" ":\tdcmpuq *cr1,f2,f0\r\n.*" "Power6 disassembly dcmpuq"
|
||||
diff --git a/gdb/testsuite/gdb.arch/powerpc-power6.s b/gdb/testsuite/gdb.arch/powerpc-power6.s
|
||||
new file mode 100644
|
||||
index 0000000000..6694b237ab
|
||||
--- /dev/null
|
||||
+++ b/gdb/testsuite/gdb.arch/powerpc-power6.s
|
||||
@@ -0,0 +1,16 @@
|
||||
@ -92,3 +102,6 @@ new file mode 100644
|
||||
+ .long 0xfc020444 /* ddivq f0,f2,f0 */
|
||||
+ .long 0xec820d04 /* dcmpu cr1,f2,f1 */
|
||||
+ .long 0xfc820504 /* dcmpuq cr1,f2,f0 */
|
||||
--
|
||||
2.14.3
|
||||
|
||||
|
166
gdb-6.6-bz235197-fork-detach-info.patch
Normal file
166
gdb-6.6-bz235197-fork-detach-info.patch
Normal file
@ -0,0 +1,166 @@
|
||||
From FEDORA_PATCHES Mon Sep 17 00:00:00 2001
|
||||
From: Jan Kratochvil <jan.kratochvil@redhat.com>
|
||||
Date: Fri, 27 Oct 2017 21:07:50 +0200
|
||||
Subject: gdb-6.6-bz235197-fork-detach-info.patch
|
||||
|
||||
FileName: gdb-6.6-bz235197-fork-detach-info.patch
|
||||
|
||||
;; Notify user of a child forked process being detached (BZ 235197).
|
||||
;;=push+jan: This is more about discussion if/what should be printed.
|
||||
|
||||
2008-03-01 Jan Kratochvil <jan.kratochvil@redhat.com>
|
||||
|
||||
Port to GDB-6.8pre.
|
||||
Remove the `[' character from the GDB-6.8 default message.
|
||||
---
|
||||
gdb/infrun.c | 2 +-
|
||||
gdb/testsuite/gdb.base/catch-syscall.exp | 4 +--
|
||||
gdb/testsuite/gdb.base/fork-detach.c | 57 ++++++++++++++++++++++++++++++++
|
||||
gdb/testsuite/gdb.base/fork-detach.exp | 36 ++++++++++++++++++++
|
||||
4 files changed, 96 insertions(+), 3 deletions(-)
|
||||
create mode 100644 gdb/testsuite/gdb.base/fork-detach.c
|
||||
create mode 100644 gdb/testsuite/gdb.base/fork-detach.exp
|
||||
|
||||
diff --git a/gdb/infrun.c b/gdb/infrun.c
|
||||
index e1d11234e0..23439979b5 100644
|
||||
--- a/gdb/infrun.c
|
||||
+++ b/gdb/infrun.c
|
||||
@@ -461,7 +461,7 @@ holding the child stopped. Try \"set detach-on-fork\" or \
|
||||
remove_breakpoints_pid (ptid_get_pid (inferior_ptid));
|
||||
}
|
||||
|
||||
- if (info_verbose || debug_infrun)
|
||||
+ if (1 /* Fedora Bug 235197 */ || info_verbose || debug_infrun)
|
||||
{
|
||||
/* Ensure that we have a process ptid. */
|
||||
ptid_t process_ptid = pid_to_ptid (ptid_get_pid (child_ptid));
|
||||
diff --git a/gdb/testsuite/gdb.base/catch-syscall.exp b/gdb/testsuite/gdb.base/catch-syscall.exp
|
||||
index 2a8bf27e5c..20fa041155 100644
|
||||
--- a/gdb/testsuite/gdb.base/catch-syscall.exp
|
||||
+++ b/gdb/testsuite/gdb.base/catch-syscall.exp
|
||||
@@ -179,7 +179,7 @@ proc check_for_program_end {} {
|
||||
# Deleting the catchpoints
|
||||
delete_breakpoints
|
||||
|
||||
- gdb_continue_to_end
|
||||
+ gdb_continue_to_end "" continue 1
|
||||
}
|
||||
|
||||
proc test_catch_syscall_without_args {} {
|
||||
@@ -250,7 +250,7 @@ proc test_catch_syscall_with_wrong_args {} {
|
||||
# If it doesn't, everything is right (since we don't have
|
||||
# a syscall named "mlock" in it). Otherwise, this is a failure.
|
||||
set thistest "catch syscall with unused syscall ($syscall_name)"
|
||||
- gdb_continue_to_end $thistest
|
||||
+ gdb_continue_to_end $thistest continue 1
|
||||
}
|
||||
}
|
||||
|
||||
diff --git a/gdb/testsuite/gdb.base/fork-detach.c b/gdb/testsuite/gdb.base/fork-detach.c
|
||||
new file mode 100644
|
||||
index 0000000000..0ba8f465f3
|
||||
--- /dev/null
|
||||
+++ b/gdb/testsuite/gdb.base/fork-detach.c
|
||||
@@ -0,0 +1,57 @@
|
||||
+/* This testcase is part of GDB, the GNU debugger.
|
||||
+
|
||||
+ Copyright 2007 Free Software Foundation, Inc.
|
||||
+
|
||||
+ This program is free software; you can redistribute it and/or modify
|
||||
+ it under the terms of the GNU General Public License as published by
|
||||
+ the Free Software Foundation; either version 2 of the License, or
|
||||
+ (at your option) any later version.
|
||||
+
|
||||
+ This program is distributed in the hope that it will be useful,
|
||||
+ but WITHOUT ANY WARRANTY; without even the implied warranty of
|
||||
+ MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
|
||||
+ GNU General Public License for more details.
|
||||
+
|
||||
+ You should have received a copy of the GNU General Public License
|
||||
+ along with this program; if not, write to the Free Software
|
||||
+ Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA.
|
||||
+
|
||||
+ Please email any bugs, comments, and/or additions to this file to:
|
||||
+ bug-gdb@prep.ai.mit.edu */
|
||||
+
|
||||
+#include <sys/types.h>
|
||||
+#include <sys/wait.h>
|
||||
+#include <unistd.h>
|
||||
+#include <assert.h>
|
||||
+#include <stdlib.h>
|
||||
+
|
||||
+static void func (void)
|
||||
+{
|
||||
+}
|
||||
+
|
||||
+int main (void)
|
||||
+{
|
||||
+ pid_t child;
|
||||
+
|
||||
+ child = fork ();
|
||||
+ switch (child)
|
||||
+ {
|
||||
+ case -1:
|
||||
+ abort ();
|
||||
+ case 0:
|
||||
+ func ();
|
||||
+ break;
|
||||
+ default:
|
||||
+ {
|
||||
+/* We do not test the switching to the other fork by GDB `fork 1'. */
|
||||
+#if 0
|
||||
+ pid_t got;
|
||||
+
|
||||
+ got = waitpid (child, NULL, 0);
|
||||
+ assert (got == child);
|
||||
+#endif
|
||||
+ break;
|
||||
+ }
|
||||
+ }
|
||||
+ return 0;
|
||||
+}
|
||||
diff --git a/gdb/testsuite/gdb.base/fork-detach.exp b/gdb/testsuite/gdb.base/fork-detach.exp
|
||||
new file mode 100644
|
||||
index 0000000000..1f1fcef6c4
|
||||
--- /dev/null
|
||||
+++ b/gdb/testsuite/gdb.base/fork-detach.exp
|
||||
@@ -0,0 +1,36 @@
|
||||
+# Copyright 2007 Free Software Foundation, Inc.
|
||||
+
|
||||
+# This program is free software; you can redistribute it and/or modify
|
||||
+# it under the terms of the GNU General Public License as published by
|
||||
+# the Free Software Foundation; either version 2 of the License, or
|
||||
+# (at your option) any later version.
|
||||
+#
|
||||
+# This program is distributed in the hope that it will be useful,
|
||||
+# but WITHOUT ANY WARRANTY; without even the implied warranty of
|
||||
+# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
|
||||
+# GNU General Public License for more details.
|
||||
+#
|
||||
+# You should have received a copy of the GNU General Public License
|
||||
+# along with this program; if not, write to the Free Software
|
||||
+# Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA.
|
||||
+
|
||||
+set testfile fork-detach
|
||||
+set srcfile ${testfile}.c
|
||||
+set binfile [standard_output_file ${testfile}]
|
||||
+if { [gdb_compile "${srcdir}/${subdir}/${srcfile}" "${binfile}" executable {debug}] != "" } {
|
||||
+ untested "Couldn't compile test program"
|
||||
+ return -1
|
||||
+}
|
||||
+
|
||||
+# Get things started.
|
||||
+
|
||||
+gdb_exit
|
||||
+gdb_start
|
||||
+gdb_reinitialize_dir $srcdir/$subdir
|
||||
+gdb_load ${binfile}
|
||||
+
|
||||
+gdb_run_cmd
|
||||
+# `Starting program: .*' prefix is available since gdb-6.7.
|
||||
+gdb_test "" \
|
||||
+ "Detaching after fork from child process.*\\\[Inferior .* exited normally\\\]" \
|
||||
+ "Info message caught"
|
||||
--
|
||||
2.14.3
|
||||
|
@ -3,6 +3,8 @@ From: Jan Kratochvil <jan.kratochvil@redhat.com>
|
||||
Date: Fri, 27 Oct 2017 21:07:50 +0200
|
||||
Subject: gdb-6.6-bz237572-ppc-atomic-sequence-test.patch
|
||||
|
||||
FileName: gdb-6.6-bz237572-ppc-atomic-sequence-test.patch
|
||||
|
||||
;; Support for stepping over PPC atomic instruction sequences (BZ 237572).
|
||||
;;=fedoratest
|
||||
|
||||
@ -10,9 +12,16 @@ Subject: gdb-6.6-bz237572-ppc-atomic-sequence-test.patch
|
||||
|
||||
* gdb.threads/atomic-seq-threaded.c,
|
||||
gdb.threads/atomic-seq-threaded.exp: New files.
|
||||
---
|
||||
gdb/testsuite/gdb.threads/atomic-seq-threaded.c | 171 ++++++++++++++++++++++
|
||||
gdb/testsuite/gdb.threads/atomic-seq-threaded.exp | 84 +++++++++++
|
||||
2 files changed, 255 insertions(+)
|
||||
create mode 100644 gdb/testsuite/gdb.threads/atomic-seq-threaded.c
|
||||
create mode 100644 gdb/testsuite/gdb.threads/atomic-seq-threaded.exp
|
||||
|
||||
diff --git a/gdb/testsuite/gdb.threads/atomic-seq-threaded.c b/gdb/testsuite/gdb.threads/atomic-seq-threaded.c
|
||||
new file mode 100644
|
||||
index 0000000000..04f998bfa6
|
||||
--- /dev/null
|
||||
+++ b/gdb/testsuite/gdb.threads/atomic-seq-threaded.c
|
||||
@@ -0,0 +1,171 @@
|
||||
@ -189,6 +198,7 @@ new file mode 100644
|
||||
+}
|
||||
diff --git a/gdb/testsuite/gdb.threads/atomic-seq-threaded.exp b/gdb/testsuite/gdb.threads/atomic-seq-threaded.exp
|
||||
new file mode 100644
|
||||
index 0000000000..eb49db506e
|
||||
--- /dev/null
|
||||
+++ b/gdb/testsuite/gdb.threads/atomic-seq-threaded.exp
|
||||
@@ -0,0 +1,84 @@
|
||||
@ -276,3 +286,6 @@ new file mode 100644
|
||||
+gdb_test "c" \
|
||||
+ ".*Program exited normally\\..*" \
|
||||
+ "run till program exit"
|
||||
--
|
||||
2.14.3
|
||||
|
||||
|
95
gdb-6.6-scheduler_locking-step-is-default.patch
Normal file
95
gdb-6.6-scheduler_locking-step-is-default.patch
Normal file
@ -0,0 +1,95 @@
|
||||
From FEDORA_PATCHES Mon Sep 17 00:00:00 2001
|
||||
From: Fedora GDB patches <invalid@email.com>
|
||||
Date: Fri, 27 Oct 2017 21:07:50 +0200
|
||||
Subject: gdb-6.6-scheduler_locking-step-is-default.patch
|
||||
|
||||
FileName: 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?
|
||||
---
|
||||
gdb/infrun.c | 2 +-
|
||||
gdb/testsuite/gdb.mi/mi-cli.exp | 2 +-
|
||||
gdb/testsuite/gdb.mi/mi-console.exp | 3 +++
|
||||
gdb/testsuite/gdb.mi/mi-logging.exp | 4 ++--
|
||||
gdb/testsuite/gdb.opt/inline-cmds.exp | 2 +-
|
||||
5 files changed, 8 insertions(+), 5 deletions(-)
|
||||
|
||||
diff --git a/gdb/infrun.c b/gdb/infrun.c
|
||||
index 23439979b5..1d0f731954 100644
|
||||
--- a/gdb/infrun.c
|
||||
+++ b/gdb/infrun.c
|
||||
@@ -2202,7 +2202,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
|
||||
index 6ce6439eb7..4f405b5fc1 100644
|
||||
--- 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
|
||||
index ec4b006018..05cf7fb889 100644
|
||||
--- 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
|
||||
index b09cde2d37..e51d46edb5 100644
|
||||
--- 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
|
||||
index 5227d63f5d..782f31c080 100644
|
||||
--- 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 {
|
||||
--
|
||||
2.14.3
|
||||
|
@ -3,10 +3,17 @@ From: Fedora GDB patches <invalid@email.com>
|
||||
Date: Fri, 27 Oct 2017 21:07:50 +0200
|
||||
Subject: gdb-6.6-testsuite-timeouts.patch
|
||||
|
||||
FileName: gdb-6.6-testsuite-timeouts.patch
|
||||
|
||||
;; Avoid too long timeouts on failing cases of "annota1.exp annota3.exp".
|
||||
;;=fedoratest
|
||||
---
|
||||
gdb/testsuite/gdb.base/annota1.exp | 2 ++
|
||||
gdb/testsuite/gdb.base/annota3.exp | 2 ++
|
||||
2 files changed, 4 insertions(+)
|
||||
|
||||
diff --git a/gdb/testsuite/gdb.base/annota1.exp b/gdb/testsuite/gdb.base/annota1.exp
|
||||
index 4b34aa84f2..40e08a4db2 100644
|
||||
--- a/gdb/testsuite/gdb.base/annota1.exp
|
||||
+++ b/gdb/testsuite/gdb.base/annota1.exp
|
||||
@@ -39,6 +39,8 @@ if { [gdb_compile "${srcdir}/${subdir}/${srcfile}" "${binfile}" executable {deb
|
||||
@ -19,6 +26,7 @@ diff --git a/gdb/testsuite/gdb.base/annota1.exp b/gdb/testsuite/gdb.base/annota1
|
||||
# <return> to continue" prompts.
|
||||
gdb_test_no_output "set height 0"
|
||||
diff --git a/gdb/testsuite/gdb.base/annota3.exp b/gdb/testsuite/gdb.base/annota3.exp
|
||||
index a899be69ea..af472af8a5 100644
|
||||
--- a/gdb/testsuite/gdb.base/annota3.exp
|
||||
+++ b/gdb/testsuite/gdb.base/annota3.exp
|
||||
@@ -38,6 +38,8 @@ if { [gdb_compile "${srcdir}/${subdir}/${srcfile}" "${binfile}" executable {deb
|
||||
@ -30,3 +38,6 @@ diff --git a/gdb/testsuite/gdb.base/annota3.exp b/gdb/testsuite/gdb.base/annota3
|
||||
# The commands we test here produce many lines of output; disable "press
|
||||
# <return> to continue" prompts.
|
||||
gdb_test_no_output "set height 0"
|
||||
--
|
||||
2.14.3
|
||||
|
||||
|
@ -3,6 +3,8 @@ From: Jan Kratochvil <jan.kratochvil@redhat.com>
|
||||
Date: Fri, 27 Oct 2017 21:07:50 +0200
|
||||
Subject: gdb-6.7-charsign-test.patch
|
||||
|
||||
FileName: gdb-6.7-charsign-test.patch
|
||||
|
||||
;; Fix displaying of numeric char arrays as strings (BZ 224128).
|
||||
;;=fedoratest: But it is failing anyway, one should check the behavior more.
|
||||
|
||||
@ -17,9 +19,16 @@ https://bugzilla.redhat.com/bugzilla/show_bug.cgi?id=224128
|
||||
|
||||
Port to GDB-6.7 - only the testcase left, patch has been reverted,
|
||||
char-vectors restricted.
|
||||
---
|
||||
gdb/testsuite/gdb.base/charsign.c | 37 ++++++++++++++++++++++
|
||||
gdb/testsuite/gdb.base/charsign.exp | 63 +++++++++++++++++++++++++++++++++++++
|
||||
2 files changed, 100 insertions(+)
|
||||
create mode 100644 gdb/testsuite/gdb.base/charsign.c
|
||||
create mode 100644 gdb/testsuite/gdb.base/charsign.exp
|
||||
|
||||
diff --git a/gdb/testsuite/gdb.base/charsign.c b/gdb/testsuite/gdb.base/charsign.c
|
||||
new file mode 100644
|
||||
index 0000000000..41d175ff9d
|
||||
--- /dev/null
|
||||
+++ b/gdb/testsuite/gdb.base/charsign.c
|
||||
@@ -0,0 +1,37 @@
|
||||
@ -62,6 +71,7 @@ new file mode 100644
|
||||
+char_u u_typed[]="A";
|
||||
diff --git a/gdb/testsuite/gdb.base/charsign.exp b/gdb/testsuite/gdb.base/charsign.exp
|
||||
new file mode 100644
|
||||
index 0000000000..b5fa580490
|
||||
--- /dev/null
|
||||
+++ b/gdb/testsuite/gdb.base/charsign.exp
|
||||
@@ -0,0 +1,63 @@
|
||||
@ -128,3 +138,6 @@ new file mode 100644
|
||||
+do_test {}
|
||||
+do_test {-fsigned-char}
|
||||
+do_test {-funsigned-char}
|
||||
--
|
||||
2.14.3
|
||||
|
||||
|
@ -3,6 +3,8 @@ From: Jan Kratochvil <jan.kratochvil@redhat.com>
|
||||
Date: Fri, 27 Oct 2017 21:07:50 +0200
|
||||
Subject: gdb-6.7-ppc-clobbered-registers-O2-test.patch
|
||||
|
||||
FileName: gdb-6.7-ppc-clobbered-registers-O2-test.patch
|
||||
|
||||
;; Test PPC hiding of call-volatile parameter register.
|
||||
;;=fedoratest
|
||||
|
||||
@ -20,9 +22,16 @@ http://sourceware.org/ml/gdb-patches/2007-09/msg00228.html
|
||||
* rs6000-tdep.c (ppc_dwarf2_frame_init_reg): New function.
|
||||
* (rs6000_gdbarch_init): Install ppc_dwarf2_frame_init_reg as
|
||||
default dwarf2_frame_set_init_reg function.
|
||||
---
|
||||
.../gdb.arch/ppc-clobbered-registers-O2.c | 21 +++++++++
|
||||
.../gdb.arch/ppc-clobbered-registers-O2.exp | 54 ++++++++++++++++++++++
|
||||
2 files changed, 75 insertions(+)
|
||||
create mode 100644 gdb/testsuite/gdb.arch/ppc-clobbered-registers-O2.c
|
||||
create mode 100644 gdb/testsuite/gdb.arch/ppc-clobbered-registers-O2.exp
|
||||
|
||||
diff --git a/gdb/testsuite/gdb.arch/ppc-clobbered-registers-O2.c b/gdb/testsuite/gdb.arch/ppc-clobbered-registers-O2.c
|
||||
new file mode 100644
|
||||
index 0000000000..698ff8a0b5
|
||||
--- /dev/null
|
||||
+++ b/gdb/testsuite/gdb.arch/ppc-clobbered-registers-O2.c
|
||||
@@ -0,0 +1,21 @@
|
||||
@ -49,6 +58,7 @@ new file mode 100644
|
||||
+}
|
||||
diff --git a/gdb/testsuite/gdb.arch/ppc-clobbered-registers-O2.exp b/gdb/testsuite/gdb.arch/ppc-clobbered-registers-O2.exp
|
||||
new file mode 100644
|
||||
index 0000000000..c9ebd0e522
|
||||
--- /dev/null
|
||||
+++ b/gdb/testsuite/gdb.arch/ppc-clobbered-registers-O2.exp
|
||||
@@ -0,0 +1,54 @@
|
||||
@ -106,3 +116,6 @@ new file mode 100644
|
||||
+
|
||||
+gdb_test backtrace ".*operand0=<value optimized out>.*operand1=<value optimized out>.*" \
|
||||
+ "Check value of call clobbered registers"
|
||||
--
|
||||
2.14.3
|
||||
|
||||
|
@ -3,6 +3,8 @@ From: Jan Kratochvil <jan.kratochvil@redhat.com>
|
||||
Date: Fri, 27 Oct 2017 21:07:50 +0200
|
||||
Subject: gdb-6.7-testsuite-stable-results.patch
|
||||
|
||||
FileName: gdb-6.7-testsuite-stable-results.patch
|
||||
|
||||
;; Testsuite fixes for more stable/comparable results.
|
||||
;;=fedoratest
|
||||
|
||||
@ -24,11 +26,16 @@ random FAIL: gdb.base/auxv.exp: matching auxv data from live and gcore
|
||||
|
||||
gdb-6.8.50.20090209/gdb/testsuite/gdb.base/annota1.exp:
|
||||
frames-invalid can happen asynchronously.
|
||||
---
|
||||
gdb/testsuite/gdb.base/fileio.c | 22 ++++++++++++++++++++++
|
||||
gdb/testsuite/gdb.base/fileio.exp | 13 ++++++-------
|
||||
2 files changed, 28 insertions(+), 7 deletions(-)
|
||||
|
||||
diff --git a/gdb/testsuite/gdb.base/fileio.c b/gdb/testsuite/gdb.base/fileio.c
|
||||
index 7f482a34d3..1caadbae84 100644
|
||||
--- a/gdb/testsuite/gdb.base/fileio.c
|
||||
+++ b/gdb/testsuite/gdb.base/fileio.c
|
||||
@@ -559,6 +559,28 @@ strerrno (int err)
|
||||
@@ -560,6 +560,28 @@ strerrno (int err)
|
||||
int
|
||||
main ()
|
||||
{
|
||||
@ -58,6 +65,7 @@ diff --git a/gdb/testsuite/gdb.base/fileio.c b/gdb/testsuite/gdb.base/fileio.c
|
||||
test_open ();
|
||||
test_write ();
|
||||
diff --git a/gdb/testsuite/gdb.base/fileio.exp b/gdb/testsuite/gdb.base/fileio.exp
|
||||
index bc409c26aa..e1e5e2e5d0 100644
|
||||
--- a/gdb/testsuite/gdb.base/fileio.exp
|
||||
+++ b/gdb/testsuite/gdb.base/fileio.exp
|
||||
@@ -24,9 +24,9 @@ if [target_info exists gdb,nofileio] {
|
||||
@ -102,3 +110,6 @@ diff --git a/gdb/testsuite/gdb.base/fileio.exp b/gdb/testsuite/gdb.base/fileio.e
|
||||
|
||||
set timeout $oldtimeout
|
||||
return 0
|
||||
--
|
||||
2.14.3
|
||||
|
||||
|
199
gdb-6.8-attach-signalled-detach-stopped.patch
Normal file
199
gdb-6.8-attach-signalled-detach-stopped.patch
Normal file
@ -0,0 +1,199 @@
|
||||
From FEDORA_PATCHES Mon Sep 17 00:00:00 2001
|
||||
From: Fedora GDB patches <invalid@email.com>
|
||||
Date: Fri, 27 Oct 2017 21:07:50 +0200
|
||||
Subject: gdb-6.8-attach-signalled-detach-stopped.patch
|
||||
|
||||
FileName: gdb-6.8-attach-signalled-detach-stopped.patch
|
||||
|
||||
;; [RHEL5,RHEL6] Fix attaching to stopped processes.
|
||||
;; [RHEL5] Workaround kernel for detaching SIGSTOPped processes (BZ 809382).
|
||||
;;=fedora
|
||||
---
|
||||
gdb/infrun.c | 7 ++++
|
||||
gdb/linux-nat.c | 45 +++++++++++++++++++++
|
||||
gdb/testsuite/gdb.threads/attach-stopped.exp | 60 +++++++++++++++++++++++++++-
|
||||
3 files changed, 111 insertions(+), 1 deletion(-)
|
||||
|
||||
diff --git a/gdb/infrun.c b/gdb/infrun.c
|
||||
index b468d02fd6..16561dd119 100644
|
||||
--- a/gdb/infrun.c
|
||||
+++ b/gdb/infrun.c
|
||||
@@ -606,6 +606,13 @@ holding the child stopped. Try \"set detach-on-fork\" or \
|
||||
target_pid_to_str (process_ptid));
|
||||
}
|
||||
|
||||
+#ifdef NEED_DETACH_SIGSTOP
|
||||
+ /* We should check PID_WAS_STOPPED and detach it stopped accordingly.
|
||||
+ In this point of code it cannot be 1 as we would not get FORK
|
||||
+ executed without CONTINUE first which resets PID_WAS_STOPPED.
|
||||
+ We would have to first TARGET_STOP and WAITPID it as with running
|
||||
+ inferior PTRACE_DETACH, SIGSTOP will ignore the signal. */
|
||||
+#endif
|
||||
target_detach (NULL, 0);
|
||||
}
|
||||
|
||||
diff --git a/gdb/linux-nat.c b/gdb/linux-nat.c
|
||||
index 1570a2bcb6..a101fbbe33 100644
|
||||
--- a/gdb/linux-nat.c
|
||||
+++ b/gdb/linux-nat.c
|
||||
@@ -194,6 +194,11 @@ enum tribool have_ptrace_getregset = TRIBOOL_UNKNOWN;
|
||||
static struct target_ops *linux_ops;
|
||||
static struct target_ops linux_ops_saved;
|
||||
|
||||
+#ifdef NEED_DETACH_SIGSTOP
|
||||
+/* PID of the inferior stopped by SIGSTOP before attaching (or zero). */
|
||||
+static pid_t pid_was_stopped;
|
||||
+
|
||||
+#endif
|
||||
/* The method to call, if any, when a new thread is attached. */
|
||||
static void (*linux_nat_new_thread) (struct lwp_info *);
|
||||
|
||||
@@ -1065,6 +1070,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");
|
||||
+#ifdef NEED_DETACH_SIGSTOP
|
||||
+ pid_was_stopped = ptid_get_pid (ptid);
|
||||
+#endif
|
||||
|
||||
/* The process is definitely stopped. It is in a job control
|
||||
stop, unless the kernel predates the TASK_STOPPED /
|
||||
@@ -1420,6 +1428,25 @@ get_detach_signal (struct lwp_info *lp)
|
||||
return gdb_signal_to_host (signo);
|
||||
}
|
||||
|
||||
+#ifdef NEED_DETACH_SIGSTOP
|
||||
+ /* Workaround RHEL-5 kernel which has unreliable PTRACE_DETACH, SIGSTOP (that
|
||||
+ many TIDs are left unstopped). See RH Bug 496732. */
|
||||
+ if (ptid_get_pid (lp->ptid) == pid_was_stopped)
|
||||
+ {
|
||||
+ int err;
|
||||
+
|
||||
+ errno = 0;
|
||||
+ err = kill_lwp (ptid_get_lwp (lp->ptid), SIGSTOP);
|
||||
+ if (debug_linux_nat)
|
||||
+ {
|
||||
+ fprintf_unfiltered (gdb_stdlog,
|
||||
+ "SC: lwp kill %d %s\n",
|
||||
+ err,
|
||||
+ errno ? safe_strerror (errno) : "ERRNO-OK");
|
||||
+ }
|
||||
+ }
|
||||
+
|
||||
+#endif
|
||||
return 0;
|
||||
}
|
||||
|
||||
@@ -1578,6 +1605,10 @@ linux_nat_detach (struct target_ops *ops, const char *args, int from_tty)
|
||||
detach_one_lwp (main_lwp, &signo);
|
||||
|
||||
inf_ptrace_detach_success (ops);
|
||||
+
|
||||
+#ifdef NEED_DETACH_SIGSTOP
|
||||
+ pid_was_stopped = 0;
|
||||
+#endif
|
||||
}
|
||||
}
|
||||
|
||||
@@ -1838,6 +1869,16 @@ linux_nat_resume (struct target_ops *ops,
|
||||
return;
|
||||
}
|
||||
|
||||
+#ifdef NEED_DETACH_SIGSTOP
|
||||
+ /* At this point, we are going to resume the inferior and if we
|
||||
+ have attached to a stopped process, we no longer should leave
|
||||
+ it as stopped if the user detaches. PTID variable has PID set to LWP
|
||||
+ while we need to check the real PID here. */
|
||||
+
|
||||
+ if (!step && lp && pid_was_stopped == ptid_get_pid (lp->ptid))
|
||||
+ pid_was_stopped = 0;
|
||||
+
|
||||
+#endif
|
||||
if (resume_many)
|
||||
iterate_over_lwps (ptid, linux_nat_resume_callback, lp);
|
||||
|
||||
@@ -3830,6 +3871,10 @@ linux_nat_mourn_inferior (struct target_ops *ops)
|
||||
|
||||
/* Let the arch-specific native code know this process is gone. */
|
||||
linux_nat_forget_process (pid);
|
||||
+#ifdef NEED_DETACH_SIGSTOP
|
||||
+
|
||||
+ pid_was_stopped = 0;
|
||||
+#endif
|
||||
}
|
||||
|
||||
/* Convert a native/host siginfo object, into/from the siginfo in the
|
||||
diff --git a/gdb/testsuite/gdb.threads/attach-stopped.exp b/gdb/testsuite/gdb.threads/attach-stopped.exp
|
||||
index 6c8c8bf10e..c953a9c60d 100644
|
||||
--- a/gdb/testsuite/gdb.threads/attach-stopped.exp
|
||||
+++ b/gdb/testsuite/gdb.threads/attach-stopped.exp
|
||||
@@ -56,7 +56,65 @@ proc corefunc { threadtype } {
|
||||
gdb_reinitialize_dir $srcdir/$subdir
|
||||
gdb_load ${binfile}
|
||||
|
||||
- # Verify that we can attach to the stopped process.
|
||||
+ # Verify that we can attach to the process by first giving its
|
||||
+ # executable name via the file command, and using attach with the
|
||||
+ # process ID.
|
||||
+
|
||||
+ set test "$threadtype: set file, before attach1 to stopped process"
|
||||
+ gdb_test_multiple "file $binfile" "$test" {
|
||||
+ -re "Load new symbol table from.*y or n. $" {
|
||||
+ gdb_test "y" "Reading symbols from $escapedbinfile\.\.\.*done." \
|
||||
+ "$test (re-read)"
|
||||
+ }
|
||||
+ -re "Reading symbols from $escapedbinfile\.\.\.*done.*$gdb_prompt $" {
|
||||
+ pass "$test"
|
||||
+ }
|
||||
+ }
|
||||
+
|
||||
+ set test "$threadtype: attach1 to stopped, after setting file"
|
||||
+ gdb_test_multiple "attach $testpid" "$test" {
|
||||
+ -re "Attaching to program.*`?$escapedbinfile'?, process $testpid.*$gdb_prompt $" {
|
||||
+ pass "$test"
|
||||
+ }
|
||||
+ }
|
||||
+
|
||||
+ # ".*sleep.*clone.*" would fail on s390x as bt stops at START_THREAD there.
|
||||
+ if {[string equal $threadtype threaded]} {
|
||||
+ gdb_test "thread apply all bt" ".*sleep.*start_thread.*" "$threadtype: attach1 to stopped bt"
|
||||
+ } else {
|
||||
+ gdb_test "bt" ".*sleep.*main.*" "$threadtype: attach1 to stopped bt"
|
||||
+ }
|
||||
+
|
||||
+ # Exit and detach the process.
|
||||
+
|
||||
+ gdb_exit
|
||||
+
|
||||
+ # Avoid some race:
|
||||
+ sleep 2
|
||||
+
|
||||
+ if [catch {open /proc/${testpid}/status r} fileid] {
|
||||
+ set line2 "NOTFOUND"
|
||||
+ } else {
|
||||
+ gets $fileid line1;
|
||||
+ gets $fileid line2;
|
||||
+ close $fileid;
|
||||
+ }
|
||||
+
|
||||
+ set test "$threadtype: attach1, exit leaves process stopped"
|
||||
+ if {[string match "*(stopped)*" $line2]} {
|
||||
+ pass $test
|
||||
+ } else {
|
||||
+ fail $test
|
||||
+ }
|
||||
+
|
||||
+ # At this point, the process should still be stopped
|
||||
+
|
||||
+ gdb_start
|
||||
+ gdb_reinitialize_dir $srcdir/$subdir
|
||||
+ gdb_load ${binfile}
|
||||
+
|
||||
+ # Verify that we can attach to the process just by giving the
|
||||
+ # process ID.
|
||||
|
||||
set test "$threadtype: attach2 to stopped, after setting file"
|
||||
gdb_test_multiple "attach $testpid" "$test" {
|
||||
--
|
||||
2.14.3
|
||||
|
46
gdb-6.8-bz436037-reg-no-longer-active.patch
Normal file
46
gdb-6.8-bz436037-reg-no-longer-active.patch
Normal file
@ -0,0 +1,46 @@
|
||||
From FEDORA_PATCHES Mon Sep 17 00:00:00 2001
|
||||
From: Fedora GDB patches <invalid@email.com>
|
||||
Date: Fri, 27 Oct 2017 21:07:50 +0200
|
||||
Subject: gdb-6.8-bz436037-reg-no-longer-active.patch
|
||||
|
||||
FileName: 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.
|
||||
---
|
||||
gdb/valops.c | 12 ++++++++++--
|
||||
1 file changed, 10 insertions(+), 2 deletions(-)
|
||||
|
||||
diff --git a/gdb/valops.c b/gdb/valops.c
|
||||
index 9b25980090..7aacd17d70 100644
|
||||
--- a/gdb/valops.c
|
||||
+++ b/gdb/valops.c
|
||||
@@ -1103,6 +1103,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
|
||||
@@ -1112,8 +1114,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."));
|
||||
|
||||
--
|
||||
2.14.3
|
||||
|
@ -3,12 +3,19 @@ From: Fedora GDB patches <invalid@email.com>
|
||||
Date: Fri, 27 Oct 2017 21:07:50 +0200
|
||||
Subject: gdb-6.8-bz442765-threaded-exec-test.patch
|
||||
|
||||
FileName: gdb-6.8-bz442765-threaded-exec-test.patch
|
||||
|
||||
;; Test various forms of threads tracking across exec() (BZ 442765).
|
||||
;;=fedoratest
|
||||
|
||||
Test various forms of threads tracking across exec(2).
|
||||
---
|
||||
gdb/testsuite/gdb.threads/threaded-exec.c | 111 ++++++++++++++++++++++++++--
|
||||
gdb/testsuite/gdb.threads/threaded-exec.exp | 13 +++-
|
||||
2 files changed, 115 insertions(+), 9 deletions(-)
|
||||
|
||||
diff --git a/gdb/testsuite/gdb.threads/threaded-exec.c b/gdb/testsuite/gdb.threads/threaded-exec.c
|
||||
index 522b24671d..7079317d3a 100644
|
||||
--- a/gdb/testsuite/gdb.threads/threaded-exec.c
|
||||
+++ b/gdb/testsuite/gdb.threads/threaded-exec.c
|
||||
@@ -18,21 +18,95 @@
|
||||
@ -148,6 +155,7 @@ diff --git a/gdb/testsuite/gdb.threads/threaded-exec.c b/gdb/testsuite/gdb.threa
|
||||
+ assert (0);
|
||||
}
|
||||
diff --git a/gdb/testsuite/gdb.threads/threaded-exec.exp b/gdb/testsuite/gdb.threads/threaded-exec.exp
|
||||
index 77c8a7dc85..8c43162b36 100644
|
||||
--- a/gdb/testsuite/gdb.threads/threaded-exec.exp
|
||||
+++ b/gdb/testsuite/gdb.threads/threaded-exec.exp
|
||||
@@ -20,9 +20,14 @@
|
||||
@ -179,3 +187,6 @@ diff --git a/gdb/testsuite/gdb.threads/threaded-exec.exp b/gdb/testsuite/gdb.thr
|
||||
|
||||
gdb_test_multiple {} "Program exited" {
|
||||
-re "\r\n\\\[Inferior .* exited normally\\\]\r\n$gdb_prompt $" {
|
||||
--
|
||||
2.14.3
|
||||
|
||||
|
@ -3,13 +3,24 @@ From: Fedora GDB patches <invalid@email.com>
|
||||
Date: Fri, 27 Oct 2017 21:07:50 +0200
|
||||
Subject: gdb-6.8-bz466901-backtrace-full-prelinked.patch
|
||||
|
||||
FileName: gdb-6.8-bz466901-backtrace-full-prelinked.patch
|
||||
|
||||
;; Fix resolving of variables at locations lists in prelinked libs (BZ 466901).
|
||||
;;=fedoratest
|
||||
|
||||
Fix resolving of variables at locations lists in prelinked libs (BZ 466901).
|
||||
---
|
||||
.../gdb.dwarf2/dw2-loclist-prelinked-func.S | 328 +++++++++++++++++++++
|
||||
.../gdb.dwarf2/dw2-loclist-prelinked-main.c | 26 ++
|
||||
gdb/testsuite/gdb.dwarf2/dw2-loclist-prelinked.exp | 102 +++++++
|
||||
3 files changed, 456 insertions(+)
|
||||
create mode 100644 gdb/testsuite/gdb.dwarf2/dw2-loclist-prelinked-func.S
|
||||
create mode 100644 gdb/testsuite/gdb.dwarf2/dw2-loclist-prelinked-main.c
|
||||
create mode 100644 gdb/testsuite/gdb.dwarf2/dw2-loclist-prelinked.exp
|
||||
|
||||
diff --git a/gdb/testsuite/gdb.dwarf2/dw2-loclist-prelinked-func.S b/gdb/testsuite/gdb.dwarf2/dw2-loclist-prelinked-func.S
|
||||
new file mode 100644
|
||||
index 0000000000..442c4d00a1
|
||||
--- /dev/null
|
||||
+++ b/gdb/testsuite/gdb.dwarf2/dw2-loclist-prelinked-func.S
|
||||
@@ -0,0 +1,328 @@
|
||||
@ -343,6 +354,7 @@ new file mode 100644
|
||||
+ .section .note.GNU-stack,"",@progbits
|
||||
diff --git a/gdb/testsuite/gdb.dwarf2/dw2-loclist-prelinked-main.c b/gdb/testsuite/gdb.dwarf2/dw2-loclist-prelinked-main.c
|
||||
new file mode 100644
|
||||
index 0000000000..57386999ce
|
||||
--- /dev/null
|
||||
+++ b/gdb/testsuite/gdb.dwarf2/dw2-loclist-prelinked-main.c
|
||||
@@ -0,0 +1,26 @@
|
||||
@ -374,6 +386,7 @@ new file mode 100644
|
||||
+}
|
||||
diff --git a/gdb/testsuite/gdb.dwarf2/dw2-loclist-prelinked.exp b/gdb/testsuite/gdb.dwarf2/dw2-loclist-prelinked.exp
|
||||
new file mode 100644
|
||||
index 0000000000..30d0473336
|
||||
--- /dev/null
|
||||
+++ b/gdb/testsuite/gdb.dwarf2/dw2-loclist-prelinked.exp
|
||||
@@ -0,0 +1,102 @@
|
||||
@ -479,3 +492,6 @@ new file mode 100644
|
||||
+
|
||||
+# `abort' can get expressed as `*__GI_abort'.
|
||||
+gdb_test "bt full" "in \[^ \]*abort \\(.*in func \\(.*\r\n\[\t \]+i = -?\[0-9\].*in main \\(.*" "Backtrace after abort()"
|
||||
--
|
||||
2.14.3
|
||||
|
||||
|
@ -3,6 +3,8 @@ From: Fedora GDB patches <invalid@email.com>
|
||||
Date: Fri, 27 Oct 2017 21:07:50 +0200
|
||||
Subject: gdb-6.8-quit-never-aborts.patch
|
||||
|
||||
FileName: gdb-6.8-quit-never-aborts.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 .
|
||||
|
||||
@ -12,11 +14,18 @@ being sent during a testcase terminating its child GDB.
|
||||
Some of the threads may not be properly PTRACE_DETACHed which hurts if they
|
||||
should have been detached with SIGSTOP (as they are accidentally left running
|
||||
on the debugger termination).
|
||||
---
|
||||
gdb/defs.h | 4 ++++
|
||||
gdb/extension.c | 5 +++++
|
||||
gdb/top.c | 6 ++++++
|
||||
gdb/utils.c | 7 +++++++
|
||||
4 files changed, 22 insertions(+)
|
||||
|
||||
diff --git a/gdb/defs.h b/gdb/defs.h
|
||||
index 0c156d56c3..9a7f4d52b0 100644
|
||||
--- a/gdb/defs.h
|
||||
+++ b/gdb/defs.h
|
||||
@@ -177,6 +177,10 @@ extern void default_quit_handler (void);
|
||||
@@ -168,6 +168,10 @@ extern void default_quit_handler (void);
|
||||
/* Flag that function quit should call quit_force. */
|
||||
extern volatile int sync_quit_force_run;
|
||||
|
||||
@ -28,26 +37,28 @@ diff --git a/gdb/defs.h b/gdb/defs.h
|
||||
|
||||
/* Helper for the QUIT macro. */
|
||||
diff --git a/gdb/extension.c b/gdb/extension.c
|
||||
index a1ee3510a6..229d702270 100644
|
||||
--- a/gdb/extension.c
|
||||
+++ b/gdb/extension.c
|
||||
@@ -769,6 +769,11 @@ check_quit_flag (void)
|
||||
{
|
||||
int result = 0;
|
||||
@@ -830,6 +830,11 @@ check_quit_flag (void)
|
||||
int i, result = 0;
|
||||
const struct extension_language_defn *extlang;
|
||||
|
||||
+#ifdef NEED_DETACH_SIGSTOP
|
||||
+ if (quit_flag_cleanup)
|
||||
+ return 0;
|
||||
+#endif
|
||||
+
|
||||
for (const struct extension_language_defn *extlang : extension_languages)
|
||||
ALL_ENABLED_EXTENSION_LANGUAGES (i, extlang)
|
||||
{
|
||||
if (extlang->ops != nullptr
|
||||
if (extlang->ops->check_quit_flag != NULL)
|
||||
diff --git a/gdb/top.c b/gdb/top.c
|
||||
index 4749cf561d..e2665c8e22 100644
|
||||
--- a/gdb/top.c
|
||||
+++ b/gdb/top.c
|
||||
@@ -1770,7 +1770,13 @@ quit_force (int *exit_arg, int from_tty)
|
||||
else if (return_child_result)
|
||||
exit_code = return_child_result_value;
|
||||
@@ -1580,7 +1580,13 @@ quit_force (int *exit_arg, int from_tty)
|
||||
qt.args = NULL;
|
||||
qt.from_tty = from_tty;
|
||||
|
||||
+#ifndef NEED_DETACH_SIGSTOP
|
||||
/* We want to handle any quit errors and exit regardless. */
|
||||
@ -58,13 +69,14 @@ diff --git a/gdb/top.c b/gdb/top.c
|
||||
+#endif
|
||||
|
||||
/* Get out of tfind mode, and kill or detach all inferiors. */
|
||||
try
|
||||
TRY
|
||||
diff --git a/gdb/utils.c b/gdb/utils.c
|
||||
index 6f0abc98a2..58c0380d17 100644
|
||||
--- a/gdb/utils.c
|
||||
+++ b/gdb/utils.c
|
||||
@@ -103,6 +103,13 @@ static std::chrono::steady_clock::duration prompt_for_continue_wait_time;
|
||||
@@ -107,6 +107,13 @@ static std::chrono::steady_clock::duration prompt_for_continue_wait_time;
|
||||
|
||||
static bool debug_timestamp = false;
|
||||
static int debug_timestamp = 0;
|
||||
|
||||
+#ifdef NEED_DETACH_SIGSTOP
|
||||
+/* Nonzero means we are already processing the quitting cleanups and we should
|
||||
@ -73,6 +85,9 @@ diff --git a/gdb/utils.c b/gdb/utils.c
|
||||
+int quit_flag_cleanup;
|
||||
+#endif
|
||||
+
|
||||
/* True means that strings with character values >0x7F should be printed
|
||||
as octal escapes. False means just print the value (e.g. it's an
|
||||
/* Nonzero means that strings with character values >0x7F should be printed
|
||||
as octal escapes. Zero means just print the value (e.g. it's an
|
||||
international character, and the terminal or window can cope.) */
|
||||
--
|
||||
2.14.3
|
||||
|
||||
|
28
gdb-6.8-sparc64-silence-memcpy-check.patch
Normal file
28
gdb-6.8-sparc64-silence-memcpy-check.patch
Normal file
@ -0,0 +1,28 @@
|
||||
From FEDORA_PATCHES Mon Sep 17 00:00:00 2001
|
||||
From: Fedora GDB patches <invalid@email.com>
|
||||
Date: Fri, 27 Oct 2017 21:07:50 +0200
|
||||
Subject: gdb-6.8-sparc64-silence-memcpy-check.patch
|
||||
|
||||
FileName: gdb-6.8-sparc64-silence-memcpy-check.patch
|
||||
|
||||
;; Silence memcpy check which returns false positive (sparc64)
|
||||
;;=push: But it is just a GCC workaround, look up the existing GCC PR for it.
|
||||
---
|
||||
gdb/sparc-tdep.c | 1 +
|
||||
1 file changed, 1 insertion(+)
|
||||
|
||||
diff --git a/gdb/sparc-tdep.c b/gdb/sparc-tdep.c
|
||||
index 12fd5b9e64..e304ba8dbc 100644
|
||||
--- a/gdb/sparc-tdep.c
|
||||
+++ b/gdb/sparc-tdep.c
|
||||
@@ -1444,6 +1444,7 @@ sparc32_store_return_value (struct type *type, struct regcache *regcache,
|
||||
if (sparc_floating_p (type) || sparc_complex_floating_p (type))
|
||||
{
|
||||
/* Floating return values. */
|
||||
+ len = (len <= 8) ? len : 8;
|
||||
memcpy (buf, valbuf, len);
|
||||
regcache_cooked_write (regcache, SPARC_F0_REGNUM, buf);
|
||||
if (len > 4)
|
||||
--
|
||||
2.14.3
|
||||
|
103
gdb-6.8-watchpoint-conditionals-test.patch
Normal file
103
gdb-6.8-watchpoint-conditionals-test.patch
Normal file
@ -0,0 +1,103 @@
|
||||
From FEDORA_PATCHES Mon Sep 17 00:00:00 2001
|
||||
From: Fedora GDB patches <invalid@email.com>
|
||||
Date: Fri, 27 Oct 2017 21:07:50 +0200
|
||||
Subject: gdb-6.8-watchpoint-conditionals-test.patch
|
||||
|
||||
FileName: gdb-6.8-watchpoint-conditionals-test.patch
|
||||
|
||||
;; Test the watchpoints conditionals works.
|
||||
;;=fedoratest
|
||||
|
||||
For:
|
||||
http://sourceware.org/ml/gdb-patches/2008-04/msg00379.html
|
||||
http://sourceware.org/ml/gdb-cvs/2008-04/msg00104.html
|
||||
---
|
||||
gdb/testsuite/gdb.base/watchpoint-cond.c | 31 +++++++++++++++++++++++++
|
||||
gdb/testsuite/gdb.base/watchpoint-cond.exp | 37 ++++++++++++++++++++++++++++++
|
||||
2 files changed, 68 insertions(+)
|
||||
create mode 100644 gdb/testsuite/gdb.base/watchpoint-cond.c
|
||||
create mode 100644 gdb/testsuite/gdb.base/watchpoint-cond.exp
|
||||
|
||||
diff --git a/gdb/testsuite/gdb.base/watchpoint-cond.c b/gdb/testsuite/gdb.base/watchpoint-cond.c
|
||||
new file mode 100644
|
||||
index 0000000000..d4ec581946
|
||||
--- /dev/null
|
||||
+++ b/gdb/testsuite/gdb.base/watchpoint-cond.c
|
||||
@@ -0,0 +1,31 @@
|
||||
+/* This testcase is part of GDB, the GNU debugger.
|
||||
+
|
||||
+ Copyright 2008 Free Software Foundation, Inc.
|
||||
+
|
||||
+ This program is free software; you can redistribute it and/or modify
|
||||
+ it under the terms of the GNU General Public License as published by
|
||||
+ the Free Software Foundation; either version 3 of the License, or
|
||||
+ (at your option) any later version.
|
||||
+
|
||||
+ This program is distributed in the hope that it will be useful,
|
||||
+ but WITHOUT ANY WARRANTY; without even the implied warranty of
|
||||
+ MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
|
||||
+ GNU General Public License for more details.
|
||||
+
|
||||
+ You should have received a copy of the GNU General Public License
|
||||
+ along with this program. If not, see <http://www.gnu.org/licenses/>.
|
||||
+
|
||||
+ Please email any bugs, comments, and/or additions to this file to:
|
||||
+ bug-gdb@prep.ai.mit.edu */
|
||||
+
|
||||
+int
|
||||
+main (int argc, char **argv)
|
||||
+{
|
||||
+ static int i = 0; /* `static' to start initialized. */
|
||||
+ int j = 2;
|
||||
+
|
||||
+ for (j = 0; j < 30; j++)
|
||||
+ i = 30 - j;
|
||||
+
|
||||
+ return 0;
|
||||
+}
|
||||
diff --git a/gdb/testsuite/gdb.base/watchpoint-cond.exp b/gdb/testsuite/gdb.base/watchpoint-cond.exp
|
||||
new file mode 100644
|
||||
index 0000000000..31d5b602aa
|
||||
--- /dev/null
|
||||
+++ b/gdb/testsuite/gdb.base/watchpoint-cond.exp
|
||||
@@ -0,0 +1,37 @@
|
||||
+# Copyright 2008 Free Software Foundation, Inc.
|
||||
+
|
||||
+# This program is free software; you can redistribute it and/or modify
|
||||
+# it under the terms of the GNU General Public License as published by
|
||||
+# the Free Software Foundation; either version 3 of the License, or
|
||||
+# (at your option) any later version.
|
||||
+#
|
||||
+# This program is distributed in the hope that it will be useful,
|
||||
+# but WITHOUT ANY WARRANTY; without even the implied warranty of
|
||||
+# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
|
||||
+# GNU General Public License for more details.
|
||||
+#
|
||||
+# You should have received a copy of the GNU General Public License
|
||||
+# along with this program. If not, see <http://www.gnu.org/licenses/>.
|
||||
+
|
||||
+set testfile watchpoint-cond
|
||||
+set srcfile ${testfile}.c
|
||||
+set binfile [standard_output_file ${testfile}]
|
||||
+if { [gdb_compile "${srcdir}/${subdir}/${srcfile}" "${binfile}" executable {debug}] != "" } {
|
||||
+ untested "Couldn't compile test program"
|
||||
+ return -1
|
||||
+}
|
||||
+
|
||||
+# Get things started.
|
||||
+
|
||||
+gdb_exit
|
||||
+gdb_start
|
||||
+gdb_reinitialize_dir $srcdir/$subdir
|
||||
+gdb_load ${binfile}
|
||||
+
|
||||
+if { [runto_main] < 0 } {
|
||||
+ untested watchpoint-cond
|
||||
+ return -1
|
||||
+}
|
||||
+
|
||||
+gdb_test "watch i if i < 20" "atchpoint \[0-9\]+: i"
|
||||
+gdb_test "cont" "atchpoint \[0-9\]+: i.*Old value = 20.*New value = 19.*"
|
||||
--
|
||||
2.14.3
|
||||
|
77
gdb-7.2.50-sparc-add-workaround-to-broken-debug-files.patch
Normal file
77
gdb-7.2.50-sparc-add-workaround-to-broken-debug-files.patch
Normal file
@ -0,0 +1,77 @@
|
||||
From FEDORA_PATCHES Mon Sep 17 00:00:00 2001
|
||||
From: Fedora GDB patches <invalid@email.com>
|
||||
Date: Fri, 27 Oct 2017 21:07:50 +0200
|
||||
Subject: gdb-7.2.50-sparc-add-workaround-to-broken-debug-files.patch
|
||||
|
||||
FileName: gdb-7.2.50-sparc-add-workaround-to-broken-debug-files.patch
|
||||
|
||||
;; Toolchain on sparc is slightly broken and debuginfo files are generated
|
||||
;; with non 64bit aligned tables/offsets.
|
||||
;; See for example readelf -S ../Xvnc.debug.
|
||||
;;
|
||||
;; As a consenquence calculation of sectp->filepos as used in
|
||||
;; dwarf2_read_section (gdb/dwarf2read.c:1525) will return a non aligned buffer
|
||||
;; that cannot be used directly as done with MMAP.
|
||||
;; Usage will result in a BusError.
|
||||
;;
|
||||
;; While we figure out what's wrong in the toolchain and do a full archive
|
||||
;; rebuild to fix it, we need to be able to use gdb :)
|
||||
;;=push
|
||||
---
|
||||
gdb/gdb_bfd.c | 6 ++++++
|
||||
1 file changed, 6 insertions(+)
|
||||
|
||||
diff --git a/gdb/gdb_bfd.c b/gdb/gdb_bfd.c
|
||||
index 80ddd427af..3e4d3e4444 100644
|
||||
--- a/gdb/gdb_bfd.c
|
||||
+++ b/gdb/gdb_bfd.c
|
||||
@@ -24,12 +24,14 @@
|
||||
#include "hashtab.h"
|
||||
#include "filestuff.h"
|
||||
#include "vec.h"
|
||||
+#ifndef __sparc__
|
||||
#ifdef HAVE_MMAP
|
||||
#include <sys/mman.h>
|
||||
#ifndef MAP_FAILED
|
||||
#define MAP_FAILED ((void *) -1)
|
||||
#endif
|
||||
#endif
|
||||
+#endif
|
||||
#include "target.h"
|
||||
#include "gdb/fileio.h"
|
||||
#include "inferior.h"
|
||||
@@ -484,6 +486,7 @@ free_one_bfd_section (bfd *abfd, asection *sectp, void *ignore)
|
||||
|
||||
if (sect != NULL && sect->data != NULL)
|
||||
{
|
||||
+#ifndef __sparc__
|
||||
#ifdef HAVE_MMAP
|
||||
if (sect->map_addr != NULL)
|
||||
{
|
||||
@@ -493,6 +496,7 @@ free_one_bfd_section (bfd *abfd, asection *sectp, void *ignore)
|
||||
gdb_assert (res == 0);
|
||||
}
|
||||
else
|
||||
+#endif
|
||||
#endif
|
||||
xfree (sect->data);
|
||||
}
|
||||
@@ -659,6 +663,7 @@ gdb_bfd_map_section (asection *sectp, bfd_size_type *size)
|
||||
if (descriptor->data != NULL)
|
||||
goto done;
|
||||
|
||||
+#ifndef __sparc__
|
||||
#ifdef HAVE_MMAP
|
||||
if (!bfd_is_section_compressed (abfd, sectp))
|
||||
{
|
||||
@@ -693,6 +698,7 @@ gdb_bfd_map_section (asection *sectp, bfd_size_type *size)
|
||||
}
|
||||
}
|
||||
#endif /* HAVE_MMAP */
|
||||
+#endif
|
||||
|
||||
/* Handle compressed sections, or ordinary uncompressed sections in
|
||||
the no-mmap case. */
|
||||
--
|
||||
2.14.3
|
||||
|
@ -3,14 +3,23 @@ From: Fedora GDB patches <invalid@email.com>
|
||||
Date: Fri, 27 Oct 2017 21:07:50 +0200
|
||||
Subject: gdb-archer-next-over-throw-cxx-exec.patch
|
||||
|
||||
FileName: gdb-archer-next-over-throw-cxx-exec.patch
|
||||
|
||||
;; Fix follow-exec for C++ programs (bugreported by Martin Stransky).
|
||||
;;=fedoratest
|
||||
|
||||
Archer-upstreamed:
|
||||
http://sourceware.org/ml/archer/2010-q2/msg00031.html
|
||||
---
|
||||
gdb/testsuite/gdb.cp/cxxexec.cc | 25 ++++++++++++++++++++
|
||||
gdb/testsuite/gdb.cp/cxxexec.exp | 51 ++++++++++++++++++++++++++++++++++++++++
|
||||
2 files changed, 76 insertions(+)
|
||||
create mode 100644 gdb/testsuite/gdb.cp/cxxexec.cc
|
||||
create mode 100644 gdb/testsuite/gdb.cp/cxxexec.exp
|
||||
|
||||
diff --git a/gdb/testsuite/gdb.cp/cxxexec.cc b/gdb/testsuite/gdb.cp/cxxexec.cc
|
||||
new file mode 100644
|
||||
index 0000000000..48fd63e9d3
|
||||
--- /dev/null
|
||||
+++ b/gdb/testsuite/gdb.cp/cxxexec.cc
|
||||
@@ -0,0 +1,25 @@
|
||||
@ -41,9 +50,10 @@ new file mode 100644
|
||||
+}
|
||||
diff --git a/gdb/testsuite/gdb.cp/cxxexec.exp b/gdb/testsuite/gdb.cp/cxxexec.exp
|
||||
new file mode 100644
|
||||
index 0000000000..c85dd0129d
|
||||
--- /dev/null
|
||||
+++ b/gdb/testsuite/gdb.cp/cxxexec.exp
|
||||
@@ -0,0 +1,42 @@
|
||||
@@ -0,0 +1,51 @@
|
||||
+# Copyright 2010 Free Software Foundation, Inc.
|
||||
+
|
||||
+# This program is free software; you can redistribute it and/or modify
|
||||
@ -83,6 +93,18 @@ new file mode 100644
|
||||
+ }
|
||||
+}
|
||||
+
|
||||
+# Run to end. The buggy GDB failed instead with:
|
||||
+# Cannot access memory at address ADDR.
|
||||
+gdb_continue_to_end "" "continue" 1
|
||||
+set test continue
|
||||
+gdb_test_multiple $test $test {
|
||||
+ -re "Cannot access memory at address 0x\[0-9a-f\]+\r\n$gdb_prompt $" {
|
||||
+ fail $test
|
||||
+ }
|
||||
+ -re "\r\n$gdb_prompt $" {
|
||||
+ pass $test
|
||||
+ }
|
||||
+}
|
||||
+
|
||||
+# `info inferiors' can show <null> on older GDBs.
|
||||
+gdb_test "info threads" "info threads" "program finished"
|
||||
--
|
||||
2.14.3
|
||||
|
||||
|
@ -3,17 +3,25 @@ From: Fedora GDB patches <invalid@email.com>
|
||||
Date: Fri, 27 Oct 2017 21:07:50 +0200
|
||||
Subject: gdb-archer-pie-addons-keep-disabled.patch
|
||||
|
||||
FileName: gdb-archer-pie-addons-keep-disabled.patch
|
||||
|
||||
;;=push+jan: Breakpoints disabling matching should not be based on address.
|
||||
---
|
||||
gdb/breakpoint.c | 44 ++++++++++++++++++++++++++++++++++++++++++++
|
||||
gdb/breakpoint.h | 3 +++
|
||||
gdb/objfiles.c | 5 +++++
|
||||
3 files changed, 52 insertions(+)
|
||||
|
||||
diff --git a/gdb/breakpoint.c b/gdb/breakpoint.c
|
||||
index 2b5eebbbee..814802a0a1 100644
|
||||
--- a/gdb/breakpoint.c
|
||||
+++ b/gdb/breakpoint.c
|
||||
@@ -15431,6 +15431,50 @@ static struct cmd_list_element *enablebreaklist = NULL;
|
||||
@@ -15590,6 +15590,50 @@ initialize_breakpoint_ops (void)
|
||||
|
||||
cmd_list_element *commands_cmd_element = nullptr;
|
||||
static struct cmd_list_element *enablebreaklist = NULL;
|
||||
|
||||
+void
|
||||
+breakpoints_relocate (struct objfile *objfile, section_offsets &delta)
|
||||
+breakpoints_relocate (struct objfile *objfile, struct section_offsets *delta)
|
||||
+{
|
||||
+ struct bp_location *bl, **blp_tmp;
|
||||
+ int changed = 0;
|
||||
@ -32,7 +40,7 @@ diff --git a/gdb/breakpoint.c b/gdb/breakpoint.c
|
||||
+ CORE_ADDR relocated_address;
|
||||
+ CORE_ADDR delta_offset;
|
||||
+
|
||||
+ delta_offset = delta[osect->the_bfd_section->index];
|
||||
+ delta_offset = ANOFFSET (delta, osect->the_bfd_section->index);
|
||||
+ if (delta_offset == 0)
|
||||
+ continue;
|
||||
+ relocated_address = bl->address + delta_offset;
|
||||
@ -52,30 +60,32 @@ diff --git a/gdb/breakpoint.c b/gdb/breakpoint.c
|
||||
+ }
|
||||
+
|
||||
+ if (changed)
|
||||
+ std::sort (bp_locations, bp_locations + bp_locations_count,
|
||||
+ bp_location_is_less_than);
|
||||
+ qsort (bp_locations, bp_locations_count, sizeof (*bp_locations),
|
||||
+ bp_locations_compare);
|
||||
+}
|
||||
+
|
||||
void _initialize_breakpoint ();
|
||||
void
|
||||
_initialize_breakpoint ()
|
||||
_initialize_breakpoint (void)
|
||||
{
|
||||
diff --git a/gdb/breakpoint.h b/gdb/breakpoint.h
|
||||
index 8bb81d8d17..3fddbaa713 100644
|
||||
--- a/gdb/breakpoint.h
|
||||
+++ b/gdb/breakpoint.h
|
||||
@@ -1691,6 +1691,9 @@ extern const char *ep_parse_optional_if_clause (const char **arg);
|
||||
@@ -1656,6 +1656,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);
|
||||
|
||||
+extern void breakpoints_relocate (struct objfile *objfile,
|
||||
+ section_offsets &delta);
|
||||
+ struct section_offsets *delta);
|
||||
+
|
||||
/* Print the specified breakpoint. */
|
||||
extern void print_breakpoint (breakpoint *bp);
|
||||
|
||||
diff --git a/gdb/objfiles.c b/gdb/objfiles.c
|
||||
index 7adaef119d..2f061b47f7 100644
|
||||
--- a/gdb/objfiles.c
|
||||
+++ b/gdb/objfiles.c
|
||||
@@ -742,6 +742,11 @@ objfile_relocate1 (struct objfile *objfile,
|
||||
@@ -879,6 +879,11 @@ objfile_relocate1 (struct objfile *objfile,
|
||||
obj_section_addr (s));
|
||||
}
|
||||
|
||||
@ -87,3 +97,6 @@ diff --git a/gdb/objfiles.c b/gdb/objfiles.c
|
||||
/* Data changed. */
|
||||
return 1;
|
||||
}
|
||||
--
|
||||
2.14.3
|
||||
|
||||
|
@ -3,12 +3,19 @@ From: Fedora GDB patches <invalid@email.com>
|
||||
Date: Fri, 27 Oct 2017 21:07:50 +0200
|
||||
Subject: gdb-archer-pie-addons.patch
|
||||
|
||||
FileName: gdb-archer-pie-addons.patch
|
||||
|
||||
;;=push+jan: May get obsoleted by Tom's unrelocated objfiles patch.
|
||||
---
|
||||
gdb/gdbtypes.h | 5 +++++
|
||||
gdb/value.c | 3 ++-
|
||||
2 files changed, 7 insertions(+), 1 deletion(-)
|
||||
|
||||
diff --git a/gdb/gdbtypes.h b/gdb/gdbtypes.h
|
||||
index 179238ce82..5597038357 100644
|
||||
--- a/gdb/gdbtypes.h
|
||||
+++ b/gdb/gdbtypes.h
|
||||
@@ -649,6 +649,7 @@ enum field_loc_kind
|
||||
@@ -453,6 +453,7 @@ enum field_loc_kind
|
||||
{
|
||||
FIELD_LOC_KIND_BITPOS, /**< bitpos */
|
||||
FIELD_LOC_KIND_ENUMVAL, /**< enumval */
|
||||
@ -16,7 +23,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 */
|
||||
@@ -699,6 +700,7 @@ union field_location
|
||||
@@ -504,6 +505,7 @@ union field_location
|
||||
field. Otherwise, physname is the mangled label of the
|
||||
static field. */
|
||||
|
||||
@ -24,16 +31,44 @@ diff --git a/gdb/gdbtypes.h b/gdb/gdbtypes.h
|
||||
CORE_ADDR physaddr;
|
||||
const char *physname;
|
||||
|
||||
@@ -1362,6 +1364,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)
|
||||
+/* This address is unrelocated by the objfile's ANOFFSET. */
|
||||
#define FIELD_STATIC_PHYSADDR(thisfld) ((thisfld).loc.physaddr)
|
||||
#define FIELD_DWARF_BLOCK(thisfld) ((thisfld).loc.dwarf_block)
|
||||
#define SET_FIELD_BITPOS(thisfld, bitpos) \
|
||||
@@ -1373,6 +1376,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))
|
||||
+/* This address is unrelocated by the objfile's ANOFFSET. */
|
||||
#define SET_FIELD_PHYSADDR(thisfld, addr) \
|
||||
(FIELD_LOC_KIND (thisfld) = FIELD_LOC_KIND_PHYSADDR, \
|
||||
FIELD_STATIC_PHYSADDR (thisfld) = (addr))
|
||||
@@ -1389,6 +1393,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))
|
||||
+/* This address is unrelocated by the objfile's ANOFFSET. */
|
||||
#define TYPE_FIELD_STATIC_PHYSADDR(thistype, n) FIELD_STATIC_PHYSADDR (TYPE_FIELD (thistype, n))
|
||||
#define TYPE_FIELD_DWARF_BLOCK(thistype, n) FIELD_DWARF_BLOCK (TYPE_FIELD (thistype, n))
|
||||
#define TYPE_FIELD_ARTIFICIAL(thistype, n) FIELD_ARTIFICIAL(TYPE_FIELD(thistype,n))
|
||||
diff --git a/gdb/value.c b/gdb/value.c
|
||||
index d4b4673f66..558d0bbd7a 100644
|
||||
--- a/gdb/value.c
|
||||
+++ b/gdb/value.c
|
||||
@@ -2850,7 +2850,8 @@ value_static_field (struct type *type, int fieldno)
|
||||
@@ -2966,7 +2966,8 @@ value_static_field (struct type *type, int fieldno)
|
||||
{
|
||||
case FIELD_LOC_KIND_PHYSADDR:
|
||||
retval = value_at_lazy (type->field (fieldno).type (),
|
||||
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 : 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:
|
||||
{
|
||||
--
|
||||
2.14.3
|
||||
|
||||
|
@ -3,12 +3,104 @@ From: Fedora GDB patches <invalid@email.com>
|
||||
Date: Fri, 27 Oct 2017 21:07:50 +0200
|
||||
Subject: gdb-archer-vla-tests.patch
|
||||
|
||||
FileName: gdb-archer-vla-tests.patch
|
||||
|
||||
;;=fedoratest
|
||||
---
|
||||
gdb/testsuite/gdb.ada/packed_array.exp | 6 +
|
||||
gdb/testsuite/gdb.arch/x86_64-vla-pointer-foo.S | 358 ++++++++++++++++
|
||||
gdb/testsuite/gdb.arch/x86_64-vla-pointer.c | 45 ++
|
||||
gdb/testsuite/gdb.arch/x86_64-vla-pointer.exp | 65 +++
|
||||
gdb/testsuite/gdb.arch/x86_64-vla-typedef-foo.S | 455 +++++++++++++++++++++
|
||||
gdb/testsuite/gdb.arch/x86_64-vla-typedef.c | 45 ++
|
||||
gdb/testsuite/gdb.arch/x86_64-vla-typedef.exp | 64 +++
|
||||
gdb/testsuite/gdb.base/arrayidx.c | 7 +
|
||||
gdb/testsuite/gdb.base/arrayidx.exp | 10 +-
|
||||
.../gdb.base/internal-var-field-address.c | 20 +
|
||||
.../gdb.base/internal-var-field-address.exp | 26 ++
|
||||
gdb/testsuite/gdb.base/vla-frame.c | 31 ++
|
||||
gdb/testsuite/gdb.base/vla-frame.exp | 38 ++
|
||||
gdb/testsuite/gdb.base/vla-overflow.c | 30 ++
|
||||
gdb/testsuite/gdb.base/vla-overflow.exp | 109 +++++
|
||||
gdb/testsuite/gdb.base/vla.c | 55 +++
|
||||
gdb/testsuite/gdb.base/vla.exp | 62 +++
|
||||
gdb/testsuite/gdb.cp/gdb9593.cc | 180 ++++++++
|
||||
gdb/testsuite/gdb.cp/gdb9593.exp | 182 +++++++++
|
||||
gdb/testsuite/gdb.dwarf2/dw2-bound-loclist.S | 246 +++++++++++
|
||||
gdb/testsuite/gdb.dwarf2/dw2-bound-loclist.exp | 66 +++
|
||||
gdb/testsuite/gdb.dwarf2/dw2-stripped.c | 42 ++
|
||||
gdb/testsuite/gdb.dwarf2/dw2-stripped.exp | 79 ++++
|
||||
.../gdb.dwarf2/dw2-struct-member-data-location.S | 83 ++++
|
||||
.../gdb.dwarf2/dw2-struct-member-data-location.exp | 37 ++
|
||||
gdb/testsuite/gdb.dwarf2/dw2-subrange-no-type.S | 121 ++++++
|
||||
gdb/testsuite/gdb.dwarf2/dw2-subrange-no-type.exp | 39 ++
|
||||
gdb/testsuite/gdb.fortran/dwarf-stride.exp | 42 ++
|
||||
gdb/testsuite/gdb.fortran/dwarf-stride.f90 | 40 ++
|
||||
gdb/testsuite/gdb.fortran/dynamic.exp | 154 +++++++
|
||||
gdb/testsuite/gdb.fortran/dynamic.f90 | 98 +++++
|
||||
gdb/testsuite/gdb.fortran/string.exp | 59 +++
|
||||
gdb/testsuite/gdb.fortran/string.f90 | 37 ++
|
||||
gdb/testsuite/gdb.fortran/subrange.exp | 72 ++++
|
||||
gdb/testsuite/gdb.fortran/subrange.f90 | 28 ++
|
||||
gdb/testsuite/gdb.mi/mi2-var-stale-type.c | 26 ++
|
||||
gdb/testsuite/gdb.mi/mi2-var-stale-type.exp | 57 +++
|
||||
gdb/testsuite/gdb.opt/array-from-register-func.c | 22 +
|
||||
gdb/testsuite/gdb.opt/array-from-register.c | 28 ++
|
||||
gdb/testsuite/gdb.opt/array-from-register.exp | 33 ++
|
||||
gdb/testsuite/gdb.opt/fortran-string.exp | 39 ++
|
||||
gdb/testsuite/gdb.opt/fortran-string.f90 | 28 ++
|
||||
gdb/testsuite/gdb.pascal/arrays.exp | 104 +++++
|
||||
gdb/testsuite/gdb.pascal/arrays.pas | 82 ++++
|
||||
gdb/testsuite/lib/gdb.exp | 5 +
|
||||
gdb/testsuite/lib/pascal.exp | 17 +
|
||||
46 files changed, 3471 insertions(+), 1 deletion(-)
|
||||
create mode 100644 gdb/testsuite/gdb.arch/x86_64-vla-pointer-foo.S
|
||||
create mode 100644 gdb/testsuite/gdb.arch/x86_64-vla-pointer.c
|
||||
create mode 100644 gdb/testsuite/gdb.arch/x86_64-vla-pointer.exp
|
||||
create mode 100644 gdb/testsuite/gdb.arch/x86_64-vla-typedef-foo.S
|
||||
create mode 100644 gdb/testsuite/gdb.arch/x86_64-vla-typedef.c
|
||||
create mode 100644 gdb/testsuite/gdb.arch/x86_64-vla-typedef.exp
|
||||
create mode 100644 gdb/testsuite/gdb.base/internal-var-field-address.c
|
||||
create mode 100644 gdb/testsuite/gdb.base/internal-var-field-address.exp
|
||||
create mode 100644 gdb/testsuite/gdb.base/vla-frame.c
|
||||
create mode 100644 gdb/testsuite/gdb.base/vla-frame.exp
|
||||
create mode 100644 gdb/testsuite/gdb.base/vla-overflow.c
|
||||
create mode 100644 gdb/testsuite/gdb.base/vla-overflow.exp
|
||||
create mode 100644 gdb/testsuite/gdb.base/vla.c
|
||||
create mode 100644 gdb/testsuite/gdb.base/vla.exp
|
||||
create mode 100644 gdb/testsuite/gdb.cp/gdb9593.cc
|
||||
create mode 100644 gdb/testsuite/gdb.cp/gdb9593.exp
|
||||
create mode 100644 gdb/testsuite/gdb.dwarf2/dw2-bound-loclist.S
|
||||
create mode 100644 gdb/testsuite/gdb.dwarf2/dw2-bound-loclist.exp
|
||||
create mode 100644 gdb/testsuite/gdb.dwarf2/dw2-stripped.c
|
||||
create mode 100644 gdb/testsuite/gdb.dwarf2/dw2-stripped.exp
|
||||
create mode 100644 gdb/testsuite/gdb.dwarf2/dw2-struct-member-data-location.S
|
||||
create mode 100644 gdb/testsuite/gdb.dwarf2/dw2-struct-member-data-location.exp
|
||||
create mode 100644 gdb/testsuite/gdb.dwarf2/dw2-subrange-no-type.S
|
||||
create mode 100644 gdb/testsuite/gdb.dwarf2/dw2-subrange-no-type.exp
|
||||
create mode 100644 gdb/testsuite/gdb.fortran/dwarf-stride.exp
|
||||
create mode 100644 gdb/testsuite/gdb.fortran/dwarf-stride.f90
|
||||
create mode 100644 gdb/testsuite/gdb.fortran/dynamic.exp
|
||||
create mode 100644 gdb/testsuite/gdb.fortran/dynamic.f90
|
||||
create mode 100644 gdb/testsuite/gdb.fortran/string.exp
|
||||
create mode 100644 gdb/testsuite/gdb.fortran/string.f90
|
||||
create mode 100644 gdb/testsuite/gdb.fortran/subrange.exp
|
||||
create mode 100644 gdb/testsuite/gdb.fortran/subrange.f90
|
||||
create mode 100644 gdb/testsuite/gdb.mi/mi2-var-stale-type.c
|
||||
create mode 100644 gdb/testsuite/gdb.mi/mi2-var-stale-type.exp
|
||||
create mode 100644 gdb/testsuite/gdb.opt/array-from-register-func.c
|
||||
create mode 100644 gdb/testsuite/gdb.opt/array-from-register.c
|
||||
create mode 100644 gdb/testsuite/gdb.opt/array-from-register.exp
|
||||
create mode 100644 gdb/testsuite/gdb.opt/fortran-string.exp
|
||||
create mode 100644 gdb/testsuite/gdb.opt/fortran-string.f90
|
||||
create mode 100644 gdb/testsuite/gdb.pascal/arrays.exp
|
||||
create mode 100644 gdb/testsuite/gdb.pascal/arrays.pas
|
||||
|
||||
diff --git a/gdb/testsuite/gdb.ada/packed_array.exp b/gdb/testsuite/gdb.ada/packed_array.exp
|
||||
index 3e614b788a..0ae87786db 100644
|
||||
--- a/gdb/testsuite/gdb.ada/packed_array.exp
|
||||
+++ b/gdb/testsuite/gdb.ada/packed_array.exp
|
||||
@@ -53,5 +53,11 @@ gdb_test_multiple "$test" "$test" {
|
||||
@@ -56,5 +56,11 @@ gdb_test_multiple "$test" "$test" {
|
||||
# are. Observed with (FSF GNU Ada 4.5.3 20110124).
|
||||
xfail $test
|
||||
}
|
||||
@ -22,6 +114,7 @@ diff --git a/gdb/testsuite/gdb.ada/packed_array.exp b/gdb/testsuite/gdb.ada/pack
|
||||
|
||||
diff --git a/gdb/testsuite/gdb.arch/x86_64-vla-pointer-foo.S b/gdb/testsuite/gdb.arch/x86_64-vla-pointer-foo.S
|
||||
new file mode 100644
|
||||
index 0000000000..3a983e6b22
|
||||
--- /dev/null
|
||||
+++ b/gdb/testsuite/gdb.arch/x86_64-vla-pointer-foo.S
|
||||
@@ -0,0 +1,358 @@
|
||||
@ -385,6 +478,7 @@ new file mode 100644
|
||||
+ .section .note.GNU-stack,"",@progbits
|
||||
diff --git a/gdb/testsuite/gdb.arch/x86_64-vla-pointer.c b/gdb/testsuite/gdb.arch/x86_64-vla-pointer.c
|
||||
new file mode 100644
|
||||
index 0000000000..98ee43bbf2
|
||||
--- /dev/null
|
||||
+++ b/gdb/testsuite/gdb.arch/x86_64-vla-pointer.c
|
||||
@@ -0,0 +1,45 @@
|
||||
@ -435,6 +529,7 @@ new file mode 100644
|
||||
+#endif
|
||||
diff --git a/gdb/testsuite/gdb.arch/x86_64-vla-pointer.exp b/gdb/testsuite/gdb.arch/x86_64-vla-pointer.exp
|
||||
new file mode 100644
|
||||
index 0000000000..3e2e64a6ab
|
||||
--- /dev/null
|
||||
+++ b/gdb/testsuite/gdb.arch/x86_64-vla-pointer.exp
|
||||
@@ -0,0 +1,65 @@
|
||||
@ -505,6 +600,7 @@ new file mode 100644
|
||||
+gdb_test "ptype array" "type = char \\\[78\\\]" "second: ptype array"
|
||||
diff --git a/gdb/testsuite/gdb.arch/x86_64-vla-typedef-foo.S b/gdb/testsuite/gdb.arch/x86_64-vla-typedef-foo.S
|
||||
new file mode 100644
|
||||
index 0000000000..66f7a399bf
|
||||
--- /dev/null
|
||||
+++ b/gdb/testsuite/gdb.arch/x86_64-vla-typedef-foo.S
|
||||
@@ -0,0 +1,455 @@
|
||||
@ -965,6 +1061,7 @@ new file mode 100644
|
||||
+ .section .note.GNU-stack,"",@progbits
|
||||
diff --git a/gdb/testsuite/gdb.arch/x86_64-vla-typedef.c b/gdb/testsuite/gdb.arch/x86_64-vla-typedef.c
|
||||
new file mode 100644
|
||||
index 0000000000..40099e9d39
|
||||
--- /dev/null
|
||||
+++ b/gdb/testsuite/gdb.arch/x86_64-vla-typedef.c
|
||||
@@ -0,0 +1,45 @@
|
||||
@ -1015,6 +1112,7 @@ new file mode 100644
|
||||
+#endif
|
||||
diff --git a/gdb/testsuite/gdb.arch/x86_64-vla-typedef.exp b/gdb/testsuite/gdb.arch/x86_64-vla-typedef.exp
|
||||
new file mode 100644
|
||||
index 0000000000..4ef6214629
|
||||
--- /dev/null
|
||||
+++ b/gdb/testsuite/gdb.arch/x86_64-vla-typedef.exp
|
||||
@@ -0,0 +1,64 @@
|
||||
@ -1083,6 +1181,7 @@ new file mode 100644
|
||||
+
|
||||
+gdb_test "ptype array" "type = char \\\[78\\\]" "second: ptype array"
|
||||
diff --git a/gdb/testsuite/gdb.base/arrayidx.c b/gdb/testsuite/gdb.base/arrayidx.c
|
||||
index 5a0d01d04f..9e4b16e902 100644
|
||||
--- a/gdb/testsuite/gdb.base/arrayidx.c
|
||||
+++ b/gdb/testsuite/gdb.base/arrayidx.c
|
||||
@@ -17,6 +17,13 @@
|
||||
@ -1100,6 +1199,7 @@ diff --git a/gdb/testsuite/gdb.base/arrayidx.c b/gdb/testsuite/gdb.base/arrayidx
|
||||
main (void)
|
||||
{
|
||||
diff --git a/gdb/testsuite/gdb.base/arrayidx.exp b/gdb/testsuite/gdb.base/arrayidx.exp
|
||||
index 91eb3c6056..af29a51f23 100644
|
||||
--- a/gdb/testsuite/gdb.base/arrayidx.exp
|
||||
+++ b/gdb/testsuite/gdb.base/arrayidx.exp
|
||||
@@ -49,4 +49,12 @@ gdb_test "print array" \
|
||||
@ -1118,6 +1218,7 @@ diff --git a/gdb/testsuite/gdb.base/arrayidx.exp b/gdb/testsuite/gdb.base/arrayi
|
||||
+}
|
||||
diff --git a/gdb/testsuite/gdb.base/internal-var-field-address.c b/gdb/testsuite/gdb.base/internal-var-field-address.c
|
||||
new file mode 100644
|
||||
index 0000000000..eeb7b8501c
|
||||
--- /dev/null
|
||||
+++ b/gdb/testsuite/gdb.base/internal-var-field-address.c
|
||||
@@ -0,0 +1,20 @@
|
||||
@ -1143,6 +1244,7 @@ new file mode 100644
|
||||
+} staticstruct = { 1 };
|
||||
diff --git a/gdb/testsuite/gdb.base/internal-var-field-address.exp b/gdb/testsuite/gdb.base/internal-var-field-address.exp
|
||||
new file mode 100644
|
||||
index 0000000000..33c9e94eee
|
||||
--- /dev/null
|
||||
+++ b/gdb/testsuite/gdb.base/internal-var-field-address.exp
|
||||
@@ -0,0 +1,26 @@
|
||||
@ -1174,6 +1276,7 @@ new file mode 100644
|
||||
+gdb_test {p $varstruct.field} " = 1"
|
||||
diff --git a/gdb/testsuite/gdb.base/vla-frame.c b/gdb/testsuite/gdb.base/vla-frame.c
|
||||
new file mode 100644
|
||||
index 0000000000..5750f68b3d
|
||||
--- /dev/null
|
||||
+++ b/gdb/testsuite/gdb.base/vla-frame.c
|
||||
@@ -0,0 +1,31 @@
|
||||
@ -1210,6 +1313,7 @@ new file mode 100644
|
||||
+}
|
||||
diff --git a/gdb/testsuite/gdb.base/vla-frame.exp b/gdb/testsuite/gdb.base/vla-frame.exp
|
||||
new file mode 100644
|
||||
index 0000000000..47736c7625
|
||||
--- /dev/null
|
||||
+++ b/gdb/testsuite/gdb.base/vla-frame.exp
|
||||
@@ -0,0 +1,38 @@
|
||||
@ -1253,6 +1357,7 @@ new file mode 100644
|
||||
+gdb_test "bt full" "\r\n +s = \"X\\\\000\"\r\n.*"
|
||||
diff --git a/gdb/testsuite/gdb.base/vla-overflow.c b/gdb/testsuite/gdb.base/vla-overflow.c
|
||||
new file mode 100644
|
||||
index 0000000000..c5d5ee0bb9
|
||||
--- /dev/null
|
||||
+++ b/gdb/testsuite/gdb.base/vla-overflow.c
|
||||
@@ -0,0 +1,30 @@
|
||||
@ -1288,6 +1393,7 @@ new file mode 100644
|
||||
+}
|
||||
diff --git a/gdb/testsuite/gdb.base/vla-overflow.exp b/gdb/testsuite/gdb.base/vla-overflow.exp
|
||||
new file mode 100644
|
||||
index 0000000000..43a5825979
|
||||
--- /dev/null
|
||||
+++ b/gdb/testsuite/gdb.base/vla-overflow.exp
|
||||
@@ -0,0 +1,109 @@
|
||||
@ -1402,6 +1508,7 @@ new file mode 100644
|
||||
+verbose -log "kb_found in bt after abort() = [expr [memory_v_pages_get] * $pagesize / 1024]"
|
||||
diff --git a/gdb/testsuite/gdb.base/vla.c b/gdb/testsuite/gdb.base/vla.c
|
||||
new file mode 100644
|
||||
index 0000000000..e1f3ed1780
|
||||
--- /dev/null
|
||||
+++ b/gdb/testsuite/gdb.base/vla.c
|
||||
@@ -0,0 +1,55 @@
|
||||
@ -1462,6 +1569,7 @@ new file mode 100644
|
||||
+}
|
||||
diff --git a/gdb/testsuite/gdb.base/vla.exp b/gdb/testsuite/gdb.base/vla.exp
|
||||
new file mode 100644
|
||||
index 0000000000..71fe637272
|
||||
--- /dev/null
|
||||
+++ b/gdb/testsuite/gdb.base/vla.exp
|
||||
@@ -0,0 +1,62 @@
|
||||
@ -1529,6 +1637,7 @@ new file mode 100644
|
||||
+gdb_test "p temp3" " = '3' <repeats 48 times>" "second: print temp3"
|
||||
diff --git a/gdb/testsuite/gdb.cp/gdb9593.cc b/gdb/testsuite/gdb.cp/gdb9593.cc
|
||||
new file mode 100644
|
||||
index 0000000000..783c9622a8
|
||||
--- /dev/null
|
||||
+++ b/gdb/testsuite/gdb.cp/gdb9593.cc
|
||||
@@ -0,0 +1,180 @@
|
||||
@ -1714,6 +1823,7 @@ new file mode 100644
|
||||
+
|
||||
diff --git a/gdb/testsuite/gdb.cp/gdb9593.exp b/gdb/testsuite/gdb.cp/gdb9593.exp
|
||||
new file mode 100644
|
||||
index 0000000000..ef40424402
|
||||
--- /dev/null
|
||||
+++ b/gdb/testsuite/gdb.cp/gdb9593.exp
|
||||
@@ -0,0 +1,182 @@
|
||||
@ -1901,6 +2011,7 @@ new file mode 100644
|
||||
+ "advance-over-throw"
|
||||
diff --git a/gdb/testsuite/gdb.dwarf2/dw2-bound-loclist.S b/gdb/testsuite/gdb.dwarf2/dw2-bound-loclist.S
|
||||
new file mode 100644
|
||||
index 0000000000..aac3baad8a
|
||||
--- /dev/null
|
||||
+++ b/gdb/testsuite/gdb.dwarf2/dw2-bound-loclist.S
|
||||
@@ -0,0 +1,246 @@
|
||||
@ -2152,6 +2263,7 @@ new file mode 100644
|
||||
+ .string "unsigned int"
|
||||
diff --git a/gdb/testsuite/gdb.dwarf2/dw2-bound-loclist.exp b/gdb/testsuite/gdb.dwarf2/dw2-bound-loclist.exp
|
||||
new file mode 100644
|
||||
index 0000000000..39e69b470f
|
||||
--- /dev/null
|
||||
+++ b/gdb/testsuite/gdb.dwarf2/dw2-bound-loclist.exp
|
||||
@@ -0,0 +1,66 @@
|
||||
@ -2223,6 +2335,7 @@ new file mode 100644
|
||||
+gdb_test "ptype reg_string" {type = char \[-?[0-9]+\]}
|
||||
diff --git a/gdb/testsuite/gdb.dwarf2/dw2-stripped.c b/gdb/testsuite/gdb.dwarf2/dw2-stripped.c
|
||||
new file mode 100644
|
||||
index 0000000000..1f02d90eeb
|
||||
--- /dev/null
|
||||
+++ b/gdb/testsuite/gdb.dwarf2/dw2-stripped.c
|
||||
@@ -0,0 +1,42 @@
|
||||
@ -2270,6 +2383,7 @@ new file mode 100644
|
||||
+}
|
||||
diff --git a/gdb/testsuite/gdb.dwarf2/dw2-stripped.exp b/gdb/testsuite/gdb.dwarf2/dw2-stripped.exp
|
||||
new file mode 100644
|
||||
index 0000000000..9336e03157
|
||||
--- /dev/null
|
||||
+++ b/gdb/testsuite/gdb.dwarf2/dw2-stripped.exp
|
||||
@@ -0,0 +1,79 @@
|
||||
@ -2354,6 +2468,7 @@ new file mode 100644
|
||||
+ "step"
|
||||
diff --git a/gdb/testsuite/gdb.dwarf2/dw2-struct-member-data-location.S b/gdb/testsuite/gdb.dwarf2/dw2-struct-member-data-location.S
|
||||
new file mode 100644
|
||||
index 0000000000..5fcdd84986
|
||||
--- /dev/null
|
||||
+++ b/gdb/testsuite/gdb.dwarf2/dw2-struct-member-data-location.S
|
||||
@@ -0,0 +1,83 @@
|
||||
@ -2442,6 +2557,7 @@ new file mode 100644
|
||||
+ .byte 0x0 /* Terminator */
|
||||
diff --git a/gdb/testsuite/gdb.dwarf2/dw2-struct-member-data-location.exp b/gdb/testsuite/gdb.dwarf2/dw2-struct-member-data-location.exp
|
||||
new file mode 100644
|
||||
index 0000000000..bc35209fe5
|
||||
--- /dev/null
|
||||
+++ b/gdb/testsuite/gdb.dwarf2/dw2-struct-member-data-location.exp
|
||||
@@ -0,0 +1,37 @@
|
||||
@ -2484,6 +2600,7 @@ new file mode 100644
|
||||
+gdb_test "ptype struct some_struct" "type = struct some_struct {\[\r\n \t\]*void field;\[\r\n \t\]*}"
|
||||
diff --git a/gdb/testsuite/gdb.dwarf2/dw2-subrange-no-type.S b/gdb/testsuite/gdb.dwarf2/dw2-subrange-no-type.S
|
||||
new file mode 100644
|
||||
index 0000000000..9dbbf3c3e1
|
||||
--- /dev/null
|
||||
+++ b/gdb/testsuite/gdb.dwarf2/dw2-subrange-no-type.S
|
||||
@@ -0,0 +1,121 @@
|
||||
@ -2610,6 +2727,7 @@ new file mode 100644
|
||||
+ .byte 0x0 /* Terminator */
|
||||
diff --git a/gdb/testsuite/gdb.dwarf2/dw2-subrange-no-type.exp b/gdb/testsuite/gdb.dwarf2/dw2-subrange-no-type.exp
|
||||
new file mode 100644
|
||||
index 0000000000..cec673cd39
|
||||
--- /dev/null
|
||||
+++ b/gdb/testsuite/gdb.dwarf2/dw2-subrange-no-type.exp
|
||||
@@ -0,0 +1,39 @@
|
||||
@ -2654,6 +2772,7 @@ new file mode 100644
|
||||
+gdb_test "p notype_string" " = 'x' <repeats 129 times>"
|
||||
diff --git a/gdb/testsuite/gdb.fortran/dwarf-stride.exp b/gdb/testsuite/gdb.fortran/dwarf-stride.exp
|
||||
new file mode 100644
|
||||
index 0000000000..d7b8bea8db
|
||||
--- /dev/null
|
||||
+++ b/gdb/testsuite/gdb.fortran/dwarf-stride.exp
|
||||
@@ -0,0 +1,42 @@
|
||||
@ -2701,6 +2820,7 @@ new file mode 100644
|
||||
+gdb_test "p c40pt(2)" " = '1-hello.*"
|
||||
diff --git a/gdb/testsuite/gdb.fortran/dwarf-stride.f90 b/gdb/testsuite/gdb.fortran/dwarf-stride.f90
|
||||
new file mode 100644
|
||||
index 0000000000..e492b3af42
|
||||
--- /dev/null
|
||||
+++ b/gdb/testsuite/gdb.fortran/dwarf-stride.f90
|
||||
@@ -0,0 +1,40 @@
|
||||
@ -2746,6 +2866,7 @@ new file mode 100644
|
||||
+end program repro
|
||||
diff --git a/gdb/testsuite/gdb.fortran/dynamic.exp b/gdb/testsuite/gdb.fortran/dynamic.exp
|
||||
new file mode 100644
|
||||
index 0000000000..37d435f799
|
||||
--- /dev/null
|
||||
+++ b/gdb/testsuite/gdb.fortran/dynamic.exp
|
||||
@@ -0,0 +1,154 @@
|
||||
@ -2804,7 +2925,7 @@ new file mode 100644
|
||||
+gdb_breakpoint [gdb_get_line_number "varx-allocated"]
|
||||
+gdb_continue_to_breakpoint "varx-allocated"
|
||||
+# $1 = (( ( 0, 0, 0, 0, 0, 0) ( 0, 0, 0, 0, 0, 0) --- , 0) ) ( ( 0, 0, ...) ...) ...)
|
||||
+gdb_test "ptype varx" "type = real(\\(kind=4\\)|\\*4), allocatable \\(6,5:15,17:28\\)" "ptype varx allocated"
|
||||
+gdb_test "ptype varx" "type = real(\\(kind=4\\)|\\*4) \\(6,5:15,17:28\\)" "ptype varx allocated"
|
||||
+# Intel Fortran Compiler 10.1.008 uses -1 there, GCC uses 1.
|
||||
+gdb_test "p l" "\\$\[0-9\]* = (\\.TRUE\\.|4294967295)" "p l if varx allocated"
|
||||
+
|
||||
@ -2831,7 +2952,7 @@ new file mode 100644
|
||||
+gdb_test "p varv(3, 7, 19)" "\\$\[0-9\]* = 6" "p varv(3, 7, 19) associated"
|
||||
+# Intel Fortran Compiler 10.1.008 uses -1 there, GCC uses 1.
|
||||
+gdb_test "p l" "\\$\[0-9\]* = (\\.TRUE\\.|4294967295)" "p l if varv associated"
|
||||
+gdb_test "ptype varx" "type = real(\\(kind=4\\)|\\*4), allocatable \\(6,5:15,17:28\\)" "ptype varx with varv associated"
|
||||
+gdb_test "ptype varx" "type = real(\\(kind=4\\)|\\*4) \\(6,5:15,17:28\\)" "ptype varx with varv associated"
|
||||
+# Intel Fortran Compiler 10.1.008 uses the pointer type.
|
||||
+gdb_test "ptype varv" "type = (PTR TO -> \\( )?real(\\(kind=4\\)|\\*4) \\(6,5:15,17:28\\)\\)?" "ptype varv associated"
|
||||
+
|
||||
@ -2852,7 +2973,7 @@ new file mode 100644
|
||||
+gdb_breakpoint [gdb_get_line_number "varx-deallocated"]
|
||||
+gdb_continue_to_breakpoint "varx-deallocated"
|
||||
+gdb_test "p varx" "\\$\[0-9\]* = <not allocated>" "p varx deallocated"
|
||||
+gdb_test "ptype varx" {type = real\(kind=4\), allocatable \(:,:,:\)} "ptype varx deallocated"
|
||||
+gdb_test "ptype varx" {type = real\(kind=4\) \(:,:,:\)} "ptype varx deallocated"
|
||||
+gdb_test "p l" "\\$\[0-9\]* = \\.FALSE\\." "p l if varx deallocated"
|
||||
+gdb_test "p varx(1,5,17)" {no such vector element \(vector not allocated\)} "p varx(1,5,17) deallocated"
|
||||
+gdb_test "ptype varx(1,5,17)" {no such vector element \(vector not allocated\)} "ptype varx(1,5,17) deallocated"
|
||||
@ -2905,6 +3026,7 @@ new file mode 100644
|
||||
+gdb_test "p vart(2,9)" "\\$\[0-9\]* = 10"
|
||||
diff --git a/gdb/testsuite/gdb.fortran/dynamic.f90 b/gdb/testsuite/gdb.fortran/dynamic.f90
|
||||
new file mode 100644
|
||||
index 0000000000..0f43564378
|
||||
--- /dev/null
|
||||
+++ b/gdb/testsuite/gdb.fortran/dynamic.f90
|
||||
@@ -0,0 +1,98 @@
|
||||
@ -3008,6 +3130,7 @@ new file mode 100644
|
||||
+end
|
||||
diff --git a/gdb/testsuite/gdb.fortran/string.exp b/gdb/testsuite/gdb.fortran/string.exp
|
||||
new file mode 100644
|
||||
index 0000000000..1b7c0dbf73
|
||||
--- /dev/null
|
||||
+++ b/gdb/testsuite/gdb.fortran/string.exp
|
||||
@@ -0,0 +1,59 @@
|
||||
@ -3072,6 +3195,7 @@ new file mode 100644
|
||||
+gdb_test "p f" "\\$\[0-9\]* = \\(\\( 'f ', 'f ', 'f ', 'f ', 'f ', 'f ', 'f '\\) \\( 'f2 ', 'f ', 'f ', 'f ', 'f ', 'f ', 'f '\\) \\( 'f ', 'f ', 'f ', 'f ', 'f ', 'f ', 'f '\\) \\)" "p *f re-set"
|
||||
diff --git a/gdb/testsuite/gdb.fortran/string.f90 b/gdb/testsuite/gdb.fortran/string.f90
|
||||
new file mode 100644
|
||||
index 0000000000..226dc5d0ff
|
||||
--- /dev/null
|
||||
+++ b/gdb/testsuite/gdb.fortran/string.f90
|
||||
@@ -0,0 +1,37 @@
|
||||
@ -3114,6 +3238,7 @@ new file mode 100644
|
||||
+end
|
||||
diff --git a/gdb/testsuite/gdb.fortran/subrange.exp b/gdb/testsuite/gdb.fortran/subrange.exp
|
||||
new file mode 100644
|
||||
index 0000000000..c121ab9751
|
||||
--- /dev/null
|
||||
+++ b/gdb/testsuite/gdb.fortran/subrange.exp
|
||||
@@ -0,0 +1,72 @@
|
||||
@ -3191,6 +3316,7 @@ new file mode 100644
|
||||
+gdb_test {p $a (3, 2:2)} { = \(23\)}
|
||||
diff --git a/gdb/testsuite/gdb.fortran/subrange.f90 b/gdb/testsuite/gdb.fortran/subrange.f90
|
||||
new file mode 100644
|
||||
index 0000000000..4747ea9746
|
||||
--- /dev/null
|
||||
+++ b/gdb/testsuite/gdb.fortran/subrange.f90
|
||||
@@ -0,0 +1,28 @@
|
||||
@ -3224,6 +3350,7 @@ new file mode 100644
|
||||
+end
|
||||
diff --git a/gdb/testsuite/gdb.mi/mi2-var-stale-type.c b/gdb/testsuite/gdb.mi/mi2-var-stale-type.c
|
||||
new file mode 100644
|
||||
index 0000000000..ebced3c042
|
||||
--- /dev/null
|
||||
+++ b/gdb/testsuite/gdb.mi/mi2-var-stale-type.c
|
||||
@@ -0,0 +1,26 @@
|
||||
@ -3255,6 +3382,7 @@ new file mode 100644
|
||||
+}
|
||||
diff --git a/gdb/testsuite/gdb.mi/mi2-var-stale-type.exp b/gdb/testsuite/gdb.mi/mi2-var-stale-type.exp
|
||||
new file mode 100644
|
||||
index 0000000000..88326c0390
|
||||
--- /dev/null
|
||||
+++ b/gdb/testsuite/gdb.mi/mi2-var-stale-type.exp
|
||||
@@ -0,0 +1,57 @@
|
||||
@ -3317,6 +3445,7 @@ new file mode 100644
|
||||
+mi_gdb_test "-var-update *" "\\^done,changelist=.*" "-var-update *"
|
||||
diff --git a/gdb/testsuite/gdb.opt/array-from-register-func.c b/gdb/testsuite/gdb.opt/array-from-register-func.c
|
||||
new file mode 100644
|
||||
index 0000000000..729f457c82
|
||||
--- /dev/null
|
||||
+++ b/gdb/testsuite/gdb.opt/array-from-register-func.c
|
||||
@@ -0,0 +1,22 @@
|
||||
@ -3344,6 +3473,7 @@ new file mode 100644
|
||||
+}
|
||||
diff --git a/gdb/testsuite/gdb.opt/array-from-register.c b/gdb/testsuite/gdb.opt/array-from-register.c
|
||||
new file mode 100644
|
||||
index 0000000000..3090e7e631
|
||||
--- /dev/null
|
||||
+++ b/gdb/testsuite/gdb.opt/array-from-register.c
|
||||
@@ -0,0 +1,28 @@
|
||||
@ -3377,6 +3507,7 @@ new file mode 100644
|
||||
+}
|
||||
diff --git a/gdb/testsuite/gdb.opt/array-from-register.exp b/gdb/testsuite/gdb.opt/array-from-register.exp
|
||||
new file mode 100644
|
||||
index 0000000000..f2de718bc3
|
||||
--- /dev/null
|
||||
+++ b/gdb/testsuite/gdb.opt/array-from-register.exp
|
||||
@@ -0,0 +1,33 @@
|
||||
@ -3415,6 +3546,7 @@ new file mode 100644
|
||||
+gdb_test "p arr\[0\]" "\\$\[0-9\]+ = 42"
|
||||
diff --git a/gdb/testsuite/gdb.opt/fortran-string.exp b/gdb/testsuite/gdb.opt/fortran-string.exp
|
||||
new file mode 100644
|
||||
index 0000000000..90a2bdf212
|
||||
--- /dev/null
|
||||
+++ b/gdb/testsuite/gdb.opt/fortran-string.exp
|
||||
@@ -0,0 +1,39 @@
|
||||
@ -3459,6 +3591,7 @@ new file mode 100644
|
||||
+gdb_test "p s" "\\$\[0-9\]* = 'foo'"
|
||||
diff --git a/gdb/testsuite/gdb.opt/fortran-string.f90 b/gdb/testsuite/gdb.opt/fortran-string.f90
|
||||
new file mode 100644
|
||||
index 0000000000..e48d520085
|
||||
--- /dev/null
|
||||
+++ b/gdb/testsuite/gdb.opt/fortran-string.f90
|
||||
@@ -0,0 +1,28 @@
|
||||
@ -3492,6 +3625,7 @@ new file mode 100644
|
||||
+ end
|
||||
diff --git a/gdb/testsuite/gdb.pascal/arrays.exp b/gdb/testsuite/gdb.pascal/arrays.exp
|
||||
new file mode 100644
|
||||
index 0000000000..22acdb86d8
|
||||
--- /dev/null
|
||||
+++ b/gdb/testsuite/gdb.pascal/arrays.exp
|
||||
@@ -0,0 +1,104 @@
|
||||
@ -3601,6 +3735,7 @@ new file mode 100644
|
||||
+
|
||||
diff --git a/gdb/testsuite/gdb.pascal/arrays.pas b/gdb/testsuite/gdb.pascal/arrays.pas
|
||||
new file mode 100644
|
||||
index 0000000000..295602d68c
|
||||
--- /dev/null
|
||||
+++ b/gdb/testsuite/gdb.pascal/arrays.pas
|
||||
@@ -0,0 +1,82 @@
|
||||
@ -3687,10 +3822,11 @@ new file mode 100644
|
||||
+ writeln(s); { set breakpoint 2 here }
|
||||
+end.
|
||||
diff --git a/gdb/testsuite/lib/gdb.exp b/gdb/testsuite/lib/gdb.exp
|
||||
index a165bf0938..a13aaf7869 100644
|
||||
--- a/gdb/testsuite/lib/gdb.exp
|
||||
+++ b/gdb/testsuite/lib/gdb.exp
|
||||
@@ -224,6 +224,11 @@ proc gdb_unload {} {
|
||||
send_gdb "y\n" answer
|
||||
@@ -169,6 +169,11 @@ proc gdb_unload {} {
|
||||
send_gdb "y\n"
|
||||
exp_continue
|
||||
}
|
||||
+ -re "A program is being debugged already..*Are you sure you want to change the file.*y or n. $"\
|
||||
@ -3699,18 +3835,19 @@ diff --git a/gdb/testsuite/lib/gdb.exp b/gdb/testsuite/lib/gdb.exp
|
||||
+ exp_continue
|
||||
+ }
|
||||
-re "Discard symbol table from .*y or n.*$" {
|
||||
send_gdb "y\n" answer
|
||||
send_gdb "y\n"
|
||||
exp_continue
|
||||
diff --git a/gdb/testsuite/lib/pascal.exp b/gdb/testsuite/lib/pascal.exp
|
||||
index 03d1b1bc06..9f9e143dff 100644
|
||||
--- a/gdb/testsuite/lib/pascal.exp
|
||||
+++ b/gdb/testsuite/lib/pascal.exp
|
||||
@@ -37,6 +37,9 @@ proc pascal_init {} {
|
||||
gdb_persistent_global pascal_compiler_is_fpc
|
||||
gdb_persistent_global gpc_compiler
|
||||
gdb_persistent_global fpc_compiler
|
||||
+ gdb_persistent_global fpcversion_major
|
||||
+ gdb_persistent_global fpcversion_minor
|
||||
+ gdb_persistent_global fpcversion_release
|
||||
global pascal_compiler_is_fpc
|
||||
global gpc_compiler
|
||||
global fpc_compiler
|
||||
+ global fpcversion_major
|
||||
+ global fpcversion_minor
|
||||
+ global fpcversion_release
|
||||
global env
|
||||
|
||||
if { $pascal_init_done == 1 } {
|
||||
@ -3735,3 +3872,6 @@ diff --git a/gdb/testsuite/lib/pascal.exp b/gdb/testsuite/lib/pascal.exp
|
||||
}
|
||||
set pascal_init_done 1
|
||||
}
|
||||
--
|
||||
2.14.3
|
||||
|
||||
|
552
gdb-archer.patch
552
gdb-archer.patch
@ -3,6 +3,8 @@ From: Fedora GDB patches <invalid@email.com>
|
||||
Date: Fri, 27 Oct 2017 21:07:50 +0200
|
||||
Subject: gdb-archer.patch
|
||||
|
||||
FileName: gdb-archer.patch
|
||||
|
||||
;; Python patches of: http://sourceware.org/gdb/wiki/ProjectArcher
|
||||
;;=push
|
||||
|
||||
@ -13,27 +15,103 @@ GIT snapshot:
|
||||
commit 718a1618b2f691a7f407213bb50f100ac59f91c3
|
||||
|
||||
tromey/python
|
||||
---
|
||||
gdb/Makefile.in | 6 ++
|
||||
gdb/data-directory/Makefile.in | 4 +
|
||||
gdb/doc/gdb.texinfo | 10 +++
|
||||
gdb/doc/python.texi | 2 -
|
||||
gdb/gdb-gdb.gdb.in | 10 +++
|
||||
gdb/main.c | 93 ++++++++++++++++++-----
|
||||
gdb/python/lib/gdb/command/ignore_errors.py | 37 +++++++++
|
||||
gdb/python/lib/gdb/command/pahole.py | 81 ++++++++++++++++++++
|
||||
gdb/python/lib/gdb/function/in_scope.py | 47 ++++++++++++
|
||||
gdb/python/python-internal.h | 3 +
|
||||
gdb/python/python.c | 113 ++++++++++++++++++++++++++++
|
||||
gdb/python/python.h | 2 +
|
||||
gdb/testsuite/gdb.python/py-frame.exp | 2 +
|
||||
gdb/testsuite/gdb.python/py-value.exp | 10 +++
|
||||
gdb/varobj.c | 8 ++
|
||||
gdb/varobj.h | 2 +
|
||||
16 files changed, 411 insertions(+), 19 deletions(-)
|
||||
create mode 100644 gdb/python/lib/gdb/command/ignore_errors.py
|
||||
create mode 100644 gdb/python/lib/gdb/command/pahole.py
|
||||
create mode 100644 gdb/python/lib/gdb/function/in_scope.py
|
||||
|
||||
diff --git a/gdb/Makefile.in b/gdb/Makefile.in
|
||||
index 3142ad6af1..28d8664236 100644
|
||||
--- a/gdb/Makefile.in
|
||||
+++ b/gdb/Makefile.in
|
||||
@@ -2110,6 +2110,12 @@ stamp-h: $(srcdir)/config.in config.status
|
||||
CONFIG_LINKS= \
|
||||
$(SHELL) config.status
|
||||
|
||||
+.gdbinit: $(srcdir)/gdbinit.in config.status
|
||||
+ CONFIG_FILES=".gdbinit:gdbinit.in" \
|
||||
+ CONFIG_COMMANDS= \
|
||||
+ CONFIG_HEADERS= \
|
||||
+ $(SHELL) config.status
|
||||
+
|
||||
config.status: $(srcdir)/configure configure.tgt configure.host ../bfd/development.sh
|
||||
$(SHELL) config.status --recheck
|
||||
|
||||
diff --git a/gdb/data-directory/Makefile.in b/gdb/data-directory/Makefile.in
|
||||
index 5c7c0b4c2e..2014607e9e 100644
|
||||
--- a/gdb/data-directory/Makefile.in
|
||||
+++ b/gdb/data-directory/Makefile.in
|
||||
@@ -80,6 +80,7 @@ PYTHON_FILE_LIST = \
|
||||
@@ -80,6 +80,8 @@ PYTHON_FILE_LIST = \
|
||||
gdb/unwinder.py \
|
||||
gdb/xmethod.py \
|
||||
gdb/command/__init__.py \
|
||||
+ gdb/command/ignore_errors.py \
|
||||
+ gdb/command/pahole.py \
|
||||
gdb/command/explore.py \
|
||||
gdb/command/backtrace.py \
|
||||
gdb/command/frame_filters.py \
|
||||
@@ -92,6 +93,7 @@ PYTHON_FILE_LIST = \
|
||||
@@ -92,6 +94,8 @@ PYTHON_FILE_LIST = \
|
||||
gdb/function/as_string.py \
|
||||
gdb/function/caller_is.py \
|
||||
gdb/function/strfns.py \
|
||||
+ gdb/function/caller_is.py \
|
||||
+ gdb/function/in_scope.py \
|
||||
gdb/printer/__init__.py \
|
||||
gdb/printer/bound_registers.py
|
||||
|
||||
diff --git a/gdb/doc/gdb.texinfo b/gdb/doc/gdb.texinfo
|
||||
index 7b99ae1551..dea17fd5a7 100644
|
||||
--- a/gdb/doc/gdb.texinfo
|
||||
+++ b/gdb/doc/gdb.texinfo
|
||||
@@ -1245,6 +1245,16 @@ for remote debugging.
|
||||
Run using @var{device} for your program's standard input and output.
|
||||
@c FIXME: kingdon thinks there is more to -tty. Investigate.
|
||||
|
||||
+@item -P
|
||||
+@cindex @code{-P}
|
||||
+@itemx --python
|
||||
+@cindex @code{--python}
|
||||
+Change interpretation of command line so that the argument immediately
|
||||
+following this switch is taken to be the name of a Python script file.
|
||||
+This option stops option processing; subsequent options are passed to
|
||||
+Python as @code{sys.argv}. This option is only available if Python
|
||||
+scripting support was enabled when @value{GDBN} was configured.
|
||||
+
|
||||
@c resolve the situation of these eventually
|
||||
@item -tui
|
||||
@cindex @code{--tui}
|
||||
diff --git a/gdb/doc/python.texi b/gdb/doc/python.texi
|
||||
index ccf011e35e..461e900f77 100644
|
||||
--- a/gdb/doc/python.texi
|
||||
+++ b/gdb/doc/python.texi
|
||||
@@ -88,8 +88,6 @@ containing @code{end}. For example:
|
||||
|
||||
@smallexample
|
||||
(@value{GDBP}) python
|
||||
-Type python script
|
||||
-End with a line saying just "end".
|
||||
>print 23
|
||||
>end
|
||||
23
|
||||
diff --git a/gdb/gdb-gdb.gdb.in b/gdb/gdb-gdb.gdb.in
|
||||
index 05a38b2670..9801fdff67 100644
|
||||
--- a/gdb/gdb-gdb.gdb.in
|
||||
+++ b/gdb/gdb-gdb.gdb.in
|
||||
@@ -1,5 +1,15 @@
|
||||
@ -52,8 +130,177 @@ diff --git a/gdb/gdb-gdb.gdb.in b/gdb/gdb-gdb.gdb.in
|
||||
if !$gdb_init_done
|
||||
set variable $gdb_init_done = 1
|
||||
|
||||
diff --git a/gdb/main.c b/gdb/main.c
|
||||
index b079e79c93..b150af4e70 100644
|
||||
--- a/gdb/main.c
|
||||
+++ b/gdb/main.c
|
||||
@@ -33,6 +33,7 @@
|
||||
|
||||
#include "interps.h"
|
||||
#include "main.h"
|
||||
+#include "python/python.h"
|
||||
#include "source.h"
|
||||
#include "cli/cli-cmds.h"
|
||||
#include "objfiles.h"
|
||||
@@ -478,7 +479,7 @@ exec_or_core_file_attach (const char *filename, int from_tty)
|
||||
}
|
||||
|
||||
static void
|
||||
-captured_main_1 (struct captured_main_args *context)
|
||||
+captured_main_1 (struct captured_main_args *context, int &python_script)
|
||||
{
|
||||
int argc = context->argc;
|
||||
char **argv = context->argv;
|
||||
@@ -694,10 +695,14 @@ captured_main_1 (struct captured_main_args *context)
|
||||
{"args", no_argument, &set_args, 1},
|
||||
{"l", required_argument, 0, 'l'},
|
||||
{"return-child-result", no_argument, &return_child_result, 1},
|
||||
+#if HAVE_PYTHON
|
||||
+ {"python", no_argument, 0, 'P'},
|
||||
+ {"P", no_argument, 0, 'P'},
|
||||
+#endif
|
||||
{0, no_argument, 0, 0}
|
||||
};
|
||||
|
||||
- while (1)
|
||||
+ while (!python_script)
|
||||
{
|
||||
int option_index;
|
||||
|
||||
@@ -715,6 +720,9 @@ captured_main_1 (struct captured_main_args *context)
|
||||
case 0:
|
||||
/* Long option that just sets a flag. */
|
||||
break;
|
||||
+ case 'P':
|
||||
+ python_script = 1;
|
||||
+ break;
|
||||
case OPT_SE:
|
||||
symarg = optarg;
|
||||
execarg = optarg;
|
||||
@@ -889,7 +897,31 @@ captured_main_1 (struct captured_main_args *context)
|
||||
|
||||
/* Now that gdb_init has created the initial inferior, we're in
|
||||
position to set args for that inferior. */
|
||||
- if (set_args)
|
||||
+ if (python_script)
|
||||
+ {
|
||||
+ /* The first argument is a python script to evaluate, and
|
||||
+ subsequent arguments are passed to the script for
|
||||
+ processing there. */
|
||||
+ if (optind >= argc)
|
||||
+ {
|
||||
+ fprintf_unfiltered (gdb_stderr,
|
||||
+ _("%s: Python script file name required\n"),
|
||||
+ argv[0]);
|
||||
+ exit (1);
|
||||
+ }
|
||||
+
|
||||
+ /* FIXME: should handle inferior I/O intelligently here.
|
||||
+ E.g., should be possible to run gdb in pipeline and have
|
||||
+ Python (and gdb) output go to stderr or file; and if a
|
||||
+ prompt is needed, open the tty. */
|
||||
+ quiet = 1;
|
||||
+ /* FIXME: should read .gdbinit if, and only if, a prompt is
|
||||
+ requested by the script. Though... maybe this is not
|
||||
+ ideal? */
|
||||
+ /* FIXME: likewise, reading in history. */
|
||||
+ inhibit_gdbinit = 1;
|
||||
+ }
|
||||
+ else if (set_args)
|
||||
{
|
||||
/* The remaining options are the command-line options for the
|
||||
inferior. The first one is the sym/exec file, and the rest
|
||||
@@ -1179,7 +1211,8 @@ captured_main_1 (struct captured_main_args *context)
|
||||
|
||||
/* Read in the old history after all the command files have been
|
||||
read. */
|
||||
- init_history ();
|
||||
+ if (!python_script)
|
||||
+ init_history ();
|
||||
|
||||
if (batch_flag)
|
||||
{
|
||||
@@ -1192,24 +1225,37 @@ static void
|
||||
captured_main (void *data)
|
||||
{
|
||||
struct captured_main_args *context = (struct captured_main_args *) data;
|
||||
+ int python_script = 0;
|
||||
|
||||
- captured_main_1 (context);
|
||||
+ captured_main_1 (context, python_script);
|
||||
|
||||
- /* NOTE: cagney/1999-11-07: There is probably no reason for not
|
||||
- moving this loop and the code found in captured_command_loop()
|
||||
- into the command_loop() proper. The main thing holding back that
|
||||
- change - SET_TOP_LEVEL() - has been eliminated. */
|
||||
- while (1)
|
||||
+#if HAVE_PYTHON
|
||||
+ if (python_script)
|
||||
{
|
||||
- TRY
|
||||
- {
|
||||
- captured_command_loop ();
|
||||
- }
|
||||
- CATCH (ex, RETURN_MASK_ALL)
|
||||
+ extern int pagination_enabled;
|
||||
+ pagination_enabled = 0;
|
||||
+ run_python_script (context->argc - optind, &context->argv[optind]);
|
||||
+ return;
|
||||
+ }
|
||||
+ else
|
||||
+#endif
|
||||
+ {
|
||||
+ /* NOTE: cagney/1999-11-07: There is probably no reason for not
|
||||
+ moving this loop and the code found in captured_command_loop()
|
||||
+ into the command_loop() proper. The main thing holding back that
|
||||
+ change - SET_TOP_LEVEL() - has been eliminated. */
|
||||
+ while (1)
|
||||
{
|
||||
- exception_print (gdb_stderr, ex);
|
||||
+ TRY
|
||||
+ {
|
||||
+ captured_command_loop ();
|
||||
+ }
|
||||
+ CATCH (ex, RETURN_MASK_ALL)
|
||||
+ {
|
||||
+ exception_print (gdb_stderr, ex);
|
||||
+ }
|
||||
+ END_CATCH
|
||||
}
|
||||
- END_CATCH
|
||||
}
|
||||
/* No exit -- exit is through quit_command. */
|
||||
}
|
||||
@@ -1252,6 +1298,12 @@ print_gdb_help (struct ui_file *stream)
|
||||
fputs_unfiltered (_("\
|
||||
This is the GNU debugger. Usage:\n\n\
|
||||
gdb [options] [executable-file [core-file or process-id]]\n\
|
||||
+ gdb [options] --args executable-file [inferior-arguments ...]\n"), stream);
|
||||
+#if HAVE_PYTHON
|
||||
+ fputs_unfiltered (_("\
|
||||
+ gdb [options] [--python|-P] script-file [script-arguments ...]\n"), stream);
|
||||
+#endif
|
||||
+ fputs_unfiltered (_("\n\
|
||||
gdb [options] --args executable-file [inferior-arguments ...]\n\n\
|
||||
"), stream);
|
||||
fputs_unfiltered (_("\
|
||||
@@ -1297,6 +1349,13 @@ Output and user interface control:\n\n\
|
||||
#endif
|
||||
fputs_unfiltered (_("\
|
||||
--dbx DBX compatibility mode.\n\
|
||||
+"), stream);
|
||||
+#if HAVE_PYTHON
|
||||
+ fputs_unfiltered (_("\
|
||||
+ --python, -P Following argument is Python script file; remaining\n\
|
||||
+ arguments are passed to script.\n"), stream);
|
||||
+#endif
|
||||
+ fputs_unfiltered (_("\
|
||||
-q, --quiet, --silent\n\
|
||||
Do not print version number on startup.\n\n\
|
||||
"), stream);
|
||||
diff --git a/gdb/python/lib/gdb/command/ignore_errors.py b/gdb/python/lib/gdb/command/ignore_errors.py
|
||||
new file mode 100644
|
||||
index 0000000000..6fa48ff081
|
||||
--- /dev/null
|
||||
+++ b/gdb/python/lib/gdb/command/ignore_errors.py
|
||||
@@ -0,0 +1,37 @@
|
||||
@ -94,8 +341,96 @@ new file mode 100644
|
||||
+ pass
|
||||
+
|
||||
+IgnoreErrorsCommand ()
|
||||
diff --git a/gdb/python/lib/gdb/command/pahole.py b/gdb/python/lib/gdb/command/pahole.py
|
||||
new file mode 100644
|
||||
index 0000000000..e08eaf5ca8
|
||||
--- /dev/null
|
||||
+++ b/gdb/python/lib/gdb/command/pahole.py
|
||||
@@ -0,0 +1,81 @@
|
||||
+# pahole command for gdb
|
||||
+
|
||||
+# Copyright (C) 2008, 2009, 2012 Free Software Foundation, Inc.
|
||||
+
|
||||
+# This program is free software; you can redistribute it and/or modify
|
||||
+# it under the terms of the GNU General Public License as published by
|
||||
+# the Free Software Foundation; either version 3 of the License, or
|
||||
+# (at your option) any later version.
|
||||
+#
|
||||
+# This program is distributed in the hope that it will be useful,
|
||||
+# but WITHOUT ANY WARRANTY; without even the implied warranty of
|
||||
+# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
|
||||
+# GNU General Public License for more details.
|
||||
+#
|
||||
+# You should have received a copy of the GNU General Public License
|
||||
+# along with this program. If not, see <http://www.gnu.org/licenses/>.
|
||||
+
|
||||
+import gdb
|
||||
+
|
||||
+class Pahole (gdb.Command):
|
||||
+ """Show the holes in a structure.
|
||||
+This command takes a single argument, a type name.
|
||||
+It prints the type and displays comments showing where holes are."""
|
||||
+
|
||||
+ def __init__ (self):
|
||||
+ super (Pahole, self).__init__ ("pahole", gdb.COMMAND_NONE,
|
||||
+ gdb.COMPLETE_SYMBOL)
|
||||
+
|
||||
+ def maybe_print_hole(self, bitpos, field_bitpos):
|
||||
+ if bitpos != field_bitpos:
|
||||
+ hole = field_bitpos - bitpos
|
||||
+ print (' /* XXX %d bit hole, try to pack */' % hole)
|
||||
+
|
||||
+ def pahole (self, type, level, name):
|
||||
+ if name is None:
|
||||
+ name = ''
|
||||
+ tag = type.tag
|
||||
+ if tag is None:
|
||||
+ tag = ''
|
||||
+ print ('%sstruct %s {' % (' ' * (2 * level), tag))
|
||||
+ bitpos = 0
|
||||
+ for field in type.fields ():
|
||||
+ # Skip static fields.
|
||||
+ if not hasattr (field, ('bitpos')):
|
||||
+ continue
|
||||
+
|
||||
+ ftype = field.type.strip_typedefs()
|
||||
+
|
||||
+ self.maybe_print_hole(bitpos, field.bitpos)
|
||||
+ bitpos = field.bitpos
|
||||
+ if field.bitsize > 0:
|
||||
+ fieldsize = field.bitsize
|
||||
+ else:
|
||||
+ # TARGET_CHAR_BIT here...
|
||||
+ fieldsize = 8 * ftype.sizeof
|
||||
+
|
||||
+ # TARGET_CHAR_BIT
|
||||
+ print (' /* %3d %3d */' % (int (bitpos / 8), int (fieldsize / 8)), end = "")
|
||||
+ bitpos = bitpos + fieldsize
|
||||
+
|
||||
+ if ftype.code == gdb.TYPE_CODE_STRUCT:
|
||||
+ self.pahole (ftype, level + 1, field.name)
|
||||
+ else:
|
||||
+ print (' ' * (2 + 2 * level), end = "")
|
||||
+ print ('%s %s' % (str (ftype), field.name))
|
||||
+
|
||||
+ if level == 0:
|
||||
+ self.maybe_print_hole(bitpos, 8 * type.sizeof)
|
||||
+
|
||||
+ print (' ' * (14 + 2 * level), end = "")
|
||||
+ print ('} %s' % name)
|
||||
+
|
||||
+ def invoke (self, arg, from_tty):
|
||||
+ type = gdb.lookup_type (arg)
|
||||
+ type = type.strip_typedefs ()
|
||||
+ if type.code != gdb.TYPE_CODE_STRUCT:
|
||||
+ raise (TypeError, '%s is not a struct type' % arg)
|
||||
+ print (' ' * 14, end = "")
|
||||
+ self.pahole (type, 0, '')
|
||||
+
|
||||
+Pahole()
|
||||
diff --git a/gdb/python/lib/gdb/function/in_scope.py b/gdb/python/lib/gdb/function/in_scope.py
|
||||
new file mode 100644
|
||||
index 0000000000..8742680614
|
||||
--- /dev/null
|
||||
+++ b/gdb/python/lib/gdb/function/in_scope.py
|
||||
@@ -0,0 +1,47 @@
|
||||
@ -146,7 +481,178 @@ new file mode 100644
|
||||
+ return wanted == found
|
||||
+
|
||||
+InScope ()
|
||||
diff --git a/gdb/python/python-internal.h b/gdb/python/python-internal.h
|
||||
index 89bbc6987b..69dbb69c06 100644
|
||||
--- a/gdb/python/python-internal.h
|
||||
+++ b/gdb/python/python-internal.h
|
||||
@@ -657,6 +657,9 @@ class gdbpy_enter_varobj : public gdbpy_enter
|
||||
|
||||
};
|
||||
|
||||
+struct cleanup *ensure_python_env (struct gdbarch *gdbarch,
|
||||
+ const struct language_defn *language);
|
||||
+
|
||||
extern struct gdbarch *python_gdbarch;
|
||||
extern const struct language_defn *python_language;
|
||||
|
||||
diff --git a/gdb/python/python.c b/gdb/python/python.c
|
||||
index 610dda828c..de5ffbd70b 100644
|
||||
--- a/gdb/python/python.c
|
||||
+++ b/gdb/python/python.c
|
||||
@@ -95,6 +95,8 @@ const struct extension_language_defn extension_language_python =
|
||||
#include "linespec.h"
|
||||
#include "source.h"
|
||||
#include "version.h"
|
||||
+#include "inferior.h"
|
||||
+#include "gdbthread.h"
|
||||
#include "target.h"
|
||||
#include "gdbthread.h"
|
||||
#include "interps.h"
|
||||
@@ -242,6 +244,29 @@ gdbpy_enter::~gdbpy_enter ()
|
||||
restore_active_ext_lang (m_previous_active);
|
||||
}
|
||||
|
||||
+static void
|
||||
+restore_python_env (void *p)
|
||||
+{
|
||||
+ gdbpy_enter *env = (gdbpy_enter *) p;
|
||||
+
|
||||
+ delete env;
|
||||
+}
|
||||
+
|
||||
+/* Called before entering the Python interpreter to install the
|
||||
+ current language and architecture to be used for Python values.
|
||||
+ Also set the active extension language for GDB so that SIGINT's
|
||||
+ are directed our way, and if necessary install the right SIGINT
|
||||
+ handler. */
|
||||
+
|
||||
+struct cleanup *
|
||||
+ensure_python_env (struct gdbarch *gdbarch,
|
||||
+ const struct language_defn *language)
|
||||
+{
|
||||
+ gdbpy_enter *env = new gdbpy_enter (gdbarch, language);
|
||||
+
|
||||
+ return make_cleanup (restore_python_env, env);
|
||||
+}
|
||||
+
|
||||
/* Set the quit flag. */
|
||||
|
||||
static void
|
||||
@@ -1356,6 +1381,92 @@ gdbpy_print_stack (void)
|
||||
|
||||
/* Return the current Progspace.
|
||||
There always is one. */
|
||||
+/* True if 'gdb -P' was used, false otherwise. */
|
||||
+static int running_python_script;
|
||||
+
|
||||
+/* True if we are currently in a call to 'gdb.cli', false otherwise. */
|
||||
+static int in_cli;
|
||||
+
|
||||
+/* Enter the command loop. */
|
||||
+
|
||||
+static PyObject *
|
||||
+gdbpy_cli (PyObject *unused1, PyObject *unused2)
|
||||
+{
|
||||
+ if (! running_python_script || in_cli)
|
||||
+ return PyErr_Format (PyExc_RuntimeError, "cannot invoke CLI recursively");
|
||||
+
|
||||
+ if (current_uiout->is_mi_like_p ())
|
||||
+ return PyErr_Format (PyExc_RuntimeError, _("Cannot invoke CLI from MI."));
|
||||
+
|
||||
+ in_cli = 1;
|
||||
+ /* See captured_command_loop. */
|
||||
+
|
||||
+ /* Give the interpreter a chance to print a prompt. */
|
||||
+ interp_pre_command_loop (top_level_interpreter ());
|
||||
+
|
||||
+ /* Now it's time to start the event loop. */
|
||||
+ start_event_loop ();
|
||||
+
|
||||
+ in_cli = 0;
|
||||
+
|
||||
+ Py_RETURN_NONE;
|
||||
+}
|
||||
+
|
||||
+/* Set up the Python argument vector and evaluate a script. This is
|
||||
+ used to implement 'gdb -P'. */
|
||||
+
|
||||
+void
|
||||
+run_python_script (int argc, char **argv)
|
||||
+{
|
||||
+ FILE *input;
|
||||
+
|
||||
+ /* We never free this, since we plan to exit at the end. */
|
||||
+ ensure_python_env (get_current_arch (), current_language);
|
||||
+
|
||||
+ running_python_script = 1;
|
||||
+
|
||||
+#if PYTHON_ABI_VERSION < 3
|
||||
+ PySys_SetArgv (argc - 1, argv + 1);
|
||||
+#else
|
||||
+ {
|
||||
+ wchar_t **wargv = (wchar_t **) alloca (sizeof (*wargv) * (argc + 1));
|
||||
+ int i;
|
||||
+
|
||||
+ for (i = 1; i < argc; i++)
|
||||
+ {
|
||||
+ size_t len = mbstowcs (NULL, argv[i], 0);
|
||||
+ /* Python-related GDB sources are built with -DNDEBUG
|
||||
+ https://sourceware.org/bugzilla/show_bug.cgi?id=20445 */
|
||||
+ size_t len2 ATTRIBUTE_UNUSED;
|
||||
+
|
||||
+ if (len == (size_t) -1)
|
||||
+ {
|
||||
+ fprintf (stderr, "Invalid multibyte argument #%d \"%s\"\n",
|
||||
+ i, argv[i]);
|
||||
+ exit (1);
|
||||
+ }
|
||||
+ wargv[i] = (wchar_t *) alloca (sizeof (**wargv) * (len + 1));
|
||||
+ len2 = mbstowcs (wargv[i], argv[i], len + 1);
|
||||
+ assert (len2 == len);
|
||||
+ }
|
||||
+ wargv[argc] = NULL;
|
||||
+ PySys_SetArgv (argc - 1, wargv + 1);
|
||||
+ }
|
||||
+#endif
|
||||
+
|
||||
+ input = fopen (argv[0], "r");
|
||||
+ if (! input)
|
||||
+ {
|
||||
+ fprintf (stderr, "could not open %s: %s\n", argv[0], strerror (errno));
|
||||
+ exit (1);
|
||||
+ }
|
||||
+ PyRun_SimpleFile (input, argv[0]);
|
||||
+ fclose (input);
|
||||
+ exit (0);
|
||||
+}
|
||||
+
|
||||
+
|
||||
+
|
||||
|
||||
static PyObject *
|
||||
gdbpy_get_current_progspace (PyObject *unused1, PyObject *unused2)
|
||||
@@ -2034,6 +2145,8 @@ PyMethodDef python_GdbMethods[] =
|
||||
Evaluate command, a string, as a gdb CLI command. Optionally returns\n\
|
||||
a Python String containing the output of the command if to_string is\n\
|
||||
set to True." },
|
||||
+ { "cli", gdbpy_cli, METH_NOARGS,
|
||||
+ "Enter the gdb CLI" },
|
||||
{ "parameter", gdbpy_parameter, METH_VARARGS,
|
||||
"Return a gdb parameter's value" },
|
||||
|
||||
diff --git a/gdb/python/python.h b/gdb/python/python.h
|
||||
index de58fd81df..237a84a0b2 100644
|
||||
--- a/gdb/python/python.h
|
||||
+++ b/gdb/python/python.h
|
||||
@@ -25,4 +25,6 @@
|
||||
/* This is all that python exports to gdb. */
|
||||
extern const struct extension_language_defn extension_language_python;
|
||||
|
||||
+extern void run_python_script (int argc, char **argv);
|
||||
+
|
||||
#endif /* GDB_PYTHON_H */
|
||||
diff --git a/gdb/testsuite/gdb.python/py-frame.exp b/gdb/testsuite/gdb.python/py-frame.exp
|
||||
index f186fa9578..0327284226 100644
|
||||
--- a/gdb/testsuite/gdb.python/py-frame.exp
|
||||
+++ b/gdb/testsuite/gdb.python/py-frame.exp
|
||||
@@ -95,6 +95,8 @@ gdb_test "python print ('result = %s' % f0.read_var ('a'))" " = 1" "test Frame.r
|
||||
@ -159,9 +665,10 @@ diff --git a/gdb/testsuite/gdb.python/py-frame.exp b/gdb/testsuite/gdb.python/py
|
||||
gdb_test "python print ('result = %s' % (gdb.selected_frame ().read_register ('sp') == gdb.parse_and_eval ('\$sp')))" \
|
||||
" = True" \
|
||||
diff --git a/gdb/testsuite/gdb.python/py-value.exp b/gdb/testsuite/gdb.python/py-value.exp
|
||||
index eb82a7776f..3069a5c6d7 100644
|
||||
--- a/gdb/testsuite/gdb.python/py-value.exp
|
||||
+++ b/gdb/testsuite/gdb.python/py-value.exp
|
||||
@@ -419,6 +419,15 @@ proc test_value_after_death {} {
|
||||
@@ -384,6 +384,15 @@ proc test_value_after_death {} {
|
||||
"print value's type"
|
||||
}
|
||||
|
||||
@ -177,11 +684,46 @@ diff --git a/gdb/testsuite/gdb.python/py-value.exp b/gdb/testsuite/gdb.python/py
|
||||
# Regression test for invalid subscript operations. The bug was that
|
||||
# the type of the value was not being checked before allowing a
|
||||
# subscript operation to proceed.
|
||||
@@ -606,6 +615,7 @@ test_value_in_inferior
|
||||
test_value_from_buffer
|
||||
@@ -512,6 +521,7 @@ if ![runto_main] then {
|
||||
test_value_in_inferior
|
||||
test_inferior_function_call
|
||||
test_value_after_death
|
||||
+test_cast_regression
|
||||
|
||||
# Test either C or C++ values.
|
||||
|
||||
diff --git a/gdb/varobj.c b/gdb/varobj.c
|
||||
index 01dabef37c..c198731d0b 100644
|
||||
--- a/gdb/varobj.c
|
||||
+++ b/gdb/varobj.c
|
||||
@@ -217,6 +217,14 @@ is_root_p (const struct varobj *var)
|
||||
}
|
||||
|
||||
#ifdef HAVE_PYTHON
|
||||
+/* Helper function to install a Python environment suitable for
|
||||
+ use during operations on VAR. */
|
||||
+struct cleanup *
|
||||
+varobj_ensure_python_env (const struct varobj *var)
|
||||
+{
|
||||
+ return ensure_python_env (var->root->exp->gdbarch,
|
||||
+ var->root->exp->language_defn);
|
||||
+}
|
||||
|
||||
/* See python-internal.h. */
|
||||
gdbpy_enter_varobj::gdbpy_enter_varobj (const struct varobj *var)
|
||||
diff --git a/gdb/varobj.h b/gdb/varobj.h
|
||||
index 6e80d1b89e..677547996f 100644
|
||||
--- a/gdb/varobj.h
|
||||
+++ b/gdb/varobj.h
|
||||
@@ -327,6 +327,8 @@ extern bool varobj_has_more (const struct varobj *var, int to);
|
||||
|
||||
extern bool varobj_is_dynamic_p (const struct varobj *var);
|
||||
|
||||
+extern struct cleanup *varobj_ensure_python_env (const struct varobj *var);
|
||||
+
|
||||
extern bool varobj_default_value_is_changeable_p (const struct varobj *var);
|
||||
extern bool varobj_value_is_changeable_p (const struct varobj *var);
|
||||
|
||||
--
|
||||
2.14.3
|
||||
|
||||
|
@ -1,7 +1,9 @@
|
||||
From FEDORA_PATCHES Mon Sep 17 00:00:00 2001
|
||||
From: Fedora GDB patches <invalid@email.com>
|
||||
Date: Fri, 27 Oct 2017 21:07:50 +0200
|
||||
Subject: gdb-attach-fail-reasons-5of5.patch
|
||||
Subject: attach-fail-reasons: SELinux deny_ptrace
|
||||
|
||||
FileName: gdb-attach-fail-reasons-5of5.patch
|
||||
|
||||
;; Print reasons for failed attach/spawn incl. SELinux deny_ptrace (BZ 786878).
|
||||
;;=push+jan
|
||||
@ -41,11 +43,24 @@ gdb/gdbserver/
|
||||
* linux-low.c (linux_traceme): New function.
|
||||
(linux_create_inferior, linux_tracefork_child): Call it instead of
|
||||
direct ptrace.
|
||||
---
|
||||
gdb/config.in | 6 +++++
|
||||
gdb/configure | 58 ++++++++++++++++++++++++++++++++++++++++++++++
|
||||
gdb/configure.ac | 4 ++++
|
||||
gdb/gdbserver/config.in | 6 +++++
|
||||
gdb/gdbserver/configure | 58 ++++++++++++++++++++++++++++++++++++++++++++++
|
||||
gdb/gdbserver/configure.ac | 4 ++++
|
||||
gdb/gdbserver/linux-low.c | 16 ++++++++++++-
|
||||
gdb/linux-nat.c | 24 ++++++++++++++++++-
|
||||
gdb/nat/linux-ptrace.c | 22 ++++++++++++++++++
|
||||
gdb/nat/linux-ptrace.h | 1 +
|
||||
10 files changed, 197 insertions(+), 2 deletions(-)
|
||||
|
||||
diff --git a/gdb/config.in b/gdb/config.in
|
||||
index edd7028f76..4de3e842d1 100644
|
||||
--- a/gdb/config.in
|
||||
+++ b/gdb/config.in
|
||||
@@ -253,6 +253,9 @@
|
||||
@@ -270,6 +270,9 @@
|
||||
/* Define if librpm library is being used. */
|
||||
#undef HAVE_LIBRPM
|
||||
|
||||
@ -55,7 +70,7 @@ diff --git a/gdb/config.in b/gdb/config.in
|
||||
/* Define to 1 if you have the <libunwind-ia64.h> header file. */
|
||||
#undef HAVE_LIBUNWIND_IA64_H
|
||||
|
||||
@@ -388,6 +391,9 @@
|
||||
@@ -393,6 +396,9 @@
|
||||
/* Define to 1 if you have the `scm_new_smob' function. */
|
||||
#undef HAVE_SCM_NEW_SMOB
|
||||
|
||||
@ -66,9 +81,10 @@ diff --git a/gdb/config.in b/gdb/config.in
|
||||
#undef HAVE_SETLOCALE
|
||||
|
||||
diff --git a/gdb/configure b/gdb/configure
|
||||
index 1cecdbc3b5..904cc453ad 100755
|
||||
--- a/gdb/configure
|
||||
+++ b/gdb/configure
|
||||
@@ -16861,6 +16861,64 @@ cat >>confdefs.h <<_ACEOF
|
||||
@@ -15681,6 +15681,64 @@ cat >>confdefs.h <<_ACEOF
|
||||
_ACEOF
|
||||
|
||||
|
||||
@ -134,9 +150,10 @@ diff --git a/gdb/configure b/gdb/configure
|
||||
# Support for --with-sysroot is a copy of GDB_AC_WITH_DIR,
|
||||
# except that the argument to --with-sysroot is optional.
|
||||
diff --git a/gdb/configure.ac b/gdb/configure.ac
|
||||
index e232c1adcb..1557760ed8 100644
|
||||
--- a/gdb/configure.ac
|
||||
+++ b/gdb/configure.ac
|
||||
@@ -1900,6 +1900,10 @@ case $host_os in
|
||||
@@ -2043,6 +2043,10 @@ case $host_os in
|
||||
esac
|
||||
AC_DEFINE_UNQUOTED(GDBINIT,"$gdbinit",[The .gdbinit filename.])
|
||||
|
||||
@ -147,93 +164,13 @@ diff --git a/gdb/configure.ac b/gdb/configure.ac
|
||||
dnl Handle optional features that can be enabled.
|
||||
|
||||
# Support for --with-sysroot is a copy of GDB_AC_WITH_DIR,
|
||||
diff --git a/gdb/linux-nat.c b/gdb/linux-nat.c
|
||||
--- a/gdb/linux-nat.c
|
||||
+++ b/gdb/linux-nat.c
|
||||
@@ -1103,7 +1103,16 @@ linux_nat_target::create_inferior (const char *exec_file,
|
||||
/* Make sure we report all signals during startup. */
|
||||
pass_signals ({});
|
||||
|
||||
- inf_ptrace_target::create_inferior (exec_file, allargs, env, from_tty);
|
||||
+ try
|
||||
+ {
|
||||
+ inf_ptrace_target::create_inferior (exec_file, allargs, env, from_tty);
|
||||
+ }
|
||||
+ catch (const gdb_exception_error &ex)
|
||||
+ {
|
||||
+ std::string result = linux_ptrace_create_warnings ();
|
||||
+
|
||||
+ throw_error (ex.error, "%s%s", result.c_str (), ex.message->c_str ());
|
||||
+ }
|
||||
}
|
||||
|
||||
/* Callback for linux_proc_attach_tgid_threads. Attach to PTID if not
|
||||
diff --git a/gdb/nat/linux-ptrace.c b/gdb/nat/linux-ptrace.c
|
||||
--- a/gdb/nat/linux-ptrace.c
|
||||
+++ b/gdb/nat/linux-ptrace.c
|
||||
@@ -25,6 +25,10 @@
|
||||
#include <sys/procfs.h>
|
||||
#endif
|
||||
|
||||
+#ifdef HAVE_SELINUX_SELINUX_H
|
||||
+# include <selinux/selinux.h>
|
||||
+#endif /* HAVE_SELINUX_SELINUX_H */
|
||||
+
|
||||
/* Stores the ptrace options supported by the running kernel.
|
||||
A value of -1 means we did not check for features yet. A value
|
||||
of 0 means there are no supported features. */
|
||||
@@ -50,6 +54,8 @@ linux_ptrace_attach_fail_reason (pid_t pid)
|
||||
"terminated"),
|
||||
(int) pid);
|
||||
|
||||
+ result += linux_ptrace_create_warnings ();
|
||||
+
|
||||
return result;
|
||||
}
|
||||
|
||||
@@ -586,6 +592,25 @@ linux_ptrace_init_warnings (void)
|
||||
linux_ptrace_test_ret_to_nx ();
|
||||
}
|
||||
|
||||
+/* Print all possible reasons we could fail to create a traced process. */
|
||||
+
|
||||
+std::string
|
||||
+linux_ptrace_create_warnings ()
|
||||
+{
|
||||
+ std::string result;
|
||||
+
|
||||
+#ifdef HAVE_LIBSELINUX
|
||||
+ /* -1 is returned for errors, 0 if it has no effect, 1 if PTRACE_ATTACH is
|
||||
+ forbidden. */
|
||||
+ if (security_get_boolean_active ("deny_ptrace") == 1)
|
||||
+ string_appendf (result,
|
||||
+ _("the SELinux boolean 'deny_ptrace' is enabled, "
|
||||
+ "you can disable this process attach protection by: "
|
||||
+ "(gdb) shell sudo setsebool deny_ptrace=0\n"));
|
||||
+#endif /* HAVE_LIBSELINUX */
|
||||
+ return result;
|
||||
+}
|
||||
+
|
||||
/* Extract extended ptrace event from wait status. */
|
||||
|
||||
int
|
||||
diff --git a/gdb/nat/linux-ptrace.h b/gdb/nat/linux-ptrace.h
|
||||
--- a/gdb/nat/linux-ptrace.h
|
||||
+++ b/gdb/nat/linux-ptrace.h
|
||||
@@ -184,6 +184,7 @@ extern std::string linux_ptrace_attach_fail_reason (pid_t pid);
|
||||
extern std::string linux_ptrace_attach_fail_reason_string (ptid_t ptid, int err);
|
||||
|
||||
extern void linux_ptrace_init_warnings (void);
|
||||
+extern std::string linux_ptrace_create_warnings ();
|
||||
extern void linux_check_ptrace_features (void);
|
||||
extern void linux_enable_event_reporting (pid_t pid, int attached);
|
||||
extern void linux_disable_event_reporting (pid_t pid);
|
||||
diff --git a/gdbserver/config.in b/gdbserver/config.in
|
||||
--- a/gdbserver/config.in
|
||||
+++ b/gdbserver/config.in
|
||||
@@ -143,6 +143,9 @@
|
||||
/* Define if you have the ipt library. */
|
||||
#undef HAVE_LIBIPT
|
||||
diff --git a/gdb/gdbserver/config.in b/gdb/gdbserver/config.in
|
||||
index dda7c1f150..b2a34b92ce 100644
|
||||
--- a/gdb/gdbserver/config.in
|
||||
+++ b/gdb/gdbserver/config.in
|
||||
@@ -126,6 +126,9 @@
|
||||
/* Define to 1 if you have the `mcheck' library (-lmcheck). */
|
||||
#undef HAVE_LIBMCHECK
|
||||
|
||||
+/* Define to 1 if you have the `selinux' library (-lselinux). */
|
||||
+#undef HAVE_LIBSELINUX
|
||||
@ -241,9 +178,9 @@ diff --git a/gdbserver/config.in b/gdbserver/config.in
|
||||
/* Define if the target supports branch tracing. */
|
||||
#undef HAVE_LINUX_BTRACE
|
||||
|
||||
@@ -249,6 +252,9 @@
|
||||
/* Define to 1 if you have the `sbrk' function. */
|
||||
#undef HAVE_SBRK
|
||||
@@ -202,6 +205,9 @@
|
||||
/* Define to 1 if you have the `pwrite' function. */
|
||||
#undef HAVE_PWRITE
|
||||
|
||||
+/* Define to 1 if you have the <selinux/selinux.h> header file. */
|
||||
+#undef HAVE_SELINUX_SELINUX_H
|
||||
@ -251,10 +188,11 @@ diff --git a/gdbserver/config.in b/gdbserver/config.in
|
||||
/* Define to 1 if you have the `setns' function. */
|
||||
#undef HAVE_SETNS
|
||||
|
||||
diff --git a/gdbserver/configure b/gdbserver/configure
|
||||
--- a/gdbserver/configure
|
||||
+++ b/gdbserver/configure
|
||||
@@ -10683,6 +10683,64 @@ if $want_ipa ; then
|
||||
diff --git a/gdb/gdbserver/configure b/gdb/gdbserver/configure
|
||||
index 340ca7a19e..6d7c9b2326 100755
|
||||
--- a/gdb/gdbserver/configure
|
||||
+++ b/gdb/gdbserver/configure
|
||||
@@ -8455,6 +8455,64 @@ if $want_ipa ; then
|
||||
fi
|
||||
fi
|
||||
|
||||
@ -319,10 +257,11 @@ diff --git a/gdbserver/configure b/gdbserver/configure
|
||||
|
||||
|
||||
|
||||
diff --git a/gdbserver/configure.ac b/gdbserver/configure.ac
|
||||
--- a/gdbserver/configure.ac
|
||||
+++ b/gdbserver/configure.ac
|
||||
@@ -401,6 +401,10 @@ if $want_ipa ; then
|
||||
diff --git a/gdb/gdbserver/configure.ac b/gdb/gdbserver/configure.ac
|
||||
index 6727959e61..7c0f508275 100644
|
||||
--- a/gdb/gdbserver/configure.ac
|
||||
+++ b/gdb/gdbserver/configure.ac
|
||||
@@ -488,6 +488,10 @@ if $want_ipa ; then
|
||||
fi
|
||||
fi
|
||||
|
||||
@ -333,20 +272,26 @@ diff --git a/gdbserver/configure.ac b/gdbserver/configure.ac
|
||||
AC_SUBST(GDBSERVER_DEPFILES)
|
||||
AC_SUBST(GDBSERVER_LIBS)
|
||||
AC_SUBST(srv_xmlbuiltin)
|
||||
diff --git a/gdbserver/linux-low.cc b/gdbserver/linux-low.cc
|
||||
--- a/gdbserver/linux-low.cc
|
||||
+++ b/gdbserver/linux-low.cc
|
||||
@@ -932,7 +932,16 @@ linux_ptrace_fun ()
|
||||
diff --git a/gdb/gdbserver/linux-low.c b/gdb/gdbserver/linux-low.c
|
||||
index cfb2b56a08..0faac80625 100644
|
||||
--- a/gdb/gdbserver/linux-low.c
|
||||
+++ b/gdb/gdbserver/linux-low.c
|
||||
@@ -963,7 +963,21 @@ linux_ptrace_fun ()
|
||||
{
|
||||
if (ptrace (PTRACE_TRACEME, 0, (PTRACE_TYPE_ARG3) 0,
|
||||
(PTRACE_TYPE_ARG4) 0) < 0)
|
||||
- trace_start_error_with_name ("ptrace");
|
||||
+ {
|
||||
+ int save_errno = errno;
|
||||
+ struct buffer buffer;
|
||||
+
|
||||
+ std::string msg (linux_ptrace_create_warnings ());
|
||||
+ buffer_init (&buffer);
|
||||
+ linux_ptrace_create_warnings (&buffer);
|
||||
+ buffer_grow_str0 (&buffer, "");
|
||||
+
|
||||
+ msg += _("Cannot trace created process");
|
||||
+ std::string msg
|
||||
+ = string_printf (_("%sCannot trace created process"),
|
||||
+ buffer_finish (&buffer));
|
||||
+
|
||||
+ errno = save_errno;
|
||||
+ trace_start_error_with_name (msg.c_str ());
|
||||
@ -354,3 +299,100 @@ diff --git a/gdbserver/linux-low.cc b/gdbserver/linux-low.cc
|
||||
|
||||
if (setpgid (0, 0) < 0)
|
||||
trace_start_error_with_name ("setpgid");
|
||||
diff --git a/gdb/linux-nat.c b/gdb/linux-nat.c
|
||||
index c41ea391a0..1570a2bcb6 100644
|
||||
--- a/gdb/linux-nat.c
|
||||
+++ b/gdb/linux-nat.c
|
||||
@@ -1127,7 +1127,29 @@ linux_nat_create_inferior (struct target_ops *ops,
|
||||
/* Make sure we report all signals during startup. */
|
||||
linux_nat_pass_signals (ops, 0, NULL);
|
||||
|
||||
- linux_ops->to_create_inferior (ops, exec_file, allargs, env, from_tty);
|
||||
+ volatile struct gdb_exception ex;
|
||||
+ TRY
|
||||
+ {
|
||||
+ linux_ops->to_create_inferior (ops, exec_file, allargs, env, from_tty);
|
||||
+ }
|
||||
+ CATCH (ex, RETURN_MASK_ERROR)
|
||||
+ {
|
||||
+ struct buffer buffer;
|
||||
+ char *message, *buffer_s;
|
||||
+
|
||||
+ message = xstrdup (ex.message);
|
||||
+ make_cleanup (xfree, message);
|
||||
+
|
||||
+ buffer_init (&buffer);
|
||||
+ linux_ptrace_create_warnings (&buffer);
|
||||
+
|
||||
+ buffer_grow_str0 (&buffer, "");
|
||||
+ buffer_s = buffer_finish (&buffer);
|
||||
+ make_cleanup (xfree, buffer_s);
|
||||
+
|
||||
+ throw_error (ex.error, "%s%s", buffer_s, message);
|
||||
+ }
|
||||
+ END_CATCH
|
||||
}
|
||||
|
||||
/* Callback for linux_proc_attach_tgid_threads. Attach to PTID if not
|
||||
diff --git a/gdb/nat/linux-ptrace.c b/gdb/nat/linux-ptrace.c
|
||||
index ac6ba72390..be51e2449b 100644
|
||||
--- a/gdb/nat/linux-ptrace.c
|
||||
+++ b/gdb/nat/linux-ptrace.c
|
||||
@@ -27,6 +27,10 @@
|
||||
#include <sys/procfs.h>
|
||||
#endif
|
||||
|
||||
+#ifdef HAVE_SELINUX_SELINUX_H
|
||||
+# include <selinux/selinux.h>
|
||||
+#endif /* HAVE_SELINUX_SELINUX_H */
|
||||
+
|
||||
/* Stores the ptrace options supported by the running kernel.
|
||||
A value of -1 means we did not check for features yet. A value
|
||||
of 0 means there are no supported features. */
|
||||
@@ -51,6 +55,8 @@ linux_ptrace_attach_fail_reason (pid_t pid, struct buffer *buffer)
|
||||
buffer_xml_printf (buffer, _("process %d is a zombie "
|
||||
"- the process has already terminated"),
|
||||
(int) pid);
|
||||
+
|
||||
+ linux_ptrace_create_warnings (buffer);
|
||||
}
|
||||
|
||||
/* See linux-ptrace.h. */
|
||||
@@ -594,6 +600,22 @@ linux_ptrace_init_warnings (void)
|
||||
linux_ptrace_test_ret_to_nx ();
|
||||
}
|
||||
|
||||
+/* Print all possible reasons we could fail to create a traced process. */
|
||||
+
|
||||
+void
|
||||
+linux_ptrace_create_warnings (struct buffer *buffer)
|
||||
+{
|
||||
+#ifdef HAVE_LIBSELINUX
|
||||
+ /* -1 is returned for errors, 0 if it has no effect, 1 if PTRACE_ATTACH is
|
||||
+ forbidden. */
|
||||
+ if (security_get_boolean_active ("deny_ptrace") == 1)
|
||||
+ buffer_xml_printf (buffer,
|
||||
+ _("the SELinux boolean 'deny_ptrace' is enabled, "
|
||||
+ "you can disable this process attach protection by: "
|
||||
+ "(gdb) shell sudo setsebool deny_ptrace=0"));
|
||||
+#endif /* HAVE_LIBSELINUX */
|
||||
+}
|
||||
+
|
||||
/* Extract extended ptrace event from wait status. */
|
||||
|
||||
int
|
||||
diff --git a/gdb/nat/linux-ptrace.h b/gdb/nat/linux-ptrace.h
|
||||
index 1f960ed132..84912f909c 100644
|
||||
--- a/gdb/nat/linux-ptrace.h
|
||||
+++ b/gdb/nat/linux-ptrace.h
|
||||
@@ -190,6 +190,7 @@ extern void linux_ptrace_attach_fail_reason (pid_t pid, struct buffer *buffer);
|
||||
extern char *linux_ptrace_attach_fail_reason_string (ptid_t ptid, int err);
|
||||
|
||||
extern void linux_ptrace_init_warnings (void);
|
||||
+extern void linux_ptrace_create_warnings (struct buffer *buffer);
|
||||
extern void linux_check_ptrace_features (void);
|
||||
extern void linux_enable_event_reporting (pid_t pid, int attached);
|
||||
extern void linux_disable_event_reporting (pid_t pid);
|
||||
--
|
||||
2.14.3
|
||||
|
||||
|
@ -3,6 +3,8 @@ From: Fedora GDB patches <invalid@email.com>
|
||||
Date: Fri, 27 Oct 2017 21:07:50 +0200
|
||||
Subject: gdb-btrobust.patch
|
||||
|
||||
FileName: gdb-btrobust.patch
|
||||
|
||||
;; Continue backtrace even if a frame filter throws an exception (Phil Muldoon).
|
||||
;;=push
|
||||
|
||||
@ -10,11 +12,15 @@ This should fix the error with glib. An error message will still be
|
||||
printed, but a default backtrace will occur in this case.
|
||||
|
||||
--
|
||||
---
|
||||
gdb/python/py-framefilter.c | 4 +++-
|
||||
1 file changed, 3 insertions(+), 1 deletion(-)
|
||||
|
||||
diff --git a/gdb/python/py-framefilter.c b/gdb/python/py-framefilter.c
|
||||
index e887849c36..a8e4f49eb5 100644
|
||||
--- a/gdb/python/py-framefilter.c
|
||||
+++ b/gdb/python/py-framefilter.c
|
||||
@@ -1204,6 +1204,7 @@ gdbpy_apply_frame_filter (const struct extension_language_defn *extlang,
|
||||
@@ -1388,6 +1388,7 @@ gdbpy_apply_frame_filter (const struct extension_language_defn *extlang,
|
||||
htab_eq_pointer,
|
||||
NULL));
|
||||
|
||||
@ -22,24 +28,23 @@ diff --git a/gdb/python/py-framefilter.c b/gdb/python/py-framefilter.c
|
||||
while (true)
|
||||
{
|
||||
gdbpy_ref<> item (PyIter_Next (iterable.get ()));
|
||||
@@ -1212,8 +1213,8 @@ gdbpy_apply_frame_filter (const struct extension_language_defn *extlang,
|
||||
{
|
||||
@@ -1397,7 +1398,7 @@ gdbpy_apply_frame_filter (const struct extension_language_defn *extlang,
|
||||
if (PyErr_Occurred ())
|
||||
{
|
||||
- gdbpy_print_stack_or_quit ();
|
||||
gdbpy_print_stack ();
|
||||
- return EXT_LANG_BT_ERROR;
|
||||
+ gdbpy_print_stack ();
|
||||
+ return count_printed > 0 ? EXT_LANG_BT_ERROR : EXT_LANG_BT_NO_FILTERS;
|
||||
}
|
||||
break;
|
||||
}
|
||||
@@ -1245,7 +1246,8 @@ gdbpy_apply_frame_filter (const struct extension_language_defn *extlang,
|
||||
/* Do not exit on error printing a single frame. Print the
|
||||
@@ -1409,6 +1410,7 @@ gdbpy_apply_frame_filter (const struct extension_language_defn *extlang,
|
||||
error and continue with other frames. */
|
||||
if (success == EXT_LANG_BT_ERROR)
|
||||
- gdbpy_print_stack_or_quit ();
|
||||
+ gdbpy_print_stack ();
|
||||
gdbpy_print_stack ();
|
||||
+ count_printed++;
|
||||
}
|
||||
|
||||
return success;
|
||||
--
|
||||
2.14.3
|
||||
|
||||
|
@ -1,7 +1,9 @@
|
||||
From FEDORA_PATCHES Mon Sep 17 00:00:00 2001
|
||||
From: Fedora GDB patches <invalid@email.com>
|
||||
Date: Fri, 27 Oct 2017 21:07:50 +0200
|
||||
Subject: gdb-bz1219747-attach-kills.patch
|
||||
Subject: Never kill PID on: gdb exec PID
|
||||
|
||||
FileName: gdb-bz1219747-attach-kills.patch
|
||||
|
||||
;; Never kill PID on: gdb exec PID (Jan Kratochvil, RH BZ 1219747).
|
||||
;;=push+jan
|
||||
@ -76,24 +78,33 @@ gdb/testsuite/ChangeLog
|
||||
|
||||
* gdb.base/attach-kills.c: New.
|
||||
* gdb.base/attach-kills.exp: New.
|
||||
---
|
||||
gdb/main.c | 5 +++-
|
||||
gdb/testsuite/gdb.base/attach-kills.c | 25 +++++++++++++++++
|
||||
gdb/testsuite/gdb.base/attach-kills.exp | 49 +++++++++++++++++++++++++++++++++
|
||||
3 files changed, 78 insertions(+), 1 deletion(-)
|
||||
create mode 100644 gdb/testsuite/gdb.base/attach-kills.c
|
||||
create mode 100644 gdb/testsuite/gdb.base/attach-kills.exp
|
||||
|
||||
diff --git a/gdb/main.c b/gdb/main.c
|
||||
index 17d35f4a8a..b079e79c93 100644
|
||||
--- a/gdb/main.c
|
||||
+++ b/gdb/main.c
|
||||
@@ -1199,7 +1199,10 @@ captured_main_1 (struct captured_main_args *context)
|
||||
@@ -1114,7 +1114,10 @@ captured_main_1 (struct captured_main_args *context)
|
||||
if (isdigit (pid_or_core_arg[0]))
|
||||
{
|
||||
ret = catch_command_errors (attach_command, pid_or_core_arg,
|
||||
!batch_flag);
|
||||
- if (ret == 0)
|
||||
+ if (ret == 0
|
||||
if (catch_command_errors (attach_command, pid_or_core_arg,
|
||||
- !batch_flag) == 0)
|
||||
+ !batch_flag) == 0
|
||||
+ /* attach_command could succeed partially and core_file_command
|
||||
+ would try to kill it. */
|
||||
+ && !have_inferiors ())
|
||||
ret = catch_command_errors (core_file_command,
|
||||
pid_or_core_arg,
|
||||
catch_command_errors (core_file_command, pid_or_core_arg,
|
||||
!batch_flag);
|
||||
}
|
||||
diff --git a/gdb/testsuite/gdb.base/attach-kills.c b/gdb/testsuite/gdb.base/attach-kills.c
|
||||
new file mode 100644
|
||||
index 0000000000..2398f00442
|
||||
--- /dev/null
|
||||
+++ b/gdb/testsuite/gdb.base/attach-kills.c
|
||||
@@ -0,0 +1,25 @@
|
||||
@ -124,6 +135,7 @@ new file mode 100644
|
||||
+}
|
||||
diff --git a/gdb/testsuite/gdb.base/attach-kills.exp b/gdb/testsuite/gdb.base/attach-kills.exp
|
||||
new file mode 100644
|
||||
index 0000000000..9a93cb7584
|
||||
--- /dev/null
|
||||
+++ b/gdb/testsuite/gdb.base/attach-kills.exp
|
||||
@@ -0,0 +1,49 @@
|
||||
@ -176,3 +188,6 @@ new file mode 100644
|
||||
+}
|
||||
+
|
||||
+kill_wait_spawned_process $test_spawn_id
|
||||
--
|
||||
2.14.3
|
||||
|
||||
|
@ -3,6 +3,8 @@ From: Fedora GDB patches <invalid@email.com>
|
||||
Date: Fri, 27 Oct 2017 21:07:50 +0200
|
||||
Subject: gdb-bz533176-fortran-omp-step.patch
|
||||
|
||||
FileName: gdb-bz533176-fortran-omp-step.patch
|
||||
|
||||
;; Fix stepping with OMP parallel Fortran sections (BZ 533176).
|
||||
;;=push+jan: It requires some better DWARF annotations.
|
||||
|
||||
@ -26,11 +28,19 @@ upstream) or "step" (default in F/RHEL) the simultaneous execution of the
|
||||
threads is inconvenient. Setting it to "on" will lockup the debugging as the
|
||||
threads need to get synchronized at some point. This is a more general
|
||||
debugging problem of GOMP outside of the scope of this Bug.
|
||||
---
|
||||
gdb/infrun.c | 11 +++++++++++
|
||||
gdb/testsuite/gdb.fortran/omp-step.exp | 31 +++++++++++++++++++++++++++++++
|
||||
gdb/testsuite/gdb.fortran/omp-step.f90 | 32 ++++++++++++++++++++++++++++++++
|
||||
3 files changed, 74 insertions(+)
|
||||
create mode 100644 gdb/testsuite/gdb.fortran/omp-step.exp
|
||||
create mode 100644 gdb/testsuite/gdb.fortran/omp-step.f90
|
||||
|
||||
diff --git a/gdb/infrun.c b/gdb/infrun.c
|
||||
index 1d0f731954..dcf022bd50 100644
|
||||
--- a/gdb/infrun.c
|
||||
+++ b/gdb/infrun.c
|
||||
@@ -6788,6 +6788,16 @@ process_event_stop_test (struct execution_control_state *ecs)
|
||||
@@ -6690,6 +6690,16 @@ process_event_stop_test (struct execution_control_state *ecs)
|
||||
|
||||
if (ecs->event_thread->control.step_over_calls == STEP_OVER_ALL)
|
||||
{
|
||||
@ -38,16 +48,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 (stop_fn->linkage_name (), ".omp_fn.") == NULL)
|
||||
+ || strstr (SYMBOL_LINKAGE_NAME (stop_fn), ".omp_fn.") == NULL)
|
||||
+ /* gcc-4.7.2-9.fc19.x86_64 uses a new format. */
|
||||
+ && (stopf == NULL
|
||||
+ || strstr (stopf->linkage_name (), "._omp_fn.") == NULL))
|
||||
+ || strstr (MSYMBOL_LINKAGE_NAME (stopf), "._omp_fn.") == NULL))
|
||||
+{ /* ".omp_fn." */
|
||||
+
|
||||
/* We're doing a "next".
|
||||
|
||||
Normal (forward) execution: set a breakpoint at the
|
||||
@@ -6821,6 +6831,7 @@ process_event_stop_test (struct execution_control_state *ecs)
|
||||
@@ -6723,6 +6733,7 @@ process_event_stop_test (struct execution_control_state *ecs)
|
||||
|
||||
keep_going (ecs);
|
||||
return;
|
||||
@ -57,6 +67,7 @@ diff --git a/gdb/infrun.c b/gdb/infrun.c
|
||||
/* If we are in a function call trampoline (a stub between the
|
||||
diff --git a/gdb/testsuite/gdb.fortran/omp-step.exp b/gdb/testsuite/gdb.fortran/omp-step.exp
|
||||
new file mode 100644
|
||||
index 0000000000..66440a7507
|
||||
--- /dev/null
|
||||
+++ b/gdb/testsuite/gdb.fortran/omp-step.exp
|
||||
@@ -0,0 +1,31 @@
|
||||
@ -93,6 +104,7 @@ new file mode 100644
|
||||
+gdb_continue_to_breakpoint "success" ".*success.*"
|
||||
diff --git a/gdb/testsuite/gdb.fortran/omp-step.f90 b/gdb/testsuite/gdb.fortran/omp-step.f90
|
||||
new file mode 100644
|
||||
index 0000000000..a0cfb37014
|
||||
--- /dev/null
|
||||
+++ b/gdb/testsuite/gdb.fortran/omp-step.f90
|
||||
@@ -0,0 +1,32 @@
|
||||
@ -128,3 +140,6 @@ new file mode 100644
|
||||
+ end do
|
||||
+ print *, "success"
|
||||
+ end
|
||||
--
|
||||
2.14.3
|
||||
|
||||
|
197
gdb-bz541866-rwatch-before-run.patch
Normal file
197
gdb-bz541866-rwatch-before-run.patch
Normal file
@ -0,0 +1,197 @@
|
||||
From FEDORA_PATCHES Mon Sep 17 00:00:00 2001
|
||||
From: Fedora GDB patches <invalid@email.com>
|
||||
Date: Fri, 27 Oct 2017 21:07:50 +0200
|
||||
Subject: gdb-bz541866-rwatch-before-run.patch
|
||||
|
||||
FileName: gdb-bz541866-rwatch-before-run.patch
|
||||
|
||||
;; Fix i386+x86_64 rwatch+awatch before run, regression against 6.8 (BZ 541866).
|
||||
;; Fix i386 rwatch+awatch before run (BZ 688788, on top of BZ 541866).
|
||||
;;=push+jan: It should be fixed properly instead.
|
||||
---
|
||||
gdb/breakpoint.c | 4 +--
|
||||
gdb/config/i386/nm-linux.h | 28 +++++++++++++++
|
||||
gdb/config/i386/nm-linux64.h | 28 +++++++++++++++
|
||||
gdb/configure.nat | 2 ++
|
||||
gdb/target.h | 2 ++
|
||||
.../gdb.base/watchpoint-hw-before-run.exp | 40 ++++++++++++++++++++++
|
||||
6 files changed, 102 insertions(+), 2 deletions(-)
|
||||
create mode 100644 gdb/config/i386/nm-linux.h
|
||||
create mode 100644 gdb/config/i386/nm-linux64.h
|
||||
create mode 100644 gdb/testsuite/gdb.base/watchpoint-hw-before-run.exp
|
||||
|
||||
diff --git a/gdb/breakpoint.c b/gdb/breakpoint.c
|
||||
index 814802a0a1..5a99de75e1 100644
|
||||
--- a/gdb/breakpoint.c
|
||||
+++ b/gdb/breakpoint.c
|
||||
@@ -8864,7 +8864,7 @@ init_breakpoint_sal (struct breakpoint *b, struct gdbarch *gdbarch,
|
||||
int enabled, int internal, unsigned flags,
|
||||
int display_canonical)
|
||||
{
|
||||
- int i;
|
||||
+ int i ATTRIBUTE_UNUSED;
|
||||
|
||||
if (type == bp_hardware_breakpoint)
|
||||
{
|
||||
@@ -14425,7 +14425,7 @@ enable_breakpoint_disp (struct breakpoint *bpt, enum bpdisp disposition,
|
||||
|
||||
if (bpt->type == bp_hardware_breakpoint)
|
||||
{
|
||||
- int i;
|
||||
+ int i ATTRIBUTE_UNUSED;
|
||||
i = hw_breakpoint_used_count ();
|
||||
target_resources_ok =
|
||||
target_can_use_hardware_watchpoint (bp_hardware_breakpoint,
|
||||
diff --git a/gdb/config/i386/nm-linux.h b/gdb/config/i386/nm-linux.h
|
||||
new file mode 100644
|
||||
index 0000000000..38e94baab1
|
||||
--- /dev/null
|
||||
+++ b/gdb/config/i386/nm-linux.h
|
||||
@@ -0,0 +1,28 @@
|
||||
+/* Native support for GNU/Linux i386.
|
||||
+
|
||||
+ Copyright 2010 Free Software Foundation, Inc.
|
||||
+
|
||||
+ This file is part of GDB.
|
||||
+
|
||||
+ This program is free software; you can redistribute it and/or modify
|
||||
+ it under the terms of the GNU General Public License as published by
|
||||
+ the Free Software Foundation; either version 3 of the License, or
|
||||
+ (at your option) any later version.
|
||||
+
|
||||
+ This program is distributed in the hope that it will be useful,
|
||||
+ but WITHOUT ANY WARRANTY; without even the implied warranty of
|
||||
+ MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
|
||||
+ GNU General Public License for more details.
|
||||
+
|
||||
+ You should have received a copy of the GNU General Public License
|
||||
+ along with this program. If not, see <http://www.gnu.org/licenses/>. */
|
||||
+
|
||||
+#ifndef NM_LINUX_H
|
||||
+#define NM_LINUX_H
|
||||
+
|
||||
+#include "config/nm-linux.h"
|
||||
+
|
||||
+/* Red Hat backward compatibility with gdb-6.8. */
|
||||
+#define target_can_use_hardware_watchpoint(type, cnt, ot) 1
|
||||
+
|
||||
+#endif /* NM_LINUX64_H */
|
||||
diff --git a/gdb/config/i386/nm-linux64.h b/gdb/config/i386/nm-linux64.h
|
||||
new file mode 100644
|
||||
index 0000000000..212daba477
|
||||
--- /dev/null
|
||||
+++ b/gdb/config/i386/nm-linux64.h
|
||||
@@ -0,0 +1,28 @@
|
||||
+/* Native support for GNU/Linux amd64.
|
||||
+
|
||||
+ Copyright 2010 Free Software Foundation, Inc.
|
||||
+
|
||||
+ This file is part of GDB.
|
||||
+
|
||||
+ This program is free software; you can redistribute it and/or modify
|
||||
+ it under the terms of the GNU General Public License as published by
|
||||
+ the Free Software Foundation; either version 3 of the License, or
|
||||
+ (at your option) any later version.
|
||||
+
|
||||
+ This program is distributed in the hope that it will be useful,
|
||||
+ but WITHOUT ANY WARRANTY; without even the implied warranty of
|
||||
+ MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
|
||||
+ GNU General Public License for more details.
|
||||
+
|
||||
+ You should have received a copy of the GNU General Public License
|
||||
+ along with this program. If not, see <http://www.gnu.org/licenses/>. */
|
||||
+
|
||||
+#ifndef NM_LINUX64_H
|
||||
+#define NM_LINUX64_H
|
||||
+
|
||||
+#include "config/nm-linux.h"
|
||||
+
|
||||
+/* Red Hat backward compatibility with gdb-6.8. */
|
||||
+#define target_can_use_hardware_watchpoint(type, cnt, ot) 1
|
||||
+
|
||||
+#endif /* NM_LINUX64_H */
|
||||
diff --git a/gdb/configure.nat b/gdb/configure.nat
|
||||
index 8e14892722..6dbb072054 100644
|
||||
--- a/gdb/configure.nat
|
||||
+++ b/gdb/configure.nat
|
||||
@@ -237,6 +237,7 @@ case ${gdb_host} in
|
||||
;;
|
||||
i386)
|
||||
# Host: Intel 386 running GNU/Linux.
|
||||
+ NAT_FILE="${srcdir}/config/${gdb_host_cpu}/nm-linux.h"
|
||||
NATDEPFILES="${NATDEPFILES} x86-nat.o x86-dregs.o \
|
||||
i386-linux-nat.o x86-linux-nat.o linux-btrace.o \
|
||||
x86-linux.o x86-linux-dregs.o"
|
||||
@@ -289,6 +290,7 @@ case ${gdb_host} in
|
||||
case ${gdb_host_cpu} in
|
||||
i386)
|
||||
# Host: GNU/Linux x86-64
|
||||
+ NAT_FILE="${srcdir}/config/${gdb_host_cpu}/nm-linux64.h"
|
||||
NATDEPFILES="${NATDEPFILES} x86-nat.o x86-dregs.o \
|
||||
amd64-nat.o amd64-linux-nat.o x86-linux-nat.o linux-btrace.o \
|
||||
x86-linux.o x86-linux-dregs.o amd64-linux-siginfo.o"
|
||||
diff --git a/gdb/target.h b/gdb/target.h
|
||||
index 4781fbc59c..e3a2882fe5 100644
|
||||
--- a/gdb/target.h
|
||||
+++ b/gdb/target.h
|
||||
@@ -1915,9 +1915,11 @@ extern struct thread_info *target_thread_handle_to_thread_info
|
||||
one. OTHERTYPE is the number of watchpoints of other types than
|
||||
this one used so far. */
|
||||
|
||||
+#ifndef target_can_use_hardware_watchpoint
|
||||
#define target_can_use_hardware_watchpoint(TYPE,CNT,OTHERTYPE) \
|
||||
(*current_target.to_can_use_hw_breakpoint) (¤t_target, \
|
||||
TYPE, CNT, OTHERTYPE)
|
||||
+#endif
|
||||
|
||||
/* Returns the number of debug registers needed to watch the given
|
||||
memory region, or zero if not supported. */
|
||||
diff --git a/gdb/testsuite/gdb.base/watchpoint-hw-before-run.exp b/gdb/testsuite/gdb.base/watchpoint-hw-before-run.exp
|
||||
new file mode 100644
|
||||
index 0000000000..4ce9997e4a
|
||||
--- /dev/null
|
||||
+++ b/gdb/testsuite/gdb.base/watchpoint-hw-before-run.exp
|
||||
@@ -0,0 +1,40 @@
|
||||
+# Copyright 2009, 2010 Free Software Foundation, Inc.
|
||||
+
|
||||
+# This program is free software; you can redistribute it and/or modify
|
||||
+# it under the terms of the GNU General Public License as published by
|
||||
+# the Free Software Foundation; either version 3 of the License, or
|
||||
+# (at your option) any later version.
|
||||
+#
|
||||
+# This program is distributed in the hope that it will be useful,
|
||||
+# but WITHOUT ANY WARRANTY; without even the implied warranty of
|
||||
+# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
|
||||
+# GNU General Public License for more details.
|
||||
+#
|
||||
+# You should have received a copy of the GNU General Public License
|
||||
+# along with this program. If not, see <http://www.gnu.org/licenses/>.
|
||||
+
|
||||
+# Arch not supporting hw watchpoints does not imply no_hardware_watchpoints set.
|
||||
+if {(![istarget "i?86-*-*"] && ![istarget "x86_64-*-*"]
|
||||
+ && ![istarget "ia64-*-*"])
|
||||
+ || [target_info exists gdb,no_hardware_watchpoints]} then {
|
||||
+ verbose "Skipping watchpoint-hw-before-run test."
|
||||
+ return
|
||||
+}
|
||||
+
|
||||
+set test watchpoint-hw-before-run
|
||||
+set srcfile watchpoint-hw-hit-once.c
|
||||
+if { [prepare_for_testing ${test}.exp ${test} ${srcfile}] } {
|
||||
+ return -1
|
||||
+}
|
||||
+
|
||||
+gdb_test "rwatch watchee" "ardware read watchpoint 1: watchee"
|
||||
+
|
||||
+# `runto_main' or `runto main' would delete the watchpoint created above.
|
||||
+
|
||||
+if { [gdb_start_cmd] < 0 } {
|
||||
+ untested start
|
||||
+ return -1
|
||||
+}
|
||||
+gdb_test "" "main .* at .*" "start"
|
||||
+
|
||||
+gdb_test "continue" "Continuing.\r\n\r\nHardware read watchpoint \[0-9\]+: watchee\r\n\r\nValue = 0\r\n.*"
|
||||
--
|
||||
2.14.3
|
||||
|
80
gdb-bz568248-oom-is-error.patch
Normal file
80
gdb-bz568248-oom-is-error.patch
Normal file
@ -0,0 +1,80 @@
|
||||
From FEDORA_PATCHES Mon Sep 17 00:00:00 2001
|
||||
From: Fedora GDB patches <invalid@email.com>
|
||||
Date: Fri, 27 Oct 2017 21:07:50 +0200
|
||||
Subject: nomem: internal_error -> error
|
||||
|
||||
FileName: gdb-bz568248-oom-is-error.patch
|
||||
|
||||
;; Out of memory is just an error, not fatal (uninitialized VLS vars, BZ 568248).
|
||||
;;=push+jan: Inferior objects should be read in parts, then this patch gets obsoleted.
|
||||
|
||||
http://sourceware.org/ml/gdb-patches/2010-06/msg00005.html
|
||||
|
||||
Hi,
|
||||
|
||||
unfortunately I see this problem reproducible only with the
|
||||
archer-jankratochvil-vla branch (VLA = Variable Length Arrays - char[var]).
|
||||
OTOH this branch I hopefully submit in some form for FSF GDB later.
|
||||
|
||||
In this case (a general problem but tested for example on Fedora 13 i686):
|
||||
|
||||
int
|
||||
main (int argc, char **argv)
|
||||
{
|
||||
char a[argc];
|
||||
return a[0];
|
||||
}
|
||||
|
||||
(gdb) start
|
||||
(gdb) print a
|
||||
../../gdb/utils.c:1251: internal-error: virtual memory exhausted: can't allocate 4294951689 bytes.
|
||||
|
||||
It is apparently because boundary for the variable `a' is not initialized
|
||||
there. Users notice it due to Eclipse-CDT trying to automatically display all
|
||||
the local variables on each step.
|
||||
|
||||
Apparentl no regressions on {x86_64,x86_64-m32,i686}-fedora13-linux-gnu.
|
||||
But is anone aware of the reasons to use internal_error there?
|
||||
I find simple error as a perfectly reasonable there.
|
||||
(history only tracks it since the initial import)
|
||||
|
||||
IIRC this idea has been discussed with Tom Tromey, not sure of its origin.
|
||||
|
||||
I understand it may be offtopic for FSF GDB but from some GDB crashes I am not
|
||||
sure if it can happen only due to the VLA variables.
|
||||
|
||||
Thanks,
|
||||
Jan
|
||||
|
||||
gdb/
|
||||
2010-06-01 Jan Kratochvil <jan.kratochvil@redhat.com>
|
||||
Tom Tromey <tromey@redhat.com>
|
||||
|
||||
* utils.c (nomem): Change internal_error to error.
|
||||
---
|
||||
gdb/utils.c | 6 ++----
|
||||
1 file changed, 2 insertions(+), 4 deletions(-)
|
||||
|
||||
diff --git a/gdb/utils.c b/gdb/utils.c
|
||||
index c531748fe4..0066bfcc4b 100644
|
||||
--- a/gdb/utils.c
|
||||
+++ b/gdb/utils.c
|
||||
@@ -774,13 +774,11 @@ malloc_failure (long size)
|
||||
{
|
||||
if (size > 0)
|
||||
{
|
||||
- internal_error (__FILE__, __LINE__,
|
||||
- _("virtual memory exhausted: can't allocate %ld bytes."),
|
||||
- size);
|
||||
+ error (_("virtual memory exhausted: can't allocate %ld bytes."), size);
|
||||
}
|
||||
else
|
||||
{
|
||||
- internal_error (__FILE__, __LINE__, _("virtual memory exhausted."));
|
||||
+ error (_("virtual memory exhausted."));
|
||||
}
|
||||
}
|
||||
|
||||
--
|
||||
2.14.3
|
||||
|
@ -3,11 +3,22 @@ From: Fedora GDB patches <invalid@email.com>
|
||||
Date: Fri, 27 Oct 2017 21:07:50 +0200
|
||||
Subject: gdb-bz601887-dwarf4-rh-test.patch
|
||||
|
||||
FileName: gdb-bz601887-dwarf4-rh-test.patch
|
||||
|
||||
;; Backport DWARF-4 support (BZ 601887, Tom Tromey).
|
||||
;;=fedoratest
|
||||
---
|
||||
gdb/testsuite/gdb.dwarf2/rh-dwarf4-x86_64.S | 167 ++++++++++++++++++++++++++
|
||||
gdb/testsuite/gdb.dwarf2/rh-dwarf4-x86_64.c | 22 ++++
|
||||
gdb/testsuite/gdb.dwarf2/rh-dwarf4-x86_64.exp | 42 +++++++
|
||||
3 files changed, 231 insertions(+)
|
||||
create mode 100644 gdb/testsuite/gdb.dwarf2/rh-dwarf4-x86_64.S
|
||||
create mode 100644 gdb/testsuite/gdb.dwarf2/rh-dwarf4-x86_64.c
|
||||
create mode 100644 gdb/testsuite/gdb.dwarf2/rh-dwarf4-x86_64.exp
|
||||
|
||||
diff --git a/gdb/testsuite/gdb.dwarf2/rh-dwarf4-x86_64.S b/gdb/testsuite/gdb.dwarf2/rh-dwarf4-x86_64.S
|
||||
new file mode 100644
|
||||
index 0000000000..48b1bbf3e1
|
||||
--- /dev/null
|
||||
+++ b/gdb/testsuite/gdb.dwarf2/rh-dwarf4-x86_64.S
|
||||
@@ -0,0 +1,167 @@
|
||||
@ -180,6 +191,7 @@ new file mode 100644
|
||||
+ .section .note.GNU-stack,"",@progbits
|
||||
diff --git a/gdb/testsuite/gdb.dwarf2/rh-dwarf4-x86_64.c b/gdb/testsuite/gdb.dwarf2/rh-dwarf4-x86_64.c
|
||||
new file mode 100644
|
||||
index 0000000000..46fcd120f4
|
||||
--- /dev/null
|
||||
+++ b/gdb/testsuite/gdb.dwarf2/rh-dwarf4-x86_64.c
|
||||
@@ -0,0 +1,22 @@
|
||||
@ -207,6 +219,7 @@ new file mode 100644
|
||||
+}
|
||||
diff --git a/gdb/testsuite/gdb.dwarf2/rh-dwarf4-x86_64.exp b/gdb/testsuite/gdb.dwarf2/rh-dwarf4-x86_64.exp
|
||||
new file mode 100644
|
||||
index 0000000000..a728f9c5ed
|
||||
--- /dev/null
|
||||
+++ b/gdb/testsuite/gdb.dwarf2/rh-dwarf4-x86_64.exp
|
||||
@@ -0,0 +1,42 @@
|
||||
@ -252,3 +265,6 @@ new file mode 100644
|
||||
+clean_restart $executable
|
||||
+
|
||||
+gdb_test "ptype main" {type = int \(void\)}
|
||||
--
|
||||
2.14.3
|
||||
|
||||
|
@ -3,15 +3,22 @@ From: Fedora GDB patches <invalid@email.com>
|
||||
Date: Fri, 27 Oct 2017 21:07:50 +0200
|
||||
Subject: gdb-bz634108-solib_address.patch
|
||||
|
||||
FileName: gdb-bz634108-solib_address.patch
|
||||
|
||||
;; Verify GDB Python built-in function gdb.solib_address exists (BZ # 634108).
|
||||
;;=fedoratest
|
||||
|
||||
Fix gdb.solib_address (fix by Phil Muldoon).
|
||||
|
||||
s/solib_address/solib_name/ during upstreaming.
|
||||
---
|
||||
.../gdb.python/rh634108-solib_address.exp | 24 ++++++++++++++++++++++
|
||||
1 file changed, 24 insertions(+)
|
||||
create mode 100644 gdb/testsuite/gdb.python/rh634108-solib_address.exp
|
||||
|
||||
diff --git a/gdb/testsuite/gdb.python/rh634108-solib_address.exp b/gdb/testsuite/gdb.python/rh634108-solib_address.exp
|
||||
new file mode 100644
|
||||
index 0000000000..c0451cf09e
|
||||
--- /dev/null
|
||||
+++ b/gdb/testsuite/gdb.python/rh634108-solib_address.exp
|
||||
@@ -0,0 +1,24 @@
|
||||
@ -39,3 +46,6 @@ new file mode 100644
|
||||
+if { [skip_python_tests] } { continue }
|
||||
+
|
||||
+gdb_test "python print gdb.solib_name(-1)" "None" "gdb.solib_name exists"
|
||||
--
|
||||
2.14.3
|
||||
|
||||
|
@ -3,10 +3,16 @@ From: Fedora GDB patches <invalid@email.com>
|
||||
Date: Fri, 27 Oct 2017 21:07:50 +0200
|
||||
Subject: gdb-ccache-workaround.patch
|
||||
|
||||
FileName: gdb-ccache-workaround.patch
|
||||
|
||||
;; Workaround ccache making lineno non-zero for command-line definitions.
|
||||
;;=fedoratest: ccache is rarely used and it is even fixed now.
|
||||
---
|
||||
gdb/testsuite/gdb.base/macscp.exp | 8 ++++++++
|
||||
1 file changed, 8 insertions(+)
|
||||
|
||||
diff --git a/gdb/testsuite/gdb.base/macscp.exp b/gdb/testsuite/gdb.base/macscp.exp
|
||||
index 27dc991ce9..a3b9458b44 100644
|
||||
--- a/gdb/testsuite/gdb.base/macscp.exp
|
||||
+++ b/gdb/testsuite/gdb.base/macscp.exp
|
||||
@@ -25,6 +25,14 @@ if { [test_compiler_info "gcc-*"] || [test_compiler_info "clang-*"] } {
|
||||
@ -24,3 +30,6 @@ diff --git a/gdb/testsuite/gdb.base/macscp.exp b/gdb/testsuite/gdb.base/macscp.e
|
||||
# Generate the intermediate object file. This is required by Darwin to
|
||||
# have access to the .debug_macinfo section.
|
||||
if {[gdb_compile "${srcdir}/${subdir}/macscp1.c" "${objfile}" \
|
||||
--
|
||||
2.14.3
|
||||
|
||||
|
@ -1,56 +0,0 @@
|
||||
diff -Nrup a/gnulib/import/m4/alloca.m4 b/gnulib/import/m4/alloca.m4
|
||||
--- a/gnulib/import/m4/alloca.m4 2019-11-18 18:49:20.000000000 -0700
|
||||
+++ b/gnulib/import/m4/alloca.m4 2020-01-11 01:07:36.200483085 -0700
|
||||
@@ -89,7 +89,7 @@ AC_CACHE_CHECK([stack direction for C al
|
||||
[ac_cv_c_stack_direction],
|
||||
[AC_RUN_IFELSE([AC_LANG_SOURCE(
|
||||
[AC_INCLUDES_DEFAULT
|
||||
-int
|
||||
+__attribute__ (noinline,noclone)) int
|
||||
find_stack_direction (int *addr, int depth)
|
||||
{
|
||||
int dir, dummy = 0;
|
||||
diff -Nrup a/libiberty/aclocal.m4 b/libiberty/aclocal.m4
|
||||
--- a/libiberty/aclocal.m4 2019-01-19 09:01:34.000000000 -0700
|
||||
+++ b/libiberty/aclocal.m4 2020-01-09 22:00:27.183312982 -0700
|
||||
@@ -147,7 +147,7 @@ if test $ac_cv_os_cray = yes; then
|
||||
fi
|
||||
|
||||
AC_CACHE_CHECK(stack direction for C alloca, ac_cv_c_stack_direction,
|
||||
-[AC_TRY_RUN([find_stack_direction ()
|
||||
+[AC_TRY_RUN([__attribute__ ((noclone,noinline)) find_stack_direction ()
|
||||
{
|
||||
static char *addr = 0;
|
||||
auto char dummy;
|
||||
diff --git a/config/intdiv0.m4 b/config/intdiv0.m4
|
||||
index 55dddcf1..ba906efc 100644
|
||||
--- a/config/intdiv0.m4
|
||||
+++ b/config/intdiv0.m4
|
||||
@@ -31,10 +31,10 @@ sigfpe_handler (sig) int sig;
|
||||
exit (sig != SIGFPE);
|
||||
}
|
||||
|
||||
-int x = 1;
|
||||
-int y = 0;
|
||||
-int z;
|
||||
-int nan;
|
||||
+volatile int x = 1;
|
||||
+volatile int y = 0;
|
||||
+volatile int z;
|
||||
+volatile int nan;
|
||||
|
||||
int main ()
|
||||
{
|
||||
diff --git a/libiberty/configure.ac b/libiberty/configure.ac
|
||||
index f1ce7601..fc20d228 100644
|
||||
--- a/libiberty/configure.ac
|
||||
+++ b/libiberty/configure.ac
|
||||
@@ -661,7 +661,7 @@ if test -z "${setobjs}"; then
|
||||
for v in $vars; do
|
||||
AC_MSG_CHECKING([for $v])
|
||||
AC_CACHE_VAL(libiberty_cv_var_$v,
|
||||
- [AC_LINK_IFELSE([AC_LANG_PROGRAM([[int *p;]],[[extern int $v []; p = $v;]])],
|
||||
+ [AC_LINK_IFELSE([AC_LANG_PROGRAM([[__attribute__ ((used)) int *p;]],[[extern int $v []; p = $v;]])],
|
||||
[eval "libiberty_cv_var_$v=yes"],
|
||||
[eval "libiberty_cv_var_$v=no"])])
|
||||
if eval "test \"`echo '$libiberty_cv_var_'$v`\" = yes"; then
|
@ -3,13 +3,19 @@ From: Fedora GDB patches <invalid@email.com>
|
||||
Date: Fri, 27 Oct 2017 21:07:50 +0200
|
||||
Subject: gdb-container-rh-pkg.patch
|
||||
|
||||
FileName: gdb-container-rh-pkg.patch
|
||||
|
||||
;; Add messages suggesting more recent RHEL gdbserver (RH BZ 1321114).
|
||||
;;=fedora
|
||||
---
|
||||
gdb/remote.c | 12 +++++++++++-
|
||||
1 file changed, 11 insertions(+), 1 deletion(-)
|
||||
|
||||
diff --git a/gdb/remote.c b/gdb/remote.c
|
||||
index 86777f1e5e..fc003c0736 100644
|
||||
--- a/gdb/remote.c
|
||||
+++ b/gdb/remote.c
|
||||
@@ -14031,7 +14031,17 @@ remote_target::pid_to_exec_file (int pid)
|
||||
@@ -13437,7 +13437,17 @@ remote_pid_to_exec_file (struct target_ops *self, int pid)
|
||||
char *annex = NULL;
|
||||
|
||||
if (packet_support (PACKET_qXfer_exec_file) != PACKET_ENABLE)
|
||||
@ -26,5 +32,8 @@ diff --git a/gdb/remote.c b/gdb/remote.c
|
||||
+ return NULL;
|
||||
+ }
|
||||
|
||||
inferior *inf = find_inferior_pid (this, pid);
|
||||
inf = find_inferior_pid (pid);
|
||||
if (inf == NULL)
|
||||
--
|
||||
2.14.3
|
||||
|
||||
|
@ -3,6 +3,8 @@ From: Fedora GDB patches <invalid@email.com>
|
||||
Date: Fri, 27 Oct 2017 21:07:50 +0200
|
||||
Subject: gdb-core-open-vdso-warning.patch
|
||||
|
||||
FileName: gdb-core-open-vdso-warning.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@.*>
|
||||
@ -15,8 +17,12 @@ Subject: [patch] Fix GNU/Linux core open: Can't read pathname for load map: Inp
|
||||
commit 7d760051ffb8a23cdc51342d4e6243fbc462f73f
|
||||
Author: Ulrich Weigand <uweigand@de.ibm.com>
|
||||
Date: Wed Sep 25 11:52:50 2013 +0000
|
||||
---
|
||||
gdb/testsuite/gdb.base/solib-symbol.exp | 23 +++++++++++++++++++++--
|
||||
1 file changed, 21 insertions(+), 2 deletions(-)
|
||||
|
||||
diff --git a/gdb/testsuite/gdb.base/solib-symbol.exp b/gdb/testsuite/gdb.base/solib-symbol.exp
|
||||
index 20c1d47a03..893efe0b2d 100644
|
||||
--- a/gdb/testsuite/gdb.base/solib-symbol.exp
|
||||
+++ b/gdb/testsuite/gdb.base/solib-symbol.exp
|
||||
@@ -29,6 +29,7 @@ set testfile "solib-symbol-main"
|
||||
@ -27,7 +33,7 @@ diff --git a/gdb/testsuite/gdb.base/solib-symbol.exp b/gdb/testsuite/gdb.base/so
|
||||
|
||||
if [get_compiler_info] {
|
||||
return -1
|
||||
@@ -71,8 +72,26 @@ gdb_test "br foo2" \
|
||||
@@ -72,8 +73,26 @@ gdb_test "br foo2" \
|
||||
"Breakpoint.*: foo2. .2 locations..*" \
|
||||
"foo2 in mdlib"
|
||||
|
||||
@ -56,3 +62,6 @@ diff --git a/gdb/testsuite/gdb.base/solib-symbol.exp b/gdb/testsuite/gdb.base/so
|
||||
+gdb_run_cmd
|
||||
+gdb_test "" "warning: Could not load shared library symbols for \[0-9\]+ libraries,.*\r\nBreakpoint \[0-9\]+, main .*" \
|
||||
+ "warning for missing libraries"
|
||||
--
|
||||
2.14.3
|
||||
|
||||
|
@ -3,12 +3,24 @@ From: Fedora GDB patches <invalid@email.com>
|
||||
Date: Fri, 27 Oct 2017 21:07:50 +0200
|
||||
Subject: gdb-dts-rhel6-python-compat.patch
|
||||
|
||||
FileName: gdb-dts-rhel6-python-compat.patch
|
||||
|
||||
;; [rhel6] DTS backward Python compatibility API (BZ 1020004, Phil Muldoon).
|
||||
;;=fedora
|
||||
|
||||
https://bugzilla.redhat.com/show_bug.cgi?id=1020004
|
||||
---
|
||||
gdb/data-directory/Makefile.in | 3 +
|
||||
gdb/python/lib/gdb/FrameWrapper.py | 122 ++++++++++++++++++++++++++++++++
|
||||
gdb/python/lib/gdb/backtrace.py | 42 +++++++++++
|
||||
gdb/python/lib/gdb/command/backtrace.py | 106 +++++++++++++++++++++++++++
|
||||
4 files changed, 273 insertions(+)
|
||||
create mode 100644 gdb/python/lib/gdb/FrameWrapper.py
|
||||
create mode 100644 gdb/python/lib/gdb/backtrace.py
|
||||
create mode 100644 gdb/python/lib/gdb/command/backtrace.py
|
||||
|
||||
diff --git a/gdb/data-directory/Makefile.in b/gdb/data-directory/Makefile.in
|
||||
index 753e0b69a3..5c7c0b4c2e 100644
|
||||
--- a/gdb/data-directory/Makefile.in
|
||||
+++ b/gdb/data-directory/Makefile.in
|
||||
@@ -71,6 +71,8 @@ PYTHON_FILE_LIST = \
|
||||
@ -30,6 +42,7 @@ diff --git a/gdb/data-directory/Makefile.in b/gdb/data-directory/Makefile.in
|
||||
gdb/command/prompt.py \
|
||||
diff --git a/gdb/python/lib/gdb/FrameWrapper.py b/gdb/python/lib/gdb/FrameWrapper.py
|
||||
new file mode 100644
|
||||
index 0000000000..34ba4a2a12
|
||||
--- /dev/null
|
||||
+++ b/gdb/python/lib/gdb/FrameWrapper.py
|
||||
@@ -0,0 +1,122 @@
|
||||
@ -157,6 +170,7 @@ new file mode 100644
|
||||
+ return getattr (self.frame, name)
|
||||
diff --git a/gdb/python/lib/gdb/backtrace.py b/gdb/python/lib/gdb/backtrace.py
|
||||
new file mode 100644
|
||||
index 0000000000..06c893f239
|
||||
--- /dev/null
|
||||
+++ b/gdb/python/lib/gdb/backtrace.py
|
||||
@@ -0,0 +1,42 @@
|
||||
@ -204,6 +218,7 @@ new file mode 100644
|
||||
+
|
||||
diff --git a/gdb/python/lib/gdb/command/backtrace.py b/gdb/python/lib/gdb/command/backtrace.py
|
||||
new file mode 100644
|
||||
index 0000000000..eeea9093e8
|
||||
--- /dev/null
|
||||
+++ b/gdb/python/lib/gdb/command/backtrace.py
|
||||
@@ -0,0 +1,106 @@
|
||||
@ -313,3 +328,6 @@ new file mode 100644
|
||||
+ pair[1].describe (sys.stdout, full)
|
||||
+
|
||||
+FilteringBacktrace()
|
||||
--
|
||||
2.14.3
|
||||
|
||||
|
@ -3,24 +3,31 @@ From: Fedora GDB patches <invalid@email.com>
|
||||
Date: Fri, 27 Oct 2017 21:07:50 +0200
|
||||
Subject: gdb-fedora-libncursesw.patch
|
||||
|
||||
FileName: gdb-fedora-libncursesw.patch
|
||||
|
||||
;; Force libncursesw over libncurses to match the includes (RH BZ 1270534).
|
||||
;;=push+jan
|
||||
|
||||
Fedora: Force libncursesw over libncurses to match the includes.
|
||||
https://bugzilla.redhat.com/show_bug.cgi?id=1270534
|
||||
---
|
||||
gdb/configure | 6 ++++--
|
||||
gdb/configure.ac | 6 ++++--
|
||||
2 files changed, 8 insertions(+), 4 deletions(-)
|
||||
|
||||
diff --git a/gdb/configure b/gdb/configure
|
||||
index 6fb5b5b509..db849572b5 100755
|
||||
--- a/gdb/configure
|
||||
+++ b/gdb/configure
|
||||
@@ -9649,6 +9649,7 @@ if test x"$prefer_curses" = xyes; then
|
||||
@@ -9238,6 +9238,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.
|
||||
+ # Fedora: Force libncursesw over libncurses to match the includes.
|
||||
{ $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 :
|
||||
@@ -9673,7 +9674,7 @@ return waddstr ();
|
||||
if test "${ac_cv_search_waddstr+set}" = set; then :
|
||||
@@ -9262,7 +9263,7 @@ return waddstr ();
|
||||
return 0;
|
||||
}
|
||||
_ACEOF
|
||||
@ -29,27 +36,28 @@ diff --git a/gdb/configure b/gdb/configure
|
||||
if test -z "$ac_lib"; then
|
||||
ac_res="none required"
|
||||
else
|
||||
@@ -9747,6 +9748,7 @@ case $host_os in
|
||||
@@ -9336,6 +9337,7 @@ case $host_os in
|
||||
esac
|
||||
|
||||
# These are the libraries checked by Readline.
|
||||
+# Fedora: Force libncursesw over libncurses to match the includes.
|
||||
{ $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 :
|
||||
@@ -9771,7 +9773,7 @@ return tgetent ();
|
||||
if test "${ac_cv_search_tgetent+set}" = set; then :
|
||||
@@ -9360,7 +9362,7 @@ return tgetent ();
|
||||
return 0;
|
||||
}
|
||||
_ACEOF
|
||||
-for ac_lib in '' termcap tinfow tinfo curses ncursesw ncurses; do
|
||||
+for ac_lib in '' ncursesw; do
|
||||
-for ac_lib in '' termcap tinfo curses ncursesw ncurses; do
|
||||
+for ac_lib in '' termcap tinfo ncursesw; do
|
||||
if test -z "$ac_lib"; then
|
||||
ac_res="none required"
|
||||
else
|
||||
diff --git a/gdb/configure.ac b/gdb/configure.ac
|
||||
index d891c7bccc..4412e25450 100644
|
||||
--- a/gdb/configure.ac
|
||||
+++ b/gdb/configure.ac
|
||||
@@ -712,7 +712,8 @@ if test x"$prefer_curses" = xyes; then
|
||||
@@ -755,7 +755,8 @@ 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.
|
||||
@ -59,13 +67,16 @@ diff --git a/gdb/configure.ac b/gdb/configure.ac
|
||||
|
||||
if test "$ac_cv_search_waddstr" != no; then
|
||||
curses_found=yes
|
||||
@@ -754,7 +755,8 @@ case $host_os in
|
||||
@@ -797,7 +798,8 @@ case $host_os in
|
||||
esac
|
||||
|
||||
# These are the libraries checked by Readline.
|
||||
-AC_SEARCH_LIBS(tgetent, [termcap tinfow tinfo curses ncursesw ncurses])
|
||||
-AC_SEARCH_LIBS(tgetent, [termcap tinfo curses ncursesw ncurses])
|
||||
+# Fedora: Force libncursesw over libncurses to match the includes.
|
||||
+AC_SEARCH_LIBS(tgetent, [ncursesw])
|
||||
+AC_SEARCH_LIBS(tgetent, [termcap tinfo ncursesw])
|
||||
|
||||
if test "$ac_cv_search_tgetent" = no; then
|
||||
CONFIG_OBS="$CONFIG_OBS stub-termcap.o"
|
||||
--
|
||||
2.14.3
|
||||
|
||||
|
45
gdb-follow-child-stale-parent.patch
Normal file
45
gdb-follow-child-stale-parent.patch
Normal file
@ -0,0 +1,45 @@
|
||||
From FEDORA_PATCHES Mon Sep 17 00:00:00 2001
|
||||
From: Fedora GDB patches <invalid@email.com>
|
||||
Date: Fri, 27 Oct 2017 21:07:50 +0200
|
||||
Subject: gdb-follow-child-stale-parent.patch
|
||||
|
||||
FileName: gdb-follow-child-stale-parent.patch
|
||||
|
||||
;; Fix regression by python on ia64 due to stale current frame.
|
||||
;;=push+jan
|
||||
|
||||
Problem occurs with python and its get_current_arch () as it selects
|
||||
selected_frame and current_frame while still inferior_ptid is valid for the
|
||||
original parent. But since this place it is already attached and later
|
||||
unwinders try to access it, breaking:
|
||||
-PASS: gdb.threads/watchpoint-fork.exp: child: singlethreaded: breakpoint after the first fork
|
||||
-PASS: gdb.threads/watchpoint-fork.exp: child: singlethreaded: watchpoint after the first fork
|
||||
-PASS: gdb.threads/watchpoint-fork.exp: child: singlethreaded: breakpoint after the second fork
|
||||
-PASS: gdb.threads/watchpoint-fork.exp: child: singlethreaded: watchpoint after the second fork
|
||||
-PASS: gdb.threads/watchpoint-fork.exp: child: singlethreaded: finish
|
||||
+FAIL: gdb.threads/watchpoint-fork.exp: child: singlethreaded: breakpoint after the first fork
|
||||
+FAIL: gdb.threads/watchpoint-fork.exp: child: singlethreaded: watchpoint after the first fork
|
||||
+FAIL: gdb.threads/watchpoint-fork.exp: child: singlethreaded: breakpoint after the second fork
|
||||
+FAIL: gdb.threads/watchpoint-fork.exp: child: singlethreaded: watchpoint after the second fork
|
||||
+FAIL: gdb.threads/watchpoint-fork.exp: child: singlethreaded: finish
|
||||
---
|
||||
gdb/infrun.c | 3 +++
|
||||
1 file changed, 3 insertions(+)
|
||||
|
||||
diff --git a/gdb/infrun.c b/gdb/infrun.c
|
||||
index dcf022bd50..b468d02fd6 100644
|
||||
--- a/gdb/infrun.c
|
||||
+++ b/gdb/infrun.c
|
||||
@@ -749,6 +749,9 @@ follow_fork (void)
|
||||
}
|
||||
else
|
||||
{
|
||||
+ /* Possibly referenced PARENT is no longer valid. */
|
||||
+ reinit_frame_cache ();
|
||||
+
|
||||
/* This pending follow fork event is now handled, one way
|
||||
or another. The previous selected thread may be gone
|
||||
from the lists by now, but if it is still around, need
|
||||
--
|
||||
2.14.3
|
||||
|
@ -1,7 +1,9 @@
|
||||
From FEDORA_PATCHES Mon Sep 17 00:00:00 2001
|
||||
From: Fedora GDB patches <invalid@email.com>
|
||||
Date: Fri, 27 Oct 2017 21:07:50 +0200
|
||||
Subject: gdb-fortran-frame-string.patch
|
||||
Subject: Display Fortran strings in backtraces
|
||||
|
||||
FileName: gdb-fortran-frame-string.patch
|
||||
|
||||
;; Display Fortran strings in backtraces.
|
||||
;;=fedoratest
|
||||
@ -27,9 +29,16 @@ No regressions on {x86_64,x86_64-m32,i686}-fedora22pre-linux-gnu.
|
||||
|
||||
Thanks,
|
||||
Jan
|
||||
---
|
||||
gdb/testsuite/gdb.fortran/fortran-frame-string.exp | 36 ++++++++++++++++++++++
|
||||
gdb/testsuite/gdb.fortran/fortran-frame-string.f90 | 28 +++++++++++++++++
|
||||
2 files changed, 64 insertions(+)
|
||||
create mode 100644 gdb/testsuite/gdb.fortran/fortran-frame-string.exp
|
||||
create mode 100644 gdb/testsuite/gdb.fortran/fortran-frame-string.f90
|
||||
|
||||
diff --git a/gdb/testsuite/gdb.fortran/fortran-frame-string.exp b/gdb/testsuite/gdb.fortran/fortran-frame-string.exp
|
||||
new file mode 100644
|
||||
index 0000000000..7114afd440
|
||||
--- /dev/null
|
||||
+++ b/gdb/testsuite/gdb.fortran/fortran-frame-string.exp
|
||||
@@ -0,0 +1,36 @@
|
||||
@ -71,6 +80,7 @@ new file mode 100644
|
||||
+gdb_test "frame" { \(s='foo', .*}
|
||||
diff --git a/gdb/testsuite/gdb.fortran/fortran-frame-string.f90 b/gdb/testsuite/gdb.fortran/fortran-frame-string.f90
|
||||
new file mode 100644
|
||||
index 0000000000..3d1576fb1f
|
||||
--- /dev/null
|
||||
+++ b/gdb/testsuite/gdb.fortran/fortran-frame-string.f90
|
||||
@@ -0,0 +1,28 @@
|
||||
@ -102,3 +112,6 @@ new file mode 100644
|
||||
+ program main
|
||||
+ call f ('foo')
|
||||
+ end
|
||||
--
|
||||
2.14.3
|
||||
|
||||
|
179
gdb-gdb-add-index-script.patch
Normal file
179
gdb-gdb-add-index-script.patch
Normal file
@ -0,0 +1,179 @@
|
||||
From FEDORA_PATCHES Mon Sep 17 00:00:00 2001
|
||||
From: Fedora GDB patches <invalid@email.com>
|
||||
Date: Fri, 27 Oct 2017 21:07:50 +0200
|
||||
Subject: RFC: add DWARF index support
|
||||
|
||||
FileName: gdb-gdb-add-index-script.patch
|
||||
|
||||
;; Provide /usr/bin/gdb-add-index for rpm-build (Tom Tromey).
|
||||
;;=push: Re-check against the upstream version.
|
||||
|
||||
http://sourceware.org/ml/gdb-patches/2010-07/msg00184.html
|
||||
|
||||
Jan Kratochvil: Fixed $d -> $dir.
|
||||
Jan Kratochvil: Remove /dev/null redirection.
|
||||
|
||||
>>>>> "Tom" == Tom Tromey <tromey@redhat.com> writes:
|
||||
|
||||
Tom> This patch series adds support for a DWARF index to gdb.
|
||||
|
||||
Roland suggested we wrap up the index-creation code into a helper
|
||||
script.
|
||||
|
||||
I'm not sure if this is something people would want in gdb proper, but I
|
||||
figured I would send it here just in case.
|
||||
|
||||
Tom
|
||||
|
||||
2010-07-09 Tom Tromey <tromey@redhat.com>
|
||||
|
||||
* Makefile.in (install-only): Install gdb-add-index.
|
||||
* gdb-add-index: New file.
|
||||
|
||||
2010-07-09 Tom Tromey <tromey@redhat.com>
|
||||
|
||||
* gdb.texinfo (Index Files): Mention gdb-add-index.
|
||||
|
||||
>From 30714fe719e61baea03d0dc5793eb0d564faebb7 Mon Sep 17 00:00:00 2001
|
||||
From: Tom Tromey <tromey@redhat.com>
|
||||
Date: Fri, 9 Jul 2010 11:17:54 -0600
|
||||
Subject: [PATCH 4/4] add gdb-add-index
|
||||
Subject: [PATCH 4/4] add gdb-add-index
|
||||
---
|
||||
gdb/Makefile.in | 9 +++++++++
|
||||
gdb/doc/Makefile.in | 9 ++++++++-
|
||||
gdb/doc/gdb.texinfo | 57 +++++++++++++++++++++++++++++++++++++++++++++++++++++
|
||||
3 files changed, 74 insertions(+), 1 deletion(-)
|
||||
|
||||
diff --git a/gdb/Makefile.in b/gdb/Makefile.in
|
||||
index e77d6a5c03..3142ad6af1 100644
|
||||
--- a/gdb/Makefile.in
|
||||
+++ b/gdb/Makefile.in
|
||||
@@ -1770,6 +1770,15 @@ install-only: install-gstack $(CONFIG_INSTALL)
|
||||
$(INSTALL_SCRIPT) gcore \
|
||||
$(DESTDIR)$(bindir)/$$transformed_name; \
|
||||
fi
|
||||
+ transformed_name=`t='$(program_transform_name)'; \
|
||||
+ echo gdb-add-index | sed -e "$$t"` ; \
|
||||
+ if test "x$$transformed_name" = x; then \
|
||||
+ transformed_name=gdb-add-index ; \
|
||||
+ else \
|
||||
+ true ; \
|
||||
+ fi ; \
|
||||
+ $(INSTALL_PROGRAM) $(srcdir)/contrib/gdb-add-index.sh \
|
||||
+ $(DESTDIR)$(bindir)/$$transformed_name$(EXEEXT)
|
||||
@$(MAKE) DO=install "DODIRS=$(SUBDIRS)" $(FLAGS_TO_PASS) subdir_do
|
||||
|
||||
install-strip:
|
||||
diff --git a/gdb/doc/Makefile.in b/gdb/doc/Makefile.in
|
||||
index eafadee899..0323bc4ecb 100644
|
||||
--- a/gdb/doc/Makefile.in
|
||||
+++ b/gdb/doc/Makefile.in
|
||||
@@ -174,7 +174,7 @@ POD2MAN5 = pod2man --center="GNU Development Tools" \
|
||||
--release="gdb-`sed q version.subst`" --section=5
|
||||
|
||||
# List of man pages generated from gdb.texi
|
||||
-MAN1S = gdb.1 gdbserver.1 gcore.1
|
||||
+MAN1S = gdb.1 gdbserver.1 gcore.1 gdb-add-index.1
|
||||
MAN5S = gdbinit.5
|
||||
MANS = $(MAN1S) $(MAN5S)
|
||||
|
||||
@@ -633,6 +633,13 @@ gcore.1: $(GDB_DOC_FILES)
|
||||
mv -f $@.T$$$$ $@) || (rm -f $@.T$$$$ && exit 1)
|
||||
rm -f gcore.pod
|
||||
|
||||
+gdb-add-index.1: $(GDB_DOC_FILES)
|
||||
+ touch $@
|
||||
+ -$(TEXI2POD) $(MANCONF) -Dgdb-add-index < $(srcdir)/gdb.texinfo > gdb-add-index.pod
|
||||
+ -($(POD2MAN1) gdb-add-index.pod | sed -e '/^.if n .na/d' > $@.T$$$$ && \
|
||||
+ mv -f $@.T$$$$ $@) || (rm -f $@.T$$$$ && exit 1)
|
||||
+ rm -f gdb-add-index.pod
|
||||
+
|
||||
gdbinit.5: $(GDB_DOC_FILES)
|
||||
touch $@
|
||||
-$(TEXI2POD) $(MANCONF) -Dgdbinit < $(srcdir)/gdb.texinfo > gdbinit.pod
|
||||
diff --git a/gdb/doc/gdb.texinfo b/gdb/doc/gdb.texinfo
|
||||
index 2f2cbd3dea..7b99ae1551 100644
|
||||
--- a/gdb/doc/gdb.texinfo
|
||||
+++ b/gdb/doc/gdb.texinfo
|
||||
@@ -19796,6 +19796,14 @@ There are currently some limitation on indices. They only work when
|
||||
for DWARF debugging information, not stabs. And, they do not
|
||||
currently work for programs using Ada.
|
||||
|
||||
+@value{GDBN} comes with a program, @command{gdb-add-index}, which can
|
||||
+be used to add the index to a symbol file. It takes the symbol file
|
||||
+as its only argument:
|
||||
+
|
||||
+@smallexample
|
||||
+$ gdb-add-index symfile
|
||||
+@end smallexample
|
||||
+
|
||||
@node Symbol Errors
|
||||
@section Errors Reading Symbol Files
|
||||
|
||||
@@ -42759,6 +42767,7 @@ switch (die->tag)
|
||||
* gdbserver man:: Remote Server for the GNU Debugger man page
|
||||
* gcore man:: Generate a core file of a running program
|
||||
* gdbinit man:: gdbinit scripts
|
||||
+* gdb-add-index man:: Add index files to speed up GDB
|
||||
@end menu
|
||||
|
||||
@node gdb man
|
||||
@@ -43435,6 +43444,54 @@ Richard M. Stallman and Roland H. Pesch, July 1991.
|
||||
@end ifset
|
||||
@c man end
|
||||
|
||||
+@node gdb-add-index man
|
||||
+@heading gdb-add-index
|
||||
+
|
||||
+@c man title gdb-add-index Add index files to speed up GDB
|
||||
+
|
||||
+@c man begin SYNOPSIS gdb-add-index
|
||||
+gdb-add-index @var{filename}
|
||||
+@c man end
|
||||
+
|
||||
+@c man begin DESCRIPTION gdb-add-index
|
||||
+When GDB finds a symbol file, it scans the symbols in the file in order
|
||||
+to construct an internal symbol table. This lets most GDB operations
|
||||
+work quickly--at the cost of a delay early on. For large programs,
|
||||
+this delay can be quite lengthy, so GDB provides a way to build an
|
||||
+index, which speeds up startup.
|
||||
+
|
||||
+To determine whether a file contains such an index, use the command
|
||||
+@command{readelf -S filename}: the index is stored in a section named
|
||||
+@code{.gdb_index}. Note that the index is never generated for files that do
|
||||
+not contain DWARF debug information (sections named @code{.debug_*}).
|
||||
+
|
||||
+See more in
|
||||
+@ifset man
|
||||
+the @value{GDBN} manual in node @code{Index Files}
|
||||
+-- shell command @code{info -f gdb -n 'Index Files'}.
|
||||
+@end ifset
|
||||
+@ifclear man
|
||||
+@ref{Index Files}.
|
||||
+@end ifclear
|
||||
+@c man end
|
||||
+
|
||||
+@c man begin SEEALSO gdb-add-index
|
||||
+@ifset man
|
||||
+The full documentation for @value{GDBN} is maintained as a Texinfo manual.
|
||||
+If the @code{info} and @code{gdb} programs and @value{GDBN}'s Texinfo
|
||||
+documentation are properly installed at your site, the command
|
||||
+
|
||||
+@smallexample
|
||||
+info gdb
|
||||
+@end smallexample
|
||||
+
|
||||
+should give you access to the complete manual.
|
||||
+
|
||||
+@cite{Using GDB: A Guide to the GNU Source-Level Debugger},
|
||||
+Richard M. Stallman and Roland H. Pesch, July 1991.
|
||||
+@end ifset
|
||||
+@c man end
|
||||
+
|
||||
@include gpl.texi
|
||||
|
||||
@node GNU Free Documentation License
|
||||
--
|
||||
2.14.3
|
||||
|
@ -3,14 +3,53 @@ From: Fedora GDB patches <invalid@email.com>
|
||||
Date: Fri, 27 Oct 2017 21:07:50 +0200
|
||||
Subject: gdb-glibc-strstr-workaround.patch
|
||||
|
||||
;; Workaround PR libc/14166 for inferior calls of strstr.
|
||||
;;=fedoratest: Compatibility with RHELs (unchecked which ones).
|
||||
FileName: gdb-glibc-strstr-workaround.patch
|
||||
|
||||
;; Workaround PR libc/14166 for inferior calls of strstr.
|
||||
;;=fedora: Compatibility with RHELs (unchecked which ones).
|
||||
---
|
||||
gdb/dwarf2read.c | 20 ++++
|
||||
.../gdb.base/gnu-ifunc-strstr-workaround.exp | 108 +++++++++++++++++++++
|
||||
2 files changed, 128 insertions(+)
|
||||
create mode 100644 gdb/testsuite/gdb.base/gnu-ifunc-strstr-workaround.exp
|
||||
|
||||
diff --git a/gdb/dwarf2read.c b/gdb/dwarf2read.c
|
||||
index c8db955f2f..6ebe00f542 100644
|
||||
--- a/gdb/dwarf2read.c
|
||||
+++ b/gdb/dwarf2read.c
|
||||
@@ -21328,6 +21328,26 @@ new_symbol_full (struct die_info *die, struct type *type, struct dwarf2_cu *cu,
|
||||
/* Cache this symbol's name and the name's demangled form (if any). */
|
||||
SYMBOL_SET_LANGUAGE (sym, cu->language, &objfile->objfile_obstack);
|
||||
linkagename = dwarf2_physname (name, die, cu);
|
||||
+
|
||||
+ /* Workaround for:
|
||||
+ * invalid IFUNC DW_AT_linkage_name: memmove strstr time
|
||||
+ * http://sourceware.org/bugzilla/show_bug.cgi?id=14166 */
|
||||
+ if (strcmp (linkagename, "strstr") == 0
|
||||
+ && strstr (objfile_name (objfile), "/libc") != NULL)
|
||||
+ {
|
||||
+ struct objfile *objfile_msym;
|
||||
+ struct bound_minimal_symbol bmsym;
|
||||
+
|
||||
+ if (objfile->separate_debug_objfile_backlink)
|
||||
+ objfile_msym = objfile->separate_debug_objfile_backlink;
|
||||
+ else
|
||||
+ objfile_msym = objfile;
|
||||
+ bmsym = lookup_minimal_symbol ("strstr", NULL, objfile_msym);
|
||||
+ if (bmsym.minsym != NULL
|
||||
+ && MSYMBOL_TYPE (bmsym.minsym) == mst_text_gnu_ifunc)
|
||||
+ linkagename = "__strstr";
|
||||
+ }
|
||||
+
|
||||
SYMBOL_SET_NAMES (sym, linkagename, strlen (linkagename), 0, objfile);
|
||||
|
||||
/* Fortran does not have mangling standard and the mangling does differ
|
||||
diff --git a/gdb/testsuite/gdb.base/gnu-ifunc-strstr-workaround.exp b/gdb/testsuite/gdb.base/gnu-ifunc-strstr-workaround.exp
|
||||
new file mode 100644
|
||||
index 0000000000..5469cd7354
|
||||
--- /dev/null
|
||||
+++ b/gdb/testsuite/gdb.base/gnu-ifunc-strstr-workaround.exp
|
||||
@@ -0,0 +1,115 @@
|
||||
@@ -0,0 +1,108 @@
|
||||
+# Copyright (C) 2012 Free Software Foundation, Inc.
|
||||
+
|
||||
+# This program is free software; you can redistribute it and/or modify
|
||||
@ -73,10 +112,6 @@ new file mode 100644
|
||||
+ set addr $expect_out(1,string)
|
||||
+ pass "$test (fixed glibc)"
|
||||
+ }
|
||||
+ -re " = {<text gnu-indirect-function variable, no debug info>} (0x\[0-9a-f\]+) <__libc_strstr_ifunc>\r\n$gdb_prompt $" {
|
||||
+ set addr $expect_out(1,string)
|
||||
+ pass "$test (fixed glibc)"
|
||||
+ }
|
||||
+ -re " = {char \\*\\(const char \\*, const char \\*\\)} 0x\[0-9a-f\]+ <strstr>\r\n$gdb_prompt $" {
|
||||
+ untested "$test (gnu-ifunc not in use by glibc)"
|
||||
+ return 0
|
||||
@ -116,9 +151,6 @@ new file mode 100644
|
||||
+ -re " = {<text gnu-indirect-function variable, no debug info>} $addr <__libc_strstr>\r\n$gdb_prompt $" {
|
||||
+ pass "$test (fixed glibc)"
|
||||
+ }
|
||||
+ -re " = {<text gnu-indirect-function variable, no debug info>} $addr <__libc_strstr_ifunc>\r\n$gdb_prompt $" {
|
||||
+ pass "$test (fixed glibc)"
|
||||
+ }
|
||||
+ -re " = {void \\*\\(void\\)} 0x\[0-9a-f\]+ <strstr>\r\n$gdb_prompt $" {
|
||||
+ fail $test
|
||||
+ }
|
||||
@ -126,3 +158,6 @@ new file mode 100644
|
||||
+
|
||||
+gdb_test {print strstr("abc","b")} { = 0x[0-9a-f]+ "bc"}
|
||||
+gdb_test {print strstr("def","e")} { = 0x[0-9a-f]+ "ef"}
|
||||
--
|
||||
2.14.3
|
||||
|
||||
|
@ -1,7 +1,9 @@
|
||||
From FEDORA_PATCHES Mon Sep 17 00:00:00 2001
|
||||
From: Fedora GDB patches <invalid@email.com>
|
||||
Date: Fri, 27 Oct 2017 21:07:50 +0200
|
||||
Subject: gdb-gnat-dwarf-crash-3of3.patch
|
||||
Subject: gdb_assert -> complaint for weird DWARF
|
||||
|
||||
FileName: gdb-gnat-dwarf-crash-3of3.patch
|
||||
|
||||
;; Fix crash of -readnow /usr/lib/debug/usr/bin/gnatbind.debug (BZ 1069211).
|
||||
;;=push+jan
|
||||
@ -38,182 +40,29 @@ gdb/
|
||||
2014-02-24 Jan Kratochvil <jan.kratochvil@redhat.com>
|
||||
|
||||
* dwarf2read.c (process_die): Change gdb_assert to complaint.
|
||||
---
|
||||
gdb/dwarf2read.c | 8 ++++++++
|
||||
1 file changed, 8 insertions(+)
|
||||
|
||||
diff --git a/gdb/dwarf2/read.c b/gdb/dwarf2/read.c
|
||||
--- a/gdb/dwarf2/read.c
|
||||
+++ b/gdb/dwarf2/read.c
|
||||
@@ -10162,6 +10162,13 @@ class process_die_scope
|
||||
diff --git a/gdb/dwarf2read.c b/gdb/dwarf2read.c
|
||||
index fbaa0af64f..2c972d5e74 100644
|
||||
--- a/gdb/dwarf2read.c
|
||||
+++ b/gdb/dwarf2read.c
|
||||
@@ -10612,6 +10612,14 @@ private:
|
||||
static void
|
||||
process_die (struct die_info *die, struct dwarf2_cu *cu)
|
||||
{
|
||||
+ if (die->in_process)
|
||||
+ {
|
||||
+ complaint (_("DIE at 0x%s attempted to be processed twice"),
|
||||
+ sect_offset_str (die->sect_off));
|
||||
+ complaint (&symfile_complaints,
|
||||
+ _("DIE at 0x%x attempted to be processed twice"),
|
||||
+ to_underlying (die->sect_off));
|
||||
+ return;
|
||||
+ }
|
||||
+
|
||||
process_die_scope scope (die, cu);
|
||||
|
||||
switch (die->tag)
|
||||
diff --git a/gdb/linux-nat.c b/gdb/linux-nat.c
|
||||
--- a/gdb/linux-nat.c
|
||||
+++ b/gdb/linux-nat.c
|
||||
@@ -190,6 +190,12 @@ struct linux_nat_target *linux_target;
|
||||
/* Does the current host support PTRACE_GETREGSET? */
|
||||
enum tribool have_ptrace_getregset = TRIBOOL_UNKNOWN;
|
||||
--
|
||||
2.14.3
|
||||
|
||||
+#ifdef NEED_DETACH_SIGSTOP
|
||||
+/* PID of the inferior stopped by SIGSTOP before attaching (or zero). */
|
||||
+static pid_t pid_was_stopped;
|
||||
+
|
||||
+#endif
|
||||
+
|
||||
static unsigned int debug_linux_nat;
|
||||
static void
|
||||
show_debug_linux_nat (struct ui_file *file, int from_tty,
|
||||
@@ -1044,6 +1050,9 @@ linux_nat_post_attach_wait (ptid_t ptid, int *signalled)
|
||||
if (linux_proc_pid_is_stopped (pid))
|
||||
{
|
||||
linux_nat_debug_printf ("Attaching to a stopped process");
|
||||
+#ifdef NEED_DETACH_SIGSTOP
|
||||
+ pid_was_stopped = ptid.pid ();
|
||||
+#endif
|
||||
|
||||
/* The process is definitely stopped. It is in a job control
|
||||
stop, unless the kernel predates the TASK_STOPPED /
|
||||
@@ -1359,6 +1368,25 @@ get_detach_signal (struct lwp_info *lp)
|
||||
return gdb_signal_to_host (signo);
|
||||
}
|
||||
|
||||
+#ifdef NEED_DETACH_SIGSTOP
|
||||
+ /* Workaround RHEL-5 kernel which has unreliable PTRACE_DETACH, SIGSTOP (that
|
||||
+ many TIDs are left unstopped). See RH Bug 496732. */
|
||||
+ if (lp->ptid.pid () == pid_was_stopped)
|
||||
+ {
|
||||
+ int err;
|
||||
+
|
||||
+ errno = 0;
|
||||
+ err = kill_lwp (lp->ptid.lwp (), SIGSTOP);
|
||||
+ if (debug_linux_nat)
|
||||
+ {
|
||||
+ fprintf_unfiltered (gdb_stdlog,
|
||||
+ "SC: lwp kill %d %s\n",
|
||||
+ err,
|
||||
+ errno ? safe_strerror (errno) : "ERRNO-OK");
|
||||
+ }
|
||||
+ }
|
||||
+
|
||||
+#endif
|
||||
return 0;
|
||||
}
|
||||
|
||||
@@ -1502,6 +1530,10 @@ linux_nat_target::detach (inferior *inf, int from_tty)
|
||||
detach_one_lwp (main_lwp, &signo);
|
||||
|
||||
detach_success (inf);
|
||||
+
|
||||
+#ifdef NEED_DETACH_SIGSTOP
|
||||
+ pid_was_stopped = 0;
|
||||
+#endif
|
||||
}
|
||||
}
|
||||
|
||||
@@ -1744,6 +1776,16 @@ linux_nat_target::resume (ptid_t ptid, int step, enum gdb_signal signo)
|
||||
return;
|
||||
}
|
||||
|
||||
+#ifdef NEED_DETACH_SIGSTOP
|
||||
+ /* At this point, we are going to resume the inferior and if we
|
||||
+ have attached to a stopped process, we no longer should leave
|
||||
+ it as stopped if the user detaches. PTID variable has PID set to LWP
|
||||
+ while we need to check the real PID here. */
|
||||
+
|
||||
+ if (!step && lp && pid_was_stopped == lp->ptid.pid ())
|
||||
+ pid_was_stopped = 0;
|
||||
+
|
||||
+#endif
|
||||
if (resume_many)
|
||||
iterate_over_lwps (ptid, [=] (struct lwp_info *info)
|
||||
{
|
||||
@@ -3617,6 +3659,10 @@ linux_nat_target::mourn_inferior ()
|
||||
|
||||
/* Let the arch-specific native code know this process is gone. */
|
||||
linux_target->low_forget_process (pid);
|
||||
+#ifdef NEED_DETACH_SIGSTOP
|
||||
+
|
||||
+ pid_was_stopped = 0;
|
||||
+#endif
|
||||
}
|
||||
|
||||
/* Convert a native/host siginfo object, into/from the siginfo in the
|
||||
diff --git a/gdb/testsuite/gdb.threads/attach-stopped.exp b/gdb/testsuite/gdb.threads/attach-stopped.exp
|
||||
--- a/gdb/testsuite/gdb.threads/attach-stopped.exp
|
||||
+++ b/gdb/testsuite/gdb.threads/attach-stopped.exp
|
||||
@@ -56,7 +56,65 @@ proc corefunc { threadtype } {
|
||||
gdb_reinitialize_dir $srcdir/$subdir
|
||||
gdb_load ${binfile}
|
||||
|
||||
- # Verify that we can attach to the stopped process.
|
||||
+ # Verify that we can attach to the process by first giving its
|
||||
+ # executable name via the file command, and using attach with the
|
||||
+ # process ID.
|
||||
+
|
||||
+ set test "$threadtype: set file, before attach1 to stopped process"
|
||||
+ gdb_test_multiple "file $binfile" "$test" {
|
||||
+ -re "Load new symbol table from.*y or n. $" {
|
||||
+ gdb_test "y" "Reading symbols from $escapedbinfile\.\.\.*done." \
|
||||
+ "$test (re-read)"
|
||||
+ }
|
||||
+ -re "Reading symbols from $escapedbinfile\.\.\.*done.*$gdb_prompt $" {
|
||||
+ pass "$test"
|
||||
+ }
|
||||
+ }
|
||||
+
|
||||
+ set test "$threadtype: attach1 to stopped, after setting file"
|
||||
+ gdb_test_multiple "attach $testpid" "$test" {
|
||||
+ -re "Attaching to program.*`?$escapedbinfile'?, process $testpid.*$gdb_prompt $" {
|
||||
+ pass "$test"
|
||||
+ }
|
||||
+ }
|
||||
+
|
||||
+ # ".*sleep.*clone.*" would fail on s390x as bt stops at START_THREAD there.
|
||||
+ if {[string equal $threadtype threaded]} {
|
||||
+ gdb_test "thread apply all bt" ".*sleep.*start_thread.*" "$threadtype: attach1 to stopped bt"
|
||||
+ } else {
|
||||
+ gdb_test "bt" ".*sleep.*main.*" "$threadtype: attach1 to stopped bt"
|
||||
+ }
|
||||
+
|
||||
+ # Exit and detach the process.
|
||||
+
|
||||
+ gdb_exit
|
||||
+
|
||||
+ # Avoid some race:
|
||||
+ sleep 2
|
||||
+
|
||||
+ if [catch {open /proc/${testpid}/status r} fileid] {
|
||||
+ set line2 "NOTFOUND"
|
||||
+ } else {
|
||||
+ gets $fileid line1;
|
||||
+ gets $fileid line2;
|
||||
+ close $fileid;
|
||||
+ }
|
||||
+
|
||||
+ set test "$threadtype: attach1, exit leaves process stopped"
|
||||
+ if {[string match "*(stopped)*" $line2]} {
|
||||
+ pass $test
|
||||
+ } else {
|
||||
+ fail $test
|
||||
+ }
|
||||
+
|
||||
+ # At this point, the process should still be stopped
|
||||
+
|
||||
+ gdb_start
|
||||
+ gdb_reinitialize_dir $srcdir/$subdir
|
||||
+ gdb_load ${binfile}
|
||||
+
|
||||
+ # Verify that we can attach to the process just by giving the
|
||||
+ # process ID.
|
||||
|
||||
set test "$threadtype: attach2 to stopped, after setting file"
|
||||
gdb_test_multiple "attach $testpid" "$test" {
|
||||
|
@ -3,13 +3,20 @@ From: Fedora GDB patches <invalid@email.com>
|
||||
Date: Fri, 27 Oct 2017 21:07:50 +0200
|
||||
Subject: gdb-jit-reader-multilib.patch
|
||||
|
||||
FileName: gdb-jit-reader-multilib.patch
|
||||
|
||||
;; Fix jit-reader.h for multi-lib.
|
||||
;;=push+jan
|
||||
---
|
||||
gdb/configure | 8 +++++---
|
||||
gdb/configure.ac | 8 +++++---
|
||||
2 files changed, 10 insertions(+), 6 deletions(-)
|
||||
|
||||
diff --git a/gdb/configure b/gdb/configure
|
||||
index 904cc453ad..6fb5b5b509 100755
|
||||
--- a/gdb/configure
|
||||
+++ b/gdb/configure
|
||||
@@ -9968,10 +9968,12 @@ _ACEOF
|
||||
@@ -9528,10 +9528,12 @@ _ACEOF
|
||||
|
||||
|
||||
|
||||
@ -26,9 +33,10 @@ diff --git a/gdb/configure b/gdb/configure
|
||||
TARGET_PTR="unsigned __int128"
|
||||
else
|
||||
diff --git a/gdb/configure.ac b/gdb/configure.ac
|
||||
index 1557760ed8..d891c7bccc 100644
|
||||
--- a/gdb/configure.ac
|
||||
+++ b/gdb/configure.ac
|
||||
@@ -803,10 +803,12 @@ AC_CHECK_SIZEOF(unsigned long long)
|
||||
@@ -832,10 +832,12 @@ AC_CHECK_SIZEOF(unsigned long long)
|
||||
AC_CHECK_SIZEOF(unsigned long)
|
||||
AC_CHECK_SIZEOF(unsigned __int128)
|
||||
|
||||
@ -44,3 +52,6 @@ diff --git a/gdb/configure.ac b/gdb/configure.ac
|
||||
elif test "x${ac_cv_sizeof_unsigned___int128}" = "x16"; then
|
||||
TARGET_PTR="unsigned __int128"
|
||||
else
|
||||
--
|
||||
2.14.3
|
||||
|
||||
|
@ -3,35 +3,30 @@ From: Fedora GDB patches <invalid@email.com>
|
||||
Date: Fri, 27 Oct 2017 21:07:50 +0200
|
||||
Subject: gdb-libexec-add-index.patch
|
||||
|
||||
FileName: gdb-libexec-add-index.patch
|
||||
|
||||
;; Fix gdb-headless /usr/bin/ executables (BZ 1390251).
|
||||
;;
|
||||
;; Also, make /usr/bin/gdb.minimal be the default GDB used, if it's
|
||||
;; present. For rationale, see:
|
||||
;;
|
||||
;; https://fedoraproject.org/wiki/Changes/Minimal_GDB_in_buildroot
|
||||
;;=fedora
|
||||
---
|
||||
gdb/contrib/gdb-add-index.sh | 5 +++++
|
||||
1 file changed, 5 insertions(+)
|
||||
|
||||
diff --git a/gdb/contrib/gdb-add-index.sh b/gdb/contrib/gdb-add-index.sh
|
||||
index 71146966ab..500b2f62d5 100755
|
||||
--- a/gdb/contrib/gdb-add-index.sh
|
||||
+++ b/gdb/contrib/gdb-add-index.sh
|
||||
@@ -22,6 +22,20 @@ GDB=${GDB:=gdb}
|
||||
@@ -21,6 +21,11 @@
|
||||
GDB=${GDB:=gdb}
|
||||
OBJCOPY=${OBJCOPY:=objcopy}
|
||||
READELF=${READELF:=readelf}
|
||||
|
||||
+GDB2=/usr/libexec/gdb
|
||||
+if test -x $GDB2 && ! which $GDB &>/dev/null; then
|
||||
+ GDB=$GDB2
|
||||
+fi
|
||||
+
|
||||
+# We default to using /usr/bin/gdb.minimal if it's present. See
|
||||
+# https://bugzilla.redhat.com/show_bug.cgi?id=1695015 and
|
||||
+# https://fedoraproject.org/wiki/Changes/Minimal_GDB_in_buildroot for
|
||||
+# explanations.
|
||||
+GDB3=/usr/bin/gdb.minimal
|
||||
+if test -x $GDB3; then
|
||||
+ GDB=$GDB3
|
||||
+fi
|
||||
+
|
||||
myname="${0##*/}"
|
||||
|
||||
dwarf5=""
|
||||
if test $# != 1; then
|
||||
--
|
||||
2.14.3
|
||||
|
||||
|
@ -3,6 +3,8 @@ From: Fedora GDB patches <invalid@email.com>
|
||||
Date: Fri, 27 Oct 2017 21:07:50 +0200
|
||||
Subject: gdb-lineno-makeup-test.patch
|
||||
|
||||
FileName: gdb-lineno-makeup-test.patch
|
||||
|
||||
;; Testcase for "Do not make up line information" fix by Daniel Jacobowitz.
|
||||
;;=fedoratest
|
||||
|
||||
@ -13,9 +15,18 @@ and the upstream fix:
|
||||
http://sourceware.org/ml/gdb-patches/2006-11/msg00253.html
|
||||
[rfc] Do not make up line information
|
||||
http://sourceware.org/ml/gdb-cvs/2006-11/msg00127.html
|
||||
---
|
||||
gdb/testsuite/gdb.base/lineno-makeup-func.c | 21 ++++++++
|
||||
gdb/testsuite/gdb.base/lineno-makeup.c | 35 +++++++++++++
|
||||
gdb/testsuite/gdb.base/lineno-makeup.exp | 78 +++++++++++++++++++++++++++++
|
||||
3 files changed, 134 insertions(+)
|
||||
create mode 100644 gdb/testsuite/gdb.base/lineno-makeup-func.c
|
||||
create mode 100644 gdb/testsuite/gdb.base/lineno-makeup.c
|
||||
create mode 100644 gdb/testsuite/gdb.base/lineno-makeup.exp
|
||||
|
||||
diff --git a/gdb/testsuite/gdb.base/lineno-makeup-func.c b/gdb/testsuite/gdb.base/lineno-makeup-func.c
|
||||
new file mode 100644
|
||||
index 0000000000..1a0220ea52
|
||||
--- /dev/null
|
||||
+++ b/gdb/testsuite/gdb.base/lineno-makeup-func.c
|
||||
@@ -0,0 +1,21 @@
|
||||
@ -42,6 +53,7 @@ new file mode 100644
|
||||
+}
|
||||
diff --git a/gdb/testsuite/gdb.base/lineno-makeup.c b/gdb/testsuite/gdb.base/lineno-makeup.c
|
||||
new file mode 100644
|
||||
index 0000000000..5d4be90999
|
||||
--- /dev/null
|
||||
+++ b/gdb/testsuite/gdb.base/lineno-makeup.c
|
||||
@@ -0,0 +1,35 @@
|
||||
@ -82,6 +94,7 @@ new file mode 100644
|
||||
+}
|
||||
diff --git a/gdb/testsuite/gdb.base/lineno-makeup.exp b/gdb/testsuite/gdb.base/lineno-makeup.exp
|
||||
new file mode 100644
|
||||
index 0000000000..9e11d78bf9
|
||||
--- /dev/null
|
||||
+++ b/gdb/testsuite/gdb.base/lineno-makeup.exp
|
||||
@@ -0,0 +1,78 @@
|
||||
@ -163,3 +176,6 @@ new file mode 100644
|
||||
+ fail $test
|
||||
+ }
|
||||
+}
|
||||
--
|
||||
2.14.3
|
||||
|
||||
|
@ -3,10 +3,45 @@ From: Fedora GDB patches <invalid@email.com>
|
||||
Date: Fri, 27 Oct 2017 21:07:50 +0200
|
||||
Subject: gdb-linux_perf-bundle.patch
|
||||
|
||||
FileName: gdb-linux_perf-bundle.patch
|
||||
|
||||
;; [dts+el7] [x86*] Bundle linux_perf.h for libipt (RH BZ 1256513).
|
||||
;;=fedora
|
||||
---
|
||||
gdb/configure | 2 +-
|
||||
gdb/configure.ac | 2 +-
|
||||
gdb/gdb.c | 8 +++
|
||||
gdb/nat/linux-btrace.h | 171 +++++++++++++++++++++++++++++++++++++++++++++++++
|
||||
4 files changed, 181 insertions(+), 2 deletions(-)
|
||||
|
||||
diff --git a/gdb/configure b/gdb/configure
|
||||
index db849572b5..7720c00f4b 100755
|
||||
--- a/gdb/configure
|
||||
+++ b/gdb/configure
|
||||
@@ -11907,7 +11907,7 @@ else
|
||||
|
||||
#include <linux/perf_event.h>
|
||||
#ifndef PERF_ATTR_SIZE_VER5
|
||||
-# error
|
||||
+// error // PERF_ATTR_SIZE_VER5_BUNDLE is not available here - Fedora+RHEL
|
||||
#endif
|
||||
|
||||
_ACEOF
|
||||
diff --git a/gdb/configure.ac b/gdb/configure.ac
|
||||
index 4412e25450..e64b0e806f 100644
|
||||
--- a/gdb/configure.ac
|
||||
+++ b/gdb/configure.ac
|
||||
@@ -1466,7 +1466,7 @@ else
|
||||
AC_PREPROC_IFELSE(AC_LANG_SOURCE([[
|
||||
#include <linux/perf_event.h>
|
||||
#ifndef PERF_ATTR_SIZE_VER5
|
||||
-# error
|
||||
+// error // PERF_ATTR_SIZE_VER5_BUNDLE is not available here - Fedora+RHEL
|
||||
#endif
|
||||
]]), [perf_event=yes], [perf_event=no])
|
||||
if test "$perf_event" != yes; then
|
||||
diff --git a/gdb/gdb.c b/gdb/gdb.c
|
||||
index b97500e579..151545105c 100644
|
||||
--- a/gdb/gdb.c
|
||||
+++ b/gdb/gdb.c
|
||||
@@ -20,11 +20,19 @@
|
||||
@ -30,9 +65,10 @@ diff --git a/gdb/gdb.c b/gdb/gdb.c
|
||||
args.argc = argc;
|
||||
args.argv = argv;
|
||||
diff --git a/gdb/nat/linux-btrace.h b/gdb/nat/linux-btrace.h
|
||||
index 31a8d9e67b..72faf23c5f 100644
|
||||
--- a/gdb/nat/linux-btrace.h
|
||||
+++ b/gdb/nat/linux-btrace.h
|
||||
@@ -27,6 +27,177 @@
|
||||
@@ -28,6 +28,177 @@
|
||||
# include <linux/perf_event.h>
|
||||
#endif
|
||||
|
||||
@ -210,15 +246,6 @@ diff --git a/gdb/nat/linux-btrace.h b/gdb/nat/linux-btrace.h
|
||||
struct target_ops;
|
||||
|
||||
#if HAVE_LINUX_PERF_EVENT_H
|
||||
diff --git a/gdbsupport/common.m4 b/gdbsupport/common.m4
|
||||
--- a/gdbsupport/common.m4
|
||||
+++ b/gdbsupport/common.m4
|
||||
@@ -145,7 +145,7 @@ AC_DEFUN([GDB_AC_COMMON], [
|
||||
AC_PREPROC_IFELSE([AC_LANG_SOURCE([[
|
||||
#include <linux/perf_event.h>
|
||||
#ifndef PERF_ATTR_SIZE_VER5
|
||||
- # error
|
||||
+ // error // PERF_ATTR_SIZE_VER5_BUNDLE is not available here - Fedora+RHEL
|
||||
#endif
|
||||
]])], [perf_event=yes], [perf_event=no])
|
||||
if test "$perf_event" != yes; then
|
||||
--
|
||||
2.14.3
|
||||
|
||||
|
@ -3,6 +3,8 @@ From: Fedora GDB patches <invalid@email.com>
|
||||
Date: Fri, 27 Oct 2017 21:07:50 +0200
|
||||
Subject: gdb-moribund-utrace-workaround.patch
|
||||
|
||||
FileName: gdb-moribund-utrace-workaround.patch
|
||||
|
||||
;; Workaround non-stop moribund locations exploited by kernel utrace (BZ 590623).
|
||||
;;=push+jan: Currently it is still not fully safe.
|
||||
|
||||
@ -10,16 +12,23 @@ https://bugzilla.redhat.com/show_bug.cgi?id=590623
|
||||
http://sources.redhat.com/bugzilla/show_bug.cgi?id=11593
|
||||
|
||||
Bug in FSF GDB exploited by the ptrace-on-utrace interaction.
|
||||
---
|
||||
gdb/breakpoint.c | 2 ++
|
||||
1 file changed, 2 insertions(+)
|
||||
|
||||
diff --git a/gdb/breakpoint.c b/gdb/breakpoint.c
|
||||
index 5a99de75e1..6a0c15b239 100644
|
||||
--- a/gdb/breakpoint.c
|
||||
+++ b/gdb/breakpoint.c
|
||||
@@ -11948,6 +11948,8 @@ update_global_location_list (enum ugll_insert_mode insert_mode)
|
||||
= 3 * (thread_count (proc_target) + 1);
|
||||
else
|
||||
old_loc->events_till_retirement = 1;
|
||||
@@ -12089,6 +12089,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);
|
||||
+ /* Red Hat Bug 590623. */
|
||||
+ old_loc->events_till_retirement *= 10;
|
||||
old_loc->owner = NULL;
|
||||
|
||||
moribund_locations.push_back (old_loc);
|
||||
VEC_safe_push (bp_location_p, moribund_locations, old_loc);
|
||||
--
|
||||
2.14.3
|
||||
|
||||
|
@ -3,11 +3,20 @@ From: Fedora GDB patches <invalid@email.com>
|
||||
Date: Fri, 27 Oct 2017 21:07:50 +0200
|
||||
Subject: gdb-opcodes-clflushopt-test.patch
|
||||
|
||||
FileName: gdb-opcodes-clflushopt-test.patch
|
||||
|
||||
;; Test clflushopt instruction decode (for RH BZ 1262471).
|
||||
;;=fedoratest
|
||||
---
|
||||
gdb/testsuite/gdb.arch/amd64-clflushopt.S | 19 +++++++++++++++++++
|
||||
gdb/testsuite/gdb.arch/amd64-clflushopt.exp | 25 +++++++++++++++++++++++++
|
||||
2 files changed, 44 insertions(+)
|
||||
create mode 100644 gdb/testsuite/gdb.arch/amd64-clflushopt.S
|
||||
create mode 100644 gdb/testsuite/gdb.arch/amd64-clflushopt.exp
|
||||
|
||||
diff --git a/gdb/testsuite/gdb.arch/amd64-clflushopt.S b/gdb/testsuite/gdb.arch/amd64-clflushopt.S
|
||||
new file mode 100644
|
||||
index 0000000000..dee4f006dc
|
||||
--- /dev/null
|
||||
+++ b/gdb/testsuite/gdb.arch/amd64-clflushopt.S
|
||||
@@ -0,0 +1,19 @@
|
||||
@ -32,6 +41,7 @@ new file mode 100644
|
||||
+ clflushopt (%edi)
|
||||
diff --git a/gdb/testsuite/gdb.arch/amd64-clflushopt.exp b/gdb/testsuite/gdb.arch/amd64-clflushopt.exp
|
||||
new file mode 100644
|
||||
index 0000000000..22a9decee2
|
||||
--- /dev/null
|
||||
+++ b/gdb/testsuite/gdb.arch/amd64-clflushopt.exp
|
||||
@@ -0,0 +1,25 @@
|
||||
@ -60,3 +70,6 @@ new file mode 100644
|
||||
+}
|
||||
+
|
||||
+gdb_test "disas _start" "Dump of assembler code for function _start:\r\n *0x\[0-9a-f\]+ <\[+\]0>:\tclflushopt \\(%edi\\)\r\nEnd of assembler dump\\." "clflushopt"
|
||||
--
|
||||
2.14.3
|
||||
|
||||
|
36
gdb-pahole-python2.patch
Normal file
36
gdb-pahole-python2.patch
Normal file
@ -0,0 +1,36 @@
|
||||
diff --git a/gdb/python/lib/gdb/command/pahole.py b/gdb/python/lib/gdb/command/pahole.py
|
||||
index e08eaf5..56c1737 100644
|
||||
--- a/gdb/python/lib/gdb/command/pahole.py
|
||||
+++ b/gdb/python/lib/gdb/command/pahole.py
|
||||
@@ -55,19 +55,19 @@ It prints the type and displays comments showing where holes are."""
|
||||
fieldsize = 8 * ftype.sizeof
|
||||
|
||||
# TARGET_CHAR_BIT
|
||||
- print (' /* %3d %3d */' % (int (bitpos / 8), int (fieldsize / 8)), end = "")
|
||||
+ print (' /* %3d %3d */' % (int (bitpos / 8), int (fieldsize / 8))),
|
||||
bitpos = bitpos + fieldsize
|
||||
|
||||
if ftype.code == gdb.TYPE_CODE_STRUCT:
|
||||
self.pahole (ftype, level + 1, field.name)
|
||||
else:
|
||||
- print (' ' * (2 + 2 * level), end = "")
|
||||
+ print (' ' * (2 + 2 * level)),
|
||||
print ('%s %s' % (str (ftype), field.name))
|
||||
|
||||
if level == 0:
|
||||
self.maybe_print_hole(bitpos, 8 * type.sizeof)
|
||||
|
||||
- print (' ' * (14 + 2 * level), end = "")
|
||||
+ print (' ' * (14 + 2 * level)),
|
||||
print ('} %s' % name)
|
||||
|
||||
def invoke (self, arg, from_tty):
|
||||
@@ -75,7 +75,7 @@ It prints the type and displays comments showing where holes are."""
|
||||
type = type.strip_typedefs ()
|
||||
if type.code != gdb.TYPE_CODE_STRUCT:
|
||||
raise (TypeError, '%s is not a struct type' % arg)
|
||||
- print (' ' * 14, end = "")
|
||||
+ print (' ' * 14),
|
||||
self.pahole (type, 0, '')
|
||||
|
||||
Pahole()
|
@ -3,13 +3,30 @@ From: Fedora GDB patches <invalid@email.com>
|
||||
Date: Fri, 27 Oct 2017 21:07:50 +0200
|
||||
Subject: gdb-physname-pr11734-test.patch
|
||||
|
||||
FileName: gdb-physname-pr11734-test.patch
|
||||
|
||||
;; Fix regressions on C++ names resolving (PR 11734, PR 12273, Keith Seitz).
|
||||
;;=fedoratest
|
||||
|
||||
http://sourceware.org/ml/gdb-patches/2010-12/msg00263.html
|
||||
---
|
||||
gdb/testsuite/gdb.cp/pr11734-1.cc | 30 +++++++++++++++++++++
|
||||
gdb/testsuite/gdb.cp/pr11734-2.cc | 27 +++++++++++++++++++
|
||||
gdb/testsuite/gdb.cp/pr11734-3.cc | 27 +++++++++++++++++++
|
||||
gdb/testsuite/gdb.cp/pr11734-4.cc | 27 +++++++++++++++++++
|
||||
gdb/testsuite/gdb.cp/pr11734.exp | 55 +++++++++++++++++++++++++++++++++++++++
|
||||
gdb/testsuite/gdb.cp/pr11734.h | 28 ++++++++++++++++++++
|
||||
6 files changed, 194 insertions(+)
|
||||
create mode 100644 gdb/testsuite/gdb.cp/pr11734-1.cc
|
||||
create mode 100644 gdb/testsuite/gdb.cp/pr11734-2.cc
|
||||
create mode 100644 gdb/testsuite/gdb.cp/pr11734-3.cc
|
||||
create mode 100644 gdb/testsuite/gdb.cp/pr11734-4.cc
|
||||
create mode 100644 gdb/testsuite/gdb.cp/pr11734.exp
|
||||
create mode 100644 gdb/testsuite/gdb.cp/pr11734.h
|
||||
|
||||
diff --git a/gdb/testsuite/gdb.cp/pr11734-1.cc b/gdb/testsuite/gdb.cp/pr11734-1.cc
|
||||
new file mode 100644
|
||||
index 0000000000..f3480ce977
|
||||
--- /dev/null
|
||||
+++ b/gdb/testsuite/gdb.cp/pr11734-1.cc
|
||||
@@ -0,0 +1,30 @@
|
||||
@ -45,6 +62,7 @@ new file mode 100644
|
||||
+
|
||||
diff --git a/gdb/testsuite/gdb.cp/pr11734-2.cc b/gdb/testsuite/gdb.cp/pr11734-2.cc
|
||||
new file mode 100644
|
||||
index 0000000000..dbebe8281a
|
||||
--- /dev/null
|
||||
+++ b/gdb/testsuite/gdb.cp/pr11734-2.cc
|
||||
@@ -0,0 +1,27 @@
|
||||
@ -77,6 +95,7 @@ new file mode 100644
|
||||
+
|
||||
diff --git a/gdb/testsuite/gdb.cp/pr11734-3.cc b/gdb/testsuite/gdb.cp/pr11734-3.cc
|
||||
new file mode 100644
|
||||
index 0000000000..faaeffc9dd
|
||||
--- /dev/null
|
||||
+++ b/gdb/testsuite/gdb.cp/pr11734-3.cc
|
||||
@@ -0,0 +1,27 @@
|
||||
@ -109,6 +128,7 @@ new file mode 100644
|
||||
+
|
||||
diff --git a/gdb/testsuite/gdb.cp/pr11734-4.cc b/gdb/testsuite/gdb.cp/pr11734-4.cc
|
||||
new file mode 100644
|
||||
index 0000000000..6edf8110f1
|
||||
--- /dev/null
|
||||
+++ b/gdb/testsuite/gdb.cp/pr11734-4.cc
|
||||
@@ -0,0 +1,27 @@
|
||||
@ -141,6 +161,7 @@ new file mode 100644
|
||||
+
|
||||
diff --git a/gdb/testsuite/gdb.cp/pr11734.exp b/gdb/testsuite/gdb.cp/pr11734.exp
|
||||
new file mode 100644
|
||||
index 0000000000..e731d422f6
|
||||
--- /dev/null
|
||||
+++ b/gdb/testsuite/gdb.cp/pr11734.exp
|
||||
@@ -0,0 +1,55 @@
|
||||
@ -201,6 +222,7 @@ new file mode 100644
|
||||
+return 0
|
||||
diff --git a/gdb/testsuite/gdb.cp/pr11734.h b/gdb/testsuite/gdb.cp/pr11734.h
|
||||
new file mode 100644
|
||||
index 0000000000..7f6e72a685
|
||||
--- /dev/null
|
||||
+++ b/gdb/testsuite/gdb.cp/pr11734.h
|
||||
@@ -0,0 +1,28 @@
|
||||
@ -232,3 +254,6 @@ new file mode 100644
|
||||
+ void foo (char *);
|
||||
+};
|
||||
+
|
||||
--
|
||||
2.14.3
|
||||
|
||||
|
@ -3,13 +3,22 @@ From: Fedora GDB patches <invalid@email.com>
|
||||
Date: Fri, 27 Oct 2017 21:07:50 +0200
|
||||
Subject: gdb-physname-pr12273-test.patch
|
||||
|
||||
FileName: gdb-physname-pr12273-test.patch
|
||||
|
||||
;; Fix regressions on C++ names resolving (PR 11734, PR 12273, Keith Seitz).
|
||||
;;=fedoratest
|
||||
|
||||
http://sourceware.org/ml/gdb-patches/2010-12/msg00264.html
|
||||
---
|
||||
gdb/testsuite/gdb.cp/pr12273.cc | 37 ++++++++++++++++++++++++++++++++
|
||||
gdb/testsuite/gdb.cp/pr12273.exp | 46 ++++++++++++++++++++++++++++++++++++++++
|
||||
2 files changed, 83 insertions(+)
|
||||
create mode 100644 gdb/testsuite/gdb.cp/pr12273.cc
|
||||
create mode 100644 gdb/testsuite/gdb.cp/pr12273.exp
|
||||
|
||||
diff --git a/gdb/testsuite/gdb.cp/pr12273.cc b/gdb/testsuite/gdb.cp/pr12273.cc
|
||||
new file mode 100644
|
||||
index 0000000000..79dd7bad74
|
||||
--- /dev/null
|
||||
+++ b/gdb/testsuite/gdb.cp/pr12273.cc
|
||||
@@ -0,0 +1,37 @@
|
||||
@ -52,6 +61,7 @@ new file mode 100644
|
||||
+}
|
||||
diff --git a/gdb/testsuite/gdb.cp/pr12273.exp b/gdb/testsuite/gdb.cp/pr12273.exp
|
||||
new file mode 100644
|
||||
index 0000000000..9d71482742
|
||||
--- /dev/null
|
||||
+++ b/gdb/testsuite/gdb.cp/pr12273.exp
|
||||
@@ -0,0 +1,46 @@
|
||||
@ -101,3 +111,6 @@ new file mode 100644
|
||||
+}
|
||||
+
|
||||
+gdb_exit
|
||||
--
|
||||
2.14.3
|
||||
|
||||
|
@ -3,11 +3,20 @@ From: Fedora GDB patches <invalid@email.com>
|
||||
Date: Fri, 27 Oct 2017 21:07:50 +0200
|
||||
Subject: gdb-ppc-power7-test.patch
|
||||
|
||||
FileName: gdb-ppc-power7-test.patch
|
||||
|
||||
;; Test power7 ppc disassembly.
|
||||
;;=fedoratest
|
||||
---
|
||||
gdb/testsuite/gdb.arch/powerpc-power7rh.exp | 178 ++++++++++++++++++++++++++++
|
||||
gdb/testsuite/gdb.arch/powerpc-power7rh.s | 107 +++++++++++++++++
|
||||
2 files changed, 285 insertions(+)
|
||||
create mode 100644 gdb/testsuite/gdb.arch/powerpc-power7rh.exp
|
||||
create mode 100644 gdb/testsuite/gdb.arch/powerpc-power7rh.s
|
||||
|
||||
diff --git a/gdb/testsuite/gdb.arch/powerpc-power7rh.exp b/gdb/testsuite/gdb.arch/powerpc-power7rh.exp
|
||||
new file mode 100644
|
||||
index 0000000000..0c2bbdaede
|
||||
--- /dev/null
|
||||
+++ b/gdb/testsuite/gdb.arch/powerpc-power7rh.exp
|
||||
@@ -0,0 +1,178 @@
|
||||
@ -191,6 +200,7 @@ new file mode 100644
|
||||
+func_check 0x19c "isel r2,r3,r4,28"
|
||||
diff --git a/gdb/testsuite/gdb.arch/powerpc-power7rh.s b/gdb/testsuite/gdb.arch/powerpc-power7rh.s
|
||||
new file mode 100644
|
||||
index 0000000000..98b2e797e7
|
||||
--- /dev/null
|
||||
+++ b/gdb/testsuite/gdb.arch/powerpc-power7rh.s
|
||||
@@ -0,0 +1,107 @@
|
||||
@ -301,3 +311,6 @@ new file mode 100644
|
||||
+ .long 0xedc07834 /* 194: frsqrtes f14,f15 */
|
||||
+ .long 0xedc07835 /* 198: frsqrtes. f14,f15 */
|
||||
+ .long 0x7c43271e /* 19c: isel r2,r3,r4,28 */
|
||||
--
|
||||
2.14.3
|
||||
|
||||
|
56
gdb-ppc64-stwux-tautological-compare.patch
Normal file
56
gdb-ppc64-stwux-tautological-compare.patch
Normal file
@ -0,0 +1,56 @@
|
||||
From FEDORA_PATCHES Mon Sep 17 00:00:00 2001
|
||||
From: Jan Kratochvil <jan.kratochvil@redhat.com>
|
||||
Date: Sun, 4 Feb 2018 21:42:18 +0100
|
||||
Subject: gdb-ppc64-stwux-tautological-compare.patch
|
||||
|
||||
FileName: gdb-ppc64-stwux-tautological-compare.patch
|
||||
|
||||
;; Fix ppc64 stwux encoding as found by gcc-8.0 -Werror=tautological-compare.
|
||||
|
||||
[patch] ppc64: Fix stwux encoding
|
||||
https://sourceware.org/ml/gdb-patches/2018-02/msg00058.html
|
||||
|
||||
with gcc-8.0.1-0.9.fc28.x86_64 I get:
|
||||
|
||||
../../gdb/rs6000-tdep.c: In function 'CORE_ADDR skip_prologue(gdbarch*, CORE_ADDR, CORE_ADDR, rs6000_framedata*)':
|
||||
../../gdb/rs6000-tdep.c:1911:34: error: bitwise comparison always evaluates to false [-Werror=tautological-compare]
|
||||
else if ((op & 0xfc1f016a) == 0x7c01016e)
|
||||
~~~~~~~~~~~~~~~~~~^~~~~~~~~~~~~
|
||||
|
||||
The code is there since:
|
||||
commit 98f08d3d9b69b344bb8b0cd2a4bda1cf4d966e20
|
||||
Author: Kevin Buettner <kevinb@redhat.com>
|
||||
Date: Thu May 29 19:47:14 2003 +0000
|
||||
From Jimi X <jimix@watson.ibm.com>:
|
||||
* rs6000-tdep.c (skip_prologue): Improve support for 64-bit code.
|
||||
So I do not think we can find the original author.
|
||||
|
||||
https://www.ibm.com/support/knowledgecenter/en/ssw_aix_72/com.ibm.aix.alangref/idalangref_stwux_stux_instrs.htm
|
||||
says
|
||||
bit 21 - 30 = 183
|
||||
Those are bits 1..10 in normal bit order: 183<<1 = 0x16e
|
||||
|
||||
gdb/ChangeLog
|
||||
2018-02-04 Jan Kratochvil <jan.kratochvil@redhat.com>
|
||||
|
||||
* rs6000-tdep.c (skip_prologue): Fix stwux encoding.
|
||||
---
|
||||
gdb/rs6000-tdep.c | 2 +-
|
||||
1 file changed, 1 insertion(+), 1 deletion(-)
|
||||
|
||||
diff --git a/gdb/rs6000-tdep.c b/gdb/rs6000-tdep.c
|
||||
index 23d0db3b8f..5275ff5b91 100644
|
||||
--- a/gdb/rs6000-tdep.c
|
||||
+++ b/gdb/rs6000-tdep.c
|
||||
@@ -1908,7 +1908,7 @@ skip_prologue (struct gdbarch *gdbarch, CORE_ADDR pc, CORE_ADDR lim_pc,
|
||||
offset = fdata->offset;
|
||||
continue;
|
||||
}
|
||||
- else if ((op & 0xfc1f016a) == 0x7c01016e)
|
||||
+ else if ((op & 0xfc1f016e) == 0x7c01016e)
|
||||
{ /* stwux rX,r1,rY */
|
||||
/* No way to figure out what r1 is going to be. */
|
||||
fdata->frameless = 0;
|
||||
--
|
||||
2.14.3
|
||||
|
262
gdb-python-gil.patch
Normal file
262
gdb-python-gil.patch
Normal file
@ -0,0 +1,262 @@
|
||||
From FEDORA_PATCHES Mon Sep 17 00:00:00 2001
|
||||
From: Fedora GDB patches <invalid@email.com>
|
||||
Date: Fri, 27 Oct 2017 21:07:50 +0200
|
||||
Subject: gdb-python-gil.patch
|
||||
|
||||
FileName: gdb-python-gil.patch
|
||||
|
||||
;; Fix Python GIL with gdb.execute("continue") (Phil Muldoon, BZ 1116957).
|
||||
;;=push
|
||||
---
|
||||
gdb/doc/python.texi | 8 ++++
|
||||
gdb/python/python-internal.h | 2 +
|
||||
gdb/python/python.c | 42 +++++++++++++++---
|
||||
gdb/testsuite/gdb.python/py-gil-mthread.c | 13 ++++++
|
||||
gdb/testsuite/gdb.python/py-gil-mthread.exp | 69 +++++++++++++++++++++++++++++
|
||||
gdb/testsuite/gdb.python/py-gil-mthread.py | 28 ++++++++++++
|
||||
6 files changed, 157 insertions(+), 5 deletions(-)
|
||||
create mode 100644 gdb/testsuite/gdb.python/py-gil-mthread.c
|
||||
create mode 100644 gdb/testsuite/gdb.python/py-gil-mthread.exp
|
||||
create mode 100644 gdb/testsuite/gdb.python/py-gil-mthread.py
|
||||
|
||||
diff --git a/gdb/doc/python.texi b/gdb/doc/python.texi
|
||||
index ebd48fffe7..ccf011e35e 100644
|
||||
--- a/gdb/doc/python.texi
|
||||
+++ b/gdb/doc/python.texi
|
||||
@@ -232,6 +232,14 @@ returned as a string. The default is @code{False}, in which case the
|
||||
return value is @code{None}. If @var{to_string} is @code{True}, the
|
||||
@value{GDBN} virtual terminal will be temporarily set to unlimited width
|
||||
and height, and its pagination will be disabled; @pxref{Screen Size}.
|
||||
+
|
||||
+The @var{release_gil} flag specifies whether @value{GDBN} ought to
|
||||
+release the Python GIL before executing the command. This is useful
|
||||
+in multi-threaded Python programs where by default the Python
|
||||
+interpreter will acquire the GIL and lock other threads from
|
||||
+executing. After the command has completed executing in @value{GDBN}
|
||||
+the Python GIL is reacquired. This flag must be a boolean value. If
|
||||
+omitted, it defaults to @code{False}.
|
||||
@end defun
|
||||
|
||||
@findex gdb.breakpoints
|
||||
diff --git a/gdb/python/python-internal.h b/gdb/python/python-internal.h
|
||||
index c110588f76..89bbc6987b 100644
|
||||
--- a/gdb/python/python-internal.h
|
||||
+++ b/gdb/python/python-internal.h
|
||||
@@ -148,6 +148,8 @@ typedef int Py_ssize_t;
|
||||
#define PyGILState_Release(ARG) ((void)(ARG))
|
||||
#define PyEval_InitThreads()
|
||||
#define PyThreadState_Swap(ARG) ((void)(ARG))
|
||||
+#define PyEval_SaveThread() ((void)(ARG))
|
||||
+#define PyEval_RestoreThread(ARG) ((void)(ARG))
|
||||
#define PyEval_ReleaseLock()
|
||||
#endif
|
||||
|
||||
diff --git a/gdb/python/python.c b/gdb/python/python.c
|
||||
index 4844c86c54..610dda828c 100644
|
||||
--- a/gdb/python/python.c
|
||||
+++ b/gdb/python/python.c
|
||||
@@ -554,12 +554,16 @@ execute_gdb_command (PyObject *self, PyObject *args, PyObject *kw)
|
||||
{
|
||||
const char *arg;
|
||||
PyObject *from_tty_obj = NULL, *to_string_obj = NULL;
|
||||
- int from_tty, to_string;
|
||||
- static const char *keywords[] = { "command", "from_tty", "to_string", NULL };
|
||||
+ int from_tty, to_string, release_gil;
|
||||
+ static const char *keywords[] = {"command", "from_tty", "to_string", "release_gil", NULL };
|
||||
+ PyObject *release_gil_obj = NULL;
|
||||
+ /* Initialize it just to avoid a GCC false warning. */
|
||||
+ PyThreadState *state = NULL;
|
||||
|
||||
- if (!gdb_PyArg_ParseTupleAndKeywords (args, kw, "s|O!O!", keywords, &arg,
|
||||
+ if (!gdb_PyArg_ParseTupleAndKeywords (args, kw, "s|O!O!O!", keywords, &arg,
|
||||
&PyBool_Type, &from_tty_obj,
|
||||
- &PyBool_Type, &to_string_obj))
|
||||
+ &PyBool_Type, &to_string_obj,
|
||||
+ &PyBool_Type, &release_gil_obj))
|
||||
return NULL;
|
||||
|
||||
from_tty = 0;
|
||||
@@ -580,12 +584,28 @@ execute_gdb_command (PyObject *self, PyObject *args, PyObject *kw)
|
||||
to_string = cmp;
|
||||
}
|
||||
|
||||
+ release_gil = 0;
|
||||
+ if (release_gil_obj)
|
||||
+ {
|
||||
+ int cmp = PyObject_IsTrue (release_gil_obj);
|
||||
+ if (cmp < 0)
|
||||
+ return NULL;
|
||||
+ release_gil = cmp;
|
||||
+ }
|
||||
+
|
||||
std::string to_string_res;
|
||||
|
||||
TRY
|
||||
{
|
||||
struct interp *interp;
|
||||
|
||||
+ /* In the case of long running GDB commands, allow the user to
|
||||
+ release the Python GIL acquired by Python. Restore the GIL
|
||||
+ after the command has completed before handing back to
|
||||
+ Python. */
|
||||
+ if (release_gil)
|
||||
+ state = PyEval_SaveThread();
|
||||
+
|
||||
scoped_restore save_async = make_scoped_restore (¤t_ui->async, 0);
|
||||
|
||||
scoped_restore save_uiout = make_scoped_restore (¤t_uiout);
|
||||
@@ -600,10 +620,22 @@ execute_gdb_command (PyObject *self, PyObject *args, PyObject *kw)
|
||||
to_string_res = execute_command_to_string (arg, from_tty);
|
||||
else
|
||||
execute_command (arg, from_tty);
|
||||
+
|
||||
+ /* Reacquire the GIL if it was released earlier. */
|
||||
+ if (release_gil)
|
||||
+ PyEval_RestoreThread (state);
|
||||
}
|
||||
CATCH (except, RETURN_MASK_ALL)
|
||||
{
|
||||
- GDB_PY_HANDLE_EXCEPTION (except);
|
||||
+ if (except.reason < 0)
|
||||
+ {
|
||||
+ /* Reacquire the GIL if it was released earlier. */
|
||||
+ if (release_gil)
|
||||
+ PyEval_RestoreThread (state);
|
||||
+
|
||||
+ gdbpy_convert_exception (except);
|
||||
+ return NULL;
|
||||
+ }
|
||||
}
|
||||
END_CATCH
|
||||
|
||||
diff --git a/gdb/testsuite/gdb.python/py-gil-mthread.c b/gdb/testsuite/gdb.python/py-gil-mthread.c
|
||||
new file mode 100644
|
||||
index 0000000000..1a12fc9c6d
|
||||
--- /dev/null
|
||||
+++ b/gdb/testsuite/gdb.python/py-gil-mthread.c
|
||||
@@ -0,0 +1,13 @@
|
||||
+#include <stdio.h>
|
||||
+#include <unistd.h>
|
||||
+
|
||||
+int
|
||||
+main (void)
|
||||
+{
|
||||
+ int i;
|
||||
+ for (i = 0; i < 10; i++)
|
||||
+ {
|
||||
+ sleep (1); /* break-here */
|
||||
+ printf ("Sleeping %d\n", i);
|
||||
+ }
|
||||
+}
|
||||
diff --git a/gdb/testsuite/gdb.python/py-gil-mthread.exp b/gdb/testsuite/gdb.python/py-gil-mthread.exp
|
||||
new file mode 100644
|
||||
index 0000000000..a89c16a45b
|
||||
--- /dev/null
|
||||
+++ b/gdb/testsuite/gdb.python/py-gil-mthread.exp
|
||||
@@ -0,0 +1,69 @@
|
||||
+# Copyright (C) 2014 Free Software Foundation, Inc.
|
||||
+
|
||||
+# This program is free software; you can redistribute it and/or modify
|
||||
+# it under the terms of the GNU General Public License as published by
|
||||
+# the Free Software Foundation; either version 3 of the License, or
|
||||
+# (at your option) any later version.
|
||||
+#
|
||||
+# This program is distributed in the hope that it will be useful,
|
||||
+# but WITHOUT ANY WARRANTY; without even the implied warranty of
|
||||
+# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
|
||||
+# GNU General Public License for more details.
|
||||
+#
|
||||
+# You should have received a copy of the GNU General Public License
|
||||
+# along with this program. If not, see <http://www.gnu.org/licenses/>.
|
||||
+
|
||||
+standard_testfile .c .py
|
||||
+set executable $testfile
|
||||
+
|
||||
+if { [prepare_for_testing $testfile.exp $executable $srcfile] } {
|
||||
+ return -1
|
||||
+}
|
||||
+
|
||||
+# Skip all tests if Python scripting is not enabled.
|
||||
+if { [skip_python_tests] } { continue }
|
||||
+
|
||||
+if ![runto_main] {
|
||||
+ return -1
|
||||
+}
|
||||
+
|
||||
+gdb_breakpoint $srcfile:[gdb_get_line_number "break-here"] temporary
|
||||
+gdb_continue_to_breakpoint "break-here" ".* break-here .*"
|
||||
+
|
||||
+set test "response"
|
||||
+set timeout 60
|
||||
+set sleeping_last -1
|
||||
+set hello_last 0
|
||||
+set minimal 5
|
||||
+gdb_test_multiple "python exec (open ('$srcdir/$subdir/$srcfile2').read ())" $test {
|
||||
+ -re "Error: unable to start thread\r\n" {
|
||||
+ fail $test
|
||||
+ # Not $gdb_prompt-synced!
|
||||
+ }
|
||||
+ -re "Sleeping (\[0-9\]+)\r\n" {
|
||||
+ set n $expect_out(1,string)
|
||||
+ if { $sleeping_last + 1 != $n } {
|
||||
+ fail $test
|
||||
+ } else {
|
||||
+ set sleeping_last $n
|
||||
+ if { $sleeping_last >= $minimal && $hello_last >= $minimal } {
|
||||
+ pass $test
|
||||
+ } else {
|
||||
+ exp_continue
|
||||
+ }
|
||||
+ }
|
||||
+ }
|
||||
+ -re "Hello \\( (\[0-9\]+) \\)\r\n" {
|
||||
+ set n $expect_out(1,string)
|
||||
+ if { $hello_last + 1 != $n } {
|
||||
+ fail $test
|
||||
+ } else {
|
||||
+ set hello_last $n
|
||||
+ if { $sleeping_last >= $minimal && $hello_last >= $minimal } {
|
||||
+ pass $test
|
||||
+ } else {
|
||||
+ exp_continue
|
||||
+ }
|
||||
+ }
|
||||
+ }
|
||||
+}
|
||||
diff --git a/gdb/testsuite/gdb.python/py-gil-mthread.py b/gdb/testsuite/gdb.python/py-gil-mthread.py
|
||||
new file mode 100644
|
||||
index 0000000000..6a89964139
|
||||
--- /dev/null
|
||||
+++ b/gdb/testsuite/gdb.python/py-gil-mthread.py
|
||||
@@ -0,0 +1,28 @@
|
||||
+try:
|
||||
+ import thread
|
||||
+except:
|
||||
+ import _thread
|
||||
+import time
|
||||
+import gdb
|
||||
+
|
||||
+# Define a function for the thread
|
||||
+def print_thread_hello():
|
||||
+ count = 0
|
||||
+ while count < 10:
|
||||
+ time.sleep(1)
|
||||
+ count += 1
|
||||
+ print ("Hello ( %d )" % count)
|
||||
+
|
||||
+# Create a threads a continue
|
||||
+try:
|
||||
+ thread.start_new_thread (print_thread_hello, ())
|
||||
+ gdb.execute ("continue", release_gil=True)
|
||||
+except:
|
||||
+ try:
|
||||
+ _thread.start_new_thread (print_thread_hello, ())
|
||||
+ gdb.execute ("continue", release_gil=True)
|
||||
+ except:
|
||||
+ print ("Error: unable to start thread")
|
||||
+
|
||||
+while 1:
|
||||
+ pass
|
||||
--
|
||||
2.14.3
|
||||
|
34
gdb-readline62-ask-more-rh.patch
Normal file
34
gdb-readline62-ask-more-rh.patch
Normal file
@ -0,0 +1,34 @@
|
||||
From FEDORA_PATCHES Mon Sep 17 00:00:00 2001
|
||||
From: Fedora GDB patches <invalid@email.com>
|
||||
Date: Fri, 27 Oct 2017 21:07:50 +0200
|
||||
Subject: gdb-readline62-ask-more-rh.patch
|
||||
|
||||
FileName: gdb-readline62-ask-more-rh.patch
|
||||
|
||||
;; Work around readline-6.2 incompatibility not asking for --more-- (BZ 701131).
|
||||
;;=fedora
|
||||
---
|
||||
gdb/event-top.c | 7 +++++++
|
||||
1 file changed, 7 insertions(+)
|
||||
|
||||
diff --git a/gdb/event-top.c b/gdb/event-top.c
|
||||
index 0d668f35e0..4aa26125f9 100644
|
||||
--- a/gdb/event-top.c
|
||||
+++ b/gdb/event-top.c
|
||||
@@ -1183,6 +1183,13 @@ gdb_setup_readline (int editing)
|
||||
{
|
||||
struct ui *ui = current_ui;
|
||||
|
||||
+#ifdef NEED_RL_STATE_FEDORA_GDB
|
||||
+ /* 6.2 regression: no longed asks for --more--
|
||||
+ gdb.base/readline-ask.exp
|
||||
+ https://bugzilla.redhat.com/show_bug.cgi?id=701131 */
|
||||
+ RL_SETSTATE (RL_STATE_FEDORA_GDB);
|
||||
+#endif
|
||||
+
|
||||
/* This function is a noop for the sync case. The assumption is
|
||||
that the sync setup is ALL done in gdb_init, and we would only
|
||||
mess it up here. The sync stuff should really go away over
|
||||
--
|
||||
2.14.3
|
||||
|
Some files were not shown because too many files have changed in this diff Show More
Loading…
Reference in New Issue
Block a user