Compare commits
17 Commits
Author | SHA1 | Date |
---|---|---|
Jan Kratochvil | 7780a1c00e | |
Jan Kratochvil | a85ad4966c | |
Sergio Durigan Junior | 259e224402 | |
Sergio Durigan Junior | 60f38d2ebd | |
Sergio Durigan Junior | 81b9cf010a | |
Jan Kratochvil | 0471cf380d | |
Jan Kratochvil | cc58fc0cba | |
Jan Kratochvil | e0871885f8 | |
Jan Kratochvil | 081d76f3ce | |
Jan Kratochvil | 623fa7eb8a | |
Jan Kratochvil | 93e8fc155e | |
Jan Kratochvil | 2303b2ef6b | |
Jan Kratochvil | 0b81726ccf | |
Jan Kratochvil | e9d4739a30 | |
Jan Kratochvil | aec887c5a4 | |
Jan Kratochvil | c56e6c2d0c | |
Fedora Release Engineering | 6f820a688c |
|
@ -1,4 +1,3 @@
|
||||||
/binutils-gdb
|
/gdb-libstdc++-v3-python-7.1.1-20170526.tar.xz
|
||||||
/gdb-libstdc++-v3-python-8.1.1-20180626.tar.xz
|
/v1.6.1.tar.gz
|
||||||
/v2.0.2.tar.gz
|
/gdb-8.0.1.tar.xz
|
||||||
/gdb-10.1.tar.xz
|
|
||||||
|
|
|
@ -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`
|
|
|
@ -1,384 +0,0 @@
|
||||||
# Match the Fedora's version info.
|
|
||||||
#=fedora
|
|
||||||
Patch001: gdb-6.3-rh-testversion-20041202.patch
|
|
||||||
|
|
||||||
# VLA (Fortran dynamic arrays) from Intel + archer-jankratochvil-vla tests.
|
|
||||||
#=push
|
|
||||||
Patch002: gdb-vla-intel-fortran-strides.patch
|
|
||||||
|
|
||||||
#=push
|
|
||||||
Patch003: gdb-vla-intel-fortran-vla-strings.patch
|
|
||||||
|
|
||||||
#=push+jan
|
|
||||||
Patch004: gdb-vla-intel-stringbt-fix.patch
|
|
||||||
|
|
||||||
# Add a wrapper script to GDB that implements pstack using the
|
|
||||||
# --readnever option.
|
|
||||||
#=push
|
|
||||||
Patch005: gdb-6.3-gstack-20050411.patch
|
|
||||||
|
|
||||||
# VSYSCALL and PIE
|
|
||||||
#=fedoratest
|
|
||||||
Patch006: gdb-6.3-test-pie-20050107.patch
|
|
||||||
|
|
||||||
# Get selftest working with sep-debug-info
|
|
||||||
#=fedoratest
|
|
||||||
Patch007: 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
|
|
||||||
|
|
||||||
# Fix to support executable moving
|
|
||||||
#=fedoratest
|
|
||||||
Patch009: 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
|
|
||||||
|
|
||||||
# Verify printing of inherited members test
|
|
||||||
#=fedoratest
|
|
||||||
Patch012: gdb-6.3-inheritancetest-20050726.patch
|
|
||||||
|
|
||||||
# Support TLS symbols (+`errno' suggestion if no pthread is found) (BZ 185337).
|
|
||||||
#=push+jan: It should be replaced by Infinity project.
|
|
||||||
Patch013: gdb-6.5-bz185337-resolve-tls-without-debuginfo-v2.patch
|
|
||||||
|
|
||||||
# Fix TLS symbols resolving for shared libraries with a relative pathname.
|
|
||||||
# The testsuite needs `gdb-6.5-tls-of-separate-debuginfo.patch'.
|
|
||||||
#=fedoratest: One should recheck if it is really fixed upstream.
|
|
||||||
Patch014: gdb-6.5-sharedlibrary-path.patch
|
|
||||||
|
|
||||||
# Improved testsuite results by the testsuite provided by the courtesy of BEA.
|
|
||||||
#=fedoratest: For upstream it should be rewritten as a dejagnu test, the test of no "??" was useful.
|
|
||||||
Patch015: 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
|
|
||||||
|
|
||||||
# Fix readline segfault on excessively long hand-typed lines.
|
|
||||||
#=fedoratest
|
|
||||||
Patch017: gdb-6.5-readline-long-line-crash-test.patch
|
|
||||||
|
|
||||||
# Test sideeffects of skipping ppc .so libs trampolines (BZ 218379).
|
|
||||||
#=fedoratest
|
|
||||||
Patch018: 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
|
|
||||||
|
|
||||||
# Find symbols properly at their original (included) file (BZ 109921).
|
|
||||||
#=fedoratest
|
|
||||||
Patch020: 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
|
|
||||||
|
|
||||||
# Testcase for exec() from threaded program (BZ 202689).
|
|
||||||
#=fedoratest
|
|
||||||
Patch022: 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
|
|
||||||
|
|
||||||
# Allow running `/usr/bin/gcore' with provided but inaccessible tty (BZ 229517).
|
|
||||||
#=fedoratest
|
|
||||||
Patch024: gdb-6.6-bz229517-gcore-without-terminal.patch
|
|
||||||
|
|
||||||
# Avoid too long timeouts on failing cases of "annota1.exp annota3.exp".
|
|
||||||
#=fedoratest
|
|
||||||
Patch025: 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
|
|
||||||
|
|
||||||
# Test leftover zombie process (BZ 243845).
|
|
||||||
#=fedoratest
|
|
||||||
Patch028: gdb-6.5-bz243845-stale-testing-zombie-test.patch
|
|
||||||
|
|
||||||
# New locating of the matching binaries from the pure core file (build-id).
|
|
||||||
#=push+jan
|
|
||||||
Patch029: gdb-6.6-buildid-locate.patch
|
|
||||||
|
|
||||||
# Fix loading of core files without build-ids but with build-ids in executables.
|
|
||||||
# Load strictly build-id-checked core files only if no executable is specified
|
|
||||||
# (Jan Kratochvil, RH BZ 1339862).
|
|
||||||
#=push+jan
|
|
||||||
Patch030: gdb-6.6-buildid-locate-solib-missing-ids.patch
|
|
||||||
|
|
||||||
#=push+jan
|
|
||||||
Patch031: gdb-6.6-buildid-locate-rpm.patch
|
|
||||||
|
|
||||||
# Fix displaying of numeric char arrays as strings (BZ 224128).
|
|
||||||
#=fedoratest: But it is failing anyway, one should check the behavior more.
|
|
||||||
Patch032: 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
|
|
||||||
|
|
||||||
# Testsuite fixes for more stable/comparable results.
|
|
||||||
#=fedoratest
|
|
||||||
Patch034: 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
|
|
||||||
|
|
||||||
# Test hiding unexpected breakpoints on intentional step commands.
|
|
||||||
#=fedoratest
|
|
||||||
Patch036: gdb-6.5-missed-trap-on-step-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
|
|
||||||
|
|
||||||
# Test a crash on `focus cmd', `focus prev' commands.
|
|
||||||
#=fedoratest
|
|
||||||
Patch039: 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
|
|
||||||
|
|
||||||
# Test a crash on libraries missing the .text section.
|
|
||||||
#=fedoratest
|
|
||||||
Patch041: gdb-6.5-section-num-fixup-test.patch
|
|
||||||
|
|
||||||
# Fix resolving of variables at locations lists in prelinked libs (BZ 466901).
|
|
||||||
#=fedoratest
|
|
||||||
Patch042: 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
|
|
||||||
|
|
||||||
# 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
|
|
||||||
|
|
||||||
# Fix stepping with OMP parallel Fortran sections (BZ 533176).
|
|
||||||
#=push+jan: It requires some better DWARF annotations.
|
|
||||||
Patch045: gdb-bz533176-fortran-omp-step.patch
|
|
||||||
|
|
||||||
# Workaround ccache making lineno non-zero for command-line definitions.
|
|
||||||
#=fedoratest: ccache is rarely used and it is even fixed now.
|
|
||||||
Patch046: gdb-ccache-workaround.patch
|
|
||||||
|
|
||||||
#=push+jan: May get obsoleted by Tom's unrelocated objfiles patch.
|
|
||||||
Patch047: gdb-archer-pie-addons.patch
|
|
||||||
|
|
||||||
#=push+jan: Breakpoints disabling matching should not be based on address.
|
|
||||||
Patch048: 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
|
|
||||||
|
|
||||||
# Test power7 ppc disassembly.
|
|
||||||
#=fedoratest
|
|
||||||
Patch050: gdb-ppc-power7-test.patch
|
|
||||||
|
|
||||||
# Workaround non-stop moribund locations exploited by kernel utrace (BZ 590623).
|
|
||||||
#=push+jan: Currently it is still not fully safe.
|
|
||||||
Patch051: 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
|
|
||||||
|
|
||||||
# Backport DWARF-4 support (BZ 601887, Tom Tromey).
|
|
||||||
#=fedoratest
|
|
||||||
Patch053: gdb-bz601887-dwarf4-rh-test.patch
|
|
||||||
|
|
||||||
#=push+jan
|
|
||||||
Patch054: 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
|
|
||||||
|
|
||||||
# [delayed-symfile] Test a backtrace regression on CFIs without DIE (BZ 614604).
|
|
||||||
#=fedoratest
|
|
||||||
Patch056: gdb-test-bt-cfi-without-die.patch
|
|
||||||
|
|
||||||
# Verify GDB Python built-in function gdb.solib_address exists (BZ # 634108).
|
|
||||||
#=fedoratest
|
|
||||||
Patch057: 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
|
|
||||||
|
|
||||||
# [archer-tromey-delayed-symfile] New test gdb.dwarf2/dw2-aranges.exp.
|
|
||||||
#=fedoratest
|
|
||||||
Patch059: gdb-test-dw2-aranges.patch
|
|
||||||
|
|
||||||
# [archer-keiths-expr-cumulative+upstream] Import C++ testcases.
|
|
||||||
#=fedoratest
|
|
||||||
Patch060: 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
|
|
||||||
|
|
||||||
# Fix regressions on C++ names resolving (PR 11734, PR 12273, Keith Seitz).
|
|
||||||
#=fedoratest
|
|
||||||
Patch062: gdb-physname-pr12273-test.patch
|
|
||||||
|
|
||||||
# Test GDB opcodes/ disassembly of Intel Ivy Bridge instructions (BZ 696890).
|
|
||||||
#=fedoratest
|
|
||||||
Patch063: gdb-test-ivy-bridge.patch
|
|
||||||
|
|
||||||
# Hack for proper PIE run of the testsuite.
|
|
||||||
#=fedoratest
|
|
||||||
Patch064: 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
|
|
||||||
|
|
||||||
# Workaround PR libc/14166 for inferior calls of strstr.
|
|
||||||
#=fedoratest: Compatibility with RHELs (unchecked which ones).
|
|
||||||
Patch066: 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
|
|
||||||
|
|
||||||
# Testcase for `Setting solib-absolute-prefix breaks vDSO' (BZ 818343).
|
|
||||||
#=fedoratest
|
|
||||||
Patch068: gdb-rhbz-818343-set-solib-absolute-prefix-testcase.patch
|
|
||||||
|
|
||||||
# Import regression test for `gdb/findvar.c:417: internal-error:
|
|
||||||
# read_var_value: Assertion `frame' failed.' (RH BZ 947564) from RHEL 6.5.
|
|
||||||
#=fedoratest
|
|
||||||
Patch069: 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
|
|
||||||
|
|
||||||
# Fix 'memory leak in infpy_read_memory()' (RH BZ 1007614)
|
|
||||||
#=fedoratest
|
|
||||||
Patch071: gdb-rhbz1007614-memleak-infpy_read_memory-test.patch
|
|
||||||
|
|
||||||
# Fix 'gdb gives highly misleading error when debuginfo pkg is present,
|
|
||||||
# but not corresponding binary pkg' (RH BZ 981154).
|
|
||||||
#=push+jan
|
|
||||||
Patch072: gdb-6.6-buildid-locate-misleading-warning-missing-debuginfo-rhbz981154.patch
|
|
||||||
|
|
||||||
#=fedoratest
|
|
||||||
Patch073: gdb-archer-vla-tests.patch
|
|
||||||
|
|
||||||
#=fedoratest
|
|
||||||
Patch074: gdb-vla-intel-tests.patch
|
|
||||||
|
|
||||||
# Continue backtrace even if a frame filter throws an exception (Phil Muldoon).
|
|
||||||
#=push
|
|
||||||
Patch075: gdb-btrobust.patch
|
|
||||||
|
|
||||||
# Display Fortran strings in backtraces.
|
|
||||||
#=fedoratest
|
|
||||||
Patch076: gdb-fortran-frame-string.patch
|
|
||||||
|
|
||||||
# Testcase for '[SAP] Recursive dlopen causes SAP HANA installer to
|
|
||||||
# crash.' (RH BZ 1156192).
|
|
||||||
#=fedoratest
|
|
||||||
Patch077: gdb-rhbz1156192-recursive-dlopen-test.patch
|
|
||||||
|
|
||||||
# Fix jit-reader.h for multi-lib.
|
|
||||||
#=push+jan
|
|
||||||
Patch078: 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
|
|
||||||
|
|
||||||
# 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
|
|
||||||
|
|
||||||
# Test 'info type-printers' Python error (RH BZ 1350436).
|
|
||||||
#=fedoratest
|
|
||||||
Patch081: 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
|
|
||||||
|
|
||||||
# Never kill PID on: gdb exec PID (Jan Kratochvil, RH BZ 1219747).
|
|
||||||
#=push+jan
|
|
||||||
Patch083: gdb-bz1219747-attach-kills.patch
|
|
||||||
|
|
||||||
# Force libncursesw over libncurses to match the includes (RH BZ 1270534).
|
|
||||||
#=push+jan
|
|
||||||
Patch084: gdb-fedora-libncursesw.patch
|
|
||||||
|
|
||||||
# Test clflushopt instruction decode (for RH BZ 1262471).
|
|
||||||
#=fedoratest
|
|
||||||
Patch085: gdb-opcodes-clflushopt-test.patch
|
|
||||||
|
|
||||||
# [rhel6] DTS backward Python compatibility API (BZ 1020004, Phil Muldoon).
|
|
||||||
#=fedora
|
|
||||||
Patch086: 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
|
|
||||||
|
|
||||||
# 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
|
|
||||||
|
|
||||||
# [aarch64] Fix hardware watchpoints (RH BZ 1261564).
|
|
||||||
#=fedoratest
|
|
||||||
Patch089: gdb-rhbz1261564-aarch64-hw-watchpoint-test.patch
|
|
||||||
|
|
||||||
# Add messages suggesting more recent RHEL gdbserver (RH BZ 1321114).
|
|
||||||
#=fedora
|
|
||||||
Patch090: 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
|
|
||||||
|
|
||||||
# [dts+el7] [x86*] Bundle linux_perf.h for libipt (RH BZ 1256513).
|
|
||||||
#=fedora
|
|
||||||
Patch092: 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
|
|
||||||
|
|
||||||
# New testcase for: Fix <tab>-completion crash (Gary Benson, RH BZ 1398387).
|
|
||||||
#=fedoratest
|
|
||||||
Patch094: gdb-rhbz1398387-tab-crash-test.patch
|
|
||||||
|
|
||||||
# Python patches of: http://sourceware.org/gdb/wiki/ProjectArcher
|
|
||||||
#=push
|
|
||||||
Patch095: gdb-archer.patch
|
|
||||||
|
|
||||||
# Revert upstream commit 469412dd9ccc4de5874fd3299b105833f36b34cd
|
|
||||||
Patch096: gdb-vla-intel-fix-print-char-array.patch
|
|
||||||
|
|
||||||
# [s390x] Backport arch12 instructions decoding (RH BZ 1553104).
|
|
||||||
# =fedoratest
|
|
||||||
Patch097: gdb-rhbz1553104-s390x-arch12-test.patch
|
|
||||||
|
|
|
@ -1,94 +0,0 @@
|
||||||
%patch001 -p1
|
|
||||||
%patch002 -p1
|
|
||||||
%patch003 -p1
|
|
||||||
%patch004 -p1
|
|
||||||
%patch005 -p1
|
|
||||||
%patch006 -p1
|
|
||||||
%patch007 -p1
|
|
||||||
%patch008 -p1
|
|
||||||
%patch009 -p1
|
|
||||||
%patch010 -p1
|
|
||||||
%patch012 -p1
|
|
||||||
%patch013 -p1
|
|
||||||
%patch014 -p1
|
|
||||||
%patch015 -p1
|
|
||||||
%patch016 -p1
|
|
||||||
%patch017 -p1
|
|
||||||
%patch018 -p1
|
|
||||||
%patch019 -p1
|
|
||||||
%patch020 -p1
|
|
||||||
%patch021 -p1
|
|
||||||
%patch022 -p1
|
|
||||||
%patch023 -p1
|
|
||||||
%patch024 -p1
|
|
||||||
%patch025 -p1
|
|
||||||
%patch026 -p1
|
|
||||||
%patch028 -p1
|
|
||||||
%patch029 -p1
|
|
||||||
%patch030 -p1
|
|
||||||
%patch031 -p1
|
|
||||||
%patch032 -p1
|
|
||||||
%patch033 -p1
|
|
||||||
%patch034 -p1
|
|
||||||
%patch035 -p1
|
|
||||||
%patch036 -p1
|
|
||||||
%patch038 -p1
|
|
||||||
%patch039 -p1
|
|
||||||
%patch040 -p1
|
|
||||||
%patch041 -p1
|
|
||||||
%patch042 -p1
|
|
||||||
%patch043 -p1
|
|
||||||
%patch044 -p1
|
|
||||||
%patch045 -p1
|
|
||||||
%patch046 -p1
|
|
||||||
%patch047 -p1
|
|
||||||
%patch048 -p1
|
|
||||||
%patch049 -p1
|
|
||||||
%patch050 -p1
|
|
||||||
%patch051 -p1
|
|
||||||
%patch052 -p1
|
|
||||||
%patch053 -p1
|
|
||||||
%patch054 -p1
|
|
||||||
%patch055 -p1
|
|
||||||
%patch056 -p1
|
|
||||||
%patch057 -p1
|
|
||||||
%patch058 -p1
|
|
||||||
%patch059 -p1
|
|
||||||
%patch060 -p1
|
|
||||||
%patch061 -p1
|
|
||||||
%patch062 -p1
|
|
||||||
%patch063 -p1
|
|
||||||
%patch064 -p1
|
|
||||||
%patch065 -p1
|
|
||||||
%patch066 -p1
|
|
||||||
%patch067 -p1
|
|
||||||
%patch068 -p1
|
|
||||||
%patch069 -p1
|
|
||||||
%patch070 -p1
|
|
||||||
%patch071 -p1
|
|
||||||
%patch072 -p1
|
|
||||||
%patch073 -p1
|
|
||||||
%patch074 -p1
|
|
||||||
%patch075 -p1
|
|
||||||
%patch076 -p1
|
|
||||||
%patch077 -p1
|
|
||||||
%patch078 -p1
|
|
||||||
%patch079 -p1
|
|
||||||
%patch080 -p1
|
|
||||||
%patch081 -p1
|
|
||||||
%patch082 -p1
|
|
||||||
%patch083 -p1
|
|
||||||
%patch084 -p1
|
|
||||||
%patch085 -p1
|
|
||||||
%patch086 -p1
|
|
||||||
%patch087 -p1
|
|
||||||
%patch088 -p1
|
|
||||||
%patch089 -p1
|
|
||||||
%patch090 -p1
|
|
||||||
%patch091 -p1
|
|
||||||
%patch092 -p1
|
|
||||||
%patch093 -p1
|
|
||||||
%patch094 -p1
|
|
||||||
%patch095 -p1
|
|
||||||
%patch096 -p1
|
|
||||||
%patch097 -p1
|
|
|
@ -1 +0,0 @@
|
||||||
606e3fd147ed9a00df165e46f30fe5c46dcda345
|
|
97
_patch_order
97
_patch_order
|
@ -1,97 +0,0 @@
|
||||||
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-gstack-20050411.patch
|
|
||||||
gdb-6.3-test-pie-20050107.patch
|
|
||||||
gdb-6.3-test-self-20050110.patch
|
|
||||||
gdb-6.3-test-dtorfix-20050121.patch
|
|
||||||
gdb-6.3-test-movedir-20050125.patch
|
|
||||||
gdb-6.3-threaded-watchpoints2-20050225.patch
|
|
||||||
gdb-6.3-inferior-notification-20050721.patch
|
|
||||||
gdb-6.3-inheritancetest-20050726.patch
|
|
||||||
gdb-6.5-bz185337-resolve-tls-without-debuginfo-v2.patch
|
|
||||||
gdb-6.5-sharedlibrary-path.patch
|
|
||||||
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-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
|
|
||||||
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-testsuite-timeouts.patch
|
|
||||||
gdb-6.6-bz237572-ppc-atomic-sequence-test.patch
|
|
||||||
gdb-6.3-attach-see-vdso-test.patch
|
|
||||||
gdb-6.5-bz243845-stale-testing-zombie-test.patch
|
|
||||||
gdb-6.6-buildid-locate.patch
|
|
||||||
gdb-6.6-buildid-locate-solib-missing-ids.patch
|
|
||||||
gdb-6.6-buildid-locate-rpm.patch
|
|
||||||
gdb-6.7-charsign-test.patch
|
|
||||||
gdb-6.7-ppc-clobbered-registers-O2-test.patch
|
|
||||||
gdb-6.7-testsuite-stable-results.patch
|
|
||||||
gdb-6.5-ia64-libunwind-leak-test.patch
|
|
||||||
gdb-6.5-missed-trap-on-step-test.patch
|
|
||||||
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.5-section-num-fixup-test.patch
|
|
||||||
gdb-6.8-bz466901-backtrace-full-prelinked.patch
|
|
||||||
gdb-simultaneous-step-resume-breakpoint-test.patch
|
|
||||||
gdb-core-open-vdso-warning.patch
|
|
||||||
gdb-bz533176-fortran-omp-step.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-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-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-test-ivy-bridge.patch
|
|
||||||
gdb-runtest-pie-override.patch
|
|
||||||
gdb-attach-fail-reasons-5of5.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-rhbz947564-findvar-assertion-frame-failed-testcase.patch
|
|
||||||
gdb-gnat-dwarf-crash-3of3.patch
|
|
||||||
gdb-rhbz1007614-memleak-infpy_read_memory-test.patch
|
|
||||||
gdb-6.6-buildid-locate-misleading-warning-missing-debuginfo-rhbz981154.patch
|
|
||||||
gdb-archer-vla-tests.patch
|
|
||||||
gdb-vla-intel-tests.patch
|
|
||||||
gdb-btrobust.patch
|
|
||||||
gdb-fortran-frame-string.patch
|
|
||||||
gdb-rhbz1156192-recursive-dlopen-test.patch
|
|
||||||
gdb-jit-reader-multilib.patch
|
|
||||||
gdb-rhbz1149205-catch-syscall-after-fork-test.patch
|
|
||||||
gdb-rhbz1186476-internal-error-unqualified-name-re-set-test.patch
|
|
||||||
gdb-rhbz1350436-type-printers-error.patch
|
|
||||||
gdb-rhbz1084404-ppc64-s390x-wrong-prologue-skip-O2-g-3of3.patch
|
|
||||||
gdb-bz1219747-attach-kills.patch
|
|
||||||
gdb-fedora-libncursesw.patch
|
|
||||||
gdb-opcodes-clflushopt-test.patch
|
|
||||||
gdb-dts-rhel6-python-compat.patch
|
|
||||||
gdb-6.6-buildid-locate-rpm-scl.patch
|
|
||||||
gdb-6.8-quit-never-aborts.patch
|
|
||||||
gdb-rhbz1261564-aarch64-hw-watchpoint-test.patch
|
|
||||||
gdb-container-rh-pkg.patch
|
|
||||||
gdb-rhbz1325795-framefilters-test.patch
|
|
||||||
gdb-linux_perf-bundle.patch
|
|
||||||
gdb-libexec-add-index.patch
|
|
||||||
gdb-rhbz1398387-tab-crash-test.patch
|
|
||||||
gdb-archer.patch
|
|
||||||
gdb-vla-intel-fix-print-char-array.patch
|
|
||||||
gdb-rhbz1553104-s390x-arch12-test.patch
|
|
|
@ -1,15 +1,7 @@
|
||||||
From FEDORA_PATCHES Mon Sep 17 00:00:00 2001
|
Index: gdb-7.10.90.20160211/gdb/testsuite/gdb.base/attach-see-vdso.c
|
||||||
From: Fedora GDB patches <invalid@email.com>
|
===================================================================
|
||||||
Date: Fri, 27 Oct 2017 21:07:50 +0200
|
--- /dev/null 1970-01-01 00:00:00.000000000 +0000
|
||||||
Subject: gdb-6.3-attach-see-vdso-test.patch
|
+++ gdb-7.10.90.20160211/gdb/testsuite/gdb.base/attach-see-vdso.c 2016-02-15 23:25:36.749601045 +0100
|
||||||
|
|
||||||
;; Test kernel VDSO decoding while attaching to an i386 process.
|
|
||||||
;;=fedoratest
|
|
||||||
|
|
||||||
diff --git a/gdb/testsuite/gdb.base/attach-see-vdso.c b/gdb/testsuite/gdb.base/attach-see-vdso.c
|
|
||||||
new file mode 100644
|
|
||||||
--- /dev/null
|
|
||||||
+++ b/gdb/testsuite/gdb.base/attach-see-vdso.c
|
|
||||||
@@ -0,0 +1,25 @@
|
@@ -0,0 +1,25 @@
|
||||||
+/* This testcase is part of GDB, the GNU debugger.
|
+/* This testcase is part of GDB, the GNU debugger.
|
||||||
+
|
+
|
||||||
|
@ -36,10 +28,10 @@ new file mode 100644
|
||||||
+ pause ();
|
+ pause ();
|
||||||
+ return 1;
|
+ return 1;
|
||||||
+}
|
+}
|
||||||
diff --git a/gdb/testsuite/gdb.base/attach-see-vdso.exp b/gdb/testsuite/gdb.base/attach-see-vdso.exp
|
Index: gdb-7.10.90.20160211/gdb/testsuite/gdb.base/attach-see-vdso.exp
|
||||||
new file mode 100644
|
===================================================================
|
||||||
--- /dev/null
|
--- /dev/null 1970-01-01 00:00:00.000000000 +0000
|
||||||
+++ b/gdb/testsuite/gdb.base/attach-see-vdso.exp
|
+++ gdb-7.10.90.20160211/gdb/testsuite/gdb.base/attach-see-vdso.exp 2016-02-15 23:25:44.889658840 +0100
|
||||||
@@ -0,0 +1,72 @@
|
@@ -0,0 +1,72 @@
|
||||||
+# Copyright 2007
|
+# Copyright 2007
|
||||||
+
|
+
|
||||||
|
|
|
@ -1,15 +1,6 @@
|
||||||
From FEDORA_PATCHES Mon Sep 17 00:00:00 2001
|
diff -u -ruNp gdb-6.3-unpatched/gdb/testsuite/gdb.arch/powerpc-bcl-prologue-asm32.S gdb-6.3/gdb/testsuite/gdb.arch/powerpc-bcl-prologue-asm32.S
|
||||||
From: Fedora GDB patches <invalid@email.com>
|
--- gdb-6.3-unpatched/gdb/testsuite/gdb.arch/powerpc-bcl-prologue-asm32.S 1969-12-31 19:00:00.000000000 -0500
|
||||||
Date: Fri, 27 Oct 2017 21:07:50 +0200
|
+++ gdb-6.3/gdb/testsuite/gdb.arch/powerpc-bcl-prologue-asm32.S 2007-08-02 13:23:10.000000000 -0400
|
||||||
Subject: gdb-6.3-bz140532-ppc-unwinding-test.patch
|
|
||||||
|
|
||||||
;; Update PPC unwinding patches to their upstream variants (BZ 140532).
|
|
||||||
;;=fedoratest
|
|
||||||
|
|
||||||
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
|
|
||||||
--- /dev/null
|
|
||||||
+++ b/gdb/testsuite/gdb.arch/powerpc-bcl-prologue-asm32.S
|
|
||||||
@@ -0,0 +1,78 @@
|
@@ -0,0 +1,78 @@
|
||||||
+/* This testcase is part of GDB, the GNU debugger.
|
+/* This testcase is part of GDB, the GNU debugger.
|
||||||
+
|
+
|
||||||
|
@ -89,10 +80,9 @@ 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
|
diff -u -ruNp gdb-6.3-unpatched/gdb/testsuite/gdb.arch/powerpc-bcl-prologue-asm64.S gdb-6.3/gdb/testsuite/gdb.arch/powerpc-bcl-prologue-asm64.S
|
||||||
new file mode 100644
|
--- gdb-6.3-unpatched/gdb/testsuite/gdb.arch/powerpc-bcl-prologue-asm64.S 1969-12-31 19:00:00.000000000 -0500
|
||||||
--- /dev/null
|
+++ gdb-6.3/gdb/testsuite/gdb.arch/powerpc-bcl-prologue-asm64.S 2007-08-02 14:28:56.000000000 -0400
|
||||||
+++ b/gdb/testsuite/gdb.arch/powerpc-bcl-prologue-asm64.S
|
|
||||||
@@ -0,0 +1,98 @@
|
@@ -0,0 +1,98 @@
|
||||||
+/* This testcase is part of GDB, the GNU debugger.
|
+/* This testcase is part of GDB, the GNU debugger.
|
||||||
+
|
+
|
||||||
|
@ -192,10 +182,9 @@ new file mode 100644
|
||||||
+}
|
+}
|
||||||
+
|
+
|
||||||
+*/
|
+*/
|
||||||
diff --git a/gdb/testsuite/gdb.arch/powerpc-bcl-prologue.c b/gdb/testsuite/gdb.arch/powerpc-bcl-prologue.c
|
diff -u -ruNp gdb-6.3-unpatched/gdb/testsuite/gdb.arch/powerpc-bcl-prologue.c gdb-6.3/gdb/testsuite/gdb.arch/powerpc-bcl-prologue.c
|
||||||
new file mode 100644
|
--- gdb-6.3-unpatched/gdb/testsuite/gdb.arch/powerpc-bcl-prologue.c 1969-12-31 19:00:00.000000000 -0500
|
||||||
--- /dev/null
|
+++ gdb-6.3/gdb/testsuite/gdb.arch/powerpc-bcl-prologue.c 2007-08-02 13:25:10.000000000 -0400
|
||||||
+++ b/gdb/testsuite/gdb.arch/powerpc-bcl-prologue.c
|
|
||||||
@@ -0,0 +1,29 @@
|
@@ -0,0 +1,29 @@
|
||||||
+/* This testcase is part of GDB, the GNU debugger.
|
+/* This testcase is part of GDB, the GNU debugger.
|
||||||
+
|
+
|
||||||
|
@ -226,10 +215,9 @@ new file mode 100644
|
||||||
+ func1 ();
|
+ func1 ();
|
||||||
+ return 0;
|
+ return 0;
|
||||||
+}
|
+}
|
||||||
diff --git a/gdb/testsuite/gdb.arch/powerpc-bcl-prologue.exp b/gdb/testsuite/gdb.arch/powerpc-bcl-prologue.exp
|
diff -u -ruNp gdb-6.3-unpatched/gdb/testsuite/gdb.arch/powerpc-bcl-prologue.exp gdb-6.3/gdb/testsuite/gdb.arch/powerpc-bcl-prologue.exp
|
||||||
new file mode 100644
|
--- gdb-6.3-unpatched/gdb/testsuite/gdb.arch/powerpc-bcl-prologue.exp 1969-12-31 19:00:00.000000000 -0500
|
||||||
--- /dev/null
|
+++ gdb-6.3/gdb/testsuite/gdb.arch/powerpc-bcl-prologue.exp 2007-08-02 14:21:29.000000000 -0400
|
||||||
+++ b/gdb/testsuite/gdb.arch/powerpc-bcl-prologue.exp
|
|
||||||
@@ -0,0 +1,72 @@
|
@@ -0,0 +1,72 @@
|
||||||
+# Copyright 2006, 2007 Free Software Foundation, Inc.
|
+# Copyright 2006, 2007 Free Software Foundation, Inc.
|
||||||
+
|
+
|
||||||
|
@ -303,10 +291,12 @@ new file mode 100644
|
||||||
+ pass $test
|
+ pass $test
|
||||||
+ }
|
+ }
|
||||||
+}
|
+}
|
||||||
diff --git a/gdb/testsuite/gdb.arch/powerpc-prologue.exp b/gdb/testsuite/gdb.arch/powerpc-prologue.exp
|
|
||||||
--- a/gdb/testsuite/gdb.arch/powerpc-prologue.exp
|
Fixup the testcase for ppc64 biarch GDB.
|
||||||
+++ b/gdb/testsuite/gdb.arch/powerpc-prologue.exp
|
|
||||||
@@ -16,8 +16,9 @@
|
--- ./gdb/testsuite/gdb.arch/powerpc-prologue.exp 2008-01-13 13:32:19.000000000 +0100
|
||||||
|
+++ ./gdb/testsuite/gdb.arch/powerpc-prologue.exp 2008-01-02 00:04:10.000000000 +0100
|
||||||
|
@@ -17,8 +17,9 @@
|
||||||
# Test PowerPC prologue analyzer.
|
# Test PowerPC prologue analyzer.
|
||||||
|
|
||||||
# Do not run on AIX (where we won't be able to build the tests without
|
# Do not run on AIX (where we won't be able to build the tests without
|
||||||
|
|
|
@ -1,19 +1,12 @@
|
||||||
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.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>
|
2007-01-17 Jan Kratochvil <jan.kratochvil@redhat.com>
|
||||||
|
|
||||||
* gdb.threads/threaded-exec.exp, gdb.threads/threaded-exec.c: New files.
|
* gdb.threads/threaded-exec.exp, gdb.threads/threaded-exec.c: New files.
|
||||||
|
|
||||||
diff --git a/gdb/testsuite/gdb.threads/threaded-exec.c b/gdb/testsuite/gdb.threads/threaded-exec.c
|
|
||||||
new file mode 100644
|
Index: gdb-7.10.90.20160211/gdb/testsuite/gdb.threads/threaded-exec.c
|
||||||
--- /dev/null
|
===================================================================
|
||||||
+++ b/gdb/testsuite/gdb.threads/threaded-exec.c
|
--- /dev/null 1970-01-01 00:00:00.000000000 +0000
|
||||||
|
+++ gdb-7.10.90.20160211/gdb/testsuite/gdb.threads/threaded-exec.c 2016-02-16 09:54:06.936904418 +0100
|
||||||
@@ -0,0 +1,46 @@
|
@@ -0,0 +1,46 @@
|
||||||
+/* This testcase is part of GDB, the GNU debugger.
|
+/* This testcase is part of GDB, the GNU debugger.
|
||||||
+
|
+
|
||||||
|
@ -61,10 +54,10 @@ new file mode 100644
|
||||||
+ execl ("/bin/true", "/bin/true", NULL);
|
+ execl ("/bin/true", "/bin/true", NULL);
|
||||||
+ abort ();
|
+ abort ();
|
||||||
+}
|
+}
|
||||||
diff --git a/gdb/testsuite/gdb.threads/threaded-exec.exp b/gdb/testsuite/gdb.threads/threaded-exec.exp
|
Index: gdb-7.10.90.20160211/gdb/testsuite/gdb.threads/threaded-exec.exp
|
||||||
new file mode 100644
|
===================================================================
|
||||||
--- /dev/null
|
--- /dev/null 1970-01-01 00:00:00.000000000 +0000
|
||||||
+++ b/gdb/testsuite/gdb.threads/threaded-exec.exp
|
+++ gdb-7.10.90.20160211/gdb/testsuite/gdb.threads/threaded-exec.exp 2016-02-16 09:54:19.965992585 +0100
|
||||||
@@ -0,0 +1,41 @@
|
@@ -0,0 +1,41 @@
|
||||||
+# threaded-exec.exp -- Check reset of the tracked threads on exec*(2)
|
+# threaded-exec.exp -- Check reset of the tracked threads on exec*(2)
|
||||||
+# Copyright (C) 2007 Free Software Foundation, Inc.
|
+# Copyright (C) 2007 Free Software Foundation, Inc.
|
||||||
|
|
|
@ -1,15 +1,7 @@
|
||||||
From FEDORA_PATCHES Mon Sep 17 00:00:00 2001
|
Index: gdb-7.12.50.20170226/gdb/testsuite/gdb.base/focus-cmd-prev.exp
|
||||||
From: Fedora GDB patches <invalid@email.com>
|
===================================================================
|
||||||
Date: Fri, 27 Oct 2017 21:07:50 +0200
|
--- /dev/null 1970-01-01 00:00:00.000000000 +0000
|
||||||
Subject: gdb-6.3-focus-cmd-prev-test.patch
|
+++ gdb-7.12.50.20170226/gdb/testsuite/gdb.base/focus-cmd-prev.exp 2017-03-02 09:39:14.508461085 +0100
|
||||||
|
|
||||||
;; Test a crash on `focus cmd', `focus prev' commands.
|
|
||||||
;;=fedoratest
|
|
||||||
|
|
||||||
diff --git a/gdb/testsuite/gdb.base/focus-cmd-prev.exp b/gdb/testsuite/gdb.base/focus-cmd-prev.exp
|
|
||||||
new file mode 100644
|
|
||||||
--- /dev/null
|
|
||||||
+++ b/gdb/testsuite/gdb.base/focus-cmd-prev.exp
|
|
||||||
@@ -0,0 +1,40 @@
|
@@ -0,0 +1,40 @@
|
||||||
+# Copyright 2008 Free Software Foundation, Inc.
|
+# Copyright 2008 Free Software Foundation, Inc.
|
||||||
+
|
+
|
||||||
|
|
|
@ -1,22 +1,14 @@
|
||||||
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-gstack-20050411.patch
|
|
||||||
|
|
||||||
;; Add a wrapper script to GDB that implements pstack using the
|
|
||||||
;; --readnever option.
|
|
||||||
;;=push
|
|
||||||
|
|
||||||
2004-11-23 Andrew Cagney <cagney@redhat.com>
|
2004-11-23 Andrew Cagney <cagney@redhat.com>
|
||||||
|
|
||||||
* Makefile.in (uninstall-gstack, install-gstack): New rules, add
|
* Makefile.in (uninstall-gstack, install-gstack): New rules, add
|
||||||
to install and uninstall.
|
to install and uninstall.
|
||||||
* gstack.sh, gstack.1: New files.
|
* gstack.sh, gstack.1: New files.
|
||||||
|
|
||||||
diff --git a/gdb/Makefile.in b/gdb/Makefile.in
|
Index: gdb-7.7/gdb/Makefile.in
|
||||||
--- a/gdb/Makefile.in
|
===================================================================
|
||||||
+++ b/gdb/Makefile.in
|
--- gdb-7.7.orig/gdb/Makefile.in 2014-02-06 20:29:09.401214339 +0100
|
||||||
@@ -1726,7 +1726,7 @@ info install-info clean-info dvi pdf install-pdf html install-html: force
|
+++ gdb-7.7/gdb/Makefile.in 2014-02-06 20:29:09.501214360 +0100
|
||||||
|
@@ -1067,7 +1067,7 @@ info install-info clean-info dvi pdf ins
|
||||||
install: all
|
install: all
|
||||||
@$(MAKE) $(FLAGS_TO_PASS) install-only
|
@$(MAKE) $(FLAGS_TO_PASS) install-only
|
||||||
|
|
||||||
|
@ -25,7 +17,7 @@ diff --git a/gdb/Makefile.in b/gdb/Makefile.in
|
||||||
transformed_name=`t='$(program_transform_name)'; \
|
transformed_name=`t='$(program_transform_name)'; \
|
||||||
echo gdb | sed -e "$$t"` ; \
|
echo gdb | sed -e "$$t"` ; \
|
||||||
if test "x$$transformed_name" = x; then \
|
if test "x$$transformed_name" = x; then \
|
||||||
@@ -1775,7 +1775,25 @@ install-guile:
|
@@ -1104,7 +1104,25 @@ install-strip:
|
||||||
install-python:
|
install-python:
|
||||||
$(SHELL) $(srcdir)/../mkinstalldirs $(DESTDIR)$(GDB_DATADIR)/python/gdb
|
$(SHELL) $(srcdir)/../mkinstalldirs $(DESTDIR)$(GDB_DATADIR)/python/gdb
|
||||||
|
|
||||||
|
@ -52,7 +44,7 @@ diff --git a/gdb/Makefile.in b/gdb/Makefile.in
|
||||||
transformed_name=`t='$(program_transform_name)'; \
|
transformed_name=`t='$(program_transform_name)'; \
|
||||||
echo gdb | sed -e $$t` ; \
|
echo gdb | sed -e $$t` ; \
|
||||||
if test "x$$transformed_name" = x; then \
|
if test "x$$transformed_name" = x; then \
|
||||||
@@ -1798,6 +1816,18 @@ uninstall: force $(CONFIG_UNINSTALL)
|
@@ -1127,6 +1145,18 @@ uninstall: force $(CONFIG_UNINSTALL)
|
||||||
fi
|
fi
|
||||||
@$(MAKE) DO=uninstall "DODIRS=$(SUBDIRS)" $(FLAGS_TO_PASS) subdir_do
|
@$(MAKE) DO=uninstall "DODIRS=$(SUBDIRS)" $(FLAGS_TO_PASS) subdir_do
|
||||||
|
|
||||||
|
@ -71,10 +63,10 @@ diff --git a/gdb/Makefile.in b/gdb/Makefile.in
|
||||||
# The C++ name parser can be built standalone for testing.
|
# The C++ name parser can be built standalone for testing.
|
||||||
test-cp-name-parser.o: cp-name-parser.c
|
test-cp-name-parser.o: cp-name-parser.c
|
||||||
$(COMPILE) -DTEST_CPNAMES cp-name-parser.c
|
$(COMPILE) -DTEST_CPNAMES cp-name-parser.c
|
||||||
diff --git a/gdb/gstack.sh b/gdb/gstack.sh
|
Index: gdb-7.7/gdb/gstack.sh
|
||||||
new file mode 100644
|
===================================================================
|
||||||
--- /dev/null
|
--- /dev/null 1970-01-01 00:00:00.000000000 +0000
|
||||||
+++ b/gdb/gstack.sh
|
+++ gdb-7.7/gdb/gstack.sh 2014-02-06 20:29:09.501214360 +0100
|
||||||
@@ -0,0 +1,43 @@
|
@@ -0,0 +1,43 @@
|
||||||
+#!/bin/sh
|
+#!/bin/sh
|
||||||
+
|
+
|
||||||
|
@ -119,10 +111,81 @@ new file mode 100644
|
||||||
+ -e 's/^\((gdb) \)*//' \
|
+ -e 's/^\((gdb) \)*//' \
|
||||||
+ -e '/^#/p' \
|
+ -e '/^#/p' \
|
||||||
+ -e '/^Thread/p'
|
+ -e '/^Thread/p'
|
||||||
diff --git a/gdb/testsuite/gdb.base/gstack.c b/gdb/testsuite/gdb.base/gstack.c
|
Index: gdb-7.7/gdb/testsuite/gdb.base/gstack.exp
|
||||||
new file mode 100644
|
===================================================================
|
||||||
--- /dev/null
|
--- /dev/null 1970-01-01 00:00:00.000000000 +0000
|
||||||
+++ b/gdb/testsuite/gdb.base/gstack.c
|
+++ gdb-7.7/gdb/testsuite/gdb.base/gstack.exp 2014-02-06 20:43:17.774747352 +0100
|
||||||
|
@@ -0,0 +1,66 @@
|
||||||
|
+# Copyright (C) 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/>.
|
||||||
|
+
|
||||||
|
+set testfile gstack
|
||||||
|
+set executable ${testfile}
|
||||||
|
+set binfile [standard_output_file $executable]
|
||||||
|
+if {[build_executable ${testfile} ${executable} "" {debug}] == -1} {
|
||||||
|
+ return -1
|
||||||
|
+}
|
||||||
|
+
|
||||||
|
+set test "spawn inferior"
|
||||||
|
+set command "${binfile}"
|
||||||
|
+set res [remote_spawn host $command];
|
||||||
|
+if { $res < 0 || $res == "" } {
|
||||||
|
+ perror "Spawning $command failed."
|
||||||
|
+ fail $test
|
||||||
|
+ return
|
||||||
|
+}
|
||||||
|
+set use_gdb_stub 1
|
||||||
|
+set pid [exp_pid -i $res]
|
||||||
|
+gdb_expect {
|
||||||
|
+ -re "looping\r\n" {
|
||||||
|
+ pass $test
|
||||||
|
+ }
|
||||||
|
+ eof {
|
||||||
|
+ fail "$test (eof)"
|
||||||
|
+ return
|
||||||
|
+ }
|
||||||
|
+ timeout {
|
||||||
|
+ fail "$test (timeout)"
|
||||||
|
+ 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.
|
||||||
|
+
|
||||||
|
+set test "spawn gstack"
|
||||||
|
+set command "sh -c GDB=$GDB\\ GDBARGS=-data-directory\\\\\\ $BUILD_DATA_DIRECTORY\\ sh\\ ${srcdir}/../gstack.sh\\ $pid\\;echo\\ GSTACK-END"
|
||||||
|
+set res [remote_spawn host $command];
|
||||||
|
+if { $res < 0 || $res == "" } {
|
||||||
|
+ perror "Spawning $command failed."
|
||||||
|
+ fail $test
|
||||||
|
+}
|
||||||
|
+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
|
||||||
|
+
|
||||||
|
+remote_exec host "kill -9 $pid"
|
||||||
|
Index: gdb-7.7/gdb/testsuite/gdb.base/gstack.c
|
||||||
|
===================================================================
|
||||||
|
--- /dev/null 1970-01-01 00:00:00.000000000 +0000
|
||||||
|
+++ gdb-7.7/gdb/testsuite/gdb.base/gstack.c 2014-02-06 20:29:09.502214360 +0100
|
||||||
@@ -0,0 +1,43 @@
|
@@ -0,0 +1,43 @@
|
||||||
+/* This testcase is part of GDB, the GNU debugger.
|
+/* This testcase is part of GDB, the GNU debugger.
|
||||||
+
|
+
|
||||||
|
@ -167,92 +230,3 @@ new file mode 100644
|
||||||
+
|
+
|
||||||
+ return 0;
|
+ return 0;
|
||||||
+}
|
+}
|
||||||
diff --git a/gdb/testsuite/gdb.base/gstack.exp b/gdb/testsuite/gdb.base/gstack.exp
|
|
||||||
new file mode 100644
|
|
||||||
--- /dev/null
|
|
||||||
+++ b/gdb/testsuite/gdb.base/gstack.exp
|
|
||||||
@@ -0,0 +1,84 @@
|
|
||||||
+# Copyright (C) 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/>.
|
|
||||||
+
|
|
||||||
+set testfile gstack
|
|
||||||
+set executable ${testfile}
|
|
||||||
+set binfile [standard_output_file $executable]
|
|
||||||
+if {[build_executable ${testfile} ${executable} "" {debug}] == -1} {
|
|
||||||
+ return -1
|
|
||||||
+}
|
|
||||||
+
|
|
||||||
+set test "spawn inferior"
|
|
||||||
+set command "${binfile}"
|
|
||||||
+set res [remote_spawn host $command];
|
|
||||||
+if { $res < 0 || $res == "" } {
|
|
||||||
+ perror "Spawning $command failed."
|
|
||||||
+ 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 {
|
|
||||||
+ -re "looping\r\n" {
|
|
||||||
+ pass $test
|
|
||||||
+ }
|
|
||||||
+ eof {
|
|
||||||
+ fail "$test (eof)"
|
|
||||||
+ return
|
|
||||||
+ }
|
|
||||||
+ timeout {
|
|
||||||
+ fail "$test (timeout)"
|
|
||||||
+ return
|
|
||||||
+ }
|
|
||||||
+}
|
|
||||||
+
|
|
||||||
+# 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.
|
|
||||||
+
|
|
||||||
+set test "spawn gstack"
|
|
||||||
+set command "sh -c GDB=$GDB\\ GDBARGS=-data-directory\\\\\\ $BUILD_DATA_DIRECTORY\\ sh\\ ${srcdir}/../gstack.sh\\ $pid\\;echo\\ GSTACK-END"
|
|
||||||
+set res [remote_spawn host $command];
|
|
||||||
+if { $res < 0 || $res == "" } {
|
|
||||||
+ perror "Spawning $command failed."
|
|
||||||
+ fail $test
|
|
||||||
+}
|
|
||||||
+
|
|
||||||
+set gdb_spawn_id $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_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
|
|
||||||
|
|
|
@ -1,11 +1,3 @@
|
||||||
From FEDORA_PATCHES Mon Sep 17 00:00:00 2001
|
|
||||||
From: Jeff Johnston <jjohnstn@redhat.com>
|
|
||||||
Date: Fri, 27 Oct 2017 21:07:50 +0200
|
|
||||||
Subject: gdb-6.3-inferior-notification-20050721.patch
|
|
||||||
|
|
||||||
;; Notify observers that the inferior has been created
|
|
||||||
;;=fedoratest
|
|
||||||
|
|
||||||
2005-07-21 Jeff Johnston <jjohnstn@redhat.com>
|
2005-07-21 Jeff Johnston <jjohnstn@redhat.com>
|
||||||
|
|
||||||
* gdb.base/attach-32.exp: New test for attaching in 32-bit
|
* gdb.base/attach-32.exp: New test for attaching in 32-bit
|
||||||
|
@ -17,10 +9,10 @@ Subject: gdb-6.3-inferior-notification-20050721.patch
|
||||||
|
|
||||||
* gdb.base/attach-32.exp: Fix forgotten $GDBFLAGS as set.
|
* gdb.base/attach-32.exp: Fix forgotten $GDBFLAGS as set.
|
||||||
|
|
||||||
diff --git a/gdb/testsuite/gdb.base/attach-32.c b/gdb/testsuite/gdb.base/attach-32.c
|
Index: gdb-7.10.90.20160211/gdb/testsuite/gdb.base/attach-32.c
|
||||||
new file mode 100644
|
===================================================================
|
||||||
--- /dev/null
|
--- /dev/null 1970-01-01 00:00:00.000000000 +0000
|
||||||
+++ b/gdb/testsuite/gdb.base/attach-32.c
|
+++ gdb-7.10.90.20160211/gdb/testsuite/gdb.base/attach-32.c 2016-02-15 23:23:02.923499512 +0100
|
||||||
@@ -0,0 +1,20 @@
|
@@ -0,0 +1,20 @@
|
||||||
+/* This program is intended to be started outside of gdb, and then
|
+/* This program is intended to be started outside of gdb, and then
|
||||||
+ attached to by gdb. Thus, it simply spins in a loop. The loop
|
+ attached to by gdb. Thus, it simply spins in a loop. The loop
|
||||||
|
@ -42,10 +34,10 @@ new file mode 100644
|
||||||
+ }
|
+ }
|
||||||
+ return 0;
|
+ return 0;
|
||||||
+}
|
+}
|
||||||
diff --git a/gdb/testsuite/gdb.base/attach-32.exp b/gdb/testsuite/gdb.base/attach-32.exp
|
Index: gdb-7.10.90.20160211/gdb/testsuite/gdb.base/attach-32.exp
|
||||||
new file mode 100644
|
===================================================================
|
||||||
--- /dev/null
|
--- /dev/null 1970-01-01 00:00:00.000000000 +0000
|
||||||
+++ b/gdb/testsuite/gdb.base/attach-32.exp
|
+++ gdb-7.10.90.20160211/gdb/testsuite/gdb.base/attach-32.exp 2016-02-15 23:25:11.385420957 +0100
|
||||||
@@ -0,0 +1,245 @@
|
@@ -0,0 +1,245 @@
|
||||||
+# Copyright 2005 Free Software Foundation, Inc.
|
+# Copyright 2005 Free Software Foundation, Inc.
|
||||||
+
|
+
|
||||||
|
@ -262,7 +254,7 @@ new file mode 100644
|
||||||
+}
|
+}
|
||||||
+
|
+
|
||||||
+set GDBFLAGS_orig $GDBFLAGS
|
+set GDBFLAGS_orig $GDBFLAGS
|
||||||
+set GDBFLAGS "-iex \"set height 0\" --pid=$testpid"
|
+set GDBFLAGS "--pid=$testpid"
|
||||||
+gdb_start
|
+gdb_start
|
||||||
+set GDBFLAGS $GDBFLAGS_orig
|
+set GDBFLAGS $GDBFLAGS_orig
|
||||||
+
|
+
|
||||||
|
@ -284,7 +276,7 @@ new file mode 100644
|
||||||
+}
|
+}
|
||||||
+
|
+
|
||||||
+set GDBFLAGS_orig $GDBFLAGS
|
+set GDBFLAGS_orig $GDBFLAGS
|
||||||
+set GDBFLAGS "-iex \"set height 0\" --pid=$testpid"
|
+set GDBFLAGS "--pid=$testpid"
|
||||||
+gdb_start
|
+gdb_start
|
||||||
+set GDBFLAGS $GDBFLAGS_orig
|
+set GDBFLAGS $GDBFLAGS_orig
|
||||||
+
|
+
|
||||||
|
@ -292,10 +284,10 @@ new file mode 100644
|
||||||
+do_call_attach_tests
|
+do_call_attach_tests
|
||||||
+
|
+
|
||||||
+return 0
|
+return 0
|
||||||
diff --git a/gdb/testsuite/gdb.base/attach-32b.c b/gdb/testsuite/gdb.base/attach-32b.c
|
Index: gdb-7.10.90.20160211/gdb/testsuite/gdb.base/attach-32b.c
|
||||||
new file mode 100644
|
===================================================================
|
||||||
--- /dev/null
|
--- /dev/null 1970-01-01 00:00:00.000000000 +0000
|
||||||
+++ b/gdb/testsuite/gdb.base/attach-32b.c
|
+++ gdb-7.10.90.20160211/gdb/testsuite/gdb.base/attach-32b.c 2016-02-15 23:23:02.924499519 +0100
|
||||||
@@ -0,0 +1,24 @@
|
@@ -0,0 +1,24 @@
|
||||||
+/* This program is intended to be started outside of gdb, and then
|
+/* This program is intended to be started outside of gdb, and then
|
||||||
+ attached to by gdb. Thus, it simply spins in a loop. The loop
|
+ attached to by gdb. Thus, it simply spins in a loop. The loop
|
||||||
|
|
|
@ -1,11 +1,3 @@
|
||||||
From FEDORA_PATCHES Mon Sep 17 00:00:00 2001
|
|
||||||
From: Jeff Johnston <jjohnstn@redhat.com>
|
|
||||||
Date: Fri, 27 Oct 2017 21:07:50 +0200
|
|
||||||
Subject: gdb-6.3-inheritancetest-20050726.patch
|
|
||||||
|
|
||||||
;; Verify printing of inherited members test
|
|
||||||
;;=fedoratest
|
|
||||||
|
|
||||||
2005-07-26 Jeff Johnston <jjohnstn@redhat.com>
|
2005-07-26 Jeff Johnston <jjohnstn@redhat.com>
|
||||||
|
|
||||||
* gdb.cp/b146835.exp: New testcase.
|
* gdb.cp/b146835.exp: New testcase.
|
||||||
|
@ -13,10 +5,26 @@ Subject: gdb-6.3-inheritancetest-20050726.patch
|
||||||
* gdb.cp/b146835b.cc: Ditto.
|
* gdb.cp/b146835b.cc: Ditto.
|
||||||
* gdb.cp/b146835.h: Ditto.
|
* gdb.cp/b146835.h: Ditto.
|
||||||
|
|
||||||
diff --git a/gdb/testsuite/gdb.cp/b146835.cc b/gdb/testsuite/gdb.cp/b146835.cc
|
Index: gdb-7.10.90.20160211/gdb/testsuite/gdb.cp/b146835b.cc
|
||||||
new file mode 100644
|
===================================================================
|
||||||
--- /dev/null
|
--- /dev/null 1970-01-01 00:00:00.000000000 +0000
|
||||||
+++ b/gdb/testsuite/gdb.cp/b146835.cc
|
+++ gdb-7.10.90.20160211/gdb/testsuite/gdb.cp/b146835b.cc 2016-02-16 09:49:08.743886620 +0100
|
||||||
|
@@ -0,0 +1,11 @@
|
||||||
|
+#include "b146835.h"
|
||||||
|
+
|
||||||
|
+C::C() { d = 0; x = 3; }
|
||||||
|
+
|
||||||
|
+int C::z (char *s) { return 0; }
|
||||||
|
+
|
||||||
|
+C::~C() {}
|
||||||
|
+
|
||||||
|
+void A::funcD (class E *e, class D *d) {}
|
||||||
|
+void A::funcE (E *e, D *d) {}
|
||||||
|
+void A::funcF (unsigned long x, D *d) {}
|
||||||
|
Index: gdb-7.10.90.20160211/gdb/testsuite/gdb.cp/b146835.cc
|
||||||
|
===================================================================
|
||||||
|
--- /dev/null 1970-01-01 00:00:00.000000000 +0000
|
||||||
|
+++ gdb-7.10.90.20160211/gdb/testsuite/gdb.cp/b146835.cc 2016-02-16 09:49:08.744886627 +0100
|
||||||
@@ -0,0 +1,32 @@
|
@@ -0,0 +1,32 @@
|
||||||
+#include "b146835.h"
|
+#include "b146835.h"
|
||||||
+#include <iostream>
|
+#include <iostream>
|
||||||
|
@ -50,10 +58,10 @@ new file mode 100644
|
||||||
+ f.foo();
|
+ f.foo();
|
||||||
+}
|
+}
|
||||||
+
|
+
|
||||||
diff --git a/gdb/testsuite/gdb.cp/b146835.exp b/gdb/testsuite/gdb.cp/b146835.exp
|
Index: gdb-7.10.90.20160211/gdb/testsuite/gdb.cp/b146835.exp
|
||||||
new file mode 100644
|
===================================================================
|
||||||
--- /dev/null
|
--- /dev/null 1970-01-01 00:00:00.000000000 +0000
|
||||||
+++ b/gdb/testsuite/gdb.cp/b146835.exp
|
+++ gdb-7.10.90.20160211/gdb/testsuite/gdb.cp/b146835.exp 2016-02-16 09:51:48.601968339 +0100
|
||||||
@@ -0,0 +1,47 @@
|
@@ -0,0 +1,47 @@
|
||||||
+# This testcase is part of GDB, the GNU debugger.
|
+# This testcase is part of GDB, the GNU debugger.
|
||||||
+
|
+
|
||||||
|
@ -102,10 +110,10 @@ new file mode 100644
|
||||||
+
|
+
|
||||||
+# Verify that we can access the inherited member d
|
+# Verify that we can access the inherited member d
|
||||||
+gdb_test "p d" " = \\(D \\*\\) *0x0" "Verify inherited member d accessible"
|
+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
|
Index: gdb-7.10.90.20160211/gdb/testsuite/gdb.cp/b146835.h
|
||||||
new file mode 100644
|
===================================================================
|
||||||
--- /dev/null
|
--- /dev/null 1970-01-01 00:00:00.000000000 +0000
|
||||||
+++ b/gdb/testsuite/gdb.cp/b146835.h
|
+++ gdb-7.10.90.20160211/gdb/testsuite/gdb.cp/b146835.h 2016-02-16 09:49:08.744886627 +0100
|
||||||
@@ -0,0 +1,36 @@
|
@@ -0,0 +1,36 @@
|
||||||
+
|
+
|
||||||
+class A {
|
+class A {
|
||||||
|
@ -143,19 +151,3 @@ new file mode 100644
|
||||||
+ int z (char *s);
|
+ int z (char *s);
|
||||||
+ virtual ~C();
|
+ virtual ~C();
|
||||||
+};
|
+};
|
||||||
diff --git a/gdb/testsuite/gdb.cp/b146835b.cc b/gdb/testsuite/gdb.cp/b146835b.cc
|
|
||||||
new file mode 100644
|
|
||||||
--- /dev/null
|
|
||||||
+++ b/gdb/testsuite/gdb.cp/b146835b.cc
|
|
||||||
@@ -0,0 +1,11 @@
|
|
||||||
+#include "b146835.h"
|
|
||||||
+
|
|
||||||
+C::C() { d = 0; x = 3; }
|
|
||||||
+
|
|
||||||
+int C::z (char *s) { return 0; }
|
|
||||||
+
|
|
||||||
+C::~C() {}
|
|
||||||
+
|
|
||||||
+void A::funcD (class E *e, class D *d) {}
|
|
||||||
+void A::funcE (E *e, D *d) {}
|
|
||||||
+void A::funcF (unsigned long x, D *d) {}
|
|
||||||
|
|
|
@ -1,15 +1,113 @@
|
||||||
From FEDORA_PATCHES Mon Sep 17 00:00:00 2001
|
Index: gdb-7.6.50.20130731-cvs/gdb/testsuite/gdb.base/gcore-shmid0.exp
|
||||||
From: Fedora GDB patches <invalid@email.com>
|
===================================================================
|
||||||
Date: Fri, 27 Oct 2017 21:07:50 +0200
|
--- /dev/null 1970-01-01 00:00:00.000000000 +0000
|
||||||
Subject: gdb-6.3-mapping-zero-inode-test.patch
|
+++ gdb-7.6.50.20130731-cvs/gdb/testsuite/gdb.base/gcore-shmid0.exp 2013-08-02 22:24:04.747745133 +0200
|
||||||
|
@@ -0,0 +1,101 @@
|
||||||
;; Test GCORE for shmid 0 shared memory mappings.
|
+# Copyright 2007, 2009 Free Software Foundation, Inc.
|
||||||
;;=fedoratest: But it is broken anyway, sometimes the case being tested is not reproducible.
|
+
|
||||||
|
+# This program is free software; you can redistribute it and/or modify
|
||||||
diff --git a/gdb/testsuite/gdb.base/gcore-shmid0.c b/gdb/testsuite/gdb.base/gcore-shmid0.c
|
+# it under the terms of the GNU General Public License as published by
|
||||||
new file mode 100644
|
+# the Free Software Foundation; either version 2 of the License, or
|
||||||
--- /dev/null
|
+# (at your option) any later version.
|
||||||
+++ b/gdb/testsuite/gdb.base/gcore-shmid0.c
|
+#
|
||||||
|
+# 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.
|
||||||
|
+
|
||||||
|
+# Test GDB's handling of gcore for mapping with a name but zero inode.
|
||||||
|
+
|
||||||
|
+if { [prepare_for_testing gcore-shmid0.exp gcore-shmid0] } {
|
||||||
|
+ return -1
|
||||||
|
+}
|
||||||
|
+
|
||||||
|
+# Does this gdb support gcore?
|
||||||
|
+set test "help gcore"
|
||||||
|
+gdb_test_multiple $test $test {
|
||||||
|
+ -re "Undefined command: .gcore.*$gdb_prompt $" {
|
||||||
|
+ # gcore command not supported -- nothing to test here.
|
||||||
|
+ unsupported "gdb does not support gcore on this target"
|
||||||
|
+ return -1;
|
||||||
|
+ }
|
||||||
|
+ -re "Save a core file .*$gdb_prompt $" {
|
||||||
|
+ pass $test
|
||||||
|
+ }
|
||||||
|
+}
|
||||||
|
+
|
||||||
|
+if { ! [ runto_main ] } then {
|
||||||
|
+ untested gcore-shmid0.exp
|
||||||
|
+ return -1
|
||||||
|
+}
|
||||||
|
+
|
||||||
|
+gdb_breakpoint "initialized"
|
||||||
|
+gdb_breakpoint "unresolved"
|
||||||
|
+
|
||||||
|
+set oldtimeout $timeout
|
||||||
|
+set timeout [expr $oldtimeout + 120]
|
||||||
|
+
|
||||||
|
+set test "Continue to initialized."
|
||||||
|
+gdb_test_multiple "continue" $test {
|
||||||
|
+ -re "Breakpoint .*, initialized .* at .*\r\n$gdb_prompt $" {
|
||||||
|
+ pass $test
|
||||||
|
+ }
|
||||||
|
+ -re "Breakpoint .*, unresolved .* at .*\r\n$gdb_prompt $" {
|
||||||
|
+ set timeout $oldtimeout
|
||||||
|
+ unsupported $test
|
||||||
|
+ return -1
|
||||||
|
+ }
|
||||||
|
+}
|
||||||
|
+set timeout $oldtimeout
|
||||||
|
+
|
||||||
|
+set escapedfilename [string_to_regexp [standard_output_file gcore-shmid0.test]]
|
||||||
|
+
|
||||||
|
+set test "save a corefile"
|
||||||
|
+gdb_test_multiple "gcore [standard_output_file gcore-shmid0.test]" $test {
|
||||||
|
+ -re "Saved corefile ${escapedfilename}\[\r\n\]+$gdb_prompt $" {
|
||||||
|
+ pass $test
|
||||||
|
+ }
|
||||||
|
+ -re "Can't create a corefile\[\r\n\]+$gdb_prompt $" {
|
||||||
|
+ unsupported $test
|
||||||
|
+ }
|
||||||
|
+}
|
||||||
|
+
|
||||||
|
+# Be sure to remove the handle first.
|
||||||
|
+# But it would get removed even on a kill by GDB as the handle is already
|
||||||
|
+# deleted, just it is still attached.
|
||||||
|
+gdb_continue_to_end "finish"
|
||||||
|
+
|
||||||
|
+set test "core-file command"
|
||||||
|
+gdb_test_multiple "core-file [standard_output_file gcore-shmid0.test]" $test {
|
||||||
|
+ -re ".* program is being debugged already.*y or n. $" {
|
||||||
|
+ # gdb_load may connect us to a gdbserver.
|
||||||
|
+ send_gdb "y\n"
|
||||||
|
+ exp_continue;
|
||||||
|
+ }
|
||||||
|
+ -re "Core was generated by .*\r\n\#0 .*\\\(\\\).*\r\n$gdb_prompt $" {
|
||||||
|
+ # The filename does not fit there anyway so do not check it.
|
||||||
|
+ pass $test
|
||||||
|
+ }
|
||||||
|
+ -re ".*registers from core file: File in wrong format.* $" {
|
||||||
|
+ fail "core-file command (could not read registers from core file)"
|
||||||
|
+ }
|
||||||
|
+}
|
||||||
|
+
|
||||||
|
+set test "backtrace"
|
||||||
|
+gdb_test_multiple "bt" $test {
|
||||||
|
+ -re "#0 *initialized \\\(\\\) at .*#1 .* main \\\(.*$gdb_prompt $" {
|
||||||
|
+ pass $test
|
||||||
|
+ }
|
||||||
|
+ -re "#0 *initialized \\\(\\\) at .*Cannot access memory at address .*$gdb_prompt $" {
|
||||||
|
+ fail $test
|
||||||
|
+ }
|
||||||
|
+}
|
||||||
|
Index: gdb-7.6.50.20130731-cvs/gdb/testsuite/gdb.base/gcore-shmid0.c
|
||||||
|
===================================================================
|
||||||
|
--- /dev/null 1970-01-01 00:00:00.000000000 +0000
|
||||||
|
+++ gdb-7.6.50.20130731-cvs/gdb/testsuite/gdb.base/gcore-shmid0.c 2013-08-02 22:22:17.573599496 +0200
|
||||||
@@ -0,0 +1,128 @@
|
@@ -0,0 +1,128 @@
|
||||||
+/* Copyright 2007, 2009 Free Software Foundation, Inc.
|
+/* Copyright 2007, 2009 Free Software Foundation, Inc.
|
||||||
+
|
+
|
||||||
|
@ -139,109 +237,3 @@ new file mode 100644
|
||||||
+
|
+
|
||||||
+ return 0;
|
+ return 0;
|
||||||
+}
|
+}
|
||||||
diff --git a/gdb/testsuite/gdb.base/gcore-shmid0.exp b/gdb/testsuite/gdb.base/gcore-shmid0.exp
|
|
||||||
new file mode 100644
|
|
||||||
--- /dev/null
|
|
||||||
+++ b/gdb/testsuite/gdb.base/gcore-shmid0.exp
|
|
||||||
@@ -0,0 +1,101 @@
|
|
||||||
+# Copyright 2007, 2009 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.
|
|
||||||
+
|
|
||||||
+# Test GDB's handling of gcore for mapping with a name but zero inode.
|
|
||||||
+
|
|
||||||
+if { [prepare_for_testing gcore-shmid0.exp gcore-shmid0] } {
|
|
||||||
+ return -1
|
|
||||||
+}
|
|
||||||
+
|
|
||||||
+# Does this gdb support gcore?
|
|
||||||
+set test "help gcore"
|
|
||||||
+gdb_test_multiple $test $test {
|
|
||||||
+ -re "Undefined command: .gcore.*$gdb_prompt $" {
|
|
||||||
+ # gcore command not supported -- nothing to test here.
|
|
||||||
+ unsupported "gdb does not support gcore on this target"
|
|
||||||
+ return -1;
|
|
||||||
+ }
|
|
||||||
+ -re "Save a core file .*$gdb_prompt $" {
|
|
||||||
+ pass $test
|
|
||||||
+ }
|
|
||||||
+}
|
|
||||||
+
|
|
||||||
+if { ! [ runto_main ] } then {
|
|
||||||
+ untested gcore-shmid0.exp
|
|
||||||
+ return -1
|
|
||||||
+}
|
|
||||||
+
|
|
||||||
+gdb_breakpoint "initialized"
|
|
||||||
+gdb_breakpoint "unresolved"
|
|
||||||
+
|
|
||||||
+set oldtimeout $timeout
|
|
||||||
+set timeout [expr $oldtimeout + 120]
|
|
||||||
+
|
|
||||||
+set test "Continue to initialized."
|
|
||||||
+gdb_test_multiple "continue" $test {
|
|
||||||
+ -re "Breakpoint .*, initialized .* at .*\r\n$gdb_prompt $" {
|
|
||||||
+ pass $test
|
|
||||||
+ }
|
|
||||||
+ -re "Breakpoint .*, unresolved .* at .*\r\n$gdb_prompt $" {
|
|
||||||
+ set timeout $oldtimeout
|
|
||||||
+ unsupported $test
|
|
||||||
+ return -1
|
|
||||||
+ }
|
|
||||||
+}
|
|
||||||
+set timeout $oldtimeout
|
|
||||||
+
|
|
||||||
+set escapedfilename [string_to_regexp [standard_output_file gcore-shmid0.test]]
|
|
||||||
+
|
|
||||||
+set test "save a corefile"
|
|
||||||
+gdb_test_multiple "gcore [standard_output_file gcore-shmid0.test]" $test {
|
|
||||||
+ -re "Saved corefile ${escapedfilename}\[\r\n\]+$gdb_prompt $" {
|
|
||||||
+ pass $test
|
|
||||||
+ }
|
|
||||||
+ -re "Can't create a corefile\[\r\n\]+$gdb_prompt $" {
|
|
||||||
+ unsupported $test
|
|
||||||
+ }
|
|
||||||
+}
|
|
||||||
+
|
|
||||||
+# Be sure to remove the handle first.
|
|
||||||
+# But it would get removed even on a kill by GDB as the handle is already
|
|
||||||
+# deleted, just it is still attached.
|
|
||||||
+gdb_continue_to_end "finish"
|
|
||||||
+
|
|
||||||
+set test "core-file command"
|
|
||||||
+gdb_test_multiple "core-file [standard_output_file gcore-shmid0.test]" $test {
|
|
||||||
+ -re ".* program is being debugged already.*y or n. $" {
|
|
||||||
+ # gdb_load may connect us to a gdbserver.
|
|
||||||
+ send_gdb "y\n"
|
|
||||||
+ exp_continue;
|
|
||||||
+ }
|
|
||||||
+ -re "Core was generated by .*\r\n\#0 .*\\\(\\\).*\r\n$gdb_prompt $" {
|
|
||||||
+ # The filename does not fit there anyway so do not check it.
|
|
||||||
+ pass $test
|
|
||||||
+ }
|
|
||||||
+ -re ".*registers from core file: File in wrong format.* $" {
|
|
||||||
+ fail "core-file command (could not read registers from core file)"
|
|
||||||
+ }
|
|
||||||
+}
|
|
||||||
+
|
|
||||||
+set test "backtrace"
|
|
||||||
+gdb_test_multiple "bt" $test {
|
|
||||||
+ -re "#0 *initialized \\\(\\\) at .*#1 .* main \\\(.*$gdb_prompt $" {
|
|
||||||
+ pass $test
|
|
||||||
+ }
|
|
||||||
+ -re "#0 *initialized \\\(\\\) at .*Cannot access memory at address .*$gdb_prompt $" {
|
|
||||||
+ fail $test
|
|
||||||
+ }
|
|
||||||
+}
|
|
||||||
|
|
|
@ -0,0 +1,24 @@
|
||||||
|
2004-11-24 Andrew Cagney <cagney@gnu.org>
|
||||||
|
|
||||||
|
* printcmd.c (build_address_symbolic): Find a section for the
|
||||||
|
address.
|
||||||
|
|
||||||
|
Index: gdb-6.8.50.20081128/gdb/printcmd.c
|
||||||
|
===================================================================
|
||||||
|
--- gdb-6.8.50.20081128.orig/gdb/printcmd.c 2008-12-04 01:36:05.000000000 +0100
|
||||||
|
+++ gdb-6.8.50.20081128/gdb/printcmd.c 2008-12-04 01:37:18.000000000 +0100
|
||||||
|
@@ -616,6 +616,14 @@ build_address_symbolic (CORE_ADDR addr,
|
||||||
|
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. */
|
|
@ -0,0 +1,111 @@
|
||||||
|
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".
|
||||||
|
|
||||||
|
Index: gdb-7.2.50.20110117/gdb/rs6000-tdep.c
|
||||||
|
===================================================================
|
||||||
|
--- gdb-7.2.50.20110117.orig/gdb/rs6000-tdep.c 2011-01-11 20:23:02.000000000 +0100
|
||||||
|
+++ gdb-7.2.50.20110117/gdb/rs6000-tdep.c 2011-01-17 15:48:19.000000000 +0100
|
||||||
|
@@ -126,6 +126,7 @@ static const char *powerpc_vector_abi_st
|
||||||
|
|
||||||
|
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 */
|
||||||
|
@@ -1496,7 +1497,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];
|
||||||
|
@@ -1514,12 +1514,14 @@ skip_prologue (struct gdbarch *gdbarch,
|
||||||
|
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;
|
||||||
|
@@ -1553,6 +1555,55 @@ skip_prologue (struct gdbarch *gdbarch,
|
||||||
|
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
|
||||||
|
@@ -1734,9 +1785,9 @@ skip_prologue (struct gdbarch *gdbarch,
|
||||||
|
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)
|
|
@ -0,0 +1,107 @@
|
||||||
|
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.
|
||||||
|
|
||||||
|
Index: gdb-7.99.90.20170420/gdb/doc/gdb.texinfo
|
||||||
|
===================================================================
|
||||||
|
--- gdb-7.99.90.20170420.orig/gdb/doc/gdb.texinfo 2017-04-20 22:29:39.179740076 +0200
|
||||||
|
+++ gdb-7.99.90.20170420/gdb/doc/gdb.texinfo 2017-04-20 22:29:40.924751096 +0200
|
||||||
|
@@ -1037,6 +1037,12 @@
|
||||||
|
the default, which is to read it incrementally as it is needed.
|
||||||
|
This makes startup slower, but makes future operations faster.
|
||||||
|
|
||||||
|
+@item --readnever
|
||||||
|
+@cindex @code{--readnever}
|
||||||
|
+Do not read each symbol file's symbolic debug information. This makes
|
||||||
|
+startup faster but at the expense of not being able to perform
|
||||||
|
+symbolic debugging.
|
||||||
|
+
|
||||||
|
@end table
|
||||||
|
|
||||||
|
@node Mode Options
|
||||||
|
Index: gdb-7.99.90.20170420/gdb/main.c
|
||||||
|
===================================================================
|
||||||
|
--- gdb-7.99.90.20170420.orig/gdb/main.c 2017-04-20 22:29:39.182740095 +0200
|
||||||
|
+++ gdb-7.99.90.20170420/gdb/main.c 2017-04-20 22:29:40.925751103 +0200
|
||||||
|
@@ -615,6 +615,7 @@
|
||||||
|
{"tui", no_argument, 0, OPT_TUI},
|
||||||
|
{"dbx", no_argument, &dbx_commands, 1},
|
||||||
|
{"readnow", no_argument, &readnow_symbol_files, 1},
|
||||||
|
+ {"readnever", no_argument, &readnever_symbol_files, 1},
|
||||||
|
{"r", no_argument, &readnow_symbol_files, 1},
|
||||||
|
{"quiet", no_argument, &quiet, 1},
|
||||||
|
{"q", no_argument, &quiet, 1},
|
||||||
|
@@ -1254,6 +1255,7 @@
|
||||||
|
--se=FILE Use FILE as symbol file and executable file.\n\
|
||||||
|
--symbols=SYMFILE Read symbols from SYMFILE.\n\
|
||||||
|
--readnow Fully read symbol files on first access.\n\
|
||||||
|
+ --readnever Do not read symbol files.\n\
|
||||||
|
--write Set writing into executable and core files.\n\n\
|
||||||
|
"), stream);
|
||||||
|
fputs_unfiltered (_("\
|
||||||
|
Index: gdb-7.99.90.20170420/gdb/symfile.c
|
||||||
|
===================================================================
|
||||||
|
--- gdb-7.99.90.20170420.orig/gdb/symfile.c 2017-04-20 22:29:39.183740101 +0200
|
||||||
|
+++ gdb-7.99.90.20170420/gdb/symfile.c 2017-04-20 22:29:40.926751109 +0200
|
||||||
|
@@ -79,6 +79,7 @@
|
||||||
|
|
||||||
|
/* Global variables owned by this file. */
|
||||||
|
int readnow_symbol_files; /* Read full symbols immediately. */
|
||||||
|
+int readnever_symbol_files; /* Never read full symbols. */
|
||||||
|
|
||||||
|
/* Functions this file defines. */
|
||||||
|
|
||||||
|
Index: gdb-7.99.90.20170420/gdb/dwarf2read.c
|
||||||
|
===================================================================
|
||||||
|
--- gdb-7.99.90.20170420.orig/gdb/dwarf2read.c 2017-04-20 22:29:39.190740145 +0200
|
||||||
|
+++ gdb-7.99.90.20170420/gdb/dwarf2read.c 2017-04-20 22:29:57.973858766 +0200
|
||||||
|
@@ -73,6 +73,7 @@
|
||||||
|
#include "common/function-view.h"
|
||||||
|
#include "common/gdb_optional.h"
|
||||||
|
#include "common/underlying.h"
|
||||||
|
+#include "top.h"
|
||||||
|
|
||||||
|
#include <fcntl.h>
|
||||||
|
#include <sys/types.h>
|
||||||
|
@@ -2208,7 +2209,8 @@
|
||||||
|
(void *) names);
|
||||||
|
dwarf2_per_objfile->objfile = objfile;
|
||||||
|
}
|
||||||
|
- return (!dwarf2_per_objfile->info.is_virtual
|
||||||
|
+ return !readnever_symbol_files &&
|
||||||
|
+ (!dwarf2_per_objfile->info.is_virtual
|
||||||
|
&& dwarf2_per_objfile->info.s.section != NULL
|
||||||
|
&& !dwarf2_per_objfile->abbrev.is_virtual
|
||||||
|
&& dwarf2_per_objfile->abbrev.s.section != NULL);
|
||||||
|
Index: gdb-7.99.90.20170420/gdb/top.h
|
||||||
|
===================================================================
|
||||||
|
--- gdb-7.99.90.20170420.orig/gdb/top.h 2017-04-20 22:29:39.191740152 +0200
|
||||||
|
+++ gdb-7.99.90.20170420/gdb/top.h 2017-04-20 22:29:40.932751147 +0200
|
||||||
|
@@ -269,6 +269,7 @@
|
||||||
|
|
||||||
|
/* From random places. */
|
||||||
|
extern int readnow_symbol_files;
|
||||||
|
+extern int readnever_symbol_files;
|
||||||
|
|
||||||
|
/* Perform _initialize initialization. */
|
||||||
|
extern void gdb_init (char *);
|
||||||
|
--- gdb-8.0.1/gdb/gcore.in-orig 2017-06-04 17:51:26.000000000 +0200
|
||||||
|
+++ gdb-8.0.1/gdb/gcore.in 2017-09-28 19:46:49.335407827 +0200
|
||||||
|
@@ -85,7 +85,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" \
|
||||||
|
-ex "attach $pid" -ex "gcore $name.$pid" -ex detach -ex quit
|
||||||
|
|
|
@ -0,0 +1,22 @@
|
||||||
|
2003-07-11 Elena Zannoni <ezannoni@redhat.com>
|
||||||
|
|
||||||
|
* lib/gdb.exp (setup_kfail, kfail): Redefine procedures.
|
||||||
|
|
||||||
|
--- ./gdb/testsuite/lib/gdb.exp.1 2004-11-24 15:59:46.131394720 -0500
|
||||||
|
+++ ./gdb/testsuite/lib/gdb.exp 2004-11-24 16:01:06.304206600 -0500
|
||||||
|
@@ -63,6 +63,15 @@
|
||||||
|
|
||||||
|
### Only procedures should come after this point.
|
||||||
|
|
||||||
|
+if {![llength [info procs kfail]]} {
|
||||||
|
+ proc setup_kfail { args } {
|
||||||
|
+ #setup_xfail args
|
||||||
|
+ }
|
||||||
|
+ proc kfail { bugid message } {
|
||||||
|
+ fail $message
|
||||||
|
+ }
|
||||||
|
+}
|
||||||
|
+
|
||||||
|
#
|
||||||
|
# gdb_version -- extract and print the version number of GDB
|
||||||
|
#
|
|
@ -1,20 +1,13 @@
|
||||||
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
|
|
||||||
|
|
||||||
;; Match the Fedora's version info.
|
|
||||||
;;=fedora
|
|
||||||
|
|
||||||
2003-02-24 Elena Zannoni <ezannoni@redhat.com>
|
2003-02-24 Elena Zannoni <ezannoni@redhat.com>
|
||||||
|
|
||||||
* gdb.gdb/selftest.exp: Add matching on specific Red Hat only version
|
* gdb.gdb/selftest.exp: Add matching on specific Red Hat only version
|
||||||
string.
|
string.
|
||||||
|
|
||||||
diff --git a/gdb/testsuite/gdb.gdb/selftest.exp b/gdb/testsuite/gdb.gdb/selftest.exp
|
Index: gdb-7.12.50.20170207/gdb/testsuite/gdb.gdb/selftest.exp
|
||||||
--- a/gdb/testsuite/gdb.gdb/selftest.exp
|
===================================================================
|
||||||
+++ b/gdb/testsuite/gdb.gdb/selftest.exp
|
--- gdb-7.12.50.20170207.orig/gdb/testsuite/gdb.gdb/selftest.exp 2017-02-07 19:47:06.472874620 +0100
|
||||||
@@ -53,6 +53,9 @@ proc test_with_self { } {
|
+++ gdb-7.12.50.20170207/gdb/testsuite/gdb.gdb/selftest.exp 2017-02-07 19:48:12.593380575 +0100
|
||||||
|
@@ -53,6 +53,9 @@
|
||||||
-re ".\[0-9\]+ = +.+ +0x.*\[0-9.\]+.*$gdb_prompt $" {
|
-re ".\[0-9\]+ = +.+ +0x.*\[0-9.\]+.*$gdb_prompt $" {
|
||||||
pass "printed version with cast"
|
pass "printed version with cast"
|
||||||
}
|
}
|
||||||
|
@ -24,15 +17,3 @@ diff --git a/gdb/testsuite/gdb.gdb/selftest.exp b/gdb/testsuite/gdb.gdb/selftest
|
||||||
}
|
}
|
||||||
|
|
||||||
# start the "xgdb" process
|
# 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));
|
|
||||||
}
|
|
||||||
|
|
|
@ -1,15 +1,7 @@
|
||||||
From FEDORA_PATCHES Mon Sep 17 00:00:00 2001
|
Index: gdb-7.10.90.20160211/gdb/testsuite/gdb.cp/constructortest.cc
|
||||||
From: Fedora GDB patches <invalid@email.com>
|
===================================================================
|
||||||
Date: Fri, 27 Oct 2017 21:07:50 +0200
|
--- /dev/null 1970-01-01 00:00:00.000000000 +0000
|
||||||
Subject: gdb-6.3-test-dtorfix-20050121.patch
|
+++ gdb-7.10.90.20160211/gdb/testsuite/gdb.cp/constructortest.cc 2016-02-16 09:49:08.681886201 +0100
|
||||||
|
|
||||||
;; Test support of multiple destructors just like multiple constructors
|
|
||||||
;;=fedoratest
|
|
||||||
|
|
||||||
diff --git a/gdb/testsuite/gdb.cp/constructortest.cc b/gdb/testsuite/gdb.cp/constructortest.cc
|
|
||||||
new file mode 100644
|
|
||||||
--- /dev/null
|
|
||||||
+++ b/gdb/testsuite/gdb.cp/constructortest.cc
|
|
||||||
@@ -0,0 +1,99 @@
|
@@ -0,0 +1,99 @@
|
||||||
+/* This testcase is part of GDB, the GNU debugger.
|
+/* This testcase is part of GDB, the GNU debugger.
|
||||||
+
|
+
|
||||||
|
@ -110,10 +102,10 @@ new file mode 100644
|
||||||
+{
|
+{
|
||||||
+ y = 2; /* First line D */
|
+ y = 2; /* First line D */
|
||||||
+}
|
+}
|
||||||
diff --git a/gdb/testsuite/gdb.cp/constructortest.exp b/gdb/testsuite/gdb.cp/constructortest.exp
|
Index: gdb-7.10.90.20160211/gdb/testsuite/gdb.cp/constructortest.exp
|
||||||
new file mode 100644
|
===================================================================
|
||||||
--- /dev/null
|
--- /dev/null 1970-01-01 00:00:00.000000000 +0000
|
||||||
+++ b/gdb/testsuite/gdb.cp/constructortest.exp
|
+++ gdb-7.10.90.20160211/gdb/testsuite/gdb.cp/constructortest.exp 2016-02-16 09:52:12.609130779 +0100
|
||||||
@@ -0,0 +1,130 @@
|
@@ -0,0 +1,130 @@
|
||||||
+# This testcase is part of GDB, the GNU debugger.
|
+# This testcase is part of GDB, the GNU debugger.
|
||||||
+
|
+
|
||||||
|
|
|
@ -1,21 +1,13 @@
|
||||||
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-test-movedir-20050125.patch
|
|
||||||
|
|
||||||
;; Fix to support executable moving
|
|
||||||
;;=fedoratest
|
|
||||||
|
|
||||||
2005-01-25 Elena Zannoni <ezannoni@redhat.com>
|
2005-01-25 Elena Zannoni <ezannoni@redhat.com>
|
||||||
|
|
||||||
* gdb.base/move-dir.exp: New test.
|
* gdb.base/move-dir.exp: New test.
|
||||||
* gdb.base/move-dir.c: Ditto.
|
* gdb.base/move-dir.c: Ditto.
|
||||||
* gdb.base/move-dir.h: Ditto.
|
* gdb.base/move-dir.h: Ditto.
|
||||||
|
|
||||||
diff --git a/gdb/testsuite/gdb.base/move-dir.c b/gdb/testsuite/gdb.base/move-dir.c
|
Index: gdb-7.10.90.20160211/gdb/testsuite/gdb.base/move-dir.c
|
||||||
new file mode 100644
|
===================================================================
|
||||||
--- /dev/null
|
--- /dev/null 1970-01-01 00:00:00.000000000 +0000
|
||||||
+++ b/gdb/testsuite/gdb.base/move-dir.c
|
+++ gdb-7.10.90.20160211/gdb/testsuite/gdb.base/move-dir.c 2016-02-15 23:23:02.892499288 +0100
|
||||||
@@ -0,0 +1,10 @@
|
@@ -0,0 +1,10 @@
|
||||||
+#include <stdio.h>
|
+#include <stdio.h>
|
||||||
+#include <stdlib.h>
|
+#include <stdlib.h>
|
||||||
|
@ -27,10 +19,10 @@ new file mode 100644
|
||||||
+ other();
|
+ other();
|
||||||
+}
|
+}
|
||||||
+
|
+
|
||||||
diff --git a/gdb/testsuite/gdb.base/move-dir.exp b/gdb/testsuite/gdb.base/move-dir.exp
|
Index: gdb-7.10.90.20160211/gdb/testsuite/gdb.base/move-dir.exp
|
||||||
new file mode 100644
|
===================================================================
|
||||||
--- /dev/null
|
--- /dev/null 1970-01-01 00:00:00.000000000 +0000
|
||||||
+++ b/gdb/testsuite/gdb.base/move-dir.exp
|
+++ gdb-7.10.90.20160211/gdb/testsuite/gdb.base/move-dir.exp 2016-02-15 23:29:58.768461406 +0100
|
||||||
@@ -0,0 +1,57 @@
|
@@ -0,0 +1,57 @@
|
||||||
+# Copyright 2005
|
+# Copyright 2005
|
||||||
+# Free Software Foundation, Inc.
|
+# Free Software Foundation, Inc.
|
||||||
|
@ -89,10 +81,10 @@ new file mode 100644
|
||||||
+
|
+
|
||||||
+set timeout $oldtimeout
|
+set timeout $oldtimeout
|
||||||
+return 0
|
+return 0
|
||||||
diff --git a/gdb/testsuite/gdb.base/move-dir.h b/gdb/testsuite/gdb.base/move-dir.h
|
Index: gdb-7.10.90.20160211/gdb/testsuite/gdb.base/move-dir.h
|
||||||
new file mode 100644
|
===================================================================
|
||||||
--- /dev/null
|
--- /dev/null 1970-01-01 00:00:00.000000000 +0000
|
||||||
+++ b/gdb/testsuite/gdb.base/move-dir.h
|
+++ gdb-7.10.90.20160211/gdb/testsuite/gdb.base/move-dir.h 2016-02-15 23:23:02.892499288 +0100
|
||||||
@@ -0,0 +1,7 @@
|
@@ -0,0 +1,7 @@
|
||||||
+#include <stdlib.h>
|
+#include <stdlib.h>
|
||||||
+
|
+
|
||||||
|
|
|
@ -1,15 +1,7 @@
|
||||||
From FEDORA_PATCHES Mon Sep 17 00:00:00 2001
|
Index: gdb-7.10.90.20160211/gdb/testsuite/gdb.pie/attach.c
|
||||||
From: Fedora GDB patches <invalid@email.com>
|
===================================================================
|
||||||
Date: Fri, 27 Oct 2017 21:07:50 +0200
|
--- /dev/null 1970-01-01 00:00:00.000000000 +0000
|
||||||
Subject: gdb-6.3-test-pie-20050107.patch
|
+++ gdb-7.10.90.20160211/gdb/testsuite/gdb.pie/attach.c 2016-02-15 23:23:02.843498936 +0100
|
||||||
|
|
||||||
;; VSYSCALL and PIE
|
|
||||||
;;=fedoratest
|
|
||||||
|
|
||||||
diff --git a/gdb/testsuite/gdb.pie/attach.c b/gdb/testsuite/gdb.pie/attach.c
|
|
||||||
new file mode 100644
|
|
||||||
--- /dev/null
|
|
||||||
+++ b/gdb/testsuite/gdb.pie/attach.c
|
|
||||||
@@ -0,0 +1,20 @@
|
@@ -0,0 +1,20 @@
|
||||||
+/* This program is intended to be started outside of gdb, and then
|
+/* This program is intended to be started outside of gdb, and then
|
||||||
+ attached to by gdb. Thus, it simply spins in a loop. The loop
|
+ attached to by gdb. Thus, it simply spins in a loop. The loop
|
||||||
|
@ -31,10 +23,386 @@ new file mode 100644
|
||||||
+ }
|
+ }
|
||||||
+ return 0;
|
+ return 0;
|
||||||
+}
|
+}
|
||||||
diff --git a/gdb/testsuite/gdb.pie/attach.exp b/gdb/testsuite/gdb.pie/attach.exp
|
Index: gdb-7.10.90.20160211/gdb/testsuite/gdb.pie/attach2.c
|
||||||
new file mode 100644
|
===================================================================
|
||||||
--- /dev/null
|
--- /dev/null 1970-01-01 00:00:00.000000000 +0000
|
||||||
+++ b/gdb/testsuite/gdb.pie/attach.exp
|
+++ gdb-7.10.90.20160211/gdb/testsuite/gdb.pie/attach2.c 2016-02-15 23:23:02.843498936 +0100
|
||||||
|
@@ -0,0 +1,24 @@
|
||||||
|
+/* This program is intended to be started outside of gdb, and then
|
||||||
|
+ attached to by gdb. Thus, it simply spins in a loop. The loop
|
||||||
|
+ is exited when & if the variable 'should_exit' is non-zero. (It
|
||||||
|
+ is initialized to zero in this program, so the loop will never
|
||||||
|
+ exit unless/until gdb sets the variable to non-zero.)
|
||||||
|
+ */
|
||||||
|
+#include <stdio.h>
|
||||||
|
+#include <stdlib.h>
|
||||||
|
+#include <unistd.h>
|
||||||
|
+
|
||||||
|
+int should_exit = 0;
|
||||||
|
+
|
||||||
|
+int main ()
|
||||||
|
+{
|
||||||
|
+ int local_i = 0;
|
||||||
|
+
|
||||||
|
+ sleep( 10 ); /* System call causes register fetch to fail */
|
||||||
|
+ /* This is a known HPUX "feature" */
|
||||||
|
+ while (! should_exit)
|
||||||
|
+ {
|
||||||
|
+ local_i++;
|
||||||
|
+ }
|
||||||
|
+ return (0);
|
||||||
|
+}
|
||||||
|
Index: gdb-7.10.90.20160211/gdb/testsuite/gdb.pie/break.c
|
||||||
|
===================================================================
|
||||||
|
--- /dev/null 1970-01-01 00:00:00.000000000 +0000
|
||||||
|
+++ gdb-7.10.90.20160211/gdb/testsuite/gdb.pie/break.c 2016-02-15 23:23:02.844498943 +0100
|
||||||
|
@@ -0,0 +1,146 @@
|
||||||
|
+/* This testcase is part of GDB, the GNU debugger.
|
||||||
|
+
|
||||||
|
+ Copyright 1992, 1993, 1994, 1995, 1999, 2002, 2003 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 */
|
||||||
|
+
|
||||||
|
+#ifdef vxworks
|
||||||
|
+
|
||||||
|
+# include <stdio.h>
|
||||||
|
+
|
||||||
|
+/* VxWorks does not supply atoi. */
|
||||||
|
+static int
|
||||||
|
+atoi (z)
|
||||||
|
+ char *z;
|
||||||
|
+{
|
||||||
|
+ int i = 0;
|
||||||
|
+
|
||||||
|
+ while (*z >= '0' && *z <= '9')
|
||||||
|
+ i = i * 10 + (*z++ - '0');
|
||||||
|
+ return i;
|
||||||
|
+}
|
||||||
|
+
|
||||||
|
+/* I don't know of any way to pass an array to VxWorks. This function
|
||||||
|
+ can be called directly from gdb. */
|
||||||
|
+
|
||||||
|
+vxmain (arg)
|
||||||
|
+char *arg;
|
||||||
|
+{
|
||||||
|
+ char *argv[2];
|
||||||
|
+
|
||||||
|
+ argv[0] = "";
|
||||||
|
+ argv[1] = arg;
|
||||||
|
+ main (2, argv, (char **) 0);
|
||||||
|
+}
|
||||||
|
+
|
||||||
|
+#else /* ! vxworks */
|
||||||
|
+# include <stdio.h>
|
||||||
|
+# include <stdlib.h>
|
||||||
|
+#endif /* ! vxworks */
|
||||||
|
+
|
||||||
|
+#ifdef PROTOTYPES
|
||||||
|
+extern int marker1 (void);
|
||||||
|
+extern int marker2 (int a);
|
||||||
|
+extern void marker3 (char *a, char *b);
|
||||||
|
+extern void marker4 (long d);
|
||||||
|
+#else
|
||||||
|
+extern int marker1 ();
|
||||||
|
+extern int marker2 ();
|
||||||
|
+extern void marker3 ();
|
||||||
|
+extern void marker4 ();
|
||||||
|
+#endif
|
||||||
|
+
|
||||||
|
+/*
|
||||||
|
+ * This simple classical example of recursion is useful for
|
||||||
|
+ * testing stack backtraces and such.
|
||||||
|
+ */
|
||||||
|
+
|
||||||
|
+#ifdef PROTOTYPES
|
||||||
|
+int factorial(int);
|
||||||
|
+
|
||||||
|
+int
|
||||||
|
+main (int argc, char **argv, char **envp)
|
||||||
|
+#else
|
||||||
|
+int
|
||||||
|
+main (argc, argv, envp)
|
||||||
|
+int argc;
|
||||||
|
+char *argv[], **envp;
|
||||||
|
+#endif
|
||||||
|
+{
|
||||||
|
+#ifdef usestubs
|
||||||
|
+ set_debug_traps(); /* set breakpoint 5 here */
|
||||||
|
+ breakpoint();
|
||||||
|
+#endif
|
||||||
|
+ if (argc == 12345) { /* an unlikely value < 2^16, in case uninited */ /* set breakpoint 6 here */
|
||||||
|
+ fprintf (stderr, "usage: factorial <number>\n");
|
||||||
|
+ return 1;
|
||||||
|
+ }
|
||||||
|
+ printf ("%d\n", factorial (atoi ("6"))); /* set breakpoint 1 here */
|
||||||
|
+ /* set breakpoint 12 here */
|
||||||
|
+ marker1 (); /* set breakpoint 11 here */
|
||||||
|
+ marker2 (43); /* set breakpoint 20 here */
|
||||||
|
+ marker3 ("stack", "trace"); /* set breakpoint 21 here */
|
||||||
|
+ marker4 (177601976L);
|
||||||
|
+ argc = (argc == 12345); /* This is silly, but we can step off of it */ /* set breakpoint 2 here */
|
||||||
|
+ return argc; /* set breakpoint 10 here */
|
||||||
|
+}
|
||||||
|
+
|
||||||
|
+#ifdef PROTOTYPES
|
||||||
|
+int factorial (int value)
|
||||||
|
+#else
|
||||||
|
+int factorial (value)
|
||||||
|
+int value;
|
||||||
|
+#endif
|
||||||
|
+{
|
||||||
|
+ if (value > 1) { /* set breakpoint 7 here */
|
||||||
|
+ value *= factorial (value - 1);
|
||||||
|
+ }
|
||||||
|
+ return (value); /* set breakpoint 19 here */
|
||||||
|
+}
|
||||||
|
+
|
||||||
|
+#ifdef PROTOTYPES
|
||||||
|
+int multi_line_if_conditional (int a, int b, int c)
|
||||||
|
+#else
|
||||||
|
+int multi_line_if_conditional (a, b, c)
|
||||||
|
+ int a, b, c;
|
||||||
|
+#endif
|
||||||
|
+{
|
||||||
|
+ if (a /* set breakpoint 3 here */
|
||||||
|
+ && b
|
||||||
|
+ && c)
|
||||||
|
+ return 0;
|
||||||
|
+ else
|
||||||
|
+ return 1;
|
||||||
|
+}
|
||||||
|
+
|
||||||
|
+#ifdef PROTOTYPES
|
||||||
|
+int multi_line_while_conditional (int a, int b, int c)
|
||||||
|
+#else
|
||||||
|
+int multi_line_while_conditional (a, b, c)
|
||||||
|
+ int a, b, c;
|
||||||
|
+#endif
|
||||||
|
+{
|
||||||
|
+ while (a /* set breakpoint 4 here */
|
||||||
|
+ && b
|
||||||
|
+ && c)
|
||||||
|
+ {
|
||||||
|
+ a--, b--, c--;
|
||||||
|
+ }
|
||||||
|
+ return 0;
|
||||||
|
+}
|
||||||
|
Index: gdb-7.10.90.20160211/gdb/testsuite/gdb.pie/break1.c
|
||||||
|
===================================================================
|
||||||
|
--- /dev/null 1970-01-01 00:00:00.000000000 +0000
|
||||||
|
+++ gdb-7.10.90.20160211/gdb/testsuite/gdb.pie/break1.c 2016-02-15 23:23:02.844498943 +0100
|
||||||
|
@@ -0,0 +1,44 @@
|
||||||
|
+/* This testcase is part of GDB, the GNU debugger.
|
||||||
|
+
|
||||||
|
+ Copyright 1992, 1993, 1994, 1995, 1999, 2002, 2003 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 */
|
||||||
|
+
|
||||||
|
+/* The code for this file was extracted from the gdb testsuite
|
||||||
|
+ testcase "break.c". */
|
||||||
|
+
|
||||||
|
+/* The following functions do nothing useful. They are included
|
||||||
|
+ simply as places to try setting breakpoints at. They are
|
||||||
|
+ explicitly "one-line functions" to verify that this case works
|
||||||
|
+ (some versions of gcc have or have had problems with this).
|
||||||
|
+
|
||||||
|
+ These functions are in a separate source file to prevent an
|
||||||
|
+ optimizing compiler from inlining them and optimizing them away. */
|
||||||
|
+
|
||||||
|
+#ifdef PROTOTYPES
|
||||||
|
+int marker1 (void) { return (0); } /* set breakpoint 15 here */
|
||||||
|
+int marker2 (int a) { return (1); } /* set breakpoint 8 here */
|
||||||
|
+void marker3 (char *a, char *b) {} /* set breakpoint 17 here */
|
||||||
|
+void marker4 (long d) {} /* set breakpoint 14 here */
|
||||||
|
+#else
|
||||||
|
+int marker1 () { return (0); } /* set breakpoint 16 here */
|
||||||
|
+int marker2 (a) int a; { return (1); } /* set breakpoint 9 here */
|
||||||
|
+void marker3 (a, b) char *a, *b; {} /* set breakpoint 18 here */
|
||||||
|
+void marker4 (d) long d; {} /* set breakpoint 13 here */
|
||||||
|
+#endif
|
||||||
|
Index: gdb-7.10.90.20160211/gdb/testsuite/gdb.pie/coremaker.c
|
||||||
|
===================================================================
|
||||||
|
--- /dev/null 1970-01-01 00:00:00.000000000 +0000
|
||||||
|
+++ gdb-7.10.90.20160211/gdb/testsuite/gdb.pie/coremaker.c 2016-02-15 23:23:02.844498943 +0100
|
||||||
|
@@ -0,0 +1,142 @@
|
||||||
|
+/* Copyright 1992, 1993, 1994, 1995, 1996, 1999
|
||||||
|
+ 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 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. */
|
||||||
|
+
|
||||||
|
+/* Simple little program that just generates a core dump from inside some
|
||||||
|
+ nested function calls. */
|
||||||
|
+
|
||||||
|
+#include <stdio.h>
|
||||||
|
+#include <sys/types.h>
|
||||||
|
+#include <fcntl.h>
|
||||||
|
+#include <sys/mman.h>
|
||||||
|
+#include <signal.h>
|
||||||
|
+#include <stdlib.h>
|
||||||
|
+#include <unistd.h>
|
||||||
|
+
|
||||||
|
+#ifndef __STDC__
|
||||||
|
+#define const /**/
|
||||||
|
+#endif
|
||||||
|
+
|
||||||
|
+#define MAPSIZE (8 * 1024)
|
||||||
|
+
|
||||||
|
+/* Don't make these automatic vars or we will have to walk back up the
|
||||||
|
+ stack to access them. */
|
||||||
|
+
|
||||||
|
+char *buf1;
|
||||||
|
+char *buf2;
|
||||||
|
+
|
||||||
|
+int coremaker_data = 1; /* In Data section */
|
||||||
|
+int coremaker_bss; /* In BSS section */
|
||||||
|
+
|
||||||
|
+const int coremaker_ro = 201; /* In Read-Only Data section */
|
||||||
|
+
|
||||||
|
+/* Note that if the mapping fails for any reason, we set buf2
|
||||||
|
+ to -1 and the testsuite notices this and reports it as
|
||||||
|
+ a failure due to a mapping error. This way we don't have
|
||||||
|
+ to test for specific errors when running the core maker. */
|
||||||
|
+
|
||||||
|
+void
|
||||||
|
+mmapdata ()
|
||||||
|
+{
|
||||||
|
+ int j, fd;
|
||||||
|
+
|
||||||
|
+ /* Allocate and initialize a buffer that will be used to write
|
||||||
|
+ the file that is later mapped in. */
|
||||||
|
+
|
||||||
|
+ buf1 = (char *) malloc (MAPSIZE);
|
||||||
|
+ for (j = 0; j < MAPSIZE; ++j)
|
||||||
|
+ {
|
||||||
|
+ buf1[j] = j;
|
||||||
|
+ }
|
||||||
|
+
|
||||||
|
+ /* Write the file to map in */
|
||||||
|
+
|
||||||
|
+ fd = open ("coremmap.data", O_CREAT | O_RDWR, 0666);
|
||||||
|
+ if (fd == -1)
|
||||||
|
+ {
|
||||||
|
+ perror ("coremmap.data open failed");
|
||||||
|
+ buf2 = (char *) -1;
|
||||||
|
+ return;
|
||||||
|
+ }
|
||||||
|
+ write (fd, buf1, MAPSIZE);
|
||||||
|
+
|
||||||
|
+ /* Now map the file into our address space as buf2 */
|
||||||
|
+
|
||||||
|
+ buf2 = (char *) mmap (0, MAPSIZE, PROT_READ | PROT_WRITE, MAP_PRIVATE, fd, 0);
|
||||||
|
+ if (buf2 == (char *) -1)
|
||||||
|
+ {
|
||||||
|
+ perror ("mmap failed");
|
||||||
|
+ return;
|
||||||
|
+ }
|
||||||
|
+
|
||||||
|
+ /* Verify that the original data and the mapped data are identical.
|
||||||
|
+ If not, we'd rather fail now than when trying to access the mapped
|
||||||
|
+ data from the core file. */
|
||||||
|
+
|
||||||
|
+ for (j = 0; j < MAPSIZE; ++j)
|
||||||
|
+ {
|
||||||
|
+ if (buf1[j] != buf2[j])
|
||||||
|
+ {
|
||||||
|
+ fprintf (stderr, "mapped data is incorrect");
|
||||||
|
+ buf2 = (char *) -1;
|
||||||
|
+ return;
|
||||||
|
+ }
|
||||||
|
+ }
|
||||||
|
+}
|
||||||
|
+
|
||||||
|
+void
|
||||||
|
+func2 ()
|
||||||
|
+{
|
||||||
|
+ int coremaker_local[5];
|
||||||
|
+ int i;
|
||||||
|
+
|
||||||
|
+#ifdef SA_FULLDUMP
|
||||||
|
+ /* Force a corefile that includes the data section for AIX. */
|
||||||
|
+ {
|
||||||
|
+ struct sigaction sa;
|
||||||
|
+
|
||||||
|
+ sigaction (SIGABRT, (struct sigaction *)0, &sa);
|
||||||
|
+ sa.sa_flags |= SA_FULLDUMP;
|
||||||
|
+ sigaction (SIGABRT, &sa, (struct sigaction *)0);
|
||||||
|
+ }
|
||||||
|
+#endif
|
||||||
|
+
|
||||||
|
+ /* Make sure that coremaker_local doesn't get optimized away. */
|
||||||
|
+ for (i = 0; i < 5; i++)
|
||||||
|
+ coremaker_local[i] = i;
|
||||||
|
+ coremaker_bss = 0;
|
||||||
|
+ for (i = 0; i < 5; i++)
|
||||||
|
+ coremaker_bss += coremaker_local[i];
|
||||||
|
+ coremaker_data = coremaker_ro + 1;
|
||||||
|
+ abort ();
|
||||||
|
+}
|
||||||
|
+
|
||||||
|
+void
|
||||||
|
+func1 ()
|
||||||
|
+{
|
||||||
|
+ func2 ();
|
||||||
|
+}
|
||||||
|
+
|
||||||
|
+int main ()
|
||||||
|
+{
|
||||||
|
+ mmapdata ();
|
||||||
|
+ func1 ();
|
||||||
|
+ return 0;
|
||||||
|
+}
|
||||||
|
+
|
||||||
|
Index: gdb-7.10.90.20160211/gdb/testsuite/gdb.pie/attach.exp
|
||||||
|
===================================================================
|
||||||
|
--- /dev/null 1970-01-01 00:00:00.000000000 +0000
|
||||||
|
+++ gdb-7.10.90.20160211/gdb/testsuite/gdb.pie/attach.exp 2016-02-15 23:37:15.190560048 +0100
|
||||||
@@ -0,0 +1,416 @@
|
@@ -0,0 +1,416 @@
|
||||||
+# Copyright 1997, 1999, 2002 Free Software Foundation, Inc.
|
+# Copyright 1997, 1999, 2002 Free Software Foundation, Inc.
|
||||||
+
|
+
|
||||||
|
@ -452,190 +820,10 @@ new file mode 100644
|
||||||
+do_call_attach_tests
|
+do_call_attach_tests
|
||||||
+
|
+
|
||||||
+return 0
|
+return 0
|
||||||
diff --git a/gdb/testsuite/gdb.pie/attach2.c b/gdb/testsuite/gdb.pie/attach2.c
|
Index: gdb-7.10.90.20160211/gdb/testsuite/gdb.pie/break.exp
|
||||||
new file mode 100644
|
===================================================================
|
||||||
--- /dev/null
|
--- /dev/null 1970-01-01 00:00:00.000000000 +0000
|
||||||
+++ b/gdb/testsuite/gdb.pie/attach2.c
|
+++ gdb-7.10.90.20160211/gdb/testsuite/gdb.pie/break.exp 2016-02-15 23:37:15.191560055 +0100
|
||||||
@@ -0,0 +1,24 @@
|
|
||||||
+/* This program is intended to be started outside of gdb, and then
|
|
||||||
+ attached to by gdb. Thus, it simply spins in a loop. The loop
|
|
||||||
+ is exited when & if the variable 'should_exit' is non-zero. (It
|
|
||||||
+ is initialized to zero in this program, so the loop will never
|
|
||||||
+ exit unless/until gdb sets the variable to non-zero.)
|
|
||||||
+ */
|
|
||||||
+#include <stdio.h>
|
|
||||||
+#include <stdlib.h>
|
|
||||||
+#include <unistd.h>
|
|
||||||
+
|
|
||||||
+int should_exit = 0;
|
|
||||||
+
|
|
||||||
+int main ()
|
|
||||||
+{
|
|
||||||
+ int local_i = 0;
|
|
||||||
+
|
|
||||||
+ sleep( 10 ); /* System call causes register fetch to fail */
|
|
||||||
+ /* This is a known HPUX "feature" */
|
|
||||||
+ while (! should_exit)
|
|
||||||
+ {
|
|
||||||
+ local_i++;
|
|
||||||
+ }
|
|
||||||
+ return (0);
|
|
||||||
+}
|
|
||||||
diff --git a/gdb/testsuite/gdb.pie/break.c b/gdb/testsuite/gdb.pie/break.c
|
|
||||||
new file mode 100644
|
|
||||||
--- /dev/null
|
|
||||||
+++ b/gdb/testsuite/gdb.pie/break.c
|
|
||||||
@@ -0,0 +1,146 @@
|
|
||||||
+/* This testcase is part of GDB, the GNU debugger.
|
|
||||||
+
|
|
||||||
+ Copyright 1992, 1993, 1994, 1995, 1999, 2002, 2003 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 */
|
|
||||||
+
|
|
||||||
+#ifdef vxworks
|
|
||||||
+
|
|
||||||
+# include <stdio.h>
|
|
||||||
+
|
|
||||||
+/* VxWorks does not supply atoi. */
|
|
||||||
+static int
|
|
||||||
+atoi (z)
|
|
||||||
+ char *z;
|
|
||||||
+{
|
|
||||||
+ int i = 0;
|
|
||||||
+
|
|
||||||
+ while (*z >= '0' && *z <= '9')
|
|
||||||
+ i = i * 10 + (*z++ - '0');
|
|
||||||
+ return i;
|
|
||||||
+}
|
|
||||||
+
|
|
||||||
+/* I don't know of any way to pass an array to VxWorks. This function
|
|
||||||
+ can be called directly from gdb. */
|
|
||||||
+
|
|
||||||
+vxmain (arg)
|
|
||||||
+char *arg;
|
|
||||||
+{
|
|
||||||
+ char *argv[2];
|
|
||||||
+
|
|
||||||
+ argv[0] = "";
|
|
||||||
+ argv[1] = arg;
|
|
||||||
+ main (2, argv, (char **) 0);
|
|
||||||
+}
|
|
||||||
+
|
|
||||||
+#else /* ! vxworks */
|
|
||||||
+# include <stdio.h>
|
|
||||||
+# include <stdlib.h>
|
|
||||||
+#endif /* ! vxworks */
|
|
||||||
+
|
|
||||||
+#ifdef PROTOTYPES
|
|
||||||
+extern int marker1 (void);
|
|
||||||
+extern int marker2 (int a);
|
|
||||||
+extern void marker3 (char *a, char *b);
|
|
||||||
+extern void marker4 (long d);
|
|
||||||
+#else
|
|
||||||
+extern int marker1 ();
|
|
||||||
+extern int marker2 ();
|
|
||||||
+extern void marker3 ();
|
|
||||||
+extern void marker4 ();
|
|
||||||
+#endif
|
|
||||||
+
|
|
||||||
+/*
|
|
||||||
+ * This simple classical example of recursion is useful for
|
|
||||||
+ * testing stack backtraces and such.
|
|
||||||
+ */
|
|
||||||
+
|
|
||||||
+#ifdef PROTOTYPES
|
|
||||||
+int factorial(int);
|
|
||||||
+
|
|
||||||
+int
|
|
||||||
+main (int argc, char **argv, char **envp)
|
|
||||||
+#else
|
|
||||||
+int
|
|
||||||
+main (argc, argv, envp)
|
|
||||||
+int argc;
|
|
||||||
+char *argv[], **envp;
|
|
||||||
+#endif
|
|
||||||
+{
|
|
||||||
+#ifdef usestubs
|
|
||||||
+ set_debug_traps(); /* set breakpoint 5 here */
|
|
||||||
+ breakpoint();
|
|
||||||
+#endif
|
|
||||||
+ if (argc == 12345) { /* an unlikely value < 2^16, in case uninited */ /* set breakpoint 6 here */
|
|
||||||
+ fprintf (stderr, "usage: factorial <number>\n");
|
|
||||||
+ return 1;
|
|
||||||
+ }
|
|
||||||
+ printf ("%d\n", factorial (atoi ("6"))); /* set breakpoint 1 here */
|
|
||||||
+ /* set breakpoint 12 here */
|
|
||||||
+ marker1 (); /* set breakpoint 11 here */
|
|
||||||
+ marker2 (43); /* set breakpoint 20 here */
|
|
||||||
+ marker3 ("stack", "trace"); /* set breakpoint 21 here */
|
|
||||||
+ marker4 (177601976L);
|
|
||||||
+ argc = (argc == 12345); /* This is silly, but we can step off of it */ /* set breakpoint 2 here */
|
|
||||||
+ return argc; /* set breakpoint 10 here */
|
|
||||||
+}
|
|
||||||
+
|
|
||||||
+#ifdef PROTOTYPES
|
|
||||||
+int factorial (int value)
|
|
||||||
+#else
|
|
||||||
+int factorial (value)
|
|
||||||
+int value;
|
|
||||||
+#endif
|
|
||||||
+{
|
|
||||||
+ if (value > 1) { /* set breakpoint 7 here */
|
|
||||||
+ value *= factorial (value - 1);
|
|
||||||
+ }
|
|
||||||
+ return (value); /* set breakpoint 19 here */
|
|
||||||
+}
|
|
||||||
+
|
|
||||||
+#ifdef PROTOTYPES
|
|
||||||
+int multi_line_if_conditional (int a, int b, int c)
|
|
||||||
+#else
|
|
||||||
+int multi_line_if_conditional (a, b, c)
|
|
||||||
+ int a, b, c;
|
|
||||||
+#endif
|
|
||||||
+{
|
|
||||||
+ if (a /* set breakpoint 3 here */
|
|
||||||
+ && b
|
|
||||||
+ && c)
|
|
||||||
+ return 0;
|
|
||||||
+ else
|
|
||||||
+ return 1;
|
|
||||||
+}
|
|
||||||
+
|
|
||||||
+#ifdef PROTOTYPES
|
|
||||||
+int multi_line_while_conditional (int a, int b, int c)
|
|
||||||
+#else
|
|
||||||
+int multi_line_while_conditional (a, b, c)
|
|
||||||
+ int a, b, c;
|
|
||||||
+#endif
|
|
||||||
+{
|
|
||||||
+ while (a /* set breakpoint 4 here */
|
|
||||||
+ && b
|
|
||||||
+ && c)
|
|
||||||
+ {
|
|
||||||
+ a--, b--, c--;
|
|
||||||
+ }
|
|
||||||
+ return 0;
|
|
||||||
+}
|
|
||||||
diff --git a/gdb/testsuite/gdb.pie/break.exp b/gdb/testsuite/gdb.pie/break.exp
|
|
||||||
new file mode 100644
|
|
||||||
--- /dev/null
|
|
||||||
+++ b/gdb/testsuite/gdb.pie/break.exp
|
|
||||||
@@ -0,0 +1,954 @@
|
@@ -0,0 +1,954 @@
|
||||||
+# Copyright 1988, 1990, 1991, 1992, 1994, 1995, 1996, 1997, 1998, 1999,
|
+# Copyright 1988, 1990, 1991, 1992, 1994, 1995, 1996, 1997, 1998, 1999,
|
||||||
+# 2000, 2002, 2003, 2004
|
+# 2000, 2002, 2003, 2004
|
||||||
|
@ -1591,59 +1779,10 @@ new file mode 100644
|
||||||
+ send_gdb "set args main\n"
|
+ send_gdb "set args main\n"
|
||||||
+ gdb_expect -re ".*$gdb_prompt $" {}
|
+ gdb_expect -re ".*$gdb_prompt $" {}
|
||||||
+}
|
+}
|
||||||
diff --git a/gdb/testsuite/gdb.pie/break1.c b/gdb/testsuite/gdb.pie/break1.c
|
Index: gdb-7.10.90.20160211/gdb/testsuite/gdb.pie/corefile.exp
|
||||||
new file mode 100644
|
===================================================================
|
||||||
--- /dev/null
|
--- /dev/null 1970-01-01 00:00:00.000000000 +0000
|
||||||
+++ b/gdb/testsuite/gdb.pie/break1.c
|
+++ gdb-7.10.90.20160211/gdb/testsuite/gdb.pie/corefile.exp 2016-02-15 23:37:15.191560055 +0100
|
||||||
@@ -0,0 +1,44 @@
|
|
||||||
+/* This testcase is part of GDB, the GNU debugger.
|
|
||||||
+
|
|
||||||
+ Copyright 1992, 1993, 1994, 1995, 1999, 2002, 2003 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 */
|
|
||||||
+
|
|
||||||
+/* The code for this file was extracted from the gdb testsuite
|
|
||||||
+ testcase "break.c". */
|
|
||||||
+
|
|
||||||
+/* The following functions do nothing useful. They are included
|
|
||||||
+ simply as places to try setting breakpoints at. They are
|
|
||||||
+ explicitly "one-line functions" to verify that this case works
|
|
||||||
+ (some versions of gcc have or have had problems with this).
|
|
||||||
+
|
|
||||||
+ These functions are in a separate source file to prevent an
|
|
||||||
+ optimizing compiler from inlining them and optimizing them away. */
|
|
||||||
+
|
|
||||||
+#ifdef PROTOTYPES
|
|
||||||
+int marker1 (void) { return (0); } /* set breakpoint 15 here */
|
|
||||||
+int marker2 (int a) { return (1); } /* set breakpoint 8 here */
|
|
||||||
+void marker3 (char *a, char *b) {} /* set breakpoint 17 here */
|
|
||||||
+void marker4 (long d) {} /* set breakpoint 14 here */
|
|
||||||
+#else
|
|
||||||
+int marker1 () { return (0); } /* set breakpoint 16 here */
|
|
||||||
+int marker2 (a) int a; { return (1); } /* set breakpoint 9 here */
|
|
||||||
+void marker3 (a, b) char *a, *b; {} /* set breakpoint 18 here */
|
|
||||||
+void marker4 (d) long d; {} /* set breakpoint 13 here */
|
|
||||||
+#endif
|
|
||||||
diff --git a/gdb/testsuite/gdb.pie/corefile.exp b/gdb/testsuite/gdb.pie/corefile.exp
|
|
||||||
new file mode 100644
|
|
||||||
--- /dev/null
|
|
||||||
+++ b/gdb/testsuite/gdb.pie/corefile.exp
|
|
||||||
@@ -0,0 +1,233 @@
|
@@ -0,0 +1,233 @@
|
||||||
+# Copyright 1992, 1993, 1994, 1995, 1996, 1997, 1998, 1999, 2000
|
+# Copyright 1992, 1993, 1994, 1995, 1996, 1997, 1998, 1999, 2000
|
||||||
+# Free Software Foundation, Inc.
|
+# Free Software Foundation, Inc.
|
||||||
|
@ -1878,150 +2017,3 @@ new file mode 100644
|
||||||
+gdb_test "up" "#\[0-9\]* *\[0-9xa-fH'\]* in .* \\(.*\\).*" "up in corefile.exp (reinit)"
|
+gdb_test "up" "#\[0-9\]* *\[0-9xa-fH'\]* in .* \\(.*\\).*" "up in corefile.exp (reinit)"
|
||||||
+
|
+
|
||||||
+gdb_test "core" "No core file now."
|
+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
|
|
||||||
--- /dev/null
|
|
||||||
+++ b/gdb/testsuite/gdb.pie/coremaker.c
|
|
||||||
@@ -0,0 +1,142 @@
|
|
||||||
+/* Copyright 1992, 1993, 1994, 1995, 1996, 1999
|
|
||||||
+ 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 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. */
|
|
||||||
+
|
|
||||||
+/* Simple little program that just generates a core dump from inside some
|
|
||||||
+ nested function calls. */
|
|
||||||
+
|
|
||||||
+#include <stdio.h>
|
|
||||||
+#include <sys/types.h>
|
|
||||||
+#include <fcntl.h>
|
|
||||||
+#include <sys/mman.h>
|
|
||||||
+#include <signal.h>
|
|
||||||
+#include <stdlib.h>
|
|
||||||
+#include <unistd.h>
|
|
||||||
+
|
|
||||||
+#ifndef __STDC__
|
|
||||||
+#define const /**/
|
|
||||||
+#endif
|
|
||||||
+
|
|
||||||
+#define MAPSIZE (8 * 1024)
|
|
||||||
+
|
|
||||||
+/* Don't make these automatic vars or we will have to walk back up the
|
|
||||||
+ stack to access them. */
|
|
||||||
+
|
|
||||||
+char *buf1;
|
|
||||||
+char *buf2;
|
|
||||||
+
|
|
||||||
+int coremaker_data = 1; /* In Data section */
|
|
||||||
+int coremaker_bss; /* In BSS section */
|
|
||||||
+
|
|
||||||
+const int coremaker_ro = 201; /* In Read-Only Data section */
|
|
||||||
+
|
|
||||||
+/* Note that if the mapping fails for any reason, we set buf2
|
|
||||||
+ to -1 and the testsuite notices this and reports it as
|
|
||||||
+ a failure due to a mapping error. This way we don't have
|
|
||||||
+ to test for specific errors when running the core maker. */
|
|
||||||
+
|
|
||||||
+void
|
|
||||||
+mmapdata ()
|
|
||||||
+{
|
|
||||||
+ int j, fd;
|
|
||||||
+
|
|
||||||
+ /* Allocate and initialize a buffer that will be used to write
|
|
||||||
+ the file that is later mapped in. */
|
|
||||||
+
|
|
||||||
+ buf1 = (char *) malloc (MAPSIZE);
|
|
||||||
+ for (j = 0; j < MAPSIZE; ++j)
|
|
||||||
+ {
|
|
||||||
+ buf1[j] = j;
|
|
||||||
+ }
|
|
||||||
+
|
|
||||||
+ /* Write the file to map in */
|
|
||||||
+
|
|
||||||
+ fd = open ("coremmap.data", O_CREAT | O_RDWR, 0666);
|
|
||||||
+ if (fd == -1)
|
|
||||||
+ {
|
|
||||||
+ perror ("coremmap.data open failed");
|
|
||||||
+ buf2 = (char *) -1;
|
|
||||||
+ return;
|
|
||||||
+ }
|
|
||||||
+ write (fd, buf1, MAPSIZE);
|
|
||||||
+
|
|
||||||
+ /* Now map the file into our address space as buf2 */
|
|
||||||
+
|
|
||||||
+ buf2 = (char *) mmap (0, MAPSIZE, PROT_READ | PROT_WRITE, MAP_PRIVATE, fd, 0);
|
|
||||||
+ if (buf2 == (char *) -1)
|
|
||||||
+ {
|
|
||||||
+ perror ("mmap failed");
|
|
||||||
+ return;
|
|
||||||
+ }
|
|
||||||
+
|
|
||||||
+ /* Verify that the original data and the mapped data are identical.
|
|
||||||
+ If not, we'd rather fail now than when trying to access the mapped
|
|
||||||
+ data from the core file. */
|
|
||||||
+
|
|
||||||
+ for (j = 0; j < MAPSIZE; ++j)
|
|
||||||
+ {
|
|
||||||
+ if (buf1[j] != buf2[j])
|
|
||||||
+ {
|
|
||||||
+ fprintf (stderr, "mapped data is incorrect");
|
|
||||||
+ buf2 = (char *) -1;
|
|
||||||
+ return;
|
|
||||||
+ }
|
|
||||||
+ }
|
|
||||||
+}
|
|
||||||
+
|
|
||||||
+void
|
|
||||||
+func2 ()
|
|
||||||
+{
|
|
||||||
+ int coremaker_local[5];
|
|
||||||
+ int i;
|
|
||||||
+
|
|
||||||
+#ifdef SA_FULLDUMP
|
|
||||||
+ /* Force a corefile that includes the data section for AIX. */
|
|
||||||
+ {
|
|
||||||
+ struct sigaction sa;
|
|
||||||
+
|
|
||||||
+ sigaction (SIGABRT, (struct sigaction *)0, &sa);
|
|
||||||
+ sa.sa_flags |= SA_FULLDUMP;
|
|
||||||
+ sigaction (SIGABRT, &sa, (struct sigaction *)0);
|
|
||||||
+ }
|
|
||||||
+#endif
|
|
||||||
+
|
|
||||||
+ /* Make sure that coremaker_local doesn't get optimized away. */
|
|
||||||
+ for (i = 0; i < 5; i++)
|
|
||||||
+ coremaker_local[i] = i;
|
|
||||||
+ coremaker_bss = 0;
|
|
||||||
+ for (i = 0; i < 5; i++)
|
|
||||||
+ coremaker_bss += coremaker_local[i];
|
|
||||||
+ coremaker_data = coremaker_ro + 1;
|
|
||||||
+ abort ();
|
|
||||||
+}
|
|
||||||
+
|
|
||||||
+void
|
|
||||||
+func1 ()
|
|
||||||
+{
|
|
||||||
+ func2 ();
|
|
||||||
+}
|
|
||||||
+
|
|
||||||
+int main ()
|
|
||||||
+{
|
|
||||||
+ mmapdata ();
|
|
||||||
+ func1 ();
|
|
||||||
+ return 0;
|
|
||||||
+}
|
|
||||||
+
|
|
||||||
|
|
|
@ -1,11 +1,3 @@
|
||||||
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-test-self-20050110.patch
|
|
||||||
|
|
||||||
;; Get selftest working with sep-debug-info
|
|
||||||
;;=fedoratest
|
|
||||||
|
|
||||||
2004-02-23 Elena Zannoni <ezannoni@redhat.com>
|
2004-02-23 Elena Zannoni <ezannoni@redhat.com>
|
||||||
|
|
||||||
* gdb.gdb/selftest.exp: Make sure that the debug directory is
|
* gdb.gdb/selftest.exp: Make sure that the debug directory is
|
||||||
|
@ -14,10 +6,11 @@ Subject: gdb-6.3-test-self-20050110.patch
|
||||||
* gdb.gdb/xfullpath.exp: Ditto.
|
* gdb.gdb/xfullpath.exp: Ditto.
|
||||||
* gdb.gdb/observer.exp: Ditto.
|
* gdb.gdb/observer.exp: Ditto.
|
||||||
|
|
||||||
diff --git a/gdb/testsuite/lib/selftest-support.exp b/gdb/testsuite/lib/selftest-support.exp
|
Index: gdb-7.6.90.20140127/gdb/testsuite/lib/selftest-support.exp
|
||||||
--- a/gdb/testsuite/lib/selftest-support.exp
|
===================================================================
|
||||||
+++ b/gdb/testsuite/lib/selftest-support.exp
|
--- gdb-7.6.90.20140127.orig/gdb/testsuite/lib/selftest-support.exp 2014-01-27 22:42:04.022535966 +0100
|
||||||
@@ -152,18 +152,18 @@ proc do_self_tests {function body} {
|
+++ gdb-7.6.90.20140127/gdb/testsuite/lib/selftest-support.exp 2014-01-27 22:42:42.630565675 +0100
|
||||||
|
@@ -136,18 +136,18 @@ proc do_self_tests {function body} {
|
||||||
}
|
}
|
||||||
|
|
||||||
# Remove any old copy lying around.
|
# Remove any old copy lying around.
|
||||||
|
|
|
@ -1,11 +1,3 @@
|
||||||
From FEDORA_PATCHES Mon Sep 17 00:00:00 2001
|
|
||||||
From: Jeff Johnston <jjohnstn@redhat.com>
|
|
||||||
Date: Fri, 27 Oct 2017 21:07:50 +0200
|
|
||||||
Subject: gdb-6.3-threaded-watchpoints2-20050225.patch
|
|
||||||
|
|
||||||
;; Test sibling threads to set threaded watchpoints for x86 and x86-64
|
|
||||||
;;=fedoratest
|
|
||||||
|
|
||||||
2005-02-28 Jeff Johnston <jjohnstn@redhat.com>
|
2005-02-28 Jeff Johnston <jjohnstn@redhat.com>
|
||||||
|
|
||||||
* config/i386/nm-linux.h: Change dr register routines to
|
* config/i386/nm-linux.h: Change dr register routines to
|
||||||
|
@ -50,10 +42,10 @@ Subject: gdb-6.3-threaded-watchpoints2-20050225.patch
|
||||||
|
|
||||||
FIXME: The testcase does not expects multiple watchpoints hits per one stop.
|
FIXME: The testcase does not expects multiple watchpoints hits per one stop.
|
||||||
|
|
||||||
diff --git a/gdb/testsuite/gdb.threads/watchthreads-threaded.c b/gdb/testsuite/gdb.threads/watchthreads-threaded.c
|
Index: gdb-7.10.90.20160211/gdb/testsuite/gdb.threads/watchthreads-threaded.c
|
||||||
new file mode 100644
|
===================================================================
|
||||||
--- /dev/null
|
--- /dev/null 1970-01-01 00:00:00.000000000 +0000
|
||||||
+++ b/gdb/testsuite/gdb.threads/watchthreads-threaded.c
|
+++ gdb-7.10.90.20160211/gdb/testsuite/gdb.threads/watchthreads-threaded.c 2016-02-15 23:37:39.766734541 +0100
|
||||||
@@ -0,0 +1,66 @@
|
@@ -0,0 +1,66 @@
|
||||||
+/* This testcase is part of GDB, the GNU debugger.
|
+/* This testcase is part of GDB, the GNU debugger.
|
||||||
+
|
+
|
||||||
|
@ -121,10 +113,10 @@ new file mode 100644
|
||||||
+ pthread_exit(NULL);
|
+ pthread_exit(NULL);
|
||||||
+}
|
+}
|
||||||
+
|
+
|
||||||
diff --git a/gdb/testsuite/gdb.threads/watchthreads-threaded.exp b/gdb/testsuite/gdb.threads/watchthreads-threaded.exp
|
Index: gdb-7.10.90.20160211/gdb/testsuite/gdb.threads/watchthreads-threaded.exp
|
||||||
new file mode 100644
|
===================================================================
|
||||||
--- /dev/null
|
--- /dev/null 1970-01-01 00:00:00.000000000 +0000
|
||||||
+++ b/gdb/testsuite/gdb.threads/watchthreads-threaded.exp
|
+++ gdb-7.10.90.20160211/gdb/testsuite/gdb.threads/watchthreads-threaded.exp 2016-02-15 23:40:32.484960858 +0100
|
||||||
@@ -0,0 +1,126 @@
|
@@ -0,0 +1,126 @@
|
||||||
+# This testcase is part of GDB, the GNU debugger.
|
+# This testcase is part of GDB, the GNU debugger.
|
||||||
+
|
+
|
||||||
|
|
|
@ -1,15 +1,7 @@
|
||||||
From FEDORA_PATCHES Mon Sep 17 00:00:00 2001
|
Index: gdb-7.10.90.20160211/gdb/testsuite/gdb.threads/threadcrash.c
|
||||||
From: Fedora GDB patches <invalid@email.com>
|
===================================================================
|
||||||
Date: Fri, 27 Oct 2017 21:07:50 +0200
|
--- /dev/null 1970-01-01 00:00:00.000000000 +0000
|
||||||
Subject: gdb-6.5-BEA-testsuite.patch
|
+++ gdb-7.10.90.20160211/gdb/testsuite/gdb.threads/threadcrash.c 2016-02-15 23:37:39.884735379 +0100
|
||||||
|
|
||||||
;; 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.
|
|
||||||
|
|
||||||
diff --git a/gdb/testsuite/gdb.threads/threadcrash.c b/gdb/testsuite/gdb.threads/threadcrash.c
|
|
||||||
new file mode 100644
|
|
||||||
--- /dev/null
|
|
||||||
+++ b/gdb/testsuite/gdb.threads/threadcrash.c
|
|
||||||
@@ -0,0 +1,301 @@
|
@@ -0,0 +1,301 @@
|
||||||
+/*
|
+/*
|
||||||
+ * The point of this program is to crash in a multi-threaded app.
|
+ * The point of this program is to crash in a multi-threaded app.
|
||||||
|
@ -312,10 +304,10 @@ new file mode 100644
|
||||||
+
|
+
|
||||||
+ return 0;
|
+ return 0;
|
||||||
+}
|
+}
|
||||||
diff --git a/gdb/testsuite/gdb.threads/threadcrash.exp b/gdb/testsuite/gdb.threads/threadcrash.exp
|
Index: gdb-7.10.90.20160211/gdb/testsuite/gdb.threads/threadcrash.exp
|
||||||
new file mode 100644
|
===================================================================
|
||||||
--- /dev/null
|
--- /dev/null 1970-01-01 00:00:00.000000000 +0000
|
||||||
+++ b/gdb/testsuite/gdb.threads/threadcrash.exp
|
+++ gdb-7.10.90.20160211/gdb/testsuite/gdb.threads/threadcrash.exp 2016-02-15 23:38:58.486293458 +0100
|
||||||
@@ -0,0 +1,37 @@
|
@@ -0,0 +1,37 @@
|
||||||
+# threadcrash.exp - The point of this program is to crash in a multi-threaded app.
|
+# threadcrash.exp - The point of this program is to crash in a multi-threaded app.
|
||||||
+
|
+
|
||||||
|
@ -354,10 +346,10 @@ new file mode 100644
|
||||||
+}
|
+}
|
||||||
+
|
+
|
||||||
+return 0
|
+return 0
|
||||||
diff --git a/gdb/testsuite/gdb.threads/threadcrash.sh b/gdb/testsuite/gdb.threads/threadcrash.sh
|
Index: gdb-7.10.90.20160211/gdb/testsuite/gdb.threads/threadcrash.sh
|
||||||
new file mode 100644
|
===================================================================
|
||||||
--- /dev/null
|
--- /dev/null 1970-01-01 00:00:00.000000000 +0000
|
||||||
+++ b/gdb/testsuite/gdb.threads/threadcrash.sh
|
+++ gdb-7.10.90.20160211/gdb/testsuite/gdb.threads/threadcrash.sh 2016-02-15 23:37:39.885735386 +0100
|
||||||
@@ -0,0 +1,324 @@
|
@@ -0,0 +1,324 @@
|
||||||
+#! /bin/bash
|
+#! /bin/bash
|
||||||
+
|
+
|
||||||
|
@ -683,10 +675,10 @@ new file mode 100644
|
||||||
+rm -rf $WORKDIR
|
+rm -rf $WORKDIR
|
||||||
+
|
+
|
||||||
+exit $FAILURES
|
+exit $FAILURES
|
||||||
diff --git a/gdb/testsuite/gdb.threads/threadcrash.sh-orig b/gdb/testsuite/gdb.threads/threadcrash.sh-orig
|
Index: gdb-7.10.90.20160211/gdb/testsuite/gdb.threads/threadcrash.sh-orig
|
||||||
new file mode 100644
|
===================================================================
|
||||||
--- /dev/null
|
--- /dev/null 1970-01-01 00:00:00.000000000 +0000
|
||||||
+++ b/gdb/testsuite/gdb.threads/threadcrash.sh-orig
|
+++ gdb-7.10.90.20160211/gdb/testsuite/gdb.threads/threadcrash.sh-orig 2016-02-15 23:37:39.885735386 +0100
|
||||||
@@ -0,0 +1,248 @@
|
@@ -0,0 +1,248 @@
|
||||||
+#! /bin/bash
|
+#! /bin/bash
|
||||||
+
|
+
|
||||||
|
|
|
@ -1,11 +1,3 @@
|
||||||
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-bz109921-DW_AT_decl_file-test.patch
|
|
||||||
|
|
||||||
;; Find symbols properly at their original (included) file (BZ 109921).
|
|
||||||
;;=fedoratest
|
|
||||||
|
|
||||||
https://bugzilla.redhat.com/bugzilla/show_bug.cgi?id=109921
|
https://bugzilla.redhat.com/bugzilla/show_bug.cgi?id=109921
|
||||||
|
|
||||||
It is duplicite to its upstream variant:
|
It is duplicite to its upstream variant:
|
||||||
|
@ -24,10 +16,10 @@ http://sourceware.org/ml/gdb-patches/2007-01/msg00434.html
|
||||||
* gdb.dwarf2/dw2-included.exp, gdb.dwarf2/dw2-included.c,
|
* gdb.dwarf2/dw2-included.exp, gdb.dwarf2/dw2-included.c,
|
||||||
gdb.dwarf2/dw2-included.h: New files.
|
gdb.dwarf2/dw2-included.h: New files.
|
||||||
|
|
||||||
diff --git a/gdb/testsuite/gdb.dwarf2/dw2-included.c b/gdb/testsuite/gdb.dwarf2/dw2-included.c
|
Index: gdb-7.10.90.20160211/gdb/testsuite/gdb.dwarf2/dw2-included.c
|
||||||
new file mode 100644
|
===================================================================
|
||||||
--- /dev/null
|
--- /dev/null 1970-01-01 00:00:00.000000000 +0000
|
||||||
+++ b/gdb/testsuite/gdb.dwarf2/dw2-included.c
|
+++ gdb-7.10.90.20160211/gdb/testsuite/gdb.dwarf2/dw2-included.c 2016-02-16 09:52:29.861247534 +0100
|
||||||
@@ -0,0 +1,26 @@
|
@@ -0,0 +1,26 @@
|
||||||
+/* This testcase is part of GDB, the GNU debugger.
|
+/* This testcase is part of GDB, the GNU debugger.
|
||||||
+
|
+
|
||||||
|
@ -55,10 +47,10 @@ new file mode 100644
|
||||||
+{
|
+{
|
||||||
+ return 0;
|
+ return 0;
|
||||||
+}
|
+}
|
||||||
diff --git a/gdb/testsuite/gdb.dwarf2/dw2-included.exp b/gdb/testsuite/gdb.dwarf2/dw2-included.exp
|
Index: gdb-7.10.90.20160211/gdb/testsuite/gdb.dwarf2/dw2-included.exp
|
||||||
new file mode 100644
|
===================================================================
|
||||||
--- /dev/null
|
--- /dev/null 1970-01-01 00:00:00.000000000 +0000
|
||||||
+++ b/gdb/testsuite/gdb.dwarf2/dw2-included.exp
|
+++ gdb-7.10.90.20160211/gdb/testsuite/gdb.dwarf2/dw2-included.exp 2016-02-16 09:52:36.481292330 +0100
|
||||||
@@ -0,0 +1,47 @@
|
@@ -0,0 +1,47 @@
|
||||||
+# Copyright 2006 Free Software Foundation, Inc.
|
+# Copyright 2006 Free Software Foundation, Inc.
|
||||||
+
|
+
|
||||||
|
@ -106,11 +98,11 @@ new file mode 100644
|
||||||
+gdb_test "list integer" "int integer;\r"
|
+gdb_test "list integer" "int integer;\r"
|
||||||
+gdb_test "ptype integer" "type = int\r"
|
+gdb_test "ptype integer" "type = int\r"
|
||||||
+# Path varies depending on the build location.
|
+# 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
|
Index: gdb-7.10.90.20160211/gdb/testsuite/gdb.dwarf2/dw2-included.h
|
||||||
new file mode 100644
|
===================================================================
|
||||||
--- /dev/null
|
--- /dev/null 1970-01-01 00:00:00.000000000 +0000
|
||||||
+++ b/gdb/testsuite/gdb.dwarf2/dw2-included.h
|
+++ gdb-7.10.90.20160211/gdb/testsuite/gdb.dwarf2/dw2-included.h 2016-02-16 09:52:29.862247541 +0100
|
||||||
@@ -0,0 +1,20 @@
|
@@ -0,0 +1,20 @@
|
||||||
+/* This testcase is part of GDB, the GNU debugger.
|
+/* This testcase is part of GDB, the GNU debugger.
|
||||||
+
|
+
|
||||||
|
|
|
@ -1,11 +1,3 @@
|
||||||
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-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.
|
|
||||||
|
|
||||||
https://bugzilla.redhat.com/bugzilla/show_bug.cgi?id=185337
|
https://bugzilla.redhat.com/bugzilla/show_bug.cgi?id=185337
|
||||||
|
|
||||||
2008-02-24 Jan Kratochvil <jan.kratochvil@redhat.com>
|
2008-02-24 Jan Kratochvil <jan.kratochvil@redhat.com>
|
||||||
|
@ -32,6 +24,7 @@ call invalidates `struct frame *' in the callers - RH BZ 690908.
|
||||||
|
|
||||||
https://bugzilla.redhat.com/show_bug.cgi?id=1166549
|
https://bugzilla.redhat.com/show_bug.cgi?id=1166549
|
||||||
|
|
||||||
|
|
||||||
2007-11-03 Jan Kratochvil <jan.kratochvil@redhat.com>
|
2007-11-03 Jan Kratochvil <jan.kratochvil@redhat.com>
|
||||||
|
|
||||||
* ./gdb/dwarf2read.c (read_partial_die, dwarf2_linkage_name): Prefer
|
* ./gdb/dwarf2read.c (read_partial_die, dwarf2_linkage_name): Prefer
|
||||||
|
@ -41,12 +34,13 @@ 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
|
<81a2> DW_AT_name : (indirect string, offset: 0x280e): __errno_location
|
||||||
<81a8> DW_AT_MIPS_linkage_name: (indirect string, offset: 0x2808): *__GI___errno_location
|
<81a8> DW_AT_MIPS_linkage_name: (indirect string, offset: 0x2808): *__GI___errno_location
|
||||||
|
|
||||||
diff --git a/gdb/printcmd.c b/gdb/printcmd.c
|
Index: gdb-7.12.50.20170207/gdb/printcmd.c
|
||||||
--- a/gdb/printcmd.c
|
===================================================================
|
||||||
+++ b/gdb/printcmd.c
|
--- gdb-7.12.50.20170207.orig/gdb/printcmd.c 2017-02-07 21:06:20.196593884 +0100
|
||||||
@@ -1210,6 +1210,10 @@ print_command_1 (const char *args, int voidprint)
|
+++ gdb-7.12.50.20170207/gdb/printcmd.c 2017-02-07 21:07:10.230973906 +0100
|
||||||
|
@@ -1258,6 +1258,10 @@
|
||||||
|
|
||||||
if (exp != nullptr && *exp)
|
if (exp && *exp)
|
||||||
{
|
{
|
||||||
+ /* '*((int *(*) (void)) __errno_location) ()' is incompatible with
|
+ /* '*((int *(*) (void)) __errno_location) ()' is incompatible with
|
||||||
+ function descriptors. */
|
+ function descriptors. */
|
||||||
|
@ -55,10 +49,10 @@ diff --git a/gdb/printcmd.c b/gdb/printcmd.c
|
||||||
expression_up expr = parse_expression (exp);
|
expression_up expr = parse_expression (exp);
|
||||||
val = evaluate_expression (expr.get ());
|
val = evaluate_expression (expr.get ());
|
||||||
}
|
}
|
||||||
diff --git a/gdb/testsuite/gdb.dwarf2/dw2-errno.c b/gdb/testsuite/gdb.dwarf2/dw2-errno.c
|
Index: gdb-7.12.50.20170207/gdb/testsuite/gdb.dwarf2/dw2-errno.c
|
||||||
new file mode 100644
|
===================================================================
|
||||||
--- /dev/null
|
--- /dev/null 1970-01-01 00:00:00.000000000 +0000
|
||||||
+++ b/gdb/testsuite/gdb.dwarf2/dw2-errno.c
|
+++ gdb-7.12.50.20170207/gdb/testsuite/gdb.dwarf2/dw2-errno.c 2017-02-07 21:06:20.196593884 +0100
|
||||||
@@ -0,0 +1,28 @@
|
@@ -0,0 +1,28 @@
|
||||||
+/* This testcase is part of GDB, the GNU debugger.
|
+/* This testcase is part of GDB, the GNU debugger.
|
||||||
+
|
+
|
||||||
|
@ -88,10 +82,10 @@ new file mode 100644
|
||||||
+
|
+
|
||||||
+ return 0; /* breakpoint */
|
+ return 0; /* breakpoint */
|
||||||
+}
|
+}
|
||||||
diff --git a/gdb/testsuite/gdb.dwarf2/dw2-errno.exp b/gdb/testsuite/gdb.dwarf2/dw2-errno.exp
|
Index: gdb-7.12.50.20170207/gdb/testsuite/gdb.dwarf2/dw2-errno.exp
|
||||||
new file mode 100644
|
===================================================================
|
||||||
--- /dev/null
|
--- /dev/null 1970-01-01 00:00:00.000000000 +0000
|
||||||
+++ b/gdb/testsuite/gdb.dwarf2/dw2-errno.exp
|
+++ gdb-7.12.50.20170207/gdb/testsuite/gdb.dwarf2/dw2-errno.exp 2017-02-07 21:06:20.196593884 +0100
|
||||||
@@ -0,0 +1,60 @@
|
@@ -0,0 +1,60 @@
|
||||||
+# Copyright 2007 Free Software Foundation, Inc.
|
+# Copyright 2007 Free Software Foundation, Inc.
|
||||||
+
|
+
|
||||||
|
@ -153,10 +147,10 @@ new file mode 100644
|
||||||
+
|
+
|
||||||
+# TODO: Test the error on resolving ERRNO with only libc loaded.
|
+# TODO: Test the error on resolving ERRNO with only libc loaded.
|
||||||
+# Just how to find the current libc filename?
|
+# 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
|
Index: gdb-7.12.50.20170207/gdb/testsuite/gdb.dwarf2/dw2-errno2.c
|
||||||
new file mode 100644
|
===================================================================
|
||||||
--- /dev/null
|
--- /dev/null 1970-01-01 00:00:00.000000000 +0000
|
||||||
+++ b/gdb/testsuite/gdb.dwarf2/dw2-errno2.c
|
+++ gdb-7.12.50.20170207/gdb/testsuite/gdb.dwarf2/dw2-errno2.c 2017-02-07 21:06:20.196593884 +0100
|
||||||
@@ -0,0 +1,28 @@
|
@@ -0,0 +1,28 @@
|
||||||
+/* This testcase is part of GDB, the GNU debugger.
|
+/* This testcase is part of GDB, the GNU debugger.
|
||||||
+
|
+
|
||||||
|
@ -186,10 +180,10 @@ new file mode 100644
|
||||||
+
|
+
|
||||||
+ return 0; /* breakpoint */
|
+ return 0; /* breakpoint */
|
||||||
+}
|
+}
|
||||||
diff --git a/gdb/testsuite/gdb.dwarf2/dw2-errno2.exp b/gdb/testsuite/gdb.dwarf2/dw2-errno2.exp
|
Index: gdb-7.12.50.20170207/gdb/testsuite/gdb.dwarf2/dw2-errno2.exp
|
||||||
new file mode 100644
|
===================================================================
|
||||||
--- /dev/null
|
--- /dev/null 1970-01-01 00:00:00.000000000 +0000
|
||||||
+++ b/gdb/testsuite/gdb.dwarf2/dw2-errno2.exp
|
+++ gdb-7.12.50.20170207/gdb/testsuite/gdb.dwarf2/dw2-errno2.exp 2017-02-07 21:06:20.197593892 +0100
|
||||||
@@ -0,0 +1,71 @@
|
@@ -0,0 +1,71 @@
|
||||||
+# Copyright 2007 Free Software Foundation, Inc.
|
+# Copyright 2007 Free Software Foundation, Inc.
|
||||||
+
|
+
|
||||||
|
@ -231,7 +225,7 @@ new file mode 100644
|
||||||
+ if $do_xfail {
|
+ if $do_xfail {
|
||||||
+ setup_xfail "*-*-*"
|
+ setup_xfail "*-*-*"
|
||||||
+ }
|
+ }
|
||||||
+ gdb_test "print (int) errno" ".* = 42" "print errno for core"
|
+ gdb_test "print errno" ".* = 42" "print errno for core"
|
||||||
+}}
|
+}}
|
||||||
+
|
+
|
||||||
+set variant g2thrN
|
+set variant g2thrN
|
||||||
|
|
|
@ -0,0 +1,17 @@
|
||||||
|
Index: gdb-7.4.50.20120602/gdb/symfile.c
|
||||||
|
===================================================================
|
||||||
|
--- gdb-7.4.50.20120602.orig/gdb/symfile.c 2012-06-02 18:25:20.000000000 +0200
|
||||||
|
+++ gdb-7.4.50.20120602/gdb/symfile.c 2012-06-02 18:26:36.145232057 +0200
|
||||||
|
@@ -3630,6 +3630,12 @@ default_symfile_relocate (struct objfile
|
||||||
|
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)
|
|
@ -0,0 +1,300 @@
|
||||||
|
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.
|
||||||
|
|
||||||
|
Index: gdb-7.10.90.20160211/gdb/amd64-linux-tdep.c
|
||||||
|
===================================================================
|
||||||
|
--- gdb-7.10.90.20160211.orig/gdb/amd64-linux-tdep.c 2016-02-15 23:37:06.936501443 +0100
|
||||||
|
+++ gdb-7.10.90.20160211/gdb/amd64-linux-tdep.c 2016-02-15 23:37:39.928735691 +0100
|
||||||
|
@@ -292,6 +292,80 @@
|
||||||
|
|
||||||
|
/* 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)
|
||||||
|
{
|
||||||
|
@@ -1800,6 +1874,8 @@
|
||||||
|
|
||||||
|
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);
|
||||||
|
|
||||||
|
Index: gdb-7.10.90.20160211/gdb/amd64-tdep.c
|
||||||
|
===================================================================
|
||||||
|
--- gdb-7.10.90.20160211.orig/gdb/amd64-tdep.c 2016-02-15 23:37:06.936501443 +0100
|
||||||
|
+++ gdb-7.10.90.20160211/gdb/amd64-tdep.c 2016-02-15 23:37:39.929735698 +0100
|
||||||
|
@@ -2494,6 +2494,7 @@
|
||||||
|
{
|
||||||
|
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;
|
||||||
|
@@ -2502,6 +2503,10 @@
|
||||||
|
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;
|
||||||
|
}
|
||||||
|
|
||||||
|
@@ -2636,6 +2641,7 @@
|
||||||
|
{
|
||||||
|
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));
|
||||||
|
@@ -2644,6 +2650,11 @@
|
||||||
|
/* 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));
|
||||||
|
}
|
||||||
|
Index: gdb-7.10.90.20160211/gdb/i386-tdep.c
|
||||||
|
===================================================================
|
||||||
|
--- gdb-7.10.90.20160211.orig/gdb/i386-tdep.c 2016-02-15 23:37:06.936501443 +0100
|
||||||
|
+++ gdb-7.10.90.20160211/gdb/i386-tdep.c 2016-02-15 23:37:39.931735713 +0100
|
||||||
|
@@ -8305,6 +8305,9 @@
|
||||||
|
|
||||||
|
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);
|
||||||
|
Index: gdb-7.10.90.20160211/gdb/i386-tdep.h
|
||||||
|
===================================================================
|
||||||
|
--- gdb-7.10.90.20160211.orig/gdb/i386-tdep.h 2016-02-15 23:37:06.936501443 +0100
|
||||||
|
+++ gdb-7.10.90.20160211/gdb/i386-tdep.h 2016-02-15 23:37:39.932735720 +0100
|
||||||
|
@@ -240,6 +240,9 @@
|
||||||
|
|
||||||
|
/* 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. */
|
||||||
|
Index: gdb-7.10.90.20160211/gdb/testsuite/gdb.threads/bt-clone-stop.c
|
||||||
|
===================================================================
|
||||||
|
--- /dev/null 1970-01-01 00:00:00.000000000 +0000
|
||||||
|
+++ gdb-7.10.90.20160211/gdb/testsuite/gdb.threads/bt-clone-stop.c 2016-02-15 23:37:39.932735720 +0100
|
||||||
|
@@ -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();
|
||||||
|
+}
|
||||||
|
Index: gdb-7.10.90.20160211/gdb/testsuite/gdb.threads/bt-clone-stop.exp
|
||||||
|
===================================================================
|
||||||
|
--- /dev/null 1970-01-01 00:00:00.000000000 +0000
|
||||||
|
+++ gdb-7.10.90.20160211/gdb/testsuite/gdb.threads/bt-clone-stop.exp 2016-02-15 23:37:56.197851204 +0100
|
||||||
|
@@ -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"
|
||||||
|
+ }
|
||||||
|
+}
|
|
@ -1,50 +1,10 @@
|
||||||
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-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
|
https://bugzilla.redhat.com/bugzilla/show_bug.cgi?id=218379
|
||||||
|
|
||||||
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: gdb-7.10.90.20160211/gdb/testsuite/gdb.base/step-over-trampoline.exp
|
||||||
--- /dev/null
|
===================================================================
|
||||||
+++ b/gdb/testsuite/gdb.base/step-over-trampoline.c
|
--- /dev/null 1970-01-01 00:00:00.000000000 +0000
|
||||||
@@ -0,0 +1,28 @@
|
+++ gdb-7.10.90.20160211/gdb/testsuite/gdb.base/step-over-trampoline.exp 2016-02-15 23:31:47.312232078 +0100
|
||||||
+/* 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., 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 <stdio.h>
|
|
||||||
+
|
|
||||||
+int main (void)
|
|
||||||
+{
|
|
||||||
+ puts ("hello world");
|
|
||||||
+ return 0;
|
|
||||||
+}
|
|
||||||
diff --git a/gdb/testsuite/gdb.base/step-over-trampoline.exp b/gdb/testsuite/gdb.base/step-over-trampoline.exp
|
|
||||||
new file mode 100644
|
|
||||||
--- /dev/null
|
|
||||||
+++ b/gdb/testsuite/gdb.base/step-over-trampoline.exp
|
|
||||||
@@ -0,0 +1,54 @@
|
@@ -0,0 +1,54 @@
|
||||||
+# Copyright 2006 Free Software Foundation, Inc.
|
+# Copyright 2006 Free Software Foundation, Inc.
|
||||||
+
|
+
|
||||||
|
@ -100,3 +60,36 @@ new file mode 100644
|
||||||
+ fail "stepped into trampoline"
|
+ fail "stepped into trampoline"
|
||||||
+ }
|
+ }
|
||||||
+}
|
+}
|
||||||
|
Index: gdb-7.10.90.20160211/gdb/testsuite/gdb.base/step-over-trampoline.c
|
||||||
|
===================================================================
|
||||||
|
--- /dev/null 1970-01-01 00:00:00.000000000 +0000
|
||||||
|
+++ gdb-7.10.90.20160211/gdb/testsuite/gdb.base/step-over-trampoline.c 2016-02-15 23:30:54.698858518 +0100
|
||||||
|
@@ -0,0 +1,28 @@
|
||||||
|
+/* 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., 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 <stdio.h>
|
||||||
|
+
|
||||||
|
+int main (void)
|
||||||
|
+{
|
||||||
|
+ puts ("hello world");
|
||||||
|
+ return 0;
|
||||||
|
+}
|
||||||
|
|
|
@ -1,18 +1,12 @@
|
||||||
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-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
|
https://bugzilla.redhat.com/bugzilla/show_bug.cgi?id=218379
|
||||||
|
|
||||||
diff --git a/gdb/symtab.c b/gdb/symtab.c
|
|
||||||
--- a/gdb/symtab.c
|
Index: gdb-7.7.90.20140613/gdb/symtab.c
|
||||||
+++ b/gdb/symtab.c
|
===================================================================
|
||||||
@@ -3169,6 +3169,13 @@ find_pc_sect_line (CORE_ADDR pc, struct obj_section *section, int notcurrent)
|
--- gdb-7.7.90.20140613.orig/gdb/symtab.c 2014-06-13 21:52:06.219338401 +0200
|
||||||
msymbol->linkage_name ()); */
|
+++ gdb-7.7.90.20140613/gdb/symtab.c 2014-06-13 21:55:02.753531885 +0200
|
||||||
|
@@ -2394,6 +2394,13 @@ find_pc_sect_line (CORE_ADDR pc, struct
|
||||||
|
SYMBOL_LINKAGE_NAME (msymbol)); */
|
||||||
;
|
;
|
||||||
/* fall through */
|
/* fall through */
|
||||||
+ /* `msymbol' trampoline may be located before its .text symbol
|
+ /* `msymbol' trampoline may be located before its .text symbol
|
||||||
|
@ -20,8 +14,8 @@ diff --git a/gdb/symtab.c b/gdb/symtab.c
|
||||||
+ Avoid `find_pc_sect_line'<->`find_pc_line' infinite loop.
|
+ Avoid `find_pc_sect_line'<->`find_pc_line' infinite loop.
|
||||||
+ Red Hat Bug 218379. */
|
+ Red Hat Bug 218379. */
|
||||||
+ else if (BMSYMBOL_VALUE_ADDRESS (mfunsym) == pc)
|
+ 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 */
|
+ /* fall through */
|
||||||
else
|
else
|
||||||
{
|
return find_pc_line (BMSYMBOL_VALUE_ADDRESS (mfunsym), 0);
|
||||||
/* Detect an obvious case of infinite recursion. If this
|
}
|
||||||
|
|
|
@ -1,15 +1,6 @@
|
||||||
From FEDORA_PATCHES Mon Sep 17 00:00:00 2001
|
diff -u -ruNp gdb-6.3-unpatched/gdb/testsuite/gdb.base/tracefork-zombie.exp gdb-6.3/gdb/testsuite/gdb.base/tracefork-zombie.exp
|
||||||
From: Fedora GDB patches <invalid@email.com>
|
--- gdb-6.3-unpatched/gdb/testsuite/gdb.base/tracefork-zombie.exp 1969-12-31 19:00:00.000000000 -0500
|
||||||
Date: Fri, 27 Oct 2017 21:07:50 +0200
|
+++ gdb-6.3/gdb/testsuite/gdb.base/tracefork-zombie.exp 2007-07-31 13:04:12.000000000 -0400
|
||||||
Subject: gdb-6.5-bz243845-stale-testing-zombie-test.patch
|
|
||||||
|
|
||||||
;; Test leftover zombie process (BZ 243845).
|
|
||||||
;;=fedoratest
|
|
||||||
|
|
||||||
diff --git a/gdb/testsuite/gdb.base/tracefork-zombie.exp b/gdb/testsuite/gdb.base/tracefork-zombie.exp
|
|
||||||
new file mode 100644
|
|
||||||
--- /dev/null
|
|
||||||
+++ b/gdb/testsuite/gdb.base/tracefork-zombie.exp
|
|
||||||
@@ -0,0 +1,75 @@
|
@@ -0,0 +1,75 @@
|
||||||
+# Copyright 2007 Free Software Foundation, Inc.
|
+# Copyright 2007 Free Software Foundation, Inc.
|
||||||
+
|
+
|
||||||
|
|
|
@ -1,15 +1,7 @@
|
||||||
From FEDORA_PATCHES Mon Sep 17 00:00:00 2001
|
Index: gdb-7.10.90.20160211/gdb/testsuite/gdb.base/gcore-excessive-memory.c
|
||||||
From: Fedora GDB patches <invalid@email.com>
|
===================================================================
|
||||||
Date: Fri, 27 Oct 2017 21:07:50 +0200
|
--- /dev/null 1970-01-01 00:00:00.000000000 +0000
|
||||||
Subject: gdb-6.5-gcore-buffer-limit-test.patch
|
+++ gdb-7.10.90.20160211/gdb/testsuite/gdb.base/gcore-excessive-memory.c 2016-02-15 23:28:15.943731340 +0100
|
||||||
|
|
||||||
;; Test gcore memory and time requirements for large inferiors.
|
|
||||||
;;=fedoratest
|
|
||||||
|
|
||||||
diff --git a/gdb/testsuite/gdb.base/gcore-excessive-memory.c b/gdb/testsuite/gdb.base/gcore-excessive-memory.c
|
|
||||||
new file mode 100644
|
|
||||||
--- /dev/null
|
|
||||||
+++ b/gdb/testsuite/gdb.base/gcore-excessive-memory.c
|
|
||||||
@@ -0,0 +1,37 @@
|
@@ -0,0 +1,37 @@
|
||||||
+/* This testcase is part of GDB, the GNU debugger.
|
+/* This testcase is part of GDB, the GNU debugger.
|
||||||
+
|
+
|
||||||
|
@ -48,10 +40,10 @@ new file mode 100644
|
||||||
+
|
+
|
||||||
+ return 0;
|
+ return 0;
|
||||||
+}
|
+}
|
||||||
diff --git a/gdb/testsuite/gdb.base/gcore-excessive-memory.exp b/gdb/testsuite/gdb.base/gcore-excessive-memory.exp
|
Index: gdb-7.10.90.20160211/gdb/testsuite/gdb.base/gcore-excessive-memory.exp
|
||||||
new file mode 100644
|
===================================================================
|
||||||
--- /dev/null
|
--- /dev/null 1970-01-01 00:00:00.000000000 +0000
|
||||||
+++ b/gdb/testsuite/gdb.base/gcore-excessive-memory.exp
|
+++ gdb-7.10.90.20160211/gdb/testsuite/gdb.base/gcore-excessive-memory.exp 2016-02-15 23:28:22.720779458 +0100
|
||||||
@@ -0,0 +1,94 @@
|
@@ -0,0 +1,94 @@
|
||||||
+# Copyright 2008 Free Software Foundation, Inc.
|
+# Copyright 2008 Free Software Foundation, Inc.
|
||||||
+
|
+
|
||||||
|
|
|
@ -1,15 +1,7 @@
|
||||||
From FEDORA_PATCHES Mon Sep 17 00:00:00 2001
|
Index: gdb-7.10.90.20160211/gdb/testsuite/gdb.base/unwind-leak.c
|
||||||
From: Fedora GDB patches <invalid@email.com>
|
===================================================================
|
||||||
Date: Fri, 27 Oct 2017 21:07:50 +0200
|
--- /dev/null 1970-01-01 00:00:00.000000000 +0000
|
||||||
Subject: gdb-6.5-ia64-libunwind-leak-test.patch
|
+++ gdb-7.10.90.20160211/gdb/testsuite/gdb.base/unwind-leak.c 2016-02-15 23:32:11.307402446 +0100
|
||||||
|
|
||||||
;; Test ia64 memory leaks of the code using libunwind.
|
|
||||||
;;=fedoratest
|
|
||||||
|
|
||||||
diff --git a/gdb/testsuite/gdb.base/unwind-leak.c b/gdb/testsuite/gdb.base/unwind-leak.c
|
|
||||||
new file mode 100644
|
|
||||||
--- /dev/null
|
|
||||||
+++ b/gdb/testsuite/gdb.base/unwind-leak.c
|
|
||||||
@@ -0,0 +1,29 @@
|
@@ -0,0 +1,29 @@
|
||||||
+/* This testcase is part of GDB, the GNU debugger.
|
+/* This testcase is part of GDB, the GNU debugger.
|
||||||
+
|
+
|
||||||
|
@ -40,10 +32,10 @@ new file mode 100644
|
||||||
+ alarm (0);
|
+ alarm (0);
|
||||||
+ return 0;
|
+ return 0;
|
||||||
+}
|
+}
|
||||||
diff --git a/gdb/testsuite/gdb.base/unwind-leak.exp b/gdb/testsuite/gdb.base/unwind-leak.exp
|
Index: gdb-7.10.90.20160211/gdb/testsuite/gdb.base/unwind-leak.exp
|
||||||
new file mode 100644
|
===================================================================
|
||||||
--- /dev/null
|
--- /dev/null 1970-01-01 00:00:00.000000000 +0000
|
||||||
+++ b/gdb/testsuite/gdb.base/unwind-leak.exp
|
+++ gdb-7.10.90.20160211/gdb/testsuite/gdb.base/unwind-leak.exp 2016-02-15 23:32:18.559453937 +0100
|
||||||
@@ -0,0 +1,83 @@
|
@@ -0,0 +1,83 @@
|
||||||
+# Copyright 2007 Free Software Foundation, Inc.
|
+# Copyright 2007 Free Software Foundation, Inc.
|
||||||
+
|
+
|
||||||
|
|
|
@ -1,15 +1,9 @@
|
||||||
From FEDORA_PATCHES Mon Sep 17 00:00:00 2001
|
Index: ./gdb/testsuite/gdb.base/largecore-last-address-lock.exp
|
||||||
From: Fedora GDB patches <invalid@email.com>
|
===================================================================
|
||||||
Date: Fri, 27 Oct 2017 21:07:50 +0200
|
RCS file: ./gdb/testsuite/gdb.base/largecore-last-address-lock.exp
|
||||||
Subject: gdb-6.5-last-address-space-byte-test.patch
|
diff -N ./gdb/testsuite/gdb.base/largecore-last-address-lock.exp
|
||||||
|
--- /dev/null 1 Jan 1970 00:00:00 -0000
|
||||||
;; Testcase for deadlocking on last address space byte; for corrupted backtraces.
|
+++ ./gdb/testsuite/gdb.base/largecore-last-address-lock.exp 15 Nov 2006 21:43:24 -0000
|
||||||
;;=fedoratest
|
|
||||||
|
|
||||||
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
|
|
||||||
--- /dev/null
|
|
||||||
+++ b/gdb/testsuite/gdb.base/largecore-last-address-lock.exp
|
|
||||||
@@ -0,0 +1,49 @@
|
@@ -0,0 +1,49 @@
|
||||||
+# Copyright 2006 Free Software Foundation, Inc.
|
+# Copyright 2006 Free Software Foundation, Inc.
|
||||||
+
|
+
|
||||||
|
|
|
@ -1,53 +1,10 @@
|
||||||
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-missed-trap-on-step-test.patch
|
|
||||||
|
|
||||||
;; Test hiding unexpected breakpoints on intentional step commands.
|
|
||||||
;;=fedoratest
|
|
||||||
|
|
||||||
Fix has been committed to:
|
Fix has been committed to:
|
||||||
gdb-6.6-scheduler_locking-step-sw-watchpoints2.patch
|
gdb-6.6-scheduler_locking-step-sw-watchpoints2.patch
|
||||||
|
|
||||||
diff --git a/gdb/testsuite/gdb.base/watchpoint-during-step.c b/gdb/testsuite/gdb.base/watchpoint-during-step.c
|
Index: gdb-7.10.90.20160211/gdb/testsuite/gdb.base/watchpoint-during-step.exp
|
||||||
new file mode 100644
|
===================================================================
|
||||||
--- /dev/null
|
--- /dev/null 1970-01-01 00:00:00.000000000 +0000
|
||||||
+++ b/gdb/testsuite/gdb.base/watchpoint-during-step.c
|
+++ gdb-7.10.90.20160211/gdb/testsuite/gdb.base/watchpoint-during-step.exp 2016-02-15 23:34:10.455248408 +0100
|
||||||
@@ -0,0 +1,30 @@
|
|
||||||
+/* 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 */
|
|
||||||
+
|
|
||||||
+static int var;
|
|
||||||
+
|
|
||||||
+int main()
|
|
||||||
+{
|
|
||||||
+ var = 1;
|
|
||||||
+ var = 2;
|
|
||||||
+ var = 3;
|
|
||||||
+ return 0;
|
|
||||||
+}
|
|
||||||
diff --git a/gdb/testsuite/gdb.base/watchpoint-during-step.exp b/gdb/testsuite/gdb.base/watchpoint-during-step.exp
|
|
||||||
new file mode 100644
|
|
||||||
--- /dev/null
|
|
||||||
+++ b/gdb/testsuite/gdb.base/watchpoint-during-step.exp
|
|
||||||
@@ -0,0 +1,44 @@
|
@@ -0,0 +1,44 @@
|
||||||
+# Copyright 2007 Free Software Foundation, Inc.
|
+# Copyright 2007 Free Software Foundation, Inc.
|
||||||
+
|
+
|
||||||
|
@ -93,3 +50,38 @@ new file mode 100644
|
||||||
+# we step from as in this case it is a valid upstream KFAIL gdb/38
|
+# 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"
|
+gdb_test "step" ".*Old value = 2.*New value = 3.*" "Catch the watchpoint"
|
||||||
|
Index: gdb-7.10.90.20160211/gdb/testsuite/gdb.base/watchpoint-during-step.c
|
||||||
|
===================================================================
|
||||||
|
--- /dev/null 1970-01-01 00:00:00.000000000 +0000
|
||||||
|
+++ gdb-7.10.90.20160211/gdb/testsuite/gdb.base/watchpoint-during-step.c 2016-02-15 23:32:51.846690279 +0100
|
||||||
|
@@ -0,0 +1,30 @@
|
||||||
|
+/* 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 */
|
||||||
|
+
|
||||||
|
+static int var;
|
||||||
|
+
|
||||||
|
+int main()
|
||||||
|
+{
|
||||||
|
+ var = 1;
|
||||||
|
+ var = 2;
|
||||||
|
+ var = 3;
|
||||||
|
+ return 0;
|
||||||
|
+}
|
||||||
|
|
|
@ -1,18 +1,11 @@
|
||||||
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-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
|
https://bugzilla.redhat.com/bugzilla/show_bug.cgi?id=214196
|
||||||
|
|
||||||
diff --git a/gdb/testsuite/gdb.base/readline-overflow.exp b/gdb/testsuite/gdb.base/readline-overflow.exp
|
|
||||||
new file mode 100644
|
Index: gdb-7.10.90.20160211/gdb/testsuite/gdb.base/readline-overflow.exp
|
||||||
--- /dev/null
|
===================================================================
|
||||||
+++ b/gdb/testsuite/gdb.base/readline-overflow.exp
|
--- /dev/null 1970-01-01 00:00:00.000000000 +0000
|
||||||
@@ -0,0 +1,104 @@
|
+++ gdb-7.10.90.20160211/gdb/testsuite/gdb.base/readline-overflow.exp 2016-02-15 23:30:29.191677414 +0100
|
||||||
|
@@ -0,0 +1,126 @@
|
||||||
+# Copyright 2006 Free Software Foundation, Inc.
|
+# Copyright 2006 Free Software Foundation, Inc.
|
||||||
+
|
+
|
||||||
+# This program is free software; you can redistribute it and/or modify
|
+# This program is free software; you can redistribute it and/or modify
|
||||||
|
@ -44,76 +37,98 @@ new file mode 100644
|
||||||
+ strace $tracelevel
|
+ strace $tracelevel
|
||||||
+}
|
+}
|
||||||
+
|
+
|
||||||
|
+# 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
|
+global env
|
||||||
|
+if [info exists env(INPUTRC)] {
|
||||||
|
+ set old_inputrc $env(INPUTRC)
|
||||||
|
+}
|
||||||
|
+set env(INPUTRC) "/dev/null"
|
||||||
+
|
+
|
||||||
+save_vars { env(INPUTRC) env(GDBHISTFILE) env(HISTSIZE) TERM timeout } {
|
+set oldtimeout1 $timeout
|
||||||
+ # The arrow key test relies on the standard VT100 bindings, so
|
+set timeout 600
|
||||||
+ # 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
|
+if [info exists env(GDBHISTFILE)] {
|
||||||
+ # the test results. Even if /dev/null doesn't exist on the particular
|
+ set old_gdbhistfile $env(GDBHISTFILE)
|
||||||
+ # platform, the readline library will use the default setting just by
|
+}
|
||||||
+ # failing to open the file. OTOH, opening /dev/null successfully will
|
+if [info exists env(HISTSIZE)] {
|
||||||
+ # also result in the default settings being used since nothing will be
|
+ set old_histsize $env(HISTSIZE)
|
||||||
+ # read from this file.
|
+}
|
||||||
+ set env(INPUTRC) "/dev/null"
|
+set env(GDBHISTFILE) "${srcdir}/${subdir}/gdb_history"
|
||||||
|
+set env(HISTSIZE) "10"
|
||||||
+
|
+
|
||||||
+ set timeout 600
|
+gdb_exit
|
||||||
+
|
+gdb_start
|
||||||
+ set env(GDBHISTFILE) "${srcdir}/${subdir}/gdb_history"
|
+gdb_reinitialize_dir $srcdir/$subdir
|
||||||
+ set env(HISTSIZE) "10"
|
|
||||||
+
|
|
||||||
+ gdb_exit
|
|
||||||
+ gdb_start
|
|
||||||
+ gdb_reinitialize_dir $srcdir/$subdir
|
|
||||||
+
|
+
|
||||||
+
|
+
|
||||||
+ set width 11
|
+set width 11
|
||||||
+ gdb_test "set width $width" \
|
+gdb_test "set width $width" \
|
||||||
+ "" \
|
+ "" \
|
||||||
+ "Setting width to $width."
|
+ "Setting width to $width."
|
||||||
+ #gdb_test "set height 1" \
|
+#gdb_test "set height 1" \
|
||||||
+ # "" \
|
+# "" \
|
||||||
+ # "Setting height to 1."
|
+# "Setting height to 1."
|
||||||
+ send_gdb "run X"
|
+send_gdb "run X"
|
||||||
+ set i 0
|
+set i 0
|
||||||
+ # It crashes using `set width 7' on `set total 3560'.
|
+# It crashes using `set width 7' on `set total 3560'.
|
||||||
+ # Sometimes it corrupts screen on `set width 7'.
|
+# Sometimes it corrupts screen on `set width 7'.
|
||||||
+ # Bugreport used `set total 130001':
|
+# Bugreport used `set total 130001':
|
||||||
+ # https://bugzilla.redhat.com/bugzilla/show_bug.cgi?id=214196
|
+# https://bugzilla.redhat.com/bugzilla/show_bug.cgi?id=214196
|
||||||
+ # Check also `timeout' above.
|
+# Check also `timeout' above.
|
||||||
+ set total 4200
|
+set total 4200
|
||||||
+ gdb_expect {
|
+gdb_expect {
|
||||||
+ -re X {
|
+ -re X {
|
||||||
+ incr i
|
+ incr i
|
||||||
+ if {$i <= $total} {
|
+ if {$i <= $total} {
|
||||||
+ send_gdb "X"
|
+ send_gdb "X"
|
||||||
+ exp_continue
|
+ exp_continue
|
||||||
+ }
|
+ }
|
||||||
+ }
|
+ }
|
||||||
+ -re "\[ \b\r\n\]" {
|
+ -re "\[ \b\r\n\]" {
|
||||||
+ exp_continue
|
+ exp_continue
|
||||||
+ }
|
+ }
|
||||||
+ eof {
|
+ eof {
|
||||||
+ fail "gdb sending total $total characters"
|
+ fail "gdb sending total $total characters"
|
||||||
+ note "Failed after sending $i characters, reason: EOF"
|
+ note "Failed after sending $i characters, reason: EOF"
|
||||||
+ gdb_clear_suppressed
|
+ gdb_clear_suppressed
|
||||||
+ }
|
+ }
|
||||||
+ timeout {
|
+ timeout {
|
||||||
+ fail "gdb sending total $total characters"
|
+ fail "gdb sending total $total characters"
|
||||||
+ note "Failed after sending $i characters (timeout $timeout), reason: TIMEOUT"
|
+ note "Failed after sending $i characters (timeout $timeout), reason: TIMEOUT"
|
||||||
+ gdb_clear_suppressed
|
+ gdb_clear_suppressed
|
||||||
+ }
|
+ }
|
||||||
+ default {
|
+ default {
|
||||||
+ fail "gdb sending total $total characters"
|
+ fail "gdb sending total $total characters"
|
||||||
+ note "Failed after sending $i characters, reason: 0=\[$expect_out(0,string)\] buffer=\[$expect_out(buffer)\]"
|
+ note "Failed after sending $i characters, reason: 0=\[$expect_out(0,string)\] buffer=\[$expect_out(buffer)\]"
|
||||||
+ gdb_clear_suppressed
|
+ gdb_clear_suppressed
|
||||||
+ }
|
+ }
|
||||||
+ }
|
|
||||||
+ send_gdb "\r"
|
|
||||||
+ gdb_test "" \
|
|
||||||
+ "No executable file specified..*" \
|
|
||||||
+ "All the characters transferred"
|
|
||||||
+}
|
+}
|
||||||
|
+send_gdb "\r"
|
||||||
|
+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
|
||||||
|
+
|
||||||
|
|
|
@ -1,15 +1,7 @@
|
||||||
From FEDORA_PATCHES Mon Sep 17 00:00:00 2001
|
Index: gdb-7.10.90.20160211/gdb/testsuite/gdb.base/datalib-lib.c
|
||||||
From: Fedora GDB patches <invalid@email.com>
|
===================================================================
|
||||||
Date: Fri, 27 Oct 2017 21:07:50 +0200
|
--- /dev/null 1970-01-01 00:00:00.000000000 +0000
|
||||||
Subject: gdb-6.5-section-num-fixup-test.patch
|
+++ gdb-7.10.90.20160211/gdb/testsuite/gdb.base/datalib-lib.c 2016-02-15 23:27:19.654331680 +0100
|
||||||
|
|
||||||
;; Test a crash on libraries missing the .text section.
|
|
||||||
;;=fedoratest
|
|
||||||
|
|
||||||
diff --git a/gdb/testsuite/gdb.base/datalib-lib.c b/gdb/testsuite/gdb.base/datalib-lib.c
|
|
||||||
new file mode 100644
|
|
||||||
--- /dev/null
|
|
||||||
+++ b/gdb/testsuite/gdb.base/datalib-lib.c
|
|
||||||
@@ -0,0 +1,22 @@
|
@@ -0,0 +1,22 @@
|
||||||
+/* This testcase is part of GDB, the GNU debugger.
|
+/* This testcase is part of GDB, the GNU debugger.
|
||||||
+
|
+
|
||||||
|
@ -33,10 +25,10 @@ new file mode 100644
|
||||||
+ bug-gdb@prep.ai.mit.edu */
|
+ bug-gdb@prep.ai.mit.edu */
|
||||||
+
|
+
|
||||||
+int var;
|
+int var;
|
||||||
diff --git a/gdb/testsuite/gdb.base/datalib-main.c b/gdb/testsuite/gdb.base/datalib-main.c
|
Index: gdb-7.10.90.20160211/gdb/testsuite/gdb.base/datalib-main.c
|
||||||
new file mode 100644
|
===================================================================
|
||||||
--- /dev/null
|
--- /dev/null 1970-01-01 00:00:00.000000000 +0000
|
||||||
+++ b/gdb/testsuite/gdb.base/datalib-main.c
|
+++ gdb-7.10.90.20160211/gdb/testsuite/gdb.base/datalib-main.c 2016-02-15 23:27:19.654331680 +0100
|
||||||
@@ -0,0 +1,26 @@
|
@@ -0,0 +1,26 @@
|
||||||
+/* This testcase is part of GDB, the GNU debugger.
|
+/* This testcase is part of GDB, the GNU debugger.
|
||||||
+
|
+
|
||||||
|
@ -64,10 +56,10 @@ new file mode 100644
|
||||||
+{
|
+{
|
||||||
+ return 0;
|
+ return 0;
|
||||||
+}
|
+}
|
||||||
diff --git a/gdb/testsuite/gdb.base/datalib.exp b/gdb/testsuite/gdb.base/datalib.exp
|
Index: gdb-7.10.90.20160211/gdb/testsuite/gdb.base/datalib.exp
|
||||||
new file mode 100644
|
===================================================================
|
||||||
--- /dev/null
|
--- /dev/null 1970-01-01 00:00:00.000000000 +0000
|
||||||
+++ b/gdb/testsuite/gdb.base/datalib.exp
|
+++ gdb-7.10.90.20160211/gdb/testsuite/gdb.base/datalib.exp 2016-02-15 23:27:25.968376510 +0100
|
||||||
@@ -0,0 +1,51 @@
|
@@ -0,0 +1,51 @@
|
||||||
+# Copyright 2008 Free Software Foundation, Inc.
|
+# Copyright 2008 Free Software Foundation, Inc.
|
||||||
+
|
+
|
||||||
|
|
|
@ -1,21 +1,15 @@
|
||||||
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-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.
|
|
||||||
|
|
||||||
If you provided some relative path to the shared library, such as with
|
If you provided some relative path to the shared library, such as with
|
||||||
export LD_LIBRARY_PATH=.
|
export LD_LIBRARY_PATH=.
|
||||||
then gdb would fail to match the shared library name during the TLS lookup.
|
then gdb would fail to match the shared library name during the TLS lookup.
|
||||||
|
|
||||||
|
|
||||||
Dropped the workaround/fix for gdb-6.8.50.20081128 - is it still needed?
|
Dropped the workaround/fix for gdb-6.8.50.20081128 - is it still needed?
|
||||||
|
|
||||||
|
|
||||||
The testsuite needs `gdb-6.3-bz146810-solib_absolute_prefix_is_empty.patch'.
|
The testsuite needs `gdb-6.3-bz146810-solib_absolute_prefix_is_empty.patch'.
|
||||||
The testsuite needs `gdb-6.5-tls-of-separate-debuginfo.patch'.
|
The testsuite needs `gdb-6.5-tls-of-separate-debuginfo.patch'.
|
||||||
|
|
||||||
|
|
||||||
2006-09-01 Jan Kratochvil <jan.kratochvil@redhat.com>
|
2006-09-01 Jan Kratochvil <jan.kratochvil@redhat.com>
|
||||||
|
|
||||||
* solib-svr4.c (svr4_fetch_objfile_link_map): Match even absolute
|
* solib-svr4.c (svr4_fetch_objfile_link_map): Match even absolute
|
||||||
|
@ -29,10 +23,10 @@ The testsuite needs `gdb-6.5-tls-of-separate-debuginfo.patch'.
|
||||||
|
|
||||||
Port to gdb-6.7.50.20080227.
|
Port to gdb-6.7.50.20080227.
|
||||||
|
|
||||||
diff --git a/gdb/testsuite/gdb.threads/tls-sepdebug-main.c b/gdb/testsuite/gdb.threads/tls-sepdebug-main.c
|
Index: gdb-7.10.90.20160211/gdb/testsuite/gdb.threads/tls-sepdebug-main.c
|
||||||
new file mode 100644
|
===================================================================
|
||||||
--- /dev/null
|
--- /dev/null 1970-01-01 00:00:00.000000000 +0000
|
||||||
+++ b/gdb/testsuite/gdb.threads/tls-sepdebug-main.c
|
+++ gdb-7.10.90.20160211/gdb/testsuite/gdb.threads/tls-sepdebug-main.c 2016-02-16 10:16:12.629875073 +0100
|
||||||
@@ -0,0 +1,25 @@
|
@@ -0,0 +1,25 @@
|
||||||
+/* This testcase is part of GDB, the GNU debugger.
|
+/* This testcase is part of GDB, the GNU debugger.
|
||||||
+
|
+
|
||||||
|
@ -59,10 +53,10 @@ new file mode 100644
|
||||||
+{
|
+{
|
||||||
+ return 0;
|
+ return 0;
|
||||||
+}
|
+}
|
||||||
diff --git a/gdb/testsuite/gdb.threads/tls-sepdebug-shared.c b/gdb/testsuite/gdb.threads/tls-sepdebug-shared.c
|
Index: gdb-7.10.90.20160211/gdb/testsuite/gdb.threads/tls-sepdebug-shared.c
|
||||||
new file mode 100644
|
===================================================================
|
||||||
--- /dev/null
|
--- /dev/null 1970-01-01 00:00:00.000000000 +0000
|
||||||
+++ b/gdb/testsuite/gdb.threads/tls-sepdebug-shared.c
|
+++ gdb-7.10.90.20160211/gdb/testsuite/gdb.threads/tls-sepdebug-shared.c 2016-02-16 10:16:12.630875080 +0100
|
||||||
@@ -0,0 +1,22 @@
|
@@ -0,0 +1,22 @@
|
||||||
+/* This testcase is part of GDB, the GNU debugger.
|
+/* This testcase is part of GDB, the GNU debugger.
|
||||||
+
|
+
|
||||||
|
@ -86,10 +80,10 @@ new file mode 100644
|
||||||
+ bug-gdb@prep.ai.mit.edu */
|
+ bug-gdb@prep.ai.mit.edu */
|
||||||
+
|
+
|
||||||
+__thread int var = 42;
|
+__thread int var = 42;
|
||||||
diff --git a/gdb/testsuite/gdb.threads/tls-sepdebug.exp b/gdb/testsuite/gdb.threads/tls-sepdebug.exp
|
Index: gdb-7.10.90.20160211/gdb/testsuite/gdb.threads/tls-sepdebug.exp
|
||||||
new file mode 100644
|
===================================================================
|
||||||
--- /dev/null
|
--- /dev/null 1970-01-01 00:00:00.000000000 +0000
|
||||||
+++ b/gdb/testsuite/gdb.threads/tls-sepdebug.exp
|
+++ gdb-7.10.90.20160211/gdb/testsuite/gdb.threads/tls-sepdebug.exp 2016-02-16 10:16:31.241001010 +0100
|
||||||
@@ -0,0 +1,87 @@
|
@@ -0,0 +1,87 @@
|
||||||
+# Copyright 2006 Free Software Foundation, Inc.
|
+# Copyright 2006 Free Software Foundation, Inc.
|
||||||
+
|
+
|
||||||
|
|
|
@ -1,11 +1,5 @@
|
||||||
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
|
|
||||||
|
|
||||||
;;=push+jan
|
|
||||||
|
|
||||||
http://sourceware.org/ml/gdb-patches/2010-01/msg00558.html
|
http://sourceware.org/ml/gdb-patches/2010-01/msg00558.html
|
||||||
|
Subject: Re: [patch] print a more useful error message for "gdb core"
|
||||||
|
|
||||||
[ Fixed up since the mail. ]
|
[ Fixed up since the mail. ]
|
||||||
|
|
||||||
|
@ -37,13 +31,16 @@ autodetections. The second command line argument
|
||||||
(captured_main->pid_or_core_arg) is also autodetected (for PID or CORE) but
|
(captured_main->pid_or_core_arg) is also autodetected (for PID or CORE) but
|
||||||
neither "attach" accepts a core file nor "core-file" accepts a PID.
|
neither "attach" accepts a core file nor "core-file" accepts a PID.
|
||||||
|
|
||||||
|
|
||||||
The patch makes sense only with the build-id patchset so this is not submit
|
The patch makes sense only with the build-id patchset so this is not submit
|
||||||
for FSF GDB inclusion yet. I am fine with your patch (+/- Hui Zhu's pending
|
for FSF GDB inclusion yet. I am fine with your patch (+/- Hui Zhu's pending
|
||||||
bfd_check_format_matches) as the patch below is its natural extension.
|
bfd_check_format_matches) as the patch below is its natural extension.
|
||||||
|
|
||||||
|
|
||||||
Sorry for the delay,
|
Sorry for the delay,
|
||||||
Jan
|
Jan
|
||||||
|
|
||||||
|
|
||||||
2010-01-25 Jan Kratochvil <jan.kratochvil@redhat.com>
|
2010-01-25 Jan Kratochvil <jan.kratochvil@redhat.com>
|
||||||
|
|
||||||
* exceptions.h (enum errors <IS_CORE_ERROR>): New.
|
* exceptions.h (enum errors <IS_CORE_ERROR>): New.
|
||||||
|
@ -61,19 +58,19 @@ Http://sourceware.org/ml/gdb-patches/2010-01/msg00517.html
|
||||||
* exec.c (exec_file_attach): Print a more useful error message if the
|
* exec.c (exec_file_attach): Print a more useful error message if the
|
||||||
user did "gdb core".
|
user did "gdb core".
|
||||||
|
|
||||||
diff --git a/gdb/exec.c b/gdb/exec.c
|
Index: gdb-7.12.50.20170226/gdb/exec.c
|
||||||
--- a/gdb/exec.c
|
===================================================================
|
||||||
+++ b/gdb/exec.c
|
--- gdb-7.12.50.20170226.orig/gdb/exec.c 2017-02-27 22:18:00.945026211 +0100
|
||||||
@@ -18,6 +18,8 @@
|
+++ gdb-7.12.50.20170226/gdb/exec.c 2017-02-27 22:18:08.111076350 +0100
|
||||||
along with this program. If not, see <http://www.gnu.org/licenses/>. */
|
@@ -35,6 +35,7 @@
|
||||||
|
#include "progspace.h"
|
||||||
#include "defs.h"
|
#include "gdb_bfd.h"
|
||||||
+#include "arch-utils.h"
|
#include "gcore.h"
|
||||||
+#include "exceptions.h"
|
+#include "exceptions.h"
|
||||||
#include "frame.h"
|
|
||||||
#include "inferior.h"
|
#include <fcntl.h>
|
||||||
#include "target.h"
|
#include "readline/readline.h"
|
||||||
@@ -495,12 +497,27 @@ exec_file_attach (const char *filename, int from_tty)
|
@@ -359,12 +360,27 @@
|
||||||
|
|
||||||
if (!bfd_check_format_matches (exec_bfd, bfd_object, &matching))
|
if (!bfd_check_format_matches (exec_bfd, bfd_object, &matching))
|
||||||
{
|
{
|
||||||
|
@ -88,26 +85,27 @@ diff --git a/gdb/exec.c b/gdb/exec.c
|
||||||
/* Make sure to close exec_bfd, or else "run" might try to use
|
/* Make sure to close exec_bfd, or else "run" might try to use
|
||||||
it. */
|
it. */
|
||||||
exec_close ();
|
exec_close ();
|
||||||
- error (_("\"%ps\": not in executable format: %s"),
|
- error (_("\"%s\": not in executable format: %s"),
|
||||||
- styled_string (file_name_style.style (), scratch_pathname),
|
- scratch_pathname,
|
||||||
- gdb_bfd_errmsg (bfd_get_error (), matching).c_str ());
|
- gdb_bfd_errmsg (bfd_get_error (), matching));
|
||||||
+
|
+
|
||||||
+ if (is_core != 0)
|
+ if (is_core != 0)
|
||||||
+ throw_error (IS_CORE_ERROR,
|
+ throw_error (IS_CORE_ERROR,
|
||||||
+ _("\"%s\" is a core file.\n"
|
+ _("\"%s\" is a core file.\n"
|
||||||
+ "Please specify an executable to debug."),
|
+ "Please specify an executable to debug."),
|
||||||
+ scratch_pathname);
|
+ scratch_pathname);
|
||||||
+ else
|
+ else
|
||||||
+ error (_("\"%ps\": not in executable format: %s"),
|
+ error (_("\"%s\": not in executable format: %s"),
|
||||||
+ styled_string (file_name_style.style (), scratch_pathname),
|
+ scratch_pathname,
|
||||||
+ gdb_bfd_errmsg (bfd_get_error (), matching).c_str ());
|
+ gdb_bfd_errmsg (bfd_get_error (), matching));
|
||||||
}
|
}
|
||||||
|
|
||||||
if (build_section_table (exec_bfd, §ions, §ions_end))
|
if (build_section_table (exec_bfd, §ions, §ions_end))
|
||||||
diff --git a/gdb/main.c b/gdb/main.c
|
Index: gdb-7.12.50.20170226/gdb/main.c
|
||||||
--- a/gdb/main.c
|
===================================================================
|
||||||
+++ b/gdb/main.c
|
--- gdb-7.12.50.20170226.orig/gdb/main.c 2017-02-27 22:18:00.945026211 +0100
|
||||||
@@ -524,6 +524,34 @@ struct cmdarg
|
+++ gdb-7.12.50.20170226/gdb/main.c 2017-02-27 22:18:08.112076357 +0100
|
||||||
|
@@ -459,6 +459,37 @@
|
||||||
char *string;
|
char *string;
|
||||||
};
|
};
|
||||||
|
|
||||||
|
@ -118,13 +116,15 @@ diff --git a/gdb/main.c b/gdb/main.c
|
||||||
+static void
|
+static void
|
||||||
+exec_or_core_file_attach (const char *filename, int from_tty)
|
+exec_or_core_file_attach (const char *filename, int from_tty)
|
||||||
+{
|
+{
|
||||||
|
+ volatile struct gdb_exception e;
|
||||||
|
+
|
||||||
+ gdb_assert (exec_bfd == NULL);
|
+ gdb_assert (exec_bfd == NULL);
|
||||||
+
|
+
|
||||||
+ try
|
+ TRY
|
||||||
+ {
|
+ {
|
||||||
+ exec_file_attach (filename, from_tty);
|
+ exec_file_attach (filename, from_tty);
|
||||||
+ }
|
+ }
|
||||||
+ catch (gdb_exception_error &e)
|
+ CATCH (e, RETURN_MASK_ALL)
|
||||||
+ {
|
+ {
|
||||||
+ if (e.error == IS_CORE_ERROR)
|
+ if (e.error == IS_CORE_ERROR)
|
||||||
+ {
|
+ {
|
||||||
|
@ -135,14 +135,15 @@ diff --git a/gdb/main.c b/gdb/main.c
|
||||||
+ if (exec_bfd != NULL)
|
+ if (exec_bfd != NULL)
|
||||||
+ return;
|
+ return;
|
||||||
+ }
|
+ }
|
||||||
+ throw_exception (std::move (e));
|
+ throw_exception (e);
|
||||||
+ }
|
+ }
|
||||||
|
+ END_CATCH
|
||||||
+}
|
+}
|
||||||
+
|
+
|
||||||
static void
|
static void
|
||||||
captured_main_1 (struct captured_main_args *context)
|
captured_main_1 (struct captured_main_args *context, int &python_script)
|
||||||
{
|
{
|
||||||
@@ -959,6 +987,8 @@ captured_main_1 (struct captured_main_args *context)
|
@@ -910,6 +941,8 @@
|
||||||
{
|
{
|
||||||
symarg = argv[optind];
|
symarg = argv[optind];
|
||||||
execarg = argv[optind];
|
execarg = argv[optind];
|
||||||
|
@ -151,7 +152,7 @@ diff --git a/gdb/main.c b/gdb/main.c
|
||||||
optind++;
|
optind++;
|
||||||
}
|
}
|
||||||
|
|
||||||
@@ -1114,12 +1144,25 @@ captured_main_1 (struct captured_main_args *context)
|
@@ -1060,11 +1093,25 @@
|
||||||
&& symarg != NULL
|
&& symarg != NULL
|
||||||
&& strcmp (execarg, symarg) == 0)
|
&& strcmp (execarg, symarg) == 0)
|
||||||
{
|
{
|
||||||
|
@ -170,21 +171,21 @@ diff --git a/gdb/main.c b/gdb/main.c
|
||||||
/* The exec file and the symbol-file are the same. If we can't
|
/* The exec file and the symbol-file are the same. If we can't
|
||||||
open it, better only print one error message.
|
open it, better only print one error message.
|
||||||
- catch_command_errors returns non-zero on success! */
|
- catch_command_errors returns non-zero on success! */
|
||||||
- ret = catch_command_errors (exec_file_attach, execarg,
|
- if (catch_command_errors_const (exec_file_attach, execarg,
|
||||||
- !batch_flag);
|
- !batch_flag))
|
||||||
- if (ret != 0)
|
|
||||||
+ catch_command_errors returns non-zero on success!
|
+ catch_command_errors returns non-zero on success!
|
||||||
+ Do not load EXECARG as a symbol file if it has been already processed
|
+ Do not load EXECARG as a symbol file if it has been already processed
|
||||||
+ as a core file. */
|
+ as a core file. */
|
||||||
+ ret = catch_command_errors (func, execarg, !batch_flag);
|
+ if (catch_command_errors_const (func, execarg, !batch_flag)
|
||||||
+ if (ret != 0 && core_bfd == NULL)
|
+ && core_bfd == NULL)
|
||||||
ret = catch_command_errors (symbol_file_add_main_adapter,
|
catch_command_errors_const (symbol_file_add_main_adapter, symarg,
|
||||||
symarg, !batch_flag);
|
!batch_flag);
|
||||||
}
|
}
|
||||||
diff --git a/gdbsupport/common-exceptions.h b/gdbsupport/common-exceptions.h
|
Index: gdb-7.12.50.20170226/gdb/common/common-exceptions.h
|
||||||
--- a/gdbsupport/common-exceptions.h
|
===================================================================
|
||||||
+++ b/gdbsupport/common-exceptions.h
|
--- gdb-7.12.50.20170226.orig/gdb/common/common-exceptions.h 2017-02-27 22:18:00.946026218 +0100
|
||||||
@@ -106,6 +106,9 @@ enum errors {
|
+++ gdb-7.12.50.20170226/gdb/common/common-exceptions.h 2017-02-27 22:18:08.112076357 +0100
|
||||||
|
@@ -106,6 +106,9 @@
|
||||||
"_ERROR" is appended to the name. */
|
"_ERROR" is appended to the name. */
|
||||||
MAX_COMPLETIONS_REACHED_ERROR,
|
MAX_COMPLETIONS_REACHED_ERROR,
|
||||||
|
|
||||||
|
|
|
@ -1,13 +1,3 @@
|
||||||
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-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
|
|
||||||
|
|
||||||
Comments by Sergio Durigan Junior <sergiodj@redhat.com>:
|
Comments by Sergio Durigan Junior <sergiodj@redhat.com>:
|
||||||
|
|
||||||
This is the fix for RH BZ #981154
|
This is the fix for RH BZ #981154
|
||||||
|
@ -25,10 +15,10 @@ Comments by Sergio Durigan Junior <sergiodj@redhat.com>:
|
||||||
NULL after it is free'd, otherwise the code below thinks that it is still
|
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 ...").
|
valid and doesn't print the necessary warning ("Try: yum install ...").
|
||||||
|
|
||||||
diff --git a/gdb/testsuite/gdb.base/rhbz981154-misleading-yum-install-warning.exp b/gdb/testsuite/gdb.base/rhbz981154-misleading-yum-install-warning.exp
|
Index: gdb-7.12.50.20170207/gdb/testsuite/gdb.base/rhbz981154-misleading-yum-install-warning.exp
|
||||||
new file mode 100644
|
===================================================================
|
||||||
--- /dev/null
|
--- /dev/null 1970-01-01 00:00:00.000000000 +0000
|
||||||
+++ b/gdb/testsuite/gdb.base/rhbz981154-misleading-yum-install-warning.exp
|
+++ gdb-7.12.50.20170207/gdb/testsuite/gdb.base/rhbz981154-misleading-yum-install-warning.exp 2017-02-26 19:14:58.492609659 +0100
|
||||||
@@ -0,0 +1,97 @@
|
@@ -0,0 +1,97 @@
|
||||||
+# Copyright (C) 2014 Free Software Foundation, Inc.
|
+# Copyright (C) 2014 Free Software Foundation, Inc.
|
||||||
+
|
+
|
||||||
|
@ -127,3 +117,19 @@ new file mode 100644
|
||||||
+
|
+
|
||||||
+# Leaving the link there will cause breakage in the next run.
|
+# Leaving the link there will cause breakage in the next run.
|
||||||
+remote_exec build "rm -f [standard_output_file ${build_id_without_debug}]"
|
+remote_exec build "rm -f [standard_output_file ${build_id_without_debug}]"
|
||||||
|
Index: gdb-7.12.50.20170207/gdb/build-id.c
|
||||||
|
===================================================================
|
||||||
|
--- gdb-7.12.50.20170207.orig/gdb/build-id.c 2017-02-26 19:14:51.943562799 +0100
|
||||||
|
+++ gdb-7.12.50.20170207/gdb/build-id.c 2017-02-26 19:14:58.492609659 +0100
|
||||||
|
@@ -589,7 +589,10 @@
|
||||||
|
do_cleanups (inner);
|
||||||
|
|
||||||
|
if (abfd == NULL)
|
||||||
|
- continue;
|
||||||
|
+ {
|
||||||
|
+ filename = NULL;
|
||||||
|
+ continue;
|
||||||
|
+ }
|
||||||
|
|
||||||
|
if (build_id_verify (abfd.get(), build_id_len, build_id))
|
||||||
|
break;
|
||||||
|
|
|
@ -1,15 +1,20 @@
|
||||||
From FEDORA_PATCHES Mon Sep 17 00:00:00 2001
|
Index: gdb-7.6.90.20140127/gdb/proc-service.list
|
||||||
From: Fedora GDB patches <invalid@email.com>
|
===================================================================
|
||||||
Date: Fri, 27 Oct 2017 21:07:50 +0200
|
--- gdb-7.6.90.20140127.orig/gdb/proc-service.list 2014-02-06 17:32:42.810640320 +0100
|
||||||
Subject: gdb-6.6-buildid-locate-rpm-librpm-workaround.patch
|
+++ gdb-7.6.90.20140127/gdb/proc-service.list 2014-02-06 17:33:35.406696964 +0100
|
||||||
|
@@ -37,4 +37,7 @@
|
||||||
;; Workaround librpm BZ 643031 due to its unexpected exit() calls (BZ 642879).
|
ps_pstop;
|
||||||
;;=push+jan
|
ps_ptread;
|
||||||
|
ps_ptwrite;
|
||||||
diff --git a/gdb/build-id.c b/gdb/build-id.c
|
+
|
||||||
--- a/gdb/build-id.c
|
+ /* gdb-6.6-buildid-locate-rpm.patch */
|
||||||
+++ b/gdb/build-id.c
|
+ rpmsqEnable;
|
||||||
@@ -708,6 +708,19 @@ build_id_to_filename (const struct bfd_build_id *build_id, char **link_return)
|
};
|
||||||
|
Index: gdb-7.6.90.20140127/gdb/build-id.c
|
||||||
|
===================================================================
|
||||||
|
--- gdb-7.6.90.20140127.orig/gdb/build-id.c 2014-02-06 17:30:14.230480264 +0100
|
||||||
|
+++ gdb-7.6.90.20140127/gdb/build-id.c 2014-02-06 17:34:28.846754283 +0100
|
||||||
|
@@ -677,6 +677,19 @@ build_id_to_filename (const struct elf_b
|
||||||
#include <dlfcn.h>
|
#include <dlfcn.h>
|
||||||
#endif
|
#endif
|
||||||
|
|
||||||
|
@ -29,14 +34,3 @@ diff --git a/gdb/build-id.c b/gdb/build-id.c
|
||||||
/* This MISSING_RPM_HASH tracker is used to collect all the missing rpm files
|
/* This MISSING_RPM_HASH tracker is used to collect all the missing rpm files
|
||||||
and avoid their duplicities during a single inferior run. */
|
and avoid their duplicities during a single inferior run. */
|
||||||
|
|
||||||
diff --git a/gdb/proc-service.list b/gdb/proc-service.list
|
|
||||||
--- a/gdb/proc-service.list
|
|
||||||
+++ b/gdb/proc-service.list
|
|
||||||
@@ -37,4 +37,7 @@
|
|
||||||
ps_pstop;
|
|
||||||
ps_ptread;
|
|
||||||
ps_ptwrite;
|
|
||||||
+
|
|
||||||
+ /* gdb-6.6-buildid-locate-rpm.patch */
|
|
||||||
+ rpmsqEnable;
|
|
||||||
};
|
|
||||||
|
|
|
@ -1,18 +1,10 @@
|
||||||
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-rpm-scl.patch
|
|
||||||
|
|
||||||
;; [SCL] Skip deprecated .gdb_index warning for Red Hat built files (BZ 953585).
|
|
||||||
;;=push+jan
|
|
||||||
|
|
||||||
warning: Skipping deprecated .gdb_index section
|
warning: Skipping deprecated .gdb_index section
|
||||||
https://bugzilla.redhat.com/show_bug.cgi?id=953585
|
https://bugzilla.redhat.com/show_bug.cgi?id=953585
|
||||||
|
|
||||||
diff --git a/gdb/build-id.c b/gdb/build-id.c
|
diff -dup -rup gdb-7.10.50.20160106-orig/gdb/build-id.c gdb-7.10.50.20160106/gdb/build-id.c
|
||||||
--- a/gdb/build-id.c
|
--- gdb-7.10.50.20160106-orig/gdb/build-id.c 2016-01-09 14:40:39.420385241 +0100
|
||||||
+++ b/gdb/build-id.c
|
+++ gdb-7.10.50.20160106/gdb/build-id.c 2016-01-09 14:41:05.944549393 +0100
|
||||||
@@ -742,7 +742,11 @@ static int missing_rpm_list_entries;
|
@@ -713,7 +713,11 @@ static int missing_rpm_list_entries;
|
||||||
/* Returns the count of newly added rpms. */
|
/* Returns the count of newly added rpms. */
|
||||||
|
|
||||||
static int
|
static int
|
||||||
|
@ -24,7 +16,7 @@ diff --git a/gdb/build-id.c b/gdb/build-id.c
|
||||||
{
|
{
|
||||||
static int rpm_init_done = 0;
|
static int rpm_init_done = 0;
|
||||||
rpmts ts;
|
rpmts ts;
|
||||||
@@ -849,7 +853,11 @@ missing_rpm_enlist (const char *filename)
|
@@ -817,7 +821,11 @@ missing_rpm_enlist (const char *filename
|
||||||
mi = rpmtsInitIterator_p (ts, RPMTAG_BASENAMES, filename, 0);
|
mi = rpmtsInitIterator_p (ts, RPMTAG_BASENAMES, filename, 0);
|
||||||
if (mi != NULL)
|
if (mi != NULL)
|
||||||
{
|
{
|
||||||
|
@ -36,7 +28,7 @@ diff --git a/gdb/build-id.c b/gdb/build-id.c
|
||||||
{
|
{
|
||||||
Header h;
|
Header h;
|
||||||
char *debuginfo, **slot, *s, *s2;
|
char *debuginfo, **slot, *s, *s2;
|
||||||
@@ -967,6 +975,37 @@ missing_rpm_enlist (const char *filename)
|
@@ -935,6 +943,37 @@ missing_rpm_enlist (const char *filename
|
||||||
xfree (debuginfo);
|
xfree (debuginfo);
|
||||||
count++;
|
count++;
|
||||||
}
|
}
|
||||||
|
@ -74,10 +66,10 @@ diff --git a/gdb/build-id.c b/gdb/build-id.c
|
||||||
|
|
||||||
rpmdbFreeIterator_p (mi);
|
rpmdbFreeIterator_p (mi);
|
||||||
}
|
}
|
||||||
@@ -976,6 +1015,20 @@ missing_rpm_enlist (const char *filename)
|
@@ -945,6 +984,21 @@ missing_rpm_enlist (const char *filename
|
||||||
return count;
|
|
||||||
}
|
}
|
||||||
|
|
||||||
|
static int
|
||||||
+#ifdef GDB_INDEX_VERIFY_VENDOR
|
+#ifdef GDB_INDEX_VERIFY_VENDOR
|
||||||
+missing_rpm_enlist (const char *filename)
|
+missing_rpm_enlist (const char *filename)
|
||||||
+{
|
+{
|
||||||
|
@ -90,15 +82,16 @@ diff --git a/gdb/build-id.c b/gdb/build-id.c
|
||||||
+{
|
+{
|
||||||
+ return missing_rpm_enlist_1 (filename, 1);
|
+ return missing_rpm_enlist_1 (filename, 1);
|
||||||
+}
|
+}
|
||||||
+#endif
|
|
||||||
+
|
+
|
||||||
static bool
|
+static int
|
||||||
missing_rpm_list_compar (const char *ap, const char *bp)
|
+#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
|
return strcoll (*ap, *bp);
|
||||||
--- a/gdb/dwarf2/read.c
|
diff -dup -rup gdb-7.10.50.20160106-orig/gdb/dwarf2read.c gdb-7.10.50.20160106/gdb/dwarf2read.c
|
||||||
+++ b/gdb/dwarf2/read.c
|
--- gdb-7.10.50.20160106-orig/gdb/dwarf2read.c 2016-01-09 14:40:39.416385216 +0100
|
||||||
@@ -3025,6 +3025,16 @@ read_gdb_index_from_buffer (const char *filename,
|
+++ gdb-7.10.50.20160106/gdb/dwarf2read.c 2016-01-09 14:41:05.942549381 +0100
|
||||||
|
@@ -3111,6 +3111,16 @@ read_index_from_section (struct objfile
|
||||||
"set use-deprecated-index-sections on". */
|
"set use-deprecated-index-sections on". */
|
||||||
if (version < 6 && !deprecated_ok)
|
if (version < 6 && !deprecated_ok)
|
||||||
{
|
{
|
||||||
|
@ -115,7 +108,7 @@ diff --git a/gdb/dwarf2/read.c b/gdb/dwarf2/read.c
|
||||||
static int warning_printed = 0;
|
static int warning_printed = 0;
|
||||||
if (!warning_printed)
|
if (!warning_printed)
|
||||||
{
|
{
|
||||||
@@ -3036,6 +3046,10 @@ to use the section anyway."),
|
@@ -3122,6 +3132,10 @@ to use the section anyway."),
|
||||||
warning_printed = 1;
|
warning_printed = 1;
|
||||||
}
|
}
|
||||||
return 0;
|
return 0;
|
||||||
|
|
File diff suppressed because it is too large
Load Diff
|
@ -1,32 +1,23 @@
|
||||||
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-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).
|
|
||||||
;;=push+jan
|
|
||||||
|
|
||||||
gdb returns an incorrect back trace when applying a debuginfo
|
gdb returns an incorrect back trace when applying a debuginfo
|
||||||
https://bugzilla.redhat.com/show_bug.cgi?id=1339862
|
https://bugzilla.redhat.com/show_bug.cgi?id=1339862
|
||||||
|
|
||||||
diff --git a/gdb/solib-svr4.c b/gdb/solib-svr4.c
|
Index: gdb-7.9.90.20150709/gdb/solib-svr4.c
|
||||||
--- a/gdb/solib-svr4.c
|
===================================================================
|
||||||
+++ b/gdb/solib-svr4.c
|
--- gdb-7.9.90.20150709.orig/gdb/solib-svr4.c 2015-07-09 18:18:54.526417766 +0200
|
||||||
@@ -1340,14 +1340,27 @@ svr4_read_so_list (svr4_info *info, CORE_ADDR lm, CORE_ADDR prev_lm,
|
+++ gdb-7.9.90.20150709/gdb/solib-svr4.c 2015-07-09 18:19:33.074746586 +0200
|
||||||
|
@@ -1381,14 +1381,27 @@ svr4_read_so_list (CORE_ADDR lm, CORE_AD
|
||||||
}
|
}
|
||||||
|
|
||||||
{
|
{
|
||||||
- struct bfd_build_id *build_id;
|
- struct bfd_build_id *build_id;
|
||||||
+ struct bfd_build_id *build_id = NULL;
|
+ 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';
|
newobj->so_original_name[SO_NAME_MAX_PATH_SIZE - 1] = '\0';
|
||||||
/* May get overwritten below. */
|
/* May get overwritten below. */
|
||||||
strcpy (newobj->so_name, newobj->so_original_name);
|
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
|
+ /* 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
|
+ (from a core file) prevent loading a different build of a library
|
||||||
+ with accidentally the same SO_NAME.
|
+ with accidentally the same SO_NAME.
|
||||||
|
@ -40,11 +31,11 @@ diff --git a/gdb/solib-svr4.c b/gdb/solib-svr4.c
|
||||||
+ to the only existing file loaded that time - the executable. */
|
+ to the only existing file loaded that time - the executable. */
|
||||||
+ if (symfile_objfile != NULL
|
+ if (symfile_objfile != NULL
|
||||||
+ && (symfile_objfile->flags & OBJF_BUILD_ID_CORE_LOADED) != 0)
|
+ && (symfile_objfile->flags & OBJF_BUILD_ID_CORE_LOADED) != 0)
|
||||||
+ build_id = build_id_addr_get (li->l_ld);
|
+ build_id = build_id_addr_get (newobj->lm_info->l_ld);
|
||||||
if (build_id != NULL)
|
if (build_id != NULL)
|
||||||
{
|
{
|
||||||
char *name, *build_id_filename;
|
char *name, *build_id_filename;
|
||||||
@@ -1362,23 +1375,7 @@ svr4_read_so_list (svr4_info *info, CORE_ADDR lm, CORE_ADDR prev_lm,
|
@@ -1403,23 +1416,7 @@ svr4_read_so_list (CORE_ADDR lm, CORE_AD
|
||||||
xfree (name);
|
xfree (name);
|
||||||
}
|
}
|
||||||
else
|
else
|
||||||
|
@ -69,66 +60,8 @@ diff --git a/gdb/solib-svr4.c b/gdb/solib-svr4.c
|
||||||
|
|
||||||
xfree (build_id_filename);
|
xfree (build_id_filename);
|
||||||
xfree (build_id);
|
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
|
--- /dev/null 2016-07-02 20:29:01.679404943 +0200
|
||||||
new file mode 100644
|
+++ gdb-7.11.50.20160721/gdb/testsuite/gdb.base/gcore-buildid-exec-but-not-solib.exp 2016-07-31 23:04:49.062753722 +0200
|
||||||
--- /dev/null
|
|
||||||
+++ b/gdb/testsuite/gdb.base/gcore-buildid-exec-but-not-solib-lib.c
|
|
||||||
@@ -0,0 +1,21 @@
|
|
||||||
+/* 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/>. */
|
|
||||||
+
|
|
||||||
+void
|
|
||||||
+lib (void)
|
|
||||||
+{
|
|
||||||
+}
|
|
||||||
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
|
|
||||||
--- /dev/null
|
|
||||||
+++ b/gdb/testsuite/gdb.base/gcore-buildid-exec-but-not-solib-main.c
|
|
||||||
@@ -0,0 +1,25 @@
|
|
||||||
+/* 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/>. */
|
|
||||||
+
|
|
||||||
+extern void lib (void);
|
|
||||||
+
|
|
||||||
+int
|
|
||||||
+main (void)
|
|
||||||
+{
|
|
||||||
+ lib ();
|
|
||||||
+ return 0;
|
|
||||||
+}
|
|
||||||
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
|
|
||||||
--- /dev/null
|
|
||||||
+++ b/gdb/testsuite/gdb.base/gcore-buildid-exec-but-not-solib.exp
|
|
||||||
@@ -0,0 +1,105 @@
|
@@ -0,0 +1,105 @@
|
||||||
+# Copyright 2016 Free Software Foundation, Inc.
|
+# Copyright 2016 Free Software Foundation, Inc.
|
||||||
+
|
+
|
||||||
|
@ -235,3 +168,55 @@ new file mode 100644
|
||||||
+
|
+
|
||||||
+gdb_test "bt"
|
+gdb_test "bt"
|
||||||
+gdb_test "info shared"
|
+gdb_test "info shared"
|
||||||
|
--- /dev/null 2016-07-02 20:29:01.679404943 +0200
|
||||||
|
+++ gdb-7.11.50.20160721/gdb/testsuite/gdb.base/gcore-buildid-exec-but-not-solib-main.c 2016-07-28 21:06:40.977786922 +0200
|
||||||
|
@@ -0,0 +1,25 @@
|
||||||
|
+/* 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/>. */
|
||||||
|
+
|
||||||
|
+extern void lib (void);
|
||||||
|
+
|
||||||
|
+int
|
||||||
|
+main (void)
|
||||||
|
+{
|
||||||
|
+ lib ();
|
||||||
|
+ return 0;
|
||||||
|
+}
|
||||||
|
--- /dev/null 2016-07-02 20:29:01.679404943 +0200
|
||||||
|
+++ gdb-7.11.50.20160721/gdb/testsuite/gdb.base/gcore-buildid-exec-but-not-solib-lib.c 2016-07-28 21:06:40.977786922 +0200
|
||||||
|
@@ -0,0 +1,21 @@
|
||||||
|
+/* 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/>. */
|
||||||
|
+
|
||||||
|
+void
|
||||||
|
+lib (void)
|
||||||
|
+{
|
||||||
|
+}
|
||||||
|
|
File diff suppressed because it is too large
Load Diff
|
@ -1,11 +1,3 @@
|
||||||
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-bz229517-gcore-without-terminal.patch
|
|
||||||
|
|
||||||
;; Allow running `/usr/bin/gcore' with provided but inaccessible tty (BZ 229517).
|
|
||||||
;;=fedoratest
|
|
||||||
|
|
||||||
2007-04-22 Jan Kratochvil <jan.kratochvil@redhat.com>
|
2007-04-22 Jan Kratochvil <jan.kratochvil@redhat.com>
|
||||||
|
|
||||||
* gdb_gcore.sh: Redirect GDB from `</dev/null'.
|
* gdb_gcore.sh: Redirect GDB from `</dev/null'.
|
||||||
|
@ -14,10 +6,11 @@ Subject: gdb-6.6-bz229517-gcore-without-terminal.patch
|
||||||
|
|
||||||
* gdb.base/gcorebg.exp, gdb.base/gcorebg.c: New files.
|
* gdb.base/gcorebg.exp, gdb.base/gcorebg.c: New files.
|
||||||
|
|
||||||
diff --git a/gdb/testsuite/gdb.base/gcorebg.c b/gdb/testsuite/gdb.base/gcorebg.c
|
|
||||||
new file mode 100644
|
Index: gdb-7.10.90.20160211/gdb/testsuite/gdb.base/gcorebg.c
|
||||||
--- /dev/null
|
===================================================================
|
||||||
+++ b/gdb/testsuite/gdb.base/gcorebg.c
|
--- /dev/null 1970-01-01 00:00:00.000000000 +0000
|
||||||
|
+++ gdb-7.10.90.20160211/gdb/testsuite/gdb.base/gcorebg.c 2016-02-16 10:44:48.998527259 +0100
|
||||||
@@ -0,0 +1,49 @@
|
@@ -0,0 +1,49 @@
|
||||||
+#include <stdio.h>
|
+#include <stdio.h>
|
||||||
+#include <sys/types.h>
|
+#include <sys/types.h>
|
||||||
|
@ -68,10 +61,10 @@ new file mode 100644
|
||||||
+
|
+
|
||||||
+ return 0;
|
+ return 0;
|
||||||
+}
|
+}
|
||||||
diff --git a/gdb/testsuite/gdb.base/gcorebg.exp b/gdb/testsuite/gdb.base/gcorebg.exp
|
Index: gdb-7.10.90.20160211/gdb/testsuite/gdb.base/gcorebg.exp
|
||||||
new file mode 100644
|
===================================================================
|
||||||
--- /dev/null
|
--- /dev/null 1970-01-01 00:00:00.000000000 +0000
|
||||||
+++ b/gdb/testsuite/gdb.base/gcorebg.exp
|
+++ gdb-7.10.90.20160211/gdb/testsuite/gdb.base/gcorebg.exp 2016-02-16 10:44:48.999527265 +0100
|
||||||
@@ -0,0 +1,113 @@
|
@@ -0,0 +1,113 @@
|
||||||
+# Copyright 2007 Free Software Foundation, Inc.
|
+# Copyright 2007 Free Software Foundation, Inc.
|
||||||
+
|
+
|
||||||
|
|
|
@ -1,21 +1,14 @@
|
||||||
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-bz230000-power6-disassembly-test.patch
|
|
||||||
|
|
||||||
;; Testcase for PPC Power6/DFP instructions disassembly (BZ 230000).
|
|
||||||
;;=fedoratest
|
|
||||||
|
|
||||||
https://bugzilla.redhat.com/bugzilla/show_bug.cgi?id=230000
|
https://bugzilla.redhat.com/bugzilla/show_bug.cgi?id=230000
|
||||||
|
|
||||||
The original testcase
|
The original testcase
|
||||||
https://bugzilla.redhat.com/bugzilla/show_bug.cgi?id=230000#c1
|
https://bugzilla.redhat.com/bugzilla/show_bug.cgi?id=230000#c1
|
||||||
requires too recent GCC.
|
requires too recent GCC.
|
||||||
|
|
||||||
diff --git a/gdb/testsuite/gdb.arch/powerpc-power6.exp b/gdb/testsuite/gdb.arch/powerpc-power6.exp
|
|
||||||
new file mode 100644
|
Index: gdb-7.5.50.20130215/gdb/testsuite/gdb.arch/powerpc-power6.exp
|
||||||
--- /dev/null
|
===================================================================
|
||||||
+++ b/gdb/testsuite/gdb.arch/powerpc-power6.exp
|
--- /dev/null 1970-01-01 00:00:00.000000000 +0000
|
||||||
|
+++ gdb-7.5.50.20130215/gdb/testsuite/gdb.arch/powerpc-power6.exp 2013-02-25 14:31:06.658827177 +0100
|
||||||
@@ -0,0 +1,54 @@
|
@@ -0,0 +1,54 @@
|
||||||
+# Copyright 2007 Free Software Foundation, Inc.
|
+# Copyright 2007 Free Software Foundation, Inc.
|
||||||
+
|
+
|
||||||
|
@ -71,10 +64,10 @@ new file mode 100644
|
||||||
+gdb_test "disass func" ":\tddivq *f0,f2,f0\r\n.*" "Power6 disassembly ddivq"
|
+gdb_test "disass func" ":\tddivq *f0,f2,f0\r\n.*" "Power6 disassembly ddivq"
|
||||||
+gdb_test "disass func" ":\tdcmpu *cr1,f2,f1\r\n.*" "Power6 disassembly dcmpu"
|
+gdb_test "disass func" ":\tdcmpu *cr1,f2,f1\r\n.*" "Power6 disassembly dcmpu"
|
||||||
+gdb_test "disass func" ":\tdcmpuq *cr1,f2,f0\r\n.*" "Power6 disassembly dcmpuq"
|
+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
|
Index: gdb-7.5.50.20130215/gdb/testsuite/gdb.arch/powerpc-power6.s
|
||||||
new file mode 100644
|
===================================================================
|
||||||
--- /dev/null
|
--- /dev/null 1970-01-01 00:00:00.000000000 +0000
|
||||||
+++ b/gdb/testsuite/gdb.arch/powerpc-power6.s
|
+++ gdb-7.5.50.20130215/gdb/testsuite/gdb.arch/powerpc-power6.s 2013-02-25 14:31:06.659827178 +0100
|
||||||
@@ -0,0 +1,16 @@
|
@@ -0,0 +1,16 @@
|
||||||
+ .text
|
+ .text
|
||||||
+ .globl func
|
+ .globl func
|
||||||
|
|
|
@ -0,0 +1,143 @@
|
||||||
|
2008-03-01 Jan Kratochvil <jan.kratochvil@redhat.com>
|
||||||
|
|
||||||
|
Port to GDB-6.8pre.
|
||||||
|
Remove the `[' character from the GDB-6.8 default message.
|
||||||
|
|
||||||
|
Index: gdb-7.10.90.20160211/gdb/testsuite/gdb.base/fork-detach.c
|
||||||
|
===================================================================
|
||||||
|
--- /dev/null 1970-01-01 00:00:00.000000000 +0000
|
||||||
|
+++ gdb-7.10.90.20160211/gdb/testsuite/gdb.base/fork-detach.c 2016-02-15 23:25:36.686600598 +0100
|
||||||
|
@@ -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;
|
||||||
|
+}
|
||||||
|
Index: gdb-7.10.90.20160211/gdb/testsuite/gdb.base/fork-detach.exp
|
||||||
|
===================================================================
|
||||||
|
--- /dev/null 1970-01-01 00:00:00.000000000 +0000
|
||||||
|
+++ gdb-7.10.90.20160211/gdb/testsuite/gdb.base/fork-detach.exp 2016-02-15 23:27:55.792588265 +0100
|
||||||
|
@@ -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"
|
||||||
|
Index: gdb-7.10.90.20160211/gdb/infrun.c
|
||||||
|
===================================================================
|
||||||
|
--- gdb-7.10.90.20160211.orig/gdb/infrun.c 2016-02-15 23:25:01.432350289 +0100
|
||||||
|
+++ gdb-7.10.90.20160211/gdb/infrun.c 2016-02-15 23:27:49.274541986 +0100
|
||||||
|
@@ -478,7 +478,7 @@
|
||||||
|
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));
|
||||||
|
Index: gdb-7.10.90.20160211/gdb/testsuite/gdb.base/catch-syscall.exp
|
||||||
|
===================================================================
|
||||||
|
--- gdb-7.10.90.20160211.orig/gdb/testsuite/gdb.base/catch-syscall.exp 2016-02-15 23:25:01.432350289 +0100
|
||||||
|
+++ gdb-7.10.90.20160211/gdb/testsuite/gdb.base/catch-syscall.exp 2016-02-15 23:25:36.689600619 +0100
|
||||||
|
@@ -165,7 +165,7 @@
|
||||||
|
# Deleting the catchpoints
|
||||||
|
delete_breakpoints
|
||||||
|
|
||||||
|
- gdb_continue_to_end
|
||||||
|
+ gdb_continue_to_end "" continue 1
|
||||||
|
}
|
||||||
|
|
||||||
|
proc test_catch_syscall_without_args {} {
|
||||||
|
@@ -236,7 +236,7 @@
|
||||||
|
# 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
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
|
@ -1,20 +1,12 @@
|
||||||
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-bz237572-ppc-atomic-sequence-test.patch
|
|
||||||
|
|
||||||
;; Support for stepping over PPC atomic instruction sequences (BZ 237572).
|
|
||||||
;;=fedoratest
|
|
||||||
|
|
||||||
2007-06-25 Jan Kratochvil <jan.kratochvil@redhat.com>
|
2007-06-25 Jan Kratochvil <jan.kratochvil@redhat.com>
|
||||||
|
|
||||||
* gdb.threads/atomic-seq-threaded.c,
|
* gdb.threads/atomic-seq-threaded.c,
|
||||||
gdb.threads/atomic-seq-threaded.exp: New files.
|
gdb.threads/atomic-seq-threaded.exp: New files.
|
||||||
|
|
||||||
diff --git a/gdb/testsuite/gdb.threads/atomic-seq-threaded.c b/gdb/testsuite/gdb.threads/atomic-seq-threaded.c
|
Index: gdb-6.8.50.20081128/gdb/testsuite/gdb.threads/atomic-seq-threaded.c
|
||||||
new file mode 100644
|
===================================================================
|
||||||
--- /dev/null
|
--- /dev/null 1970-01-01 00:00:00.000000000 +0000
|
||||||
+++ b/gdb/testsuite/gdb.threads/atomic-seq-threaded.c
|
+++ gdb-6.8.50.20081128/gdb/testsuite/gdb.threads/atomic-seq-threaded.c 2008-12-08 22:27:01.000000000 +0100
|
||||||
@@ -0,0 +1,171 @@
|
@@ -0,0 +1,171 @@
|
||||||
+/* This testcase is part of GDB, the GNU debugger.
|
+/* This testcase is part of GDB, the GNU debugger.
|
||||||
+
|
+
|
||||||
|
@ -187,10 +179,10 @@ new file mode 100644
|
||||||
+
|
+
|
||||||
+ return 0; /* _exit_ */
|
+ return 0; /* _exit_ */
|
||||||
+}
|
+}
|
||||||
diff --git a/gdb/testsuite/gdb.threads/atomic-seq-threaded.exp b/gdb/testsuite/gdb.threads/atomic-seq-threaded.exp
|
Index: gdb-6.8.50.20081128/gdb/testsuite/gdb.threads/atomic-seq-threaded.exp
|
||||||
new file mode 100644
|
===================================================================
|
||||||
--- /dev/null
|
--- /dev/null 1970-01-01 00:00:00.000000000 +0000
|
||||||
+++ b/gdb/testsuite/gdb.threads/atomic-seq-threaded.exp
|
+++ gdb-6.8.50.20081128/gdb/testsuite/gdb.threads/atomic-seq-threaded.exp 2008-12-08 22:31:01.000000000 +0100
|
||||||
@@ -0,0 +1,84 @@
|
@@ -0,0 +1,84 @@
|
||||||
+# atomic-seq-threaded.exp -- Test case for stepping over RISC atomic code seqs.
|
+# atomic-seq-threaded.exp -- Test case for stepping over RISC atomic code seqs.
|
||||||
+# This variant testcases the code for stepping another thread while skipping
|
+# This variant testcases the code for stepping another thread while skipping
|
||||||
|
|
|
@ -0,0 +1,75 @@
|
||||||
|
Index: gdb-7.12.50.20170207/gdb/infrun.c
|
||||||
|
===================================================================
|
||||||
|
--- gdb-7.12.50.20170207.orig/gdb/infrun.c 2017-02-07 21:07:40.321202448 +0100
|
||||||
|
+++ gdb-7.12.50.20170207/gdb/infrun.c 2017-02-07 21:07:42.680220365 +0100
|
||||||
|
@@ -2218,7 +2218,7 @@
|
||||||
|
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)
|
||||||
|
Index: gdb-7.12.50.20170207/gdb/testsuite/gdb.mi/mi-cli.exp
|
||||||
|
===================================================================
|
||||||
|
--- gdb-7.12.50.20170207.orig/gdb/testsuite/gdb.mi/mi-cli.exp 2017-02-07 21:07:40.322202455 +0100
|
||||||
|
+++ gdb-7.12.50.20170207/gdb/testsuite/gdb.mi/mi-cli.exp 2017-02-07 21:07:42.680220365 +0100
|
||||||
|
@@ -199,7 +199,7 @@
|
||||||
|
# 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
|
||||||
|
Index: gdb-7.12.50.20170207/gdb/testsuite/gdb.mi/mi-logging.exp
|
||||||
|
===================================================================
|
||||||
|
--- gdb-7.12.50.20170207.orig/gdb/testsuite/gdb.mi/mi-logging.exp 2017-02-07 21:07:42.681220372 +0100
|
||||||
|
+++ gdb-7.12.50.20170207/gdb/testsuite/gdb.mi/mi-logging.exp 2017-02-07 21:09:36.950088269 +0100
|
||||||
|
@@ -53,7 +53,7 @@
|
||||||
|
|
||||||
|
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 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"
|
||||||
|
Index: gdb-7.12.50.20170207/gdb/testsuite/gdb.mi/mi-console.exp
|
||||||
|
===================================================================
|
||||||
|
--- gdb-7.12.50.20170207.orig/gdb/testsuite/gdb.mi/mi-console.exp 2017-02-07 21:07:40.323202463 +0100
|
||||||
|
+++ gdb-7.12.50.20170207/gdb/testsuite/gdb.mi/mi-console.exp 2017-02-07 21:07:42.681220372 +0100
|
||||||
|
@@ -60,6 +60,9 @@
|
||||||
|
|
||||||
|
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
|
||||||
|
Index: gdb-7.12.50.20170207/gdb/testsuite/gdb.opt/inline-cmds.exp
|
||||||
|
===================================================================
|
||||||
|
--- gdb-7.12.50.20170207.orig/gdb/testsuite/gdb.opt/inline-cmds.exp 2017-02-07 21:07:40.323202463 +0100
|
||||||
|
+++ gdb-7.12.50.20170207/gdb/testsuite/gdb.opt/inline-cmds.exp 2017-02-07 21:07:42.681220372 +0100
|
||||||
|
@@ -331,7 +331,7 @@
|
||||||
|
|
||||||
|
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 {
|
|
@ -1,15 +1,8 @@
|
||||||
From FEDORA_PATCHES Mon Sep 17 00:00:00 2001
|
Index: gdb-7.6.50.20130731-cvs/gdb/testsuite/gdb.base/annota1.exp
|
||||||
From: Fedora GDB patches <invalid@email.com>
|
===================================================================
|
||||||
Date: Fri, 27 Oct 2017 21:07:50 +0200
|
--- gdb-7.6.50.20130731-cvs.orig/gdb/testsuite/gdb.base/annota1.exp 2013-08-02 16:23:26.559936258 +0200
|
||||||
Subject: gdb-6.6-testsuite-timeouts.patch
|
+++ gdb-7.6.50.20130731-cvs/gdb/testsuite/gdb.base/annota1.exp 2013-08-02 16:23:56.590976418 +0200
|
||||||
|
@@ -41,6 +41,8 @@ if { [gdb_compile "${srcdir}/${subdir}/
|
||||||
;; Avoid too long timeouts on failing cases of "annota1.exp annota3.exp".
|
|
||||||
;;=fedoratest
|
|
||||||
|
|
||||||
diff --git a/gdb/testsuite/gdb.base/annota1.exp b/gdb/testsuite/gdb.base/annota1.exp
|
|
||||||
--- 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
|
|
||||||
|
|
||||||
clean_restart ${binfile}
|
clean_restart ${binfile}
|
||||||
|
|
||||||
|
@ -18,10 +11,11 @@ diff --git a/gdb/testsuite/gdb.base/annota1.exp b/gdb/testsuite/gdb.base/annota1
|
||||||
# The commands we test here produce many lines of output; disable "press
|
# The commands we test here produce many lines of output; disable "press
|
||||||
# <return> to continue" prompts.
|
# <return> to continue" prompts.
|
||||||
gdb_test_no_output "set height 0"
|
gdb_test_no_output "set height 0"
|
||||||
diff --git a/gdb/testsuite/gdb.base/annota3.exp b/gdb/testsuite/gdb.base/annota3.exp
|
Index: gdb-7.6.50.20130731-cvs/gdb/testsuite/gdb.base/annota3.exp
|
||||||
--- a/gdb/testsuite/gdb.base/annota3.exp
|
===================================================================
|
||||||
+++ b/gdb/testsuite/gdb.base/annota3.exp
|
--- gdb-7.6.50.20130731-cvs.orig/gdb/testsuite/gdb.base/annota3.exp 2013-08-02 16:23:26.560936259 +0200
|
||||||
@@ -38,6 +38,8 @@ if { [gdb_compile "${srcdir}/${subdir}/${srcfile}" "${binfile}" executable {deb
|
+++ gdb-7.6.50.20130731-cvs/gdb/testsuite/gdb.base/annota3.exp 2013-08-02 16:24:11.654996267 +0200
|
||||||
|
@@ -40,6 +40,8 @@ if { [gdb_compile "${srcdir}/${subdir}/
|
||||||
|
|
||||||
clean_restart ${binfile}
|
clean_restart ${binfile}
|
||||||
|
|
||||||
|
|
|
@ -0,0 +1,18 @@
|
||||||
|
Index: gdb-7.12.50.20170207/gdb/testsuite/gdb.threads/staticthreads.exp
|
||||||
|
===================================================================
|
||||||
|
--- gdb-7.12.50.20170207.orig/gdb/testsuite/gdb.threads/staticthreads.exp 2017-02-26 17:24:48.392316045 +0100
|
||||||
|
+++ gdb-7.12.50.20170207/gdb/testsuite/gdb.threads/staticthreads.exp 2017-02-26 17:25:38.649677595 +0100
|
||||||
|
@@ -41,6 +41,13 @@
|
||||||
|
# See if the static multi-threaded program runs.
|
||||||
|
|
||||||
|
runto_main
|
||||||
|
+
|
||||||
|
+# See if we get excessive LWP there (patched glibc with unpatched GDB):
|
||||||
|
+# * 2 Thread 135661664 (LWP 3856) main () at threadloop.c:41
|
||||||
|
+# 1 process 3856 main () at threadloop.c:41
|
||||||
|
+
|
||||||
|
+gdb_test "info threads" "^info threads\r\n\[ \t\]*Id\[ \t\]+Target Id\[ \t\]+Frame\[ \t\]*\r\n\[^\r\n\]* Thread \[^\r\n\]*" "info threads on start"
|
||||||
|
+
|
||||||
|
gdb_test "break sem_post"
|
||||||
|
set test "continue to main's call of sem_post"
|
||||||
|
gdb_test_multiple "continue" "$test" {
|
|
@ -1,11 +1,3 @@
|
||||||
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.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.
|
|
||||||
|
|
||||||
https://bugzilla.redhat.com/bugzilla/show_bug.cgi?id=224128
|
https://bugzilla.redhat.com/bugzilla/show_bug.cgi?id=224128
|
||||||
|
|
||||||
2007-01-25 Jan Kratochvil <jan.kratochvil@redhat.com>
|
2007-01-25 Jan Kratochvil <jan.kratochvil@redhat.com>
|
||||||
|
@ -18,10 +10,10 @@ https://bugzilla.redhat.com/bugzilla/show_bug.cgi?id=224128
|
||||||
Port to GDB-6.7 - only the testcase left, patch has been reverted,
|
Port to GDB-6.7 - only the testcase left, patch has been reverted,
|
||||||
char-vectors restricted.
|
char-vectors restricted.
|
||||||
|
|
||||||
diff --git a/gdb/testsuite/gdb.base/charsign.c b/gdb/testsuite/gdb.base/charsign.c
|
Index: gdb-7.10.90.20160211/gdb/testsuite/gdb.base/charsign.c
|
||||||
new file mode 100644
|
===================================================================
|
||||||
--- /dev/null
|
--- /dev/null 1970-01-01 00:00:00.000000000 +0000
|
||||||
+++ b/gdb/testsuite/gdb.base/charsign.c
|
+++ gdb-7.10.90.20160211/gdb/testsuite/gdb.base/charsign.c 2016-02-15 23:26:06.429811778 +0100
|
||||||
@@ -0,0 +1,37 @@
|
@@ -0,0 +1,37 @@
|
||||||
+/* This testcase is part of GDB, the GNU debugger.
|
+/* This testcase is part of GDB, the GNU debugger.
|
||||||
+
|
+
|
||||||
|
@ -60,10 +52,10 @@ new file mode 100644
|
||||||
+char_n n_typed[]="A";
|
+char_n n_typed[]="A";
|
||||||
+char_s s_typed[]="A";
|
+char_s s_typed[]="A";
|
||||||
+char_u u_typed[]="A";
|
+char_u u_typed[]="A";
|
||||||
diff --git a/gdb/testsuite/gdb.base/charsign.exp b/gdb/testsuite/gdb.base/charsign.exp
|
Index: gdb-7.10.90.20160211/gdb/testsuite/gdb.base/charsign.exp
|
||||||
new file mode 100644
|
===================================================================
|
||||||
--- /dev/null
|
--- /dev/null 1970-01-01 00:00:00.000000000 +0000
|
||||||
+++ b/gdb/testsuite/gdb.base/charsign.exp
|
+++ gdb-7.10.90.20160211/gdb/testsuite/gdb.base/charsign.exp 2016-02-15 23:26:12.409854237 +0100
|
||||||
@@ -0,0 +1,63 @@
|
@@ -0,0 +1,63 @@
|
||||||
+# Copyright 2007 Free Software Foundation, Inc.
|
+# Copyright 2007 Free Software Foundation, Inc.
|
||||||
+
|
+
|
||||||
|
|
|
@ -1,11 +1,3 @@
|
||||||
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.7-ppc-clobbered-registers-O2-test.patch
|
|
||||||
|
|
||||||
;; Test PPC hiding of call-volatile parameter register.
|
|
||||||
;;=fedoratest
|
|
||||||
|
|
||||||
2007-11-04 Jan Kratochvil <jan.kratochvil@redhat.com>
|
2007-11-04 Jan Kratochvil <jan.kratochvil@redhat.com>
|
||||||
|
|
||||||
* gdb.arch/ppc-clobbered-registers-O2.exp: `powerpc64' changed to
|
* gdb.arch/ppc-clobbered-registers-O2.exp: `powerpc64' changed to
|
||||||
|
@ -21,10 +13,8 @@ http://sourceware.org/ml/gdb-patches/2007-09/msg00228.html
|
||||||
* (rs6000_gdbarch_init): Install ppc_dwarf2_frame_init_reg as
|
* (rs6000_gdbarch_init): Install ppc_dwarf2_frame_init_reg as
|
||||||
default dwarf2_frame_set_init_reg function.
|
default dwarf2_frame_set_init_reg function.
|
||||||
|
|
||||||
diff --git a/gdb/testsuite/gdb.arch/ppc-clobbered-registers-O2.c b/gdb/testsuite/gdb.arch/ppc-clobbered-registers-O2.c
|
--- /dev/null 1 Jan 1970 00:00:00 -0000
|
||||||
new file mode 100644
|
+++ ./gdb/testsuite/gdb.arch/ppc-clobbered-registers-O2.c 3 Nov 2007 22:22:28 -0000
|
||||||
--- /dev/null
|
|
||||||
+++ b/gdb/testsuite/gdb.arch/ppc-clobbered-registers-O2.c
|
|
||||||
@@ -0,0 +1,21 @@
|
@@ -0,0 +1,21 @@
|
||||||
+
|
+
|
||||||
+unsigned * __attribute__((noinline))
|
+unsigned * __attribute__((noinline))
|
||||||
|
@ -47,10 +37,8 @@ new file mode 100644
|
||||||
+ y = 14;
|
+ y = 14;
|
||||||
+ return (int)gen_movsd (&x, &y);
|
+ return (int)gen_movsd (&x, &y);
|
||||||
+}
|
+}
|
||||||
diff --git a/gdb/testsuite/gdb.arch/ppc-clobbered-registers-O2.exp b/gdb/testsuite/gdb.arch/ppc-clobbered-registers-O2.exp
|
--- /dev/null 1 Jan 1970 00:00:00 -0000
|
||||||
new file mode 100644
|
+++ ./gdb/testsuite/gdb.arch/ppc-clobbered-registers-O2.exp 3 Nov 2007 22:22:28 -0000
|
||||||
--- /dev/null
|
|
||||||
+++ b/gdb/testsuite/gdb.arch/ppc-clobbered-registers-O2.exp
|
|
||||||
@@ -0,0 +1,54 @@
|
@@ -0,0 +1,54 @@
|
||||||
+# Copyright 2006 Free Software Foundation, Inc.
|
+# Copyright 2006 Free Software Foundation, Inc.
|
||||||
+#
|
+#
|
||||||
|
|
|
@ -1,11 +1,3 @@
|
||||||
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.7-testsuite-stable-results.patch
|
|
||||||
|
|
||||||
;; Testsuite fixes for more stable/comparable results.
|
|
||||||
;;=fedoratest
|
|
||||||
|
|
||||||
gdb/testsuite/gdb.base/fileio.c:
|
gdb/testsuite/gdb.base/fileio.c:
|
||||||
gdb/testsuite/gdb.base/fileio.exp:
|
gdb/testsuite/gdb.base/fileio.exp:
|
||||||
2007-12-08 Jan Kratochvil <jan.kratochvil@redhat.com>
|
2007-12-08 Jan Kratochvil <jan.kratochvil@redhat.com>
|
||||||
|
@ -16,19 +8,23 @@ gdb/testsuite/gdb.base/fileio.exp:
|
||||||
* gdb.base/fileio.exp: Change the startup and finish cleanup.
|
* gdb.base/fileio.exp: Change the startup and finish cleanup.
|
||||||
Change the test file reference to be into the `fileio.dir' directory.
|
Change the test file reference to be into the `fileio.dir' directory.
|
||||||
|
|
||||||
|
|
||||||
sources/gdb/testsuite/gdb.base/dump.exp:
|
sources/gdb/testsuite/gdb.base/dump.exp:
|
||||||
Found on RHEL-5.s390x.
|
Found on RHEL-5.s390x.
|
||||||
|
|
||||||
|
|
||||||
gdb-6.8.50.20090209/gdb/testsuite/gdb.base/auxv.exp:
|
gdb-6.8.50.20090209/gdb/testsuite/gdb.base/auxv.exp:
|
||||||
random FAIL: gdb.base/auxv.exp: matching auxv data from live and gcore
|
random FAIL: gdb.base/auxv.exp: matching auxv data from live and gcore
|
||||||
|
|
||||||
|
|
||||||
gdb-6.8.50.20090209/gdb/testsuite/gdb.base/annota1.exp:
|
gdb-6.8.50.20090209/gdb/testsuite/gdb.base/annota1.exp:
|
||||||
frames-invalid can happen asynchronously.
|
frames-invalid can happen asynchronously.
|
||||||
|
|
||||||
diff --git a/gdb/testsuite/gdb.base/fileio.c b/gdb/testsuite/gdb.base/fileio.c
|
Index: gdb-7.12/gdb/testsuite/gdb.base/fileio.c
|
||||||
--- a/gdb/testsuite/gdb.base/fileio.c
|
===================================================================
|
||||||
+++ b/gdb/testsuite/gdb.base/fileio.c
|
--- gdb-7.12.orig/gdb/testsuite/gdb.base/fileio.c 2016-08-01 17:50:21.000000000 +0200
|
||||||
@@ -559,6 +559,28 @@ strerrno (int err)
|
+++ gdb-7.12/gdb/testsuite/gdb.base/fileio.c 2016-10-07 22:49:20.689346914 +0200
|
||||||
|
@@ -556,6 +556,28 @@
|
||||||
int
|
int
|
||||||
main ()
|
main ()
|
||||||
{
|
{
|
||||||
|
@ -57,10 +53,11 @@ diff --git a/gdb/testsuite/gdb.base/fileio.c b/gdb/testsuite/gdb.base/fileio.c
|
||||||
/* Don't change the order of the calls. They partly depend on each other */
|
/* Don't change the order of the calls. They partly depend on each other */
|
||||||
test_open ();
|
test_open ();
|
||||||
test_write ();
|
test_write ();
|
||||||
diff --git a/gdb/testsuite/gdb.base/fileio.exp b/gdb/testsuite/gdb.base/fileio.exp
|
Index: gdb-7.12/gdb/testsuite/gdb.base/fileio.exp
|
||||||
--- a/gdb/testsuite/gdb.base/fileio.exp
|
===================================================================
|
||||||
+++ b/gdb/testsuite/gdb.base/fileio.exp
|
--- gdb-7.12.orig/gdb/testsuite/gdb.base/fileio.exp 2016-08-01 17:50:21.000000000 +0200
|
||||||
@@ -24,9 +24,9 @@ if [target_info exists gdb,nofileio] {
|
+++ gdb-7.12/gdb/testsuite/gdb.base/fileio.exp 2016-10-07 22:54:44.680071906 +0200
|
||||||
|
@@ -24,9 +24,9 @@
|
||||||
standard_testfile
|
standard_testfile
|
||||||
|
|
||||||
if {[is_remote host]} {
|
if {[is_remote host]} {
|
||||||
|
@ -72,7 +69,7 @@ diff --git a/gdb/testsuite/gdb.base/fileio.exp b/gdb/testsuite/gdb.base/fileio.e
|
||||||
}
|
}
|
||||||
|
|
||||||
if { [gdb_compile "${srcdir}/${subdir}/${srcfile}" "${binfile}" \
|
if { [gdb_compile "${srcdir}/${subdir}/${srcfile}" "${binfile}" \
|
||||||
@@ -47,7 +47,8 @@ set dir2 [standard_output_file dir2.fileio.test]
|
@@ -47,7 +47,8 @@
|
||||||
if {[file exists $dir2] && ![file writable $dir2]} {
|
if {[file exists $dir2] && ![file writable $dir2]} {
|
||||||
system "chmod +w $dir2"
|
system "chmod +w $dir2"
|
||||||
}
|
}
|
||||||
|
@ -82,7 +79,7 @@ diff --git a/gdb/testsuite/gdb.base/fileio.exp b/gdb/testsuite/gdb.base/fileio.e
|
||||||
|
|
||||||
set oldtimeout $timeout
|
set oldtimeout $timeout
|
||||||
set timeout [expr "$timeout + 60"]
|
set timeout [expr "$timeout + 60"]
|
||||||
@@ -89,7 +90,7 @@ gdb_test continue \
|
@@ -89,7 +90,7 @@
|
||||||
|
|
||||||
gdb_test "continue" ".*" ""
|
gdb_test "continue" ".*" ""
|
||||||
|
|
||||||
|
@ -91,7 +88,7 @@ diff --git a/gdb/testsuite/gdb.base/fileio.exp b/gdb/testsuite/gdb.base/fileio.e
|
||||||
|
|
||||||
gdb_test continue \
|
gdb_test continue \
|
||||||
"Continuing\\..*open 5:.*EACCES$stop_msg" \
|
"Continuing\\..*open 5:.*EACCES$stop_msg" \
|
||||||
@@ -276,9 +277,7 @@ gdb_test continue \
|
@@ -276,9 +277,7 @@
|
||||||
gdb_exit
|
gdb_exit
|
||||||
|
|
||||||
# Make dir2 writable again so rm -rf of a build tree Just Works.
|
# Make dir2 writable again so rm -rf of a build tree Just Works.
|
||||||
|
|
|
@ -0,0 +1,180 @@
|
||||||
|
Index: gdb-7.99.90.20170420/gdb/infrun.c
|
||||||
|
===================================================================
|
||||||
|
--- gdb-7.99.90.20170420.orig/gdb/infrun.c 2017-04-20 23:19:16.056434309 +0200
|
||||||
|
+++ gdb-7.99.90.20170420/gdb/infrun.c 2017-04-20 23:19:22.932480367 +0200
|
||||||
|
@@ -620,6 +620,13 @@
|
||||||
|
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);
|
||||||
|
}
|
||||||
|
|
||||||
|
Index: gdb-7.99.90.20170420/gdb/linux-nat.c
|
||||||
|
===================================================================
|
||||||
|
--- gdb-7.99.90.20170420.orig/gdb/linux-nat.c 2017-04-20 23:19:16.058434322 +0200
|
||||||
|
+++ gdb-7.99.90.20170420/gdb/linux-nat.c 2017-04-20 23:19:22.933480373 +0200
|
||||||
|
@@ -194,6 +194,11 @@
|
||||||
|
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 *);
|
||||||
|
|
||||||
|
@@ -1055,6 +1060,9 @@
|
||||||
|
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 /
|
||||||
|
@@ -1412,6 +1420,25 @@
|
||||||
|
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;
|
||||||
|
}
|
||||||
|
|
||||||
|
@@ -1570,6 +1597,10 @@
|
||||||
|
detach_one_lwp (main_lwp, &signo);
|
||||||
|
|
||||||
|
inf_ptrace_detach_success (ops);
|
||||||
|
+
|
||||||
|
+#ifdef NEED_DETACH_SIGSTOP
|
||||||
|
+ pid_was_stopped = 0;
|
||||||
|
+#endif
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
@@ -1830,6 +1861,16 @@
|
||||||
|
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);
|
||||||
|
|
||||||
|
@@ -3826,6 +3867,10 @@
|
||||||
|
|
||||||
|
/* 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
|
||||||
|
Index: gdb-7.99.90.20170420/gdb/testsuite/gdb.threads/attach-stopped.exp
|
||||||
|
===================================================================
|
||||||
|
--- gdb-7.99.90.20170420.orig/gdb/testsuite/gdb.threads/attach-stopped.exp 2017-04-20 23:19:16.059434329 +0200
|
||||||
|
+++ gdb-7.99.90.20170420/gdb/testsuite/gdb.threads/attach-stopped.exp 2017-04-20 23:19:22.933480373 +0200
|
||||||
|
@@ -56,7 +56,65 @@
|
||||||
|
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" {
|
|
@ -0,0 +1,30 @@
|
||||||
|
Index: gdb-7.12.50.20170207/gdb/valops.c
|
||||||
|
===================================================================
|
||||||
|
--- gdb-7.12.50.20170207.orig/gdb/valops.c 2017-02-26 17:26:43.839146565 +0100
|
||||||
|
+++ gdb-7.12.50.20170207/gdb/valops.c 2017-02-26 17:28:40.840988272 +0100
|
||||||
|
@@ -1112,6 +1112,8 @@
|
||||||
|
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
|
||||||
|
@@ -1121,8 +1123,14 @@
|
||||||
|
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."));
|
||||||
|
|
|
@ -1,16 +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.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).
|
Test various forms of threads tracking across exec(2).
|
||||||
|
|
||||||
diff --git a/gdb/testsuite/gdb.threads/threaded-exec.c b/gdb/testsuite/gdb.threads/threaded-exec.c
|
Index: gdb-7.10.90.20160211/gdb/testsuite/gdb.threads/threaded-exec.c
|
||||||
--- a/gdb/testsuite/gdb.threads/threaded-exec.c
|
===================================================================
|
||||||
+++ b/gdb/testsuite/gdb.threads/threaded-exec.c
|
--- gdb-7.10.90.20160211.orig/gdb/testsuite/gdb.threads/threaded-exec.c 2016-02-16 09:54:45.157163049 +0100
|
||||||
|
+++ gdb-7.10.90.20160211/gdb/testsuite/gdb.threads/threaded-exec.c 2016-02-16 09:54:46.210170175 +0100
|
||||||
@@ -18,21 +18,95 @@
|
@@ -18,21 +18,95 @@
|
||||||
Boston, MA 02111-1307, USA. */
|
Boston, MA 02111-1307, USA. */
|
||||||
|
|
||||||
|
@ -110,7 +103,7 @@ diff --git a/gdb/testsuite/gdb.threads/threaded-exec.c b/gdb/testsuite/gdb.threa
|
||||||
pthread_t t1;
|
pthread_t t1;
|
||||||
int i;
|
int i;
|
||||||
|
|
||||||
@@ -40,7 +114,34 @@ main (void)
|
@@ -40,7 +114,34 @@
|
||||||
assert (i == 0);
|
assert (i == 0);
|
||||||
i = pthread_join (t1, NULL);
|
i = pthread_join (t1, NULL);
|
||||||
assert (i == 0);
|
assert (i == 0);
|
||||||
|
@ -147,9 +140,10 @@ diff --git a/gdb/testsuite/gdb.threads/threaded-exec.c b/gdb/testsuite/gdb.threa
|
||||||
+ execl (cmd, cmd, exec_nothreads, exec_threads, phase_s, NULL);
|
+ execl (cmd, cmd, exec_nothreads, exec_threads, phase_s, NULL);
|
||||||
+ assert (0);
|
+ assert (0);
|
||||||
}
|
}
|
||||||
diff --git a/gdb/testsuite/gdb.threads/threaded-exec.exp b/gdb/testsuite/gdb.threads/threaded-exec.exp
|
Index: gdb-7.10.90.20160211/gdb/testsuite/gdb.threads/threaded-exec.exp
|
||||||
--- a/gdb/testsuite/gdb.threads/threaded-exec.exp
|
===================================================================
|
||||||
+++ b/gdb/testsuite/gdb.threads/threaded-exec.exp
|
--- gdb-7.10.90.20160211.orig/gdb/testsuite/gdb.threads/threaded-exec.exp 2016-02-16 09:54:45.157163049 +0100
|
||||||
|
+++ gdb-7.10.90.20160211/gdb/testsuite/gdb.threads/threaded-exec.exp 2016-02-16 09:55:27.397448879 +0100
|
||||||
@@ -20,9 +20,14 @@
|
@@ -20,9 +20,14 @@
|
||||||
|
|
||||||
set testfile threaded-exec
|
set testfile threaded-exec
|
||||||
|
@ -167,7 +161,7 @@ diff --git a/gdb/testsuite/gdb.threads/threaded-exec.exp b/gdb/testsuite/gdb.thr
|
||||||
return -1
|
return -1
|
||||||
}
|
}
|
||||||
|
|
||||||
@@ -30,9 +35,9 @@ gdb_exit
|
@@ -30,9 +35,9 @@
|
||||||
gdb_start
|
gdb_start
|
||||||
gdb_reinitialize_dir $srcdir/$subdir
|
gdb_reinitialize_dir $srcdir/$subdir
|
||||||
|
|
||||||
|
|
|
@ -1,17 +1,147 @@
|
||||||
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-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).
|
Fix resolving of variables at locations lists in prelinked libs (BZ 466901).
|
||||||
|
|
||||||
diff --git a/gdb/testsuite/gdb.dwarf2/dw2-loclist-prelinked-func.S b/gdb/testsuite/gdb.dwarf2/dw2-loclist-prelinked-func.S
|
Index: gdb-6.8.50.20090909/gdb/testsuite/gdb.dwarf2/dw2-loclist-prelinked.exp
|
||||||
new file mode 100644
|
===================================================================
|
||||||
--- /dev/null
|
--- /dev/null 1970-01-01 00:00:00.000000000 +0000
|
||||||
+++ b/gdb/testsuite/gdb.dwarf2/dw2-loclist-prelinked-func.S
|
+++ gdb-6.8.50.20090909/gdb/testsuite/gdb.dwarf2/dw2-loclist-prelinked.exp 2009-09-09 20:10:35.000000000 +0200
|
||||||
|
@@ -0,0 +1,102 @@
|
||||||
|
+# 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 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.
|
||||||
|
+
|
||||||
|
+# Minimal DWARF-2 unit test
|
||||||
|
+
|
||||||
|
+# This test can only be run on i386/x86_64 targets which support DWARF-2.
|
||||||
|
+# For now pick a sampling of likely targets.
|
||||||
|
+if {(![istarget *-*-linux*]
|
||||||
|
+ && ![istarget *-*-gnu*]
|
||||||
|
+ && ![istarget *-*-elf*]
|
||||||
|
+ && ![istarget *-*-openbsd*])
|
||||||
|
+ || (![istarget "i?86-*-*"] && ![istarget "x86_64-*-*"])} {
|
||||||
|
+ return 0
|
||||||
|
+}
|
||||||
|
+
|
||||||
|
+set testfile "dw2-loclist-prelinked"
|
||||||
|
+set srcfuncfile ${testfile}-func.S
|
||||||
|
+set binsharedfuncfile [standard_output_file ${testfile}.so]
|
||||||
|
+set srcmainfile ${testfile}-main.c
|
||||||
|
+set binfile [standard_output_file ${testfile}]
|
||||||
|
+
|
||||||
|
+remote_exec build "rm -f ${binfile}"
|
||||||
|
+
|
||||||
|
+# get the value of gcc_compiled
|
||||||
|
+if [get_compiler_info ${binfile}] {
|
||||||
|
+ return -1
|
||||||
|
+}
|
||||||
|
+
|
||||||
|
+# This test can only be run on gcc as we use additional_flags=FIXME
|
||||||
|
+if {$gcc_compiled == 0} {
|
||||||
|
+ return 0
|
||||||
|
+}
|
||||||
|
+
|
||||||
|
+if { [gdb_compile_shlib "${srcdir}/${subdir}/${srcfuncfile}" "${binsharedfuncfile}" {debug additional_flags=-m32}] != "" } {
|
||||||
|
+ untested "Couldn't compile test library"
|
||||||
|
+ return -1
|
||||||
|
+}
|
||||||
|
+
|
||||||
|
+# The new separate debug info file will be stored in the .debug subdirectory.
|
||||||
|
+
|
||||||
|
+if [gdb_gnu_strip_debug ${binsharedfuncfile}] {
|
||||||
|
+ # check that you have a recent version of strip and objcopy installed
|
||||||
|
+ unsupported "cannot produce separate debug info files"
|
||||||
|
+ return -1
|
||||||
|
+}
|
||||||
|
+
|
||||||
|
+if {[catch "system \"/usr/sbin/prelink -qNR --no-exec-shield ${binsharedfuncfile}\""] != 0} {
|
||||||
|
+ # Maybe we don't have prelink.
|
||||||
|
+ return -1
|
||||||
|
+}
|
||||||
|
+
|
||||||
|
+if { [gdb_compile "${srcdir}/${subdir}/${srcmainfile}" \
|
||||||
|
+ "${binfile}" executable [list debug additional_flags=-m32 shlib=${binsharedfuncfile}]] != "" } {
|
||||||
|
+ return -1
|
||||||
|
+}
|
||||||
|
+
|
||||||
|
+gdb_exit
|
||||||
|
+gdb_start
|
||||||
|
+gdb_reinitialize_dir $srcdir/$subdir
|
||||||
|
+gdb_load ${binfile}
|
||||||
|
+
|
||||||
|
+gdb_run_cmd
|
||||||
|
+
|
||||||
|
+gdb_test "" "Program received signal SIGABRT, Aborted..*" "Enter abort()"
|
||||||
|
+
|
||||||
|
+# Incorrect:
|
||||||
|
+# #0 0x00110430 in __kernel_vsyscall ()
|
||||||
|
+# No symbol table info available.
|
||||||
|
+# #1 0x003d44c0 in raise () from /lib/libc.so.6
|
||||||
|
+# No symbol table info available.
|
||||||
|
+# #2 0x003d5e88 in abort () from /lib/libc.so.6
|
||||||
|
+# No symbol table info available.
|
||||||
|
+# #3 0x44f10437 in func () at dw2-loclist-prelinked.c:8
|
||||||
|
+# i = Could not find the frame base for "func".
|
||||||
|
+
|
||||||
|
+# Correct:
|
||||||
|
+# #0 0x00110430 in __kernel_vsyscall ()
|
||||||
|
+# No symbol table info available.
|
||||||
|
+# #1 0x003d44c0 in raise () from /lib/libc.so.6
|
||||||
|
+# No symbol table info available.
|
||||||
|
+# #2 0x003d5e88 in abort () from /lib/libc.so.6
|
||||||
|
+# No symbol table info available.
|
||||||
|
+# #3 0x4ae36437 in func () at dw2-loclist-prelinked.c:8
|
||||||
|
+# i = 3827288
|
||||||
|
+# #4 0x0804851a in main () at ../../../gdb/testsuite/gdb.dwarf2/dw2-loclist-prelinked-main.c:24
|
||||||
|
+# No locals.
|
||||||
|
+
|
||||||
|
+# `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()"
|
||||||
|
Index: gdb-6.8.50.20090909/gdb/testsuite/gdb.dwarf2/dw2-loclist-prelinked-main.c
|
||||||
|
===================================================================
|
||||||
|
--- /dev/null 1970-01-01 00:00:00.000000000 +0000
|
||||||
|
+++ gdb-6.8.50.20090909/gdb/testsuite/gdb.dwarf2/dw2-loclist-prelinked-main.c 2009-09-09 20:10:35.000000000 +0200
|
||||||
|
@@ -0,0 +1,26 @@
|
||||||
|
+/* 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/>. */
|
||||||
|
+
|
||||||
|
+/* dw2-loclist-prelinked-func.S */
|
||||||
|
+extern void func (void);
|
||||||
|
+
|
||||||
|
+int
|
||||||
|
+main (void)
|
||||||
|
+{
|
||||||
|
+ func ();
|
||||||
|
+ return 0;
|
||||||
|
+}
|
||||||
|
Index: gdb-6.8.50.20090909/gdb/testsuite/gdb.dwarf2/dw2-loclist-prelinked-func.S
|
||||||
|
===================================================================
|
||||||
|
--- /dev/null 1970-01-01 00:00:00.000000000 +0000
|
||||||
|
+++ gdb-6.8.50.20090909/gdb/testsuite/gdb.dwarf2/dw2-loclist-prelinked-func.S 2009-09-09 20:10:35.000000000 +0200
|
||||||
@@ -0,0 +1,328 @@
|
@@ -0,0 +1,328 @@
|
||||||
+/* This testcase is part of GDB, the GNU debugger.
|
+/* This testcase is part of GDB, the GNU debugger.
|
||||||
+
|
+
|
||||||
|
@ -341,141 +471,3 @@ new file mode 100644
|
||||||
+ .string "short int"
|
+ .string "short int"
|
||||||
+ .ident "GCC: (GNU) 4.3.2 20081007 (Red Hat 4.3.2-6)"
|
+ .ident "GCC: (GNU) 4.3.2 20081007 (Red Hat 4.3.2-6)"
|
||||||
+ .section .note.GNU-stack,"",@progbits
|
+ .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
|
|
||||||
--- /dev/null
|
|
||||||
+++ b/gdb/testsuite/gdb.dwarf2/dw2-loclist-prelinked-main.c
|
|
||||||
@@ -0,0 +1,26 @@
|
|
||||||
+/* 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/>. */
|
|
||||||
+
|
|
||||||
+/* dw2-loclist-prelinked-func.S */
|
|
||||||
+extern void func (void);
|
|
||||||
+
|
|
||||||
+int
|
|
||||||
+main (void)
|
|
||||||
+{
|
|
||||||
+ func ();
|
|
||||||
+ return 0;
|
|
||||||
+}
|
|
||||||
diff --git a/gdb/testsuite/gdb.dwarf2/dw2-loclist-prelinked.exp b/gdb/testsuite/gdb.dwarf2/dw2-loclist-prelinked.exp
|
|
||||||
new file mode 100644
|
|
||||||
--- /dev/null
|
|
||||||
+++ b/gdb/testsuite/gdb.dwarf2/dw2-loclist-prelinked.exp
|
|
||||||
@@ -0,0 +1,102 @@
|
|
||||||
+# 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 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.
|
|
||||||
+
|
|
||||||
+# Minimal DWARF-2 unit test
|
|
||||||
+
|
|
||||||
+# This test can only be run on i386/x86_64 targets which support DWARF-2.
|
|
||||||
+# For now pick a sampling of likely targets.
|
|
||||||
+if {(![istarget *-*-linux*]
|
|
||||||
+ && ![istarget *-*-gnu*]
|
|
||||||
+ && ![istarget *-*-elf*]
|
|
||||||
+ && ![istarget *-*-openbsd*])
|
|
||||||
+ || (![istarget "i?86-*-*"] && ![istarget "x86_64-*-*"])} {
|
|
||||||
+ return 0
|
|
||||||
+}
|
|
||||||
+
|
|
||||||
+set testfile "dw2-loclist-prelinked"
|
|
||||||
+set srcfuncfile ${testfile}-func.S
|
|
||||||
+set binsharedfuncfile [standard_output_file ${testfile}.so]
|
|
||||||
+set srcmainfile ${testfile}-main.c
|
|
||||||
+set binfile [standard_output_file ${testfile}]
|
|
||||||
+
|
|
||||||
+remote_exec build "rm -f ${binfile}"
|
|
||||||
+
|
|
||||||
+# get the value of gcc_compiled
|
|
||||||
+if [get_compiler_info ${binfile}] {
|
|
||||||
+ return -1
|
|
||||||
+}
|
|
||||||
+
|
|
||||||
+# This test can only be run on gcc as we use additional_flags=FIXME
|
|
||||||
+if {$gcc_compiled == 0} {
|
|
||||||
+ return 0
|
|
||||||
+}
|
|
||||||
+
|
|
||||||
+if { [gdb_compile_shlib "${srcdir}/${subdir}/${srcfuncfile}" "${binsharedfuncfile}" {debug additional_flags=-m32}] != "" } {
|
|
||||||
+ untested "Couldn't compile test library"
|
|
||||||
+ return -1
|
|
||||||
+}
|
|
||||||
+
|
|
||||||
+# The new separate debug info file will be stored in the .debug subdirectory.
|
|
||||||
+
|
|
||||||
+if [gdb_gnu_strip_debug ${binsharedfuncfile}] {
|
|
||||||
+ # check that you have a recent version of strip and objcopy installed
|
|
||||||
+ unsupported "cannot produce separate debug info files"
|
|
||||||
+ return -1
|
|
||||||
+}
|
|
||||||
+
|
|
||||||
+if {[catch "system \"/usr/sbin/prelink -qNR --no-exec-shield ${binsharedfuncfile}\""] != 0} {
|
|
||||||
+ # Maybe we don't have prelink.
|
|
||||||
+ return -1
|
|
||||||
+}
|
|
||||||
+
|
|
||||||
+if { [gdb_compile "${srcdir}/${subdir}/${srcmainfile}" \
|
|
||||||
+ "${binfile}" executable [list debug additional_flags=-m32 shlib=${binsharedfuncfile}]] != "" } {
|
|
||||||
+ return -1
|
|
||||||
+}
|
|
||||||
+
|
|
||||||
+gdb_exit
|
|
||||||
+gdb_start
|
|
||||||
+gdb_reinitialize_dir $srcdir/$subdir
|
|
||||||
+gdb_load ${binfile}
|
|
||||||
+
|
|
||||||
+gdb_run_cmd
|
|
||||||
+
|
|
||||||
+gdb_test "" "Program received signal SIGABRT, Aborted..*" "Enter abort()"
|
|
||||||
+
|
|
||||||
+# Incorrect:
|
|
||||||
+# #0 0x00110430 in __kernel_vsyscall ()
|
|
||||||
+# No symbol table info available.
|
|
||||||
+# #1 0x003d44c0 in raise () from /lib/libc.so.6
|
|
||||||
+# No symbol table info available.
|
|
||||||
+# #2 0x003d5e88 in abort () from /lib/libc.so.6
|
|
||||||
+# No symbol table info available.
|
|
||||||
+# #3 0x44f10437 in func () at dw2-loclist-prelinked.c:8
|
|
||||||
+# i = Could not find the frame base for "func".
|
|
||||||
+
|
|
||||||
+# Correct:
|
|
||||||
+# #0 0x00110430 in __kernel_vsyscall ()
|
|
||||||
+# No symbol table info available.
|
|
||||||
+# #1 0x003d44c0 in raise () from /lib/libc.so.6
|
|
||||||
+# No symbol table info available.
|
|
||||||
+# #2 0x003d5e88 in abort () from /lib/libc.so.6
|
|
||||||
+# No symbol table info available.
|
|
||||||
+# #3 0x4ae36437 in func () at dw2-loclist-prelinked.c:8
|
|
||||||
+# i = 3827288
|
|
||||||
+# #4 0x0804851a in main () at ../../../gdb/testsuite/gdb.dwarf2/dw2-loclist-prelinked-main.c:24
|
|
||||||
+# No locals.
|
|
||||||
+
|
|
||||||
+# `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()"
|
|
||||||
|
|
|
@ -1,11 +1,3 @@
|
||||||
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-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 .
|
|
||||||
|
|
||||||
We may abort the process of detaching threads with multiple SIGINTs - which are
|
We may abort the process of detaching threads with multiple SIGINTs - which are
|
||||||
being sent during a testcase terminating its child GDB.
|
being sent during a testcase terminating its child GDB.
|
||||||
|
|
||||||
|
@ -13,10 +5,11 @@ 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
|
should have been detached with SIGSTOP (as they are accidentally left running
|
||||||
on the debugger termination).
|
on the debugger termination).
|
||||||
|
|
||||||
diff --git a/gdb/defs.h b/gdb/defs.h
|
Index: gdb-7.12.50.20170207/gdb/defs.h
|
||||||
--- a/gdb/defs.h
|
===================================================================
|
||||||
+++ b/gdb/defs.h
|
--- gdb-7.12.50.20170207.orig/gdb/defs.h 2017-02-26 21:11:35.654350580 +0100
|
||||||
@@ -177,6 +177,10 @@ extern void default_quit_handler (void);
|
+++ gdb-7.12.50.20170207/gdb/defs.h 2017-02-26 21:11:52.932473129 +0100
|
||||||
|
@@ -169,6 +169,10 @@
|
||||||
/* Flag that function quit should call quit_force. */
|
/* Flag that function quit should call quit_force. */
|
||||||
extern volatile int sync_quit_force_run;
|
extern volatile int sync_quit_force_run;
|
||||||
|
|
||||||
|
@ -27,27 +20,29 @@ diff --git a/gdb/defs.h b/gdb/defs.h
|
||||||
extern void quit (void);
|
extern void quit (void);
|
||||||
|
|
||||||
/* Helper for the QUIT macro. */
|
/* Helper for the QUIT macro. */
|
||||||
diff --git a/gdb/extension.c b/gdb/extension.c
|
Index: gdb-7.12.50.20170207/gdb/extension.c
|
||||||
--- a/gdb/extension.c
|
===================================================================
|
||||||
+++ b/gdb/extension.c
|
--- gdb-7.12.50.20170207.orig/gdb/extension.c 2017-02-26 21:11:35.655350587 +0100
|
||||||
@@ -769,6 +769,11 @@ check_quit_flag (void)
|
+++ gdb-7.12.50.20170207/gdb/extension.c 2017-02-26 21:11:52.933473136 +0100
|
||||||
{
|
@@ -830,6 +830,11 @@
|
||||||
int result = 0;
|
int i, result = 0;
|
||||||
|
const struct extension_language_defn *extlang;
|
||||||
|
|
||||||
+#ifdef NEED_DETACH_SIGSTOP
|
+#ifdef NEED_DETACH_SIGSTOP
|
||||||
+ if (quit_flag_cleanup)
|
+ if (quit_flag_cleanup)
|
||||||
+ return 0;
|
+ return 0;
|
||||||
+#endif
|
+#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: gdb-7.12.50.20170207/gdb/top.c
|
||||||
--- a/gdb/top.c
|
===================================================================
|
||||||
+++ b/gdb/top.c
|
--- gdb-7.12.50.20170207.orig/gdb/top.c 2017-02-26 21:11:35.655350587 +0100
|
||||||
@@ -1770,7 +1770,13 @@ quit_force (int *exit_arg, int from_tty)
|
+++ gdb-7.12.50.20170207/gdb/top.c 2017-02-26 21:11:52.933473136 +0100
|
||||||
else if (return_child_result)
|
@@ -1619,7 +1619,13 @@
|
||||||
exit_code = return_child_result_value;
|
qt.args = NULL;
|
||||||
|
qt.from_tty = from_tty;
|
||||||
|
|
||||||
+#ifndef NEED_DETACH_SIGSTOP
|
+#ifndef NEED_DETACH_SIGSTOP
|
||||||
/* We want to handle any quit errors and exit regardless. */
|
/* We want to handle any quit errors and exit regardless. */
|
||||||
|
@ -58,13 +53,14 @@ diff --git a/gdb/top.c b/gdb/top.c
|
||||||
+#endif
|
+#endif
|
||||||
|
|
||||||
/* Get out of tfind mode, and kill or detach all inferiors. */
|
/* Get out of tfind mode, and kill or detach all inferiors. */
|
||||||
try
|
TRY
|
||||||
diff --git a/gdb/utils.c b/gdb/utils.c
|
Index: gdb-7.12.50.20170207/gdb/utils.c
|
||||||
--- a/gdb/utils.c
|
===================================================================
|
||||||
+++ b/gdb/utils.c
|
--- gdb-7.12.50.20170207.orig/gdb/utils.c 2017-02-26 21:11:35.657350601 +0100
|
||||||
@@ -103,6 +103,13 @@ static std::chrono::steady_clock::duration prompt_for_continue_wait_time;
|
+++ gdb-7.12.50.20170207/gdb/utils.c 2017-02-26 21:11:52.934473143 +0100
|
||||||
|
@@ -106,6 +106,13 @@
|
||||||
|
|
||||||
static bool debug_timestamp = false;
|
int job_control;
|
||||||
|
|
||||||
+#ifdef NEED_DETACH_SIGSTOP
|
+#ifdef NEED_DETACH_SIGSTOP
|
||||||
+/* Nonzero means we are already processing the quitting cleanups and we should
|
+/* Nonzero means we are already processing the quitting cleanups and we should
|
||||||
|
@ -73,6 +69,6 @@ diff --git a/gdb/utils.c b/gdb/utils.c
|
||||||
+int quit_flag_cleanup;
|
+int quit_flag_cleanup;
|
||||||
+#endif
|
+#endif
|
||||||
+
|
+
|
||||||
/* True means that strings with character values >0x7F should be printed
|
/* Nonzero means that strings with character values >0x7F should be printed
|
||||||
as octal escapes. False means just print the value (e.g. it's an
|
as octal escapes. Zero means just print the value (e.g. it's an
|
||||||
international character, and the terminal or window can cope.) */
|
international character, and the terminal or window can cope.) */
|
||||||
|
|
|
@ -0,0 +1,12 @@
|
||||||
|
Index: gdb-7.4.50.20111218/gdb/sparc-tdep.c
|
||||||
|
===================================================================
|
||||||
|
--- gdb-7.4.50.20111218.orig/gdb/sparc-tdep.c 2011-09-28 19:59:42.000000000 +0200
|
||||||
|
+++ gdb-7.4.50.20111218/gdb/sparc-tdep.c 2011-12-19 01:25:29.294046199 +0100
|
||||||
|
@@ -1316,6 +1316,7 @@ sparc32_store_return_value (struct type
|
||||||
|
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)
|
|
@ -0,0 +1,82 @@
|
||||||
|
For:
|
||||||
|
http://sourceware.org/ml/gdb-patches/2008-04/msg00379.html
|
||||||
|
http://sourceware.org/ml/gdb-cvs/2008-04/msg00104.html
|
||||||
|
|
||||||
|
Index: gdb-7.10.90.20160211/gdb/testsuite/gdb.base/watchpoint-cond.exp
|
||||||
|
===================================================================
|
||||||
|
--- /dev/null 1970-01-01 00:00:00.000000000 +0000
|
||||||
|
+++ gdb-7.10.90.20160211/gdb/testsuite/gdb.base/watchpoint-cond.exp 2016-02-15 23:33:49.519099759 +0100
|
||||||
|
@@ -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.*"
|
||||||
|
Index: gdb-7.10.90.20160211/gdb/testsuite/gdb.base/watchpoint-cond.c
|
||||||
|
===================================================================
|
||||||
|
--- /dev/null 1970-01-01 00:00:00.000000000 +0000
|
||||||
|
+++ gdb-7.10.90.20160211/gdb/testsuite/gdb.base/watchpoint-cond.c 2016-02-15 23:32:51.974691188 +0100
|
||||||
|
@@ -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;
|
||||||
|
+}
|
|
@ -0,0 +1,51 @@
|
||||||
|
Index: gdb-7.9.90.20150709/gdb/gdb_bfd.c
|
||||||
|
===================================================================
|
||||||
|
--- gdb-7.9.90.20150709.orig/gdb/gdb_bfd.c 2015-07-09 18:23:59.344017882 +0200
|
||||||
|
+++ gdb-7.9.90.20150709/gdb/gdb_bfd.c 2015-07-09 18:24:06.986083071 +0200
|
||||||
|
@@ -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"
|
||||||
|
@@ -397,6 +399,7 @@ free_one_bfd_section (bfd *abfd, asectio
|
||||||
|
|
||||||
|
if (sect != NULL && sect->data != NULL)
|
||||||
|
{
|
||||||
|
+#ifndef __sparc__
|
||||||
|
#ifdef HAVE_MMAP
|
||||||
|
if (sect->map_addr != NULL)
|
||||||
|
{
|
||||||
|
@@ -407,6 +410,7 @@ free_one_bfd_section (bfd *abfd, asectio
|
||||||
|
}
|
||||||
|
else
|
||||||
|
#endif
|
||||||
|
+#endif
|
||||||
|
xfree (sect->data);
|
||||||
|
}
|
||||||
|
}
|
||||||
|
@@ -558,6 +562,7 @@ gdb_bfd_map_section (asection *sectp, bf
|
||||||
|
if (descriptor->data != NULL)
|
||||||
|
goto done;
|
||||||
|
|
||||||
|
+#ifndef __sparc__
|
||||||
|
#ifdef HAVE_MMAP
|
||||||
|
if (!bfd_is_section_compressed (abfd, sectp))
|
||||||
|
{
|
||||||
|
@@ -592,6 +597,7 @@ gdb_bfd_map_section (asection *sectp, bf
|
||||||
|
}
|
||||||
|
}
|
||||||
|
#endif /* HAVE_MMAP */
|
||||||
|
+#endif
|
||||||
|
|
||||||
|
/* Handle compressed sections, or ordinary uncompressed sections in
|
||||||
|
the no-mmap case. */
|
|
@ -0,0 +1,69 @@
|
||||||
|
http://sourceware.org/ml/gdb-patches/2017-01/msg00110.html
|
||||||
|
Subject: [patch] contrib/gdb-add-index.sh: chmod u+w
|
||||||
|
|
||||||
|
|
||||||
|
--AhhlLboLdkugWU4S
|
||||||
|
Content-Type: text/plain; charset=us-ascii
|
||||||
|
Content-Disposition: inline
|
||||||
|
|
||||||
|
Hi,
|
||||||
|
|
||||||
|
in Fedora 24 it still worked, in Fedora 25 it does not - *-debuginfo.rpm
|
||||||
|
no longer have the .gdb_index accelerating section now.
|
||||||
|
|
||||||
|
It happens because:
|
||||||
|
objcopy: unable to copy file 'foo.debug'; reason: Permission denied
|
||||||
|
|
||||||
|
*.debug files in Fedora were always 444 but the time gdb-add-index is run is
|
||||||
|
still before the *.debug split and in Fedora 24 the files were -rwxr-xr-x
|
||||||
|
that time while in Fedora 25 they are apparently no longer w.
|
||||||
|
|
||||||
|
OK for check-in?
|
||||||
|
|
||||||
|
|
||||||
|
Jan
|
||||||
|
|
||||||
|
--AhhlLboLdkugWU4S
|
||||||
|
Content-Type: text/plain; charset=us-ascii
|
||||||
|
Content-Disposition: inline; filename=1
|
||||||
|
|
||||||
|
gdb/ChangeLog
|
||||||
|
2017-01-06 Jan Kratochvil <jan.kratochvil@redhat.com>
|
||||||
|
|
||||||
|
* contrib/gdb-add-index.sh: Use chmod u+w for $file.
|
||||||
|
|
||||||
|
diff --git a/gdb/contrib/gdb-add-index.sh b/gdb/contrib/gdb-add-index.sh
|
||||||
|
index 0cd4ce3..5a190a0 100755
|
||||||
|
--- a/gdb/contrib/gdb-add-index.sh
|
||||||
|
+++ b/gdb/contrib/gdb-add-index.sh
|
||||||
|
@@ -38,10 +38,11 @@ fi
|
||||||
|
dir="${file%/*}"
|
||||||
|
test "$dir" = "$file" && dir="."
|
||||||
|
index="${file}.gdb-index"
|
||||||
|
+mode="${file}.mode"
|
||||||
|
|
||||||
|
-rm -f $index
|
||||||
|
+rm -f $index $mode
|
||||||
|
# Ensure intermediate index file is removed when we exit.
|
||||||
|
-trap "rm -f $index" 0
|
||||||
|
+trap "rm -f $index $mode" 0
|
||||||
|
|
||||||
|
$GDB --batch -nx -iex 'set auto-load no' \
|
||||||
|
-ex "file $file" -ex "save gdb-index $dir" || {
|
||||||
|
@@ -58,8 +59,13 @@ $GDB --batch -nx -iex 'set auto-load no' \
|
||||||
|
status=0
|
||||||
|
|
||||||
|
if test -f "$index"; then
|
||||||
|
+ touch "$mode"
|
||||||
|
+ chmod --reference="$file" "$mode"
|
||||||
|
+ # objcopy: unable to copy file 'foo.debug'; reason: Permission denied
|
||||||
|
+ chmod u+w "$file"
|
||||||
|
$OBJCOPY --add-section .gdb_index="$index" \
|
||||||
|
--set-section-flags .gdb_index=readonly "$file" "$file"
|
||||||
|
+ chmod --reference="$mode" "$file"
|
||||||
|
status=$?
|
||||||
|
else
|
||||||
|
echo "$myname: No index was created for $file" 1>&2
|
||||||
|
|
||||||
|
--AhhlLboLdkugWU4S--
|
||||||
|
|
|
@ -1,18 +1,8 @@
|
||||||
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-archer-next-over-throw-cxx-exec.patch
|
|
||||||
|
|
||||||
;; Fix follow-exec for C++ programs (bugreported by Martin Stransky).
|
|
||||||
;;=fedoratest
|
|
||||||
|
|
||||||
Archer-upstreamed:
|
Archer-upstreamed:
|
||||||
http://sourceware.org/ml/archer/2010-q2/msg00031.html
|
http://sourceware.org/ml/archer/2010-q2/msg00031.html
|
||||||
|
|
||||||
diff --git a/gdb/testsuite/gdb.cp/cxxexec.cc b/gdb/testsuite/gdb.cp/cxxexec.cc
|
--- ./gdb/testsuite/gdb.cp/cxxexec.cc 1970-01-01 01:00:00.000000000 +0100
|
||||||
new file mode 100644
|
+++ ./gdb/testsuite/gdb.cp/cxxexec.cc 2010-05-29 01:18:56.000000000 +0200
|
||||||
--- /dev/null
|
|
||||||
+++ b/gdb/testsuite/gdb.cp/cxxexec.cc
|
|
||||||
@@ -0,0 +1,25 @@
|
@@ -0,0 +1,25 @@
|
||||||
+/* This test script is part of GDB, the GNU debugger.
|
+/* This test script is part of GDB, the GNU debugger.
|
||||||
+
|
+
|
||||||
|
@ -39,11 +29,9 @@ new file mode 100644
|
||||||
+ execlp ("true", "true", NULL);
|
+ execlp ("true", "true", NULL);
|
||||||
+ return 1;
|
+ return 1;
|
||||||
+}
|
+}
|
||||||
diff --git a/gdb/testsuite/gdb.cp/cxxexec.exp b/gdb/testsuite/gdb.cp/cxxexec.exp
|
--- ./gdb/testsuite/gdb.cp/cxxexec.exp 1970-01-01 01:00:00.000000000 +0100
|
||||||
new file mode 100644
|
+++ ./gdb/testsuite/gdb.cp/cxxexec.exp 2010-05-29 01:29:25.000000000 +0200
|
||||||
--- /dev/null
|
@@ -0,0 +1,51 @@
|
||||||
+++ b/gdb/testsuite/gdb.cp/cxxexec.exp
|
|
||||||
@@ -0,0 +1,42 @@
|
|
||||||
+# Copyright 2010 Free Software Foundation, Inc.
|
+# Copyright 2010 Free Software Foundation, Inc.
|
||||||
+
|
+
|
||||||
+# This program is free software; you can redistribute it and/or modify
|
+# This program is free software; you can redistribute it and/or modify
|
||||||
|
@ -83,6 +71,15 @@ new file mode 100644
|
||||||
+ }
|
+ }
|
||||||
+}
|
+}
|
||||||
+
|
+
|
||||||
+# Run to end. The buggy GDB failed instead with:
|
+set test continue
|
||||||
+# Cannot access memory at address ADDR.
|
+gdb_test_multiple $test $test {
|
||||||
+gdb_continue_to_end "" "continue" 1
|
+ -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"
|
||||||
|
|
|
@ -1,19 +1,12 @@
|
||||||
From FEDORA_PATCHES Mon Sep 17 00:00:00 2001
|
Index: gdb-7.99.90.20170420/gdb/breakpoint.c
|
||||||
From: Fedora GDB patches <invalid@email.com>
|
===================================================================
|
||||||
Date: Fri, 27 Oct 2017 21:07:50 +0200
|
--- gdb-7.99.90.20170420.orig/gdb/breakpoint.c 2017-04-20 23:04:39.627960523 +0200
|
||||||
Subject: gdb-archer-pie-addons-keep-disabled.patch
|
+++ gdb-7.99.90.20170420/gdb/breakpoint.c 2017-04-20 23:07:29.854919725 +0200
|
||||||
|
@@ -16086,6 +16086,50 @@
|
||||||
;;=push+jan: Breakpoints disabling matching should not be based on address.
|
static struct cmd_list_element *enablebreaklist = NULL;
|
||||||
|
|
||||||
diff --git a/gdb/breakpoint.c b/gdb/breakpoint.c
|
|
||||||
--- a/gdb/breakpoint.c
|
|
||||||
+++ b/gdb/breakpoint.c
|
|
||||||
@@ -15431,6 +15431,50 @@ static struct cmd_list_element *enablebreaklist = NULL;
|
|
||||||
|
|
||||||
cmd_list_element *commands_cmd_element = nullptr;
|
void
|
||||||
|
+breakpoints_relocate (struct objfile *objfile, struct section_offsets *delta)
|
||||||
+void
|
|
||||||
+breakpoints_relocate (struct objfile *objfile, section_offsets &delta)
|
|
||||||
+{
|
+{
|
||||||
+ struct bp_location *bl, **blp_tmp;
|
+ struct bp_location *bl, **blp_tmp;
|
||||||
+ int changed = 0;
|
+ int changed = 0;
|
||||||
|
@ -32,7 +25,7 @@ diff --git a/gdb/breakpoint.c b/gdb/breakpoint.c
|
||||||
+ CORE_ADDR relocated_address;
|
+ CORE_ADDR relocated_address;
|
||||||
+ CORE_ADDR delta_offset;
|
+ 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)
|
+ if (delta_offset == 0)
|
||||||
+ continue;
|
+ continue;
|
||||||
+ relocated_address = bl->address + delta_offset;
|
+ relocated_address = bl->address + delta_offset;
|
||||||
|
@ -52,30 +45,31 @@ diff --git a/gdb/breakpoint.c b/gdb/breakpoint.c
|
||||||
+ }
|
+ }
|
||||||
+
|
+
|
||||||
+ if (changed)
|
+ if (changed)
|
||||||
+ std::sort (bp_locations, bp_locations + bp_locations_count,
|
+ qsort (bp_locations, bp_locations_count, sizeof (*bp_locations),
|
||||||
+ bp_location_is_less_than);
|
+ bp_locations_compare);
|
||||||
+}
|
+}
|
||||||
+
|
+
|
||||||
void _initialize_breakpoint ();
|
+void
|
||||||
void
|
_initialize_breakpoint (void)
|
||||||
_initialize_breakpoint ()
|
{
|
||||||
diff --git a/gdb/breakpoint.h b/gdb/breakpoint.h
|
struct cmd_list_element *c;
|
||||||
--- a/gdb/breakpoint.h
|
Index: gdb-7.99.90.20170420/gdb/breakpoint.h
|
||||||
+++ b/gdb/breakpoint.h
|
===================================================================
|
||||||
@@ -1691,6 +1691,9 @@ extern const char *ep_parse_optional_if_clause (const char **arg);
|
--- gdb-7.99.90.20170420.orig/gdb/breakpoint.h 2017-04-20 23:04:39.627960523 +0200
|
||||||
|
+++ gdb-7.99.90.20170420/gdb/breakpoint.h 2017-04-20 23:04:48.331009563 +0200
|
||||||
|
@@ -1646,4 +1646,7 @@
|
||||||
UIOUT iff debugging multiple threads. */
|
UIOUT iff debugging multiple threads. */
|
||||||
extern void maybe_print_thread_hit_breakpoint (struct ui_out *uiout);
|
extern void maybe_print_thread_hit_breakpoint (struct ui_out *uiout);
|
||||||
|
|
||||||
+extern void breakpoints_relocate (struct objfile *objfile,
|
+extern void breakpoints_relocate (struct objfile *objfile,
|
||||||
+ section_offsets &delta);
|
+ struct section_offsets *delta);
|
||||||
+
|
+
|
||||||
/* Print the specified breakpoint. */
|
#endif /* !defined (BREAKPOINT_H) */
|
||||||
extern void print_breakpoint (breakpoint *bp);
|
Index: gdb-7.99.90.20170420/gdb/objfiles.c
|
||||||
|
===================================================================
|
||||||
diff --git a/gdb/objfiles.c b/gdb/objfiles.c
|
--- gdb-7.99.90.20170420.orig/gdb/objfiles.c 2017-04-20 23:04:39.627960523 +0200
|
||||||
--- a/gdb/objfiles.c
|
+++ gdb-7.99.90.20170420/gdb/objfiles.c 2017-04-20 23:04:48.332009569 +0200
|
||||||
+++ b/gdb/objfiles.c
|
@@ -909,6 +909,11 @@
|
||||||
@@ -742,6 +742,11 @@ objfile_relocate1 (struct objfile *objfile,
|
|
||||||
obj_section_addr (s));
|
obj_section_addr (s));
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
|
@ -1,14 +1,8 @@
|
||||||
From FEDORA_PATCHES Mon Sep 17 00:00:00 2001
|
Index: gdb-7.9.50.20150520/gdb/gdbtypes.h
|
||||||
From: Fedora GDB patches <invalid@email.com>
|
===================================================================
|
||||||
Date: Fri, 27 Oct 2017 21:07:50 +0200
|
--- gdb-7.9.50.20150520.orig/gdb/gdbtypes.h 2015-05-31 16:55:29.723475485 +0200
|
||||||
Subject: gdb-archer-pie-addons.patch
|
+++ gdb-7.9.50.20150520/gdb/gdbtypes.h 2015-05-31 16:55:49.716601669 +0200
|
||||||
|
@@ -462,6 +462,7 @@ enum field_loc_kind
|
||||||
;;=push+jan: May get obsoleted by Tom's unrelocated objfiles patch.
|
|
||||||
|
|
||||||
diff --git a/gdb/gdbtypes.h b/gdb/gdbtypes.h
|
|
||||||
--- a/gdb/gdbtypes.h
|
|
||||||
+++ b/gdb/gdbtypes.h
|
|
||||||
@@ -649,6 +649,7 @@ enum field_loc_kind
|
|
||||||
{
|
{
|
||||||
FIELD_LOC_KIND_BITPOS, /**< bitpos */
|
FIELD_LOC_KIND_BITPOS, /**< bitpos */
|
||||||
FIELD_LOC_KIND_ENUMVAL, /**< enumval */
|
FIELD_LOC_KIND_ENUMVAL, /**< enumval */
|
||||||
|
@ -16,7 +10,7 @@ diff --git a/gdb/gdbtypes.h b/gdb/gdbtypes.h
|
||||||
FIELD_LOC_KIND_PHYSADDR, /**< physaddr */
|
FIELD_LOC_KIND_PHYSADDR, /**< physaddr */
|
||||||
FIELD_LOC_KIND_PHYSNAME, /**< physname */
|
FIELD_LOC_KIND_PHYSNAME, /**< physname */
|
||||||
FIELD_LOC_KIND_DWARF_BLOCK /**< dwarf_block */
|
FIELD_LOC_KIND_DWARF_BLOCK /**< dwarf_block */
|
||||||
@@ -699,6 +700,7 @@ union field_location
|
@@ -513,6 +514,7 @@ union field_location
|
||||||
field. Otherwise, physname is the mangled label of the
|
field. Otherwise, physname is the mangled label of the
|
||||||
static field. */
|
static field. */
|
||||||
|
|
||||||
|
@ -24,16 +18,41 @@ diff --git a/gdb/gdbtypes.h b/gdb/gdbtypes.h
|
||||||
CORE_ADDR physaddr;
|
CORE_ADDR physaddr;
|
||||||
const char *physname;
|
const char *physname;
|
||||||
|
|
||||||
diff --git a/gdb/value.c b/gdb/value.c
|
@@ -1386,6 +1388,7 @@ extern void set_type_vptr_basetype (stru
|
||||||
--- a/gdb/value.c
|
#define FIELD_ENUMVAL_LVAL(thisfld) ((thisfld).loc.enumval)
|
||||||
+++ b/gdb/value.c
|
#define FIELD_ENUMVAL(thisfld) (FIELD_ENUMVAL_LVAL (thisfld) + 0)
|
||||||
@@ -2850,7 +2850,8 @@ value_static_field (struct type *type, int fieldno)
|
#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) \
|
||||||
|
@@ -1397,6 +1400,7 @@ extern void set_type_vptr_basetype (stru
|
||||||
|
#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))
|
||||||
|
@@ -1413,6 +1417,7 @@ extern void set_type_vptr_basetype (stru
|
||||||
|
#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))
|
||||||
|
Index: gdb-7.9.50.20150520/gdb/value.c
|
||||||
|
===================================================================
|
||||||
|
--- gdb-7.9.50.20150520.orig/gdb/value.c 2015-05-31 16:55:29.725475497 +0200
|
||||||
|
+++ gdb-7.9.50.20150520/gdb/value.c 2015-05-31 16:55:30.821482415 +0200
|
||||||
|
@@ -2951,7 +2951,8 @@ value_static_field (struct type *type, i
|
||||||
{
|
{
|
||||||
case FIELD_LOC_KIND_PHYSADDR:
|
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_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;
|
break;
|
||||||
case FIELD_LOC_KIND_PHYSNAME:
|
case FIELD_LOC_KIND_PHYSNAME:
|
||||||
{
|
{
|
||||||
|
|
|
@ -1,14 +1,8 @@
|
||||||
From FEDORA_PATCHES Mon Sep 17 00:00:00 2001
|
Index: gdb-7.12.50.20170207/gdb/testsuite/gdb.ada/packed_array.exp
|
||||||
From: Fedora GDB patches <invalid@email.com>
|
===================================================================
|
||||||
Date: Fri, 27 Oct 2017 21:07:50 +0200
|
--- gdb-7.12.50.20170207.orig/gdb/testsuite/gdb.ada/packed_array.exp 2017-02-26 19:15:28.552824751 +0100
|
||||||
Subject: gdb-archer-vla-tests.patch
|
+++ gdb-7.12.50.20170207/gdb/testsuite/gdb.ada/packed_array.exp 2017-02-26 19:15:36.597882316 +0100
|
||||||
|
@@ -56,5 +56,11 @@
|
||||||
;;=fedoratest
|
|
||||||
|
|
||||||
diff --git a/gdb/testsuite/gdb.ada/packed_array.exp b/gdb/testsuite/gdb.ada/packed_array.exp
|
|
||||||
--- 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" {
|
|
||||||
# are. Observed with (FSF GNU Ada 4.5.3 20110124).
|
# are. Observed with (FSF GNU Ada 4.5.3 20110124).
|
||||||
xfail $test
|
xfail $test
|
||||||
}
|
}
|
||||||
|
@ -20,10 +14,10 @@ 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
|
Index: gdb-7.12.50.20170207/gdb/testsuite/gdb.arch/x86_64-vla-pointer-foo.S
|
||||||
new file mode 100644
|
===================================================================
|
||||||
--- /dev/null
|
--- /dev/null 1970-01-01 00:00:00.000000000 +0000
|
||||||
+++ b/gdb/testsuite/gdb.arch/x86_64-vla-pointer-foo.S
|
+++ gdb-7.12.50.20170207/gdb/testsuite/gdb.arch/x86_64-vla-pointer-foo.S 2017-02-26 19:15:36.598882323 +0100
|
||||||
@@ -0,0 +1,358 @@
|
@@ -0,0 +1,358 @@
|
||||||
+ .file "x86_64-vla-pointer.c"
|
+ .file "x86_64-vla-pointer.c"
|
||||||
+ .text
|
+ .text
|
||||||
|
@ -383,10 +377,10 @@ new file mode 100644
|
||||||
+ .string "array"
|
+ .string "array"
|
||||||
+ .ident "GCC: (GNU) 6.2.1 20160916 (Red Hat 6.2.1-2)"
|
+ .ident "GCC: (GNU) 6.2.1 20160916 (Red Hat 6.2.1-2)"
|
||||||
+ .section .note.GNU-stack,"",@progbits
|
+ .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
|
Index: gdb-7.12.50.20170207/gdb/testsuite/gdb.arch/x86_64-vla-pointer.c
|
||||||
new file mode 100644
|
===================================================================
|
||||||
--- /dev/null
|
--- /dev/null 1970-01-01 00:00:00.000000000 +0000
|
||||||
+++ b/gdb/testsuite/gdb.arch/x86_64-vla-pointer.c
|
+++ gdb-7.12.50.20170207/gdb/testsuite/gdb.arch/x86_64-vla-pointer.c 2017-02-26 19:15:36.598882323 +0100
|
||||||
@@ -0,0 +1,45 @@
|
@@ -0,0 +1,45 @@
|
||||||
+/* This testcase is part of GDB, the GNU debugger.
|
+/* This testcase is part of GDB, the GNU debugger.
|
||||||
+
|
+
|
||||||
|
@ -433,10 +427,10 @@ new file mode 100644
|
||||||
+}
|
+}
|
||||||
+
|
+
|
||||||
+#endif
|
+#endif
|
||||||
diff --git a/gdb/testsuite/gdb.arch/x86_64-vla-pointer.exp b/gdb/testsuite/gdb.arch/x86_64-vla-pointer.exp
|
Index: gdb-7.12.50.20170207/gdb/testsuite/gdb.arch/x86_64-vla-pointer.exp
|
||||||
new file mode 100644
|
===================================================================
|
||||||
--- /dev/null
|
--- /dev/null 1970-01-01 00:00:00.000000000 +0000
|
||||||
+++ b/gdb/testsuite/gdb.arch/x86_64-vla-pointer.exp
|
+++ gdb-7.12.50.20170207/gdb/testsuite/gdb.arch/x86_64-vla-pointer.exp 2017-02-26 19:15:36.598882323 +0100
|
||||||
@@ -0,0 +1,65 @@
|
@@ -0,0 +1,65 @@
|
||||||
+# Copyright 2009 Free Software Foundation, Inc.
|
+# Copyright 2009 Free Software Foundation, Inc.
|
||||||
+
|
+
|
||||||
|
@ -503,10 +497,10 @@ new file mode 100644
|
||||||
+gdb_test "whatis array" "type = array_t" "second: whatis array"
|
+gdb_test "whatis array" "type = array_t" "second: whatis array"
|
||||||
+gdb_test "whatis array_t" "type = char \\\[variable length\\\]" "second: whatis array_t"
|
+gdb_test "whatis array_t" "type = char \\\[variable length\\\]" "second: whatis array_t"
|
||||||
+gdb_test "ptype array" "type = char \\\[78\\\]" "second: ptype array"
|
+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
|
Index: gdb-7.12.50.20170207/gdb/testsuite/gdb.arch/x86_64-vla-typedef-foo.S
|
||||||
new file mode 100644
|
===================================================================
|
||||||
--- /dev/null
|
--- /dev/null 1970-01-01 00:00:00.000000000 +0000
|
||||||
+++ b/gdb/testsuite/gdb.arch/x86_64-vla-typedef-foo.S
|
+++ gdb-7.12.50.20170207/gdb/testsuite/gdb.arch/x86_64-vla-typedef-foo.S 2017-02-26 19:15:36.598882323 +0100
|
||||||
@@ -0,0 +1,455 @@
|
@@ -0,0 +1,455 @@
|
||||||
+ .file "x86_64-vla-typedef.c"
|
+ .file "x86_64-vla-typedef.c"
|
||||||
+ .section .debug_abbrev,"",@progbits
|
+ .section .debug_abbrev,"",@progbits
|
||||||
|
@ -963,10 +957,10 @@ new file mode 100644
|
||||||
+ .string "GNU C 4.3.2 20081105 (Red Hat 4.3.2-7)"
|
+ .string "GNU C 4.3.2 20081105 (Red Hat 4.3.2-7)"
|
||||||
+ .ident "GCC: (GNU) 4.3.2 20081105 (Red Hat 4.3.2-7)"
|
+ .ident "GCC: (GNU) 4.3.2 20081105 (Red Hat 4.3.2-7)"
|
||||||
+ .section .note.GNU-stack,"",@progbits
|
+ .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
|
Index: gdb-7.12.50.20170207/gdb/testsuite/gdb.arch/x86_64-vla-typedef.c
|
||||||
new file mode 100644
|
===================================================================
|
||||||
--- /dev/null
|
--- /dev/null 1970-01-01 00:00:00.000000000 +0000
|
||||||
+++ b/gdb/testsuite/gdb.arch/x86_64-vla-typedef.c
|
+++ gdb-7.12.50.20170207/gdb/testsuite/gdb.arch/x86_64-vla-typedef.c 2017-02-26 19:15:36.599882330 +0100
|
||||||
@@ -0,0 +1,45 @@
|
@@ -0,0 +1,45 @@
|
||||||
+/* This testcase is part of GDB, the GNU debugger.
|
+/* This testcase is part of GDB, the GNU debugger.
|
||||||
+
|
+
|
||||||
|
@ -1013,10 +1007,10 @@ new file mode 100644
|
||||||
+}
|
+}
|
||||||
+
|
+
|
||||||
+#endif
|
+#endif
|
||||||
diff --git a/gdb/testsuite/gdb.arch/x86_64-vla-typedef.exp b/gdb/testsuite/gdb.arch/x86_64-vla-typedef.exp
|
Index: gdb-7.12.50.20170207/gdb/testsuite/gdb.arch/x86_64-vla-typedef.exp
|
||||||
new file mode 100644
|
===================================================================
|
||||||
--- /dev/null
|
--- /dev/null 1970-01-01 00:00:00.000000000 +0000
|
||||||
+++ b/gdb/testsuite/gdb.arch/x86_64-vla-typedef.exp
|
+++ gdb-7.12.50.20170207/gdb/testsuite/gdb.arch/x86_64-vla-typedef.exp 2017-02-26 19:15:36.599882330 +0100
|
||||||
@@ -0,0 +1,64 @@
|
@@ -0,0 +1,64 @@
|
||||||
+# Copyright 2009 Free Software Foundation, Inc.
|
+# Copyright 2009 Free Software Foundation, Inc.
|
||||||
+
|
+
|
||||||
|
@ -1082,9 +1076,10 @@ new file mode 100644
|
||||||
+gdb_test "whatis array" "type = array_t" "second: whatis array"
|
+gdb_test "whatis array" "type = array_t" "second: whatis array"
|
||||||
+
|
+
|
||||||
+gdb_test "ptype array" "type = char \\\[78\\\]" "second: ptype array"
|
+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: gdb-7.12.50.20170207/gdb/testsuite/gdb.base/arrayidx.c
|
||||||
--- a/gdb/testsuite/gdb.base/arrayidx.c
|
===================================================================
|
||||||
+++ b/gdb/testsuite/gdb.base/arrayidx.c
|
--- gdb-7.12.50.20170207.orig/gdb/testsuite/gdb.base/arrayidx.c 2017-02-26 19:15:28.555824772 +0100
|
||||||
|
+++ gdb-7.12.50.20170207/gdb/testsuite/gdb.base/arrayidx.c 2017-02-26 19:15:36.599882330 +0100
|
||||||
@@ -17,6 +17,13 @@
|
@@ -17,6 +17,13 @@
|
||||||
|
|
||||||
int array[] = {1, 2, 3, 4};
|
int array[] = {1, 2, 3, 4};
|
||||||
|
@ -1099,10 +1094,11 @@ diff --git a/gdb/testsuite/gdb.base/arrayidx.c b/gdb/testsuite/gdb.base/arrayidx
|
||||||
int
|
int
|
||||||
main (void)
|
main (void)
|
||||||
{
|
{
|
||||||
diff --git a/gdb/testsuite/gdb.base/arrayidx.exp b/gdb/testsuite/gdb.base/arrayidx.exp
|
Index: gdb-7.12.50.20170207/gdb/testsuite/gdb.base/arrayidx.exp
|
||||||
--- a/gdb/testsuite/gdb.base/arrayidx.exp
|
===================================================================
|
||||||
+++ b/gdb/testsuite/gdb.base/arrayidx.exp
|
--- gdb-7.12.50.20170207.orig/gdb/testsuite/gdb.base/arrayidx.exp 2017-02-26 19:15:28.555824772 +0100
|
||||||
@@ -49,4 +49,12 @@ gdb_test "print array" \
|
+++ gdb-7.12.50.20170207/gdb/testsuite/gdb.base/arrayidx.exp 2017-02-26 19:15:36.599882330 +0100
|
||||||
|
@@ -49,4 +49,12 @@
|
||||||
"\\{\\\[0\\\] = 1, \\\[1\\\] = 2, \\\[2\\\] = 3, \\\[3\\\] = 4\\}" \
|
"\\{\\\[0\\\] = 1, \\\[1\\\] = 2, \\\[2\\\] = 3, \\\[3\\\] = 4\\}" \
|
||||||
"print array with array-indexes on"
|
"print array with array-indexes on"
|
||||||
|
|
||||||
|
@ -1116,10 +1112,10 @@ diff --git a/gdb/testsuite/gdb.base/arrayidx.exp b/gdb/testsuite/gdb.base/arrayi
|
||||||
+ unsupported "$test (no GCC)"
|
+ unsupported "$test (no GCC)"
|
||||||
+ }
|
+ }
|
||||||
+}
|
+}
|
||||||
diff --git a/gdb/testsuite/gdb.base/internal-var-field-address.c b/gdb/testsuite/gdb.base/internal-var-field-address.c
|
Index: gdb-7.12.50.20170207/gdb/testsuite/gdb.base/internal-var-field-address.c
|
||||||
new file mode 100644
|
===================================================================
|
||||||
--- /dev/null
|
--- /dev/null 1970-01-01 00:00:00.000000000 +0000
|
||||||
+++ b/gdb/testsuite/gdb.base/internal-var-field-address.c
|
+++ gdb-7.12.50.20170207/gdb/testsuite/gdb.base/internal-var-field-address.c 2017-02-26 19:15:36.599882330 +0100
|
||||||
@@ -0,0 +1,20 @@
|
@@ -0,0 +1,20 @@
|
||||||
+/* This testcase is part of GDB, the GNU debugger.
|
+/* This testcase is part of GDB, the GNU debugger.
|
||||||
+
|
+
|
||||||
|
@ -1141,10 +1137,10 @@ new file mode 100644
|
||||||
+struct {
|
+struct {
|
||||||
+ int field;
|
+ int field;
|
||||||
+} staticstruct = { 1 };
|
+} staticstruct = { 1 };
|
||||||
diff --git a/gdb/testsuite/gdb.base/internal-var-field-address.exp b/gdb/testsuite/gdb.base/internal-var-field-address.exp
|
Index: gdb-7.12.50.20170207/gdb/testsuite/gdb.base/internal-var-field-address.exp
|
||||||
new file mode 100644
|
===================================================================
|
||||||
--- /dev/null
|
--- /dev/null 1970-01-01 00:00:00.000000000 +0000
|
||||||
+++ b/gdb/testsuite/gdb.base/internal-var-field-address.exp
|
+++ gdb-7.12.50.20170207/gdb/testsuite/gdb.base/internal-var-field-address.exp 2017-02-26 19:15:36.600882337 +0100
|
||||||
@@ -0,0 +1,26 @@
|
@@ -0,0 +1,26 @@
|
||||||
+# Copyright 2009 Free Software Foundation, Inc.
|
+# Copyright 2009 Free Software Foundation, Inc.
|
||||||
+
|
+
|
||||||
|
@ -1172,10 +1168,10 @@ new file mode 100644
|
||||||
+
|
+
|
||||||
+gdb_test {set $varstruct = staticstruct}
|
+gdb_test {set $varstruct = staticstruct}
|
||||||
+gdb_test {p $varstruct.field} " = 1"
|
+gdb_test {p $varstruct.field} " = 1"
|
||||||
diff --git a/gdb/testsuite/gdb.base/vla-frame.c b/gdb/testsuite/gdb.base/vla-frame.c
|
Index: gdb-7.12.50.20170207/gdb/testsuite/gdb.base/vla-frame.c
|
||||||
new file mode 100644
|
===================================================================
|
||||||
--- /dev/null
|
--- /dev/null 1970-01-01 00:00:00.000000000 +0000
|
||||||
+++ b/gdb/testsuite/gdb.base/vla-frame.c
|
+++ gdb-7.12.50.20170207/gdb/testsuite/gdb.base/vla-frame.c 2017-02-26 19:15:36.600882337 +0100
|
||||||
@@ -0,0 +1,31 @@
|
@@ -0,0 +1,31 @@
|
||||||
+/* This testcase is part of GDB, the GNU debugger.
|
+/* This testcase is part of GDB, the GNU debugger.
|
||||||
+
|
+
|
||||||
|
@ -1208,10 +1204,10 @@ new file mode 100644
|
||||||
+ f (s);
|
+ f (s);
|
||||||
+ return 0;
|
+ return 0;
|
||||||
+}
|
+}
|
||||||
diff --git a/gdb/testsuite/gdb.base/vla-frame.exp b/gdb/testsuite/gdb.base/vla-frame.exp
|
Index: gdb-7.12.50.20170207/gdb/testsuite/gdb.base/vla-frame.exp
|
||||||
new file mode 100644
|
===================================================================
|
||||||
--- /dev/null
|
--- /dev/null 1970-01-01 00:00:00.000000000 +0000
|
||||||
+++ b/gdb/testsuite/gdb.base/vla-frame.exp
|
+++ gdb-7.12.50.20170207/gdb/testsuite/gdb.base/vla-frame.exp 2017-02-26 19:15:36.600882337 +0100
|
||||||
@@ -0,0 +1,38 @@
|
@@ -0,0 +1,38 @@
|
||||||
+# Copyright 2011 Free Software Foundation, Inc.
|
+# Copyright 2011 Free Software Foundation, Inc.
|
||||||
+#
|
+#
|
||||||
|
@ -1251,10 +1247,10 @@ new file mode 100644
|
||||||
+}
|
+}
|
||||||
+
|
+
|
||||||
+gdb_test "bt full" "\r\n +s = \"X\\\\000\"\r\n.*"
|
+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
|
Index: gdb-7.12.50.20170207/gdb/testsuite/gdb.base/vla-overflow.c
|
||||||
new file mode 100644
|
===================================================================
|
||||||
--- /dev/null
|
--- /dev/null 1970-01-01 00:00:00.000000000 +0000
|
||||||
+++ b/gdb/testsuite/gdb.base/vla-overflow.c
|
+++ gdb-7.12.50.20170207/gdb/testsuite/gdb.base/vla-overflow.c 2017-02-26 19:15:36.600882337 +0100
|
||||||
@@ -0,0 +1,30 @@
|
@@ -0,0 +1,30 @@
|
||||||
+/* This testcase is part of GDB, the GNU debugger.
|
+/* This testcase is part of GDB, the GNU debugger.
|
||||||
+
|
+
|
||||||
|
@ -1286,10 +1282,10 @@ new file mode 100644
|
||||||
+
|
+
|
||||||
+ return 0;
|
+ return 0;
|
||||||
+}
|
+}
|
||||||
diff --git a/gdb/testsuite/gdb.base/vla-overflow.exp b/gdb/testsuite/gdb.base/vla-overflow.exp
|
Index: gdb-7.12.50.20170207/gdb/testsuite/gdb.base/vla-overflow.exp
|
||||||
new file mode 100644
|
===================================================================
|
||||||
--- /dev/null
|
--- /dev/null 1970-01-01 00:00:00.000000000 +0000
|
||||||
+++ b/gdb/testsuite/gdb.base/vla-overflow.exp
|
+++ gdb-7.12.50.20170207/gdb/testsuite/gdb.base/vla-overflow.exp 2017-02-26 19:15:36.600882337 +0100
|
||||||
@@ -0,0 +1,109 @@
|
@@ -0,0 +1,109 @@
|
||||||
+# Copyright 2008 Free Software Foundation, Inc.
|
+# Copyright 2008 Free Software Foundation, Inc.
|
||||||
+
|
+
|
||||||
|
@ -1400,10 +1396,10 @@ new file mode 100644
|
||||||
+gdb_test "bt" "in \[^ \]*abort \\(.* in main \\(.*" "Backtrace after abort()"
|
+gdb_test "bt" "in \[^ \]*abort \\(.* in main \\(.*" "Backtrace after abort()"
|
||||||
+
|
+
|
||||||
+verbose -log "kb_found in bt after abort() = [expr [memory_v_pages_get] * $pagesize / 1024]"
|
+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
|
Index: gdb-7.12.50.20170207/gdb/testsuite/gdb.base/vla.c
|
||||||
new file mode 100644
|
===================================================================
|
||||||
--- /dev/null
|
--- /dev/null 1970-01-01 00:00:00.000000000 +0000
|
||||||
+++ b/gdb/testsuite/gdb.base/vla.c
|
+++ gdb-7.12.50.20170207/gdb/testsuite/gdb.base/vla.c 2017-02-26 19:15:36.600882337 +0100
|
||||||
@@ -0,0 +1,55 @@
|
@@ -0,0 +1,55 @@
|
||||||
+/* This testcase is part of GDB, the GNU debugger.
|
+/* This testcase is part of GDB, the GNU debugger.
|
||||||
+
|
+
|
||||||
|
@ -1460,10 +1456,10 @@ new file mode 100644
|
||||||
+ foo (78);
|
+ foo (78);
|
||||||
+ return 0;
|
+ return 0;
|
||||||
+}
|
+}
|
||||||
diff --git a/gdb/testsuite/gdb.base/vla.exp b/gdb/testsuite/gdb.base/vla.exp
|
Index: gdb-7.12.50.20170207/gdb/testsuite/gdb.base/vla.exp
|
||||||
new file mode 100644
|
===================================================================
|
||||||
--- /dev/null
|
--- /dev/null 1970-01-01 00:00:00.000000000 +0000
|
||||||
+++ b/gdb/testsuite/gdb.base/vla.exp
|
+++ gdb-7.12.50.20170207/gdb/testsuite/gdb.base/vla.exp 2017-02-26 19:15:36.600882337 +0100
|
||||||
@@ -0,0 +1,62 @@
|
@@ -0,0 +1,62 @@
|
||||||
+# Copyright 2008 Free Software Foundation, Inc.
|
+# Copyright 2008 Free Software Foundation, Inc.
|
||||||
+
|
+
|
||||||
|
@ -1527,10 +1523,10 @@ new file mode 100644
|
||||||
+gdb_test "p temp1" " = '1' <repeats 78 times>" "second: print temp1"
|
+gdb_test "p temp1" " = '1' <repeats 78 times>" "second: print temp1"
|
||||||
+gdb_test "p temp2" " = '2' <repeats 78 times>" "second: print temp2"
|
+gdb_test "p temp2" " = '2' <repeats 78 times>" "second: print temp2"
|
||||||
+gdb_test "p temp3" " = '3' <repeats 48 times>" "second: print temp3"
|
+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
|
Index: gdb-7.12.50.20170207/gdb/testsuite/gdb.cp/gdb9593.cc
|
||||||
new file mode 100644
|
===================================================================
|
||||||
--- /dev/null
|
--- /dev/null 1970-01-01 00:00:00.000000000 +0000
|
||||||
+++ b/gdb/testsuite/gdb.cp/gdb9593.cc
|
+++ gdb-7.12.50.20170207/gdb/testsuite/gdb.cp/gdb9593.cc 2017-02-26 19:15:36.601882344 +0100
|
||||||
@@ -0,0 +1,180 @@
|
@@ -0,0 +1,180 @@
|
||||||
+/* This testcase is part of GDB, the GNU debugger.
|
+/* This testcase is part of GDB, the GNU debugger.
|
||||||
+
|
+
|
||||||
|
@ -1712,10 +1708,10 @@ new file mode 100644
|
||||||
+ }
|
+ }
|
||||||
+}
|
+}
|
||||||
+
|
+
|
||||||
diff --git a/gdb/testsuite/gdb.cp/gdb9593.exp b/gdb/testsuite/gdb.cp/gdb9593.exp
|
Index: gdb-7.12.50.20170207/gdb/testsuite/gdb.cp/gdb9593.exp
|
||||||
new file mode 100644
|
===================================================================
|
||||||
--- /dev/null
|
--- /dev/null 1970-01-01 00:00:00.000000000 +0000
|
||||||
+++ b/gdb/testsuite/gdb.cp/gdb9593.exp
|
+++ gdb-7.12.50.20170207/gdb/testsuite/gdb.cp/gdb9593.exp 2017-02-26 19:15:36.601882344 +0100
|
||||||
@@ -0,0 +1,182 @@
|
@@ -0,0 +1,182 @@
|
||||||
+# Copyright 2008, 2009 Free Software Foundation, Inc.
|
+# Copyright 2008, 2009 Free Software Foundation, Inc.
|
||||||
+
|
+
|
||||||
|
@ -1899,10 +1895,10 @@ new file mode 100644
|
||||||
+gdb_test "advance $line" \
|
+gdb_test "advance $line" \
|
||||||
+ ".*catch (...).*" \
|
+ ".*catch (...).*" \
|
||||||
+ "advance-over-throw"
|
+ "advance-over-throw"
|
||||||
diff --git a/gdb/testsuite/gdb.dwarf2/dw2-bound-loclist.S b/gdb/testsuite/gdb.dwarf2/dw2-bound-loclist.S
|
Index: gdb-7.12.50.20170207/gdb/testsuite/gdb.dwarf2/dw2-bound-loclist.S
|
||||||
new file mode 100644
|
===================================================================
|
||||||
--- /dev/null
|
--- /dev/null 1970-01-01 00:00:00.000000000 +0000
|
||||||
+++ b/gdb/testsuite/gdb.dwarf2/dw2-bound-loclist.S
|
+++ gdb-7.12.50.20170207/gdb/testsuite/gdb.dwarf2/dw2-bound-loclist.S 2017-02-26 19:15:36.601882344 +0100
|
||||||
@@ -0,0 +1,246 @@
|
@@ -0,0 +1,246 @@
|
||||||
+/* This testcase is part of GDB, the GNU debugger.
|
+/* This testcase is part of GDB, the GNU debugger.
|
||||||
+
|
+
|
||||||
|
@ -2150,10 +2146,10 @@ new file mode 100644
|
||||||
+ .string "char"
|
+ .string "char"
|
||||||
+.Luint_str:
|
+.Luint_str:
|
||||||
+ .string "unsigned int"
|
+ .string "unsigned int"
|
||||||
diff --git a/gdb/testsuite/gdb.dwarf2/dw2-bound-loclist.exp b/gdb/testsuite/gdb.dwarf2/dw2-bound-loclist.exp
|
Index: gdb-7.12.50.20170207/gdb/testsuite/gdb.dwarf2/dw2-bound-loclist.exp
|
||||||
new file mode 100644
|
===================================================================
|
||||||
--- /dev/null
|
--- /dev/null 1970-01-01 00:00:00.000000000 +0000
|
||||||
+++ b/gdb/testsuite/gdb.dwarf2/dw2-bound-loclist.exp
|
+++ gdb-7.12.50.20170207/gdb/testsuite/gdb.dwarf2/dw2-bound-loclist.exp 2017-02-26 19:15:36.602882352 +0100
|
||||||
@@ -0,0 +1,66 @@
|
@@ -0,0 +1,66 @@
|
||||||
+# Copyright 2010 Free Software Foundation, Inc.
|
+# Copyright 2010 Free Software Foundation, Inc.
|
||||||
+
|
+
|
||||||
|
@ -2221,10 +2217,10 @@ new file mode 100644
|
||||||
+
|
+
|
||||||
+# The register contains unpredictable value - the array size.
|
+# The register contains unpredictable value - the array size.
|
||||||
+gdb_test "ptype reg_string" {type = char \[-?[0-9]+\]}
|
+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
|
Index: gdb-7.12.50.20170207/gdb/testsuite/gdb.dwarf2/dw2-stripped.c
|
||||||
new file mode 100644
|
===================================================================
|
||||||
--- /dev/null
|
--- /dev/null 1970-01-01 00:00:00.000000000 +0000
|
||||||
+++ b/gdb/testsuite/gdb.dwarf2/dw2-stripped.c
|
+++ gdb-7.12.50.20170207/gdb/testsuite/gdb.dwarf2/dw2-stripped.c 2017-02-26 19:15:36.602882352 +0100
|
||||||
@@ -0,0 +1,42 @@
|
@@ -0,0 +1,42 @@
|
||||||
+/* This testcase is part of GDB, the GNU debugger.
|
+/* This testcase is part of GDB, the GNU debugger.
|
||||||
+
|
+
|
||||||
|
@ -2268,10 +2264,10 @@ new file mode 100644
|
||||||
+ func1 (1, 2);
|
+ func1 (1, 2);
|
||||||
+ return 0;
|
+ return 0;
|
||||||
+}
|
+}
|
||||||
diff --git a/gdb/testsuite/gdb.dwarf2/dw2-stripped.exp b/gdb/testsuite/gdb.dwarf2/dw2-stripped.exp
|
Index: gdb-7.12.50.20170207/gdb/testsuite/gdb.dwarf2/dw2-stripped.exp
|
||||||
new file mode 100644
|
===================================================================
|
||||||
--- /dev/null
|
--- /dev/null 1970-01-01 00:00:00.000000000 +0000
|
||||||
+++ b/gdb/testsuite/gdb.dwarf2/dw2-stripped.exp
|
+++ gdb-7.12.50.20170207/gdb/testsuite/gdb.dwarf2/dw2-stripped.exp 2017-02-26 19:15:36.602882352 +0100
|
||||||
@@ -0,0 +1,79 @@
|
@@ -0,0 +1,79 @@
|
||||||
+# Copyright 2006 Free Software Foundation, Inc.
|
+# Copyright 2006 Free Software Foundation, Inc.
|
||||||
+
|
+
|
||||||
|
@ -2352,10 +2348,10 @@ new file mode 100644
|
||||||
+gdb_test "step" \
|
+gdb_test "step" \
|
||||||
+ "func.* \\(.*\\) at .*" \
|
+ "func.* \\(.*\\) at .*" \
|
||||||
+ "step"
|
+ "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
|
Index: gdb-7.12.50.20170207/gdb/testsuite/gdb.dwarf2/dw2-struct-member-data-location.S
|
||||||
new file mode 100644
|
===================================================================
|
||||||
--- /dev/null
|
--- /dev/null 1970-01-01 00:00:00.000000000 +0000
|
||||||
+++ b/gdb/testsuite/gdb.dwarf2/dw2-struct-member-data-location.S
|
+++ gdb-7.12.50.20170207/gdb/testsuite/gdb.dwarf2/dw2-struct-member-data-location.S 2017-02-26 19:15:36.602882352 +0100
|
||||||
@@ -0,0 +1,83 @@
|
@@ -0,0 +1,83 @@
|
||||||
+/* This testcase is part of GDB, the GNU debugger.
|
+/* This testcase is part of GDB, the GNU debugger.
|
||||||
+
|
+
|
||||||
|
@ -2440,10 +2436,10 @@ new file mode 100644
|
||||||
+
|
+
|
||||||
+ .byte 0x0 /* Terminator */
|
+ .byte 0x0 /* Terminator */
|
||||||
+ .byte 0x0 /* Terminator */
|
+ .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
|
Index: gdb-7.12.50.20170207/gdb/testsuite/gdb.dwarf2/dw2-struct-member-data-location.exp
|
||||||
new file mode 100644
|
===================================================================
|
||||||
--- /dev/null
|
--- /dev/null 1970-01-01 00:00:00.000000000 +0000
|
||||||
+++ b/gdb/testsuite/gdb.dwarf2/dw2-struct-member-data-location.exp
|
+++ gdb-7.12.50.20170207/gdb/testsuite/gdb.dwarf2/dw2-struct-member-data-location.exp 2017-02-26 19:15:36.602882352 +0100
|
||||||
@@ -0,0 +1,37 @@
|
@@ -0,0 +1,37 @@
|
||||||
+# Copyright 2009 Free Software Foundation, Inc.
|
+# Copyright 2009 Free Software Foundation, Inc.
|
||||||
+
|
+
|
||||||
|
@ -2482,10 +2478,10 @@ new file mode 100644
|
||||||
+clean_restart $binfile
|
+clean_restart $binfile
|
||||||
+
|
+
|
||||||
+gdb_test "ptype struct some_struct" "type = struct some_struct {\[\r\n \t\]*void field;\[\r\n \t\]*}"
|
+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
|
Index: gdb-7.12.50.20170207/gdb/testsuite/gdb.dwarf2/dw2-subrange-no-type.S
|
||||||
new file mode 100644
|
===================================================================
|
||||||
--- /dev/null
|
--- /dev/null 1970-01-01 00:00:00.000000000 +0000
|
||||||
+++ b/gdb/testsuite/gdb.dwarf2/dw2-subrange-no-type.S
|
+++ gdb-7.12.50.20170207/gdb/testsuite/gdb.dwarf2/dw2-subrange-no-type.S 2017-02-26 19:15:36.602882352 +0100
|
||||||
@@ -0,0 +1,121 @@
|
@@ -0,0 +1,121 @@
|
||||||
+/* This testcase is part of GDB, the GNU debugger.
|
+/* This testcase is part of GDB, the GNU debugger.
|
||||||
+
|
+
|
||||||
|
@ -2608,10 +2604,10 @@ new file mode 100644
|
||||||
+ .byte 0x0 /* Terminator */
|
+ .byte 0x0 /* Terminator */
|
||||||
+
|
+
|
||||||
+ .byte 0x0 /* Terminator */
|
+ .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
|
Index: gdb-7.12.50.20170207/gdb/testsuite/gdb.dwarf2/dw2-subrange-no-type.exp
|
||||||
new file mode 100644
|
===================================================================
|
||||||
--- /dev/null
|
--- /dev/null 1970-01-01 00:00:00.000000000 +0000
|
||||||
+++ b/gdb/testsuite/gdb.dwarf2/dw2-subrange-no-type.exp
|
+++ gdb-7.12.50.20170207/gdb/testsuite/gdb.dwarf2/dw2-subrange-no-type.exp 2017-02-26 19:15:36.603882359 +0100
|
||||||
@@ -0,0 +1,39 @@
|
@@ -0,0 +1,39 @@
|
||||||
+# Copyright 2012 Free Software Foundation, Inc.
|
+# Copyright 2012 Free Software Foundation, Inc.
|
||||||
+
|
+
|
||||||
|
@ -2652,10 +2648,10 @@ new file mode 100644
|
||||||
+
|
+
|
||||||
+gdb_test "ptype notype_string" {type = char \[129\]}
|
+gdb_test "ptype notype_string" {type = char \[129\]}
|
||||||
+gdb_test "p notype_string" " = 'x' <repeats 129 times>"
|
+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
|
Index: gdb-7.12.50.20170207/gdb/testsuite/gdb.fortran/dwarf-stride.exp
|
||||||
new file mode 100644
|
===================================================================
|
||||||
--- /dev/null
|
--- /dev/null 1970-01-01 00:00:00.000000000 +0000
|
||||||
+++ b/gdb/testsuite/gdb.fortran/dwarf-stride.exp
|
+++ gdb-7.12.50.20170207/gdb/testsuite/gdb.fortran/dwarf-stride.exp 2017-02-26 19:15:36.603882359 +0100
|
||||||
@@ -0,0 +1,42 @@
|
@@ -0,0 +1,42 @@
|
||||||
+# Copyright 2009 Free Software Foundation, Inc.
|
+# Copyright 2009 Free Software Foundation, Inc.
|
||||||
+
|
+
|
||||||
|
@ -2699,10 +2695,10 @@ new file mode 100644
|
||||||
+gdb_continue_to_breakpoint "break-here" ".*break-here.*"
|
+gdb_continue_to_breakpoint "break-here" ".*break-here.*"
|
||||||
+gdb_test "p c40pt(1)" " = '0-hello.*"
|
+gdb_test "p c40pt(1)" " = '0-hello.*"
|
||||||
+gdb_test "p c40pt(2)" " = '1-hello.*"
|
+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
|
Index: gdb-7.12.50.20170207/gdb/testsuite/gdb.fortran/dwarf-stride.f90
|
||||||
new file mode 100644
|
===================================================================
|
||||||
--- /dev/null
|
--- /dev/null 1970-01-01 00:00:00.000000000 +0000
|
||||||
+++ b/gdb/testsuite/gdb.fortran/dwarf-stride.f90
|
+++ gdb-7.12.50.20170207/gdb/testsuite/gdb.fortran/dwarf-stride.f90 2017-02-26 19:15:36.603882359 +0100
|
||||||
@@ -0,0 +1,40 @@
|
@@ -0,0 +1,40 @@
|
||||||
+! Copyright 2009 Free Software Foundation, Inc.
|
+! Copyright 2009 Free Software Foundation, Inc.
|
||||||
+!
|
+!
|
||||||
|
@ -2744,10 +2740,10 @@ new file mode 100644
|
||||||
+ print *, c40pt ! break-here
|
+ print *, c40pt ! break-here
|
||||||
+
|
+
|
||||||
+end program repro
|
+end program repro
|
||||||
diff --git a/gdb/testsuite/gdb.fortran/dynamic.exp b/gdb/testsuite/gdb.fortran/dynamic.exp
|
Index: gdb-7.12.50.20170207/gdb/testsuite/gdb.fortran/dynamic.exp
|
||||||
new file mode 100644
|
===================================================================
|
||||||
--- /dev/null
|
--- /dev/null 1970-01-01 00:00:00.000000000 +0000
|
||||||
+++ b/gdb/testsuite/gdb.fortran/dynamic.exp
|
+++ gdb-7.12.50.20170207/gdb/testsuite/gdb.fortran/dynamic.exp 2017-02-26 19:15:36.603882359 +0100
|
||||||
@@ -0,0 +1,154 @@
|
@@ -0,0 +1,154 @@
|
||||||
+# Copyright 2007 Free Software Foundation, Inc.
|
+# Copyright 2007 Free Software Foundation, Inc.
|
||||||
+
|
+
|
||||||
|
@ -2804,7 +2800,7 @@ new file mode 100644
|
||||||
+gdb_breakpoint [gdb_get_line_number "varx-allocated"]
|
+gdb_breakpoint [gdb_get_line_number "varx-allocated"]
|
||||||
+gdb_continue_to_breakpoint "varx-allocated"
|
+gdb_continue_to_breakpoint "varx-allocated"
|
||||||
+# $1 = (( ( 0, 0, 0, 0, 0, 0) ( 0, 0, 0, 0, 0, 0) --- , 0) ) ( ( 0, 0, ...) ...) ...)
|
+# $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.
|
+# 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"
|
+gdb_test "p l" "\\$\[0-9\]* = (\\.TRUE\\.|4294967295)" "p l if varx allocated"
|
||||||
+
|
+
|
||||||
|
@ -2831,7 +2827,7 @@ new file mode 100644
|
||||||
+gdb_test "p varv(3, 7, 19)" "\\$\[0-9\]* = 6" "p varv(3, 7, 19) associated"
|
+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.
|
+# 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 "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.
|
+# 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"
|
+gdb_test "ptype varv" "type = (PTR TO -> \\( )?real(\\(kind=4\\)|\\*4) \\(6,5:15,17:28\\)\\)?" "ptype varv associated"
|
||||||
+
|
+
|
||||||
|
@ -2852,7 +2848,7 @@ new file mode 100644
|
||||||
+gdb_breakpoint [gdb_get_line_number "varx-deallocated"]
|
+gdb_breakpoint [gdb_get_line_number "varx-deallocated"]
|
||||||
+gdb_continue_to_breakpoint "varx-deallocated"
|
+gdb_continue_to_breakpoint "varx-deallocated"
|
||||||
+gdb_test "p varx" "\\$\[0-9\]* = <not allocated>" "p 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 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 "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"
|
+gdb_test "ptype varx(1,5,17)" {no such vector element \(vector not allocated\)} "ptype varx(1,5,17) deallocated"
|
||||||
|
@ -2903,10 +2899,10 @@ new file mode 100644
|
||||||
+gdb_test "p vart(3,8)" "\\$\[0-9\]* = 9"
|
+gdb_test "p vart(3,8)" "\\$\[0-9\]* = 9"
|
||||||
+# maps to foo::vary(1,3)
|
+# maps to foo::vary(1,3)
|
||||||
+gdb_test "p vart(2,9)" "\\$\[0-9\]* = 10"
|
+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
|
Index: gdb-7.12.50.20170207/gdb/testsuite/gdb.fortran/dynamic.f90
|
||||||
new file mode 100644
|
===================================================================
|
||||||
--- /dev/null
|
--- /dev/null 1970-01-01 00:00:00.000000000 +0000
|
||||||
+++ b/gdb/testsuite/gdb.fortran/dynamic.f90
|
+++ gdb-7.12.50.20170207/gdb/testsuite/gdb.fortran/dynamic.f90 2017-02-26 19:15:36.603882359 +0100
|
||||||
@@ -0,0 +1,98 @@
|
@@ -0,0 +1,98 @@
|
||||||
+! Copyright 2007 Free Software Foundation, Inc.
|
+! Copyright 2007 Free Software Foundation, Inc.
|
||||||
+!
|
+!
|
||||||
|
@ -3006,10 +3002,10 @@ new file mode 100644
|
||||||
+ if (x (1, 1) .ne. 8 .or. x (2, 2) .ne. 9 .or. x (1, 2) .ne. 4) call abort
|
+ if (x (1, 1) .ne. 8 .or. x (2, 2) .ne. 9 .or. x (1, 2) .ne. 4) call abort
|
||||||
+ if (x (3, 1) .ne. 10) call abort
|
+ if (x (3, 1) .ne. 10) call abort
|
||||||
+end
|
+end
|
||||||
diff --git a/gdb/testsuite/gdb.fortran/string.exp b/gdb/testsuite/gdb.fortran/string.exp
|
Index: gdb-7.12.50.20170207/gdb/testsuite/gdb.fortran/string.exp
|
||||||
new file mode 100644
|
===================================================================
|
||||||
--- /dev/null
|
--- /dev/null 1970-01-01 00:00:00.000000000 +0000
|
||||||
+++ b/gdb/testsuite/gdb.fortran/string.exp
|
+++ gdb-7.12.50.20170207/gdb/testsuite/gdb.fortran/string.exp 2017-02-26 19:15:36.604882366 +0100
|
||||||
@@ -0,0 +1,59 @@
|
@@ -0,0 +1,59 @@
|
||||||
+# Copyright 2008 Free Software Foundation, Inc.
|
+# Copyright 2008 Free Software Foundation, Inc.
|
||||||
+
|
+
|
||||||
|
@ -3070,10 +3066,10 @@ new file mode 100644
|
||||||
+gdb_continue_to_breakpoint "var-finish"
|
+gdb_continue_to_breakpoint "var-finish"
|
||||||
+gdb_test "p e" "\\$\[0-9\]* = 'e '" "p e re-set"
|
+gdb_test "p e" "\\$\[0-9\]* = 'e '" "p e re-set"
|
||||||
+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"
|
+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
|
Index: gdb-7.12.50.20170207/gdb/testsuite/gdb.fortran/string.f90
|
||||||
new file mode 100644
|
===================================================================
|
||||||
--- /dev/null
|
--- /dev/null 1970-01-01 00:00:00.000000000 +0000
|
||||||
+++ b/gdb/testsuite/gdb.fortran/string.f90
|
+++ gdb-7.12.50.20170207/gdb/testsuite/gdb.fortran/string.f90 2017-02-26 19:15:36.604882366 +0100
|
||||||
@@ -0,0 +1,37 @@
|
@@ -0,0 +1,37 @@
|
||||||
+! Copyright 2008 Free Software Foundation, Inc.
|
+! Copyright 2008 Free Software Foundation, Inc.
|
||||||
+!
|
+!
|
||||||
|
@ -3112,10 +3108,10 @@ new file mode 100644
|
||||||
+ h = 'h'
|
+ h = 'h'
|
||||||
+ call foo (g, h)
|
+ call foo (g, h)
|
||||||
+end
|
+end
|
||||||
diff --git a/gdb/testsuite/gdb.fortran/subrange.exp b/gdb/testsuite/gdb.fortran/subrange.exp
|
Index: gdb-7.12.50.20170207/gdb/testsuite/gdb.fortran/subrange.exp
|
||||||
new file mode 100644
|
===================================================================
|
||||||
--- /dev/null
|
--- /dev/null 1970-01-01 00:00:00.000000000 +0000
|
||||||
+++ b/gdb/testsuite/gdb.fortran/subrange.exp
|
+++ gdb-7.12.50.20170207/gdb/testsuite/gdb.fortran/subrange.exp 2017-02-26 19:15:36.604882366 +0100
|
||||||
@@ -0,0 +1,72 @@
|
@@ -0,0 +1,72 @@
|
||||||
+# Copyright 2011 Free Software Foundation, Inc.
|
+# Copyright 2011 Free Software Foundation, Inc.
|
||||||
+
|
+
|
||||||
|
@ -3189,10 +3185,10 @@ new file mode 100644
|
||||||
+gdb_unload
|
+gdb_unload
|
||||||
+setup_kfail "*-*-*" "vlaregression/9999"
|
+setup_kfail "*-*-*" "vlaregression/9999"
|
||||||
+gdb_test {p $a (3, 2:2)} { = \(23\)}
|
+gdb_test {p $a (3, 2:2)} { = \(23\)}
|
||||||
diff --git a/gdb/testsuite/gdb.fortran/subrange.f90 b/gdb/testsuite/gdb.fortran/subrange.f90
|
Index: gdb-7.12.50.20170207/gdb/testsuite/gdb.fortran/subrange.f90
|
||||||
new file mode 100644
|
===================================================================
|
||||||
--- /dev/null
|
--- /dev/null 1970-01-01 00:00:00.000000000 +0000
|
||||||
+++ b/gdb/testsuite/gdb.fortran/subrange.f90
|
+++ gdb-7.12.50.20170207/gdb/testsuite/gdb.fortran/subrange.f90 2017-02-26 19:15:36.604882366 +0100
|
||||||
@@ -0,0 +1,28 @@
|
@@ -0,0 +1,28 @@
|
||||||
+! Copyright 2011 Free Software Foundation, Inc.
|
+! Copyright 2011 Free Software Foundation, Inc.
|
||||||
+!
|
+!
|
||||||
|
@ -3222,10 +3218,10 @@ new file mode 100644
|
||||||
+ ptr => a
|
+ ptr => a
|
||||||
+ write (*,*) a ! break-static
|
+ write (*,*) a ! break-static
|
||||||
+end
|
+end
|
||||||
diff --git a/gdb/testsuite/gdb.mi/mi2-var-stale-type.c b/gdb/testsuite/gdb.mi/mi2-var-stale-type.c
|
Index: gdb-7.12.50.20170207/gdb/testsuite/gdb.mi/mi2-var-stale-type.c
|
||||||
new file mode 100644
|
===================================================================
|
||||||
--- /dev/null
|
--- /dev/null 1970-01-01 00:00:00.000000000 +0000
|
||||||
+++ b/gdb/testsuite/gdb.mi/mi2-var-stale-type.c
|
+++ gdb-7.12.50.20170207/gdb/testsuite/gdb.mi/mi2-var-stale-type.c 2017-02-26 19:15:36.604882366 +0100
|
||||||
@@ -0,0 +1,26 @@
|
@@ -0,0 +1,26 @@
|
||||||
+/* Copyright 2011 Free Software Foundation, Inc.
|
+/* Copyright 2011 Free Software Foundation, Inc.
|
||||||
+
|
+
|
||||||
|
@ -3253,10 +3249,10 @@ new file mode 100644
|
||||||
+
|
+
|
||||||
+ return 0;
|
+ return 0;
|
||||||
+}
|
+}
|
||||||
diff --git a/gdb/testsuite/gdb.mi/mi2-var-stale-type.exp b/gdb/testsuite/gdb.mi/mi2-var-stale-type.exp
|
Index: gdb-7.12.50.20170207/gdb/testsuite/gdb.mi/mi2-var-stale-type.exp
|
||||||
new file mode 100644
|
===================================================================
|
||||||
--- /dev/null
|
--- /dev/null 1970-01-01 00:00:00.000000000 +0000
|
||||||
+++ b/gdb/testsuite/gdb.mi/mi2-var-stale-type.exp
|
+++ gdb-7.12.50.20170207/gdb/testsuite/gdb.mi/mi2-var-stale-type.exp 2017-02-26 19:15:36.604882366 +0100
|
||||||
@@ -0,0 +1,57 @@
|
@@ -0,0 +1,57 @@
|
||||||
+# Copyright 2011 Free Software Foundation, Inc.
|
+# Copyright 2011 Free Software Foundation, Inc.
|
||||||
+#
|
+#
|
||||||
|
@ -3315,10 +3311,10 @@ new file mode 100644
|
||||||
+mi_create_varobj "vla" "vla" "create local variable vla"
|
+mi_create_varobj "vla" "vla" "create local variable vla"
|
||||||
+
|
+
|
||||||
+mi_gdb_test "-var-update *" "\\^done,changelist=.*" "-var-update *"
|
+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
|
Index: gdb-7.12.50.20170207/gdb/testsuite/gdb.opt/array-from-register-func.c
|
||||||
new file mode 100644
|
===================================================================
|
||||||
--- /dev/null
|
--- /dev/null 1970-01-01 00:00:00.000000000 +0000
|
||||||
+++ b/gdb/testsuite/gdb.opt/array-from-register-func.c
|
+++ gdb-7.12.50.20170207/gdb/testsuite/gdb.opt/array-from-register-func.c 2017-02-26 19:15:36.604882366 +0100
|
||||||
@@ -0,0 +1,22 @@
|
@@ -0,0 +1,22 @@
|
||||||
+/* This file is part of GDB, the GNU debugger.
|
+/* This file is part of GDB, the GNU debugger.
|
||||||
+
|
+
|
||||||
|
@ -3342,10 +3338,10 @@ new file mode 100644
|
||||||
+{
|
+{
|
||||||
+ return arr[0];
|
+ return arr[0];
|
||||||
+}
|
+}
|
||||||
diff --git a/gdb/testsuite/gdb.opt/array-from-register.c b/gdb/testsuite/gdb.opt/array-from-register.c
|
Index: gdb-7.12.50.20170207/gdb/testsuite/gdb.opt/array-from-register.c
|
||||||
new file mode 100644
|
===================================================================
|
||||||
--- /dev/null
|
--- /dev/null 1970-01-01 00:00:00.000000000 +0000
|
||||||
+++ b/gdb/testsuite/gdb.opt/array-from-register.c
|
+++ gdb-7.12.50.20170207/gdb/testsuite/gdb.opt/array-from-register.c 2017-02-26 19:15:36.605882373 +0100
|
||||||
@@ -0,0 +1,28 @@
|
@@ -0,0 +1,28 @@
|
||||||
+/* This file is part of GDB, the GNU debugger.
|
+/* This file is part of GDB, the GNU debugger.
|
||||||
+
|
+
|
||||||
|
@ -3375,10 +3371,10 @@ new file mode 100644
|
||||||
+
|
+
|
||||||
+ return 0;
|
+ return 0;
|
||||||
+}
|
+}
|
||||||
diff --git a/gdb/testsuite/gdb.opt/array-from-register.exp b/gdb/testsuite/gdb.opt/array-from-register.exp
|
Index: gdb-7.12.50.20170207/gdb/testsuite/gdb.opt/array-from-register.exp
|
||||||
new file mode 100644
|
===================================================================
|
||||||
--- /dev/null
|
--- /dev/null 1970-01-01 00:00:00.000000000 +0000
|
||||||
+++ b/gdb/testsuite/gdb.opt/array-from-register.exp
|
+++ gdb-7.12.50.20170207/gdb/testsuite/gdb.opt/array-from-register.exp 2017-02-26 19:15:36.605882373 +0100
|
||||||
@@ -0,0 +1,33 @@
|
@@ -0,0 +1,33 @@
|
||||||
+# Copyright 2009 Free Software Foundation, Inc.
|
+# Copyright 2009 Free Software Foundation, Inc.
|
||||||
+#
|
+#
|
||||||
|
@ -3413,10 +3409,10 @@ new file mode 100644
|
||||||
+# Seen regression:
|
+# Seen regression:
|
||||||
+# Address requested for identifier "arr" which is in register $rdi
|
+# Address requested for identifier "arr" which is in register $rdi
|
||||||
+gdb_test "p arr\[0\]" "\\$\[0-9\]+ = 42"
|
+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
|
Index: gdb-7.12.50.20170207/gdb/testsuite/gdb.opt/fortran-string.exp
|
||||||
new file mode 100644
|
===================================================================
|
||||||
--- /dev/null
|
--- /dev/null 1970-01-01 00:00:00.000000000 +0000
|
||||||
+++ b/gdb/testsuite/gdb.opt/fortran-string.exp
|
+++ gdb-7.12.50.20170207/gdb/testsuite/gdb.opt/fortran-string.exp 2017-02-26 19:15:36.605882373 +0100
|
||||||
@@ -0,0 +1,39 @@
|
@@ -0,0 +1,39 @@
|
||||||
+# Copyright 2009 Free Software Foundation, Inc.
|
+# Copyright 2009 Free Software Foundation, Inc.
|
||||||
+
|
+
|
||||||
|
@ -3457,10 +3453,10 @@ new file mode 100644
|
||||||
+gdb_test "frame" ".*s='foo'.*"
|
+gdb_test "frame" ".*s='foo'.*"
|
||||||
+gdb_test "ptype s" "type = character\\*3"
|
+gdb_test "ptype s" "type = character\\*3"
|
||||||
+gdb_test "p s" "\\$\[0-9\]* = 'foo'"
|
+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
|
Index: gdb-7.12.50.20170207/gdb/testsuite/gdb.opt/fortran-string.f90
|
||||||
new file mode 100644
|
===================================================================
|
||||||
--- /dev/null
|
--- /dev/null 1970-01-01 00:00:00.000000000 +0000
|
||||||
+++ b/gdb/testsuite/gdb.opt/fortran-string.f90
|
+++ gdb-7.12.50.20170207/gdb/testsuite/gdb.opt/fortran-string.f90 2017-02-26 19:15:36.605882373 +0100
|
||||||
@@ -0,0 +1,28 @@
|
@@ -0,0 +1,28 @@
|
||||||
+! Copyright 2009 Free Software Foundation, Inc.
|
+! Copyright 2009 Free Software Foundation, Inc.
|
||||||
+!
|
+!
|
||||||
|
@ -3490,10 +3486,10 @@ new file mode 100644
|
||||||
+ program main
|
+ program main
|
||||||
+ call f ('foo')
|
+ call f ('foo')
|
||||||
+ end
|
+ end
|
||||||
diff --git a/gdb/testsuite/gdb.pascal/arrays.exp b/gdb/testsuite/gdb.pascal/arrays.exp
|
Index: gdb-7.12.50.20170207/gdb/testsuite/gdb.pascal/arrays.exp
|
||||||
new file mode 100644
|
===================================================================
|
||||||
--- /dev/null
|
--- /dev/null 1970-01-01 00:00:00.000000000 +0000
|
||||||
+++ b/gdb/testsuite/gdb.pascal/arrays.exp
|
+++ gdb-7.12.50.20170207/gdb/testsuite/gdb.pascal/arrays.exp 2017-02-26 19:15:36.605882373 +0100
|
||||||
@@ -0,0 +1,104 @@
|
@@ -0,0 +1,104 @@
|
||||||
+# Copyright 2008, 2009 Free Software Foundation, Inc.
|
+# Copyright 2008, 2009 Free Software Foundation, Inc.
|
||||||
+#
|
+#
|
||||||
|
@ -3599,10 +3595,10 @@ new file mode 100644
|
||||||
+}
|
+}
|
||||||
+gdb_test "print DynArrChar" ".* = 'abcdefghijklm'" "Print dynamic array of char"
|
+gdb_test "print DynArrChar" ".* = 'abcdefghijklm'" "Print dynamic array of char"
|
||||||
+
|
+
|
||||||
diff --git a/gdb/testsuite/gdb.pascal/arrays.pas b/gdb/testsuite/gdb.pascal/arrays.pas
|
Index: gdb-7.12.50.20170207/gdb/testsuite/gdb.pascal/arrays.pas
|
||||||
new file mode 100644
|
===================================================================
|
||||||
--- /dev/null
|
--- /dev/null 1970-01-01 00:00:00.000000000 +0000
|
||||||
+++ b/gdb/testsuite/gdb.pascal/arrays.pas
|
+++ gdb-7.12.50.20170207/gdb/testsuite/gdb.pascal/arrays.pas 2017-02-26 19:15:36.605882373 +0100
|
||||||
@@ -0,0 +1,82 @@
|
@@ -0,0 +1,82 @@
|
||||||
+{
|
+{
|
||||||
+ Copyright 2008, 2009 Free Software Foundation, Inc.
|
+ Copyright 2008, 2009 Free Software Foundation, Inc.
|
||||||
|
@ -3686,11 +3682,12 @@ new file mode 100644
|
||||||
+ s := 'test'#0'string';
|
+ s := 'test'#0'string';
|
||||||
+ writeln(s); { set breakpoint 2 here }
|
+ writeln(s); { set breakpoint 2 here }
|
||||||
+end.
|
+end.
|
||||||
diff --git a/gdb/testsuite/lib/gdb.exp b/gdb/testsuite/lib/gdb.exp
|
Index: gdb-7.12.50.20170207/gdb/testsuite/lib/gdb.exp
|
||||||
--- a/gdb/testsuite/lib/gdb.exp
|
===================================================================
|
||||||
+++ b/gdb/testsuite/lib/gdb.exp
|
--- gdb-7.12.50.20170207.orig/gdb/testsuite/lib/gdb.exp 2017-02-26 19:15:28.564824836 +0100
|
||||||
@@ -224,6 +224,11 @@ proc gdb_unload {} {
|
+++ gdb-7.12.50.20170207/gdb/testsuite/lib/gdb.exp 2017-02-26 19:15:36.607882387 +0100
|
||||||
send_gdb "y\n" answer
|
@@ -178,6 +178,11 @@
|
||||||
|
send_gdb "y\n"
|
||||||
exp_continue
|
exp_continue
|
||||||
}
|
}
|
||||||
+ -re "A program is being debugged already..*Are you sure you want to change the file.*y or n. $"\
|
+ -re "A program is being debugged already..*Are you sure you want to change the file.*y or n. $"\
|
||||||
|
@ -3699,22 +3696,23 @@ diff --git a/gdb/testsuite/lib/gdb.exp b/gdb/testsuite/lib/gdb.exp
|
||||||
+ exp_continue
|
+ exp_continue
|
||||||
+ }
|
+ }
|
||||||
-re "Discard symbol table from .*y or n.*$" {
|
-re "Discard symbol table from .*y or n.*$" {
|
||||||
send_gdb "y\n" answer
|
send_gdb "y\n"
|
||||||
exp_continue
|
exp_continue
|
||||||
diff --git a/gdb/testsuite/lib/pascal.exp b/gdb/testsuite/lib/pascal.exp
|
Index: gdb-7.12.50.20170207/gdb/testsuite/lib/pascal.exp
|
||||||
--- a/gdb/testsuite/lib/pascal.exp
|
===================================================================
|
||||||
+++ b/gdb/testsuite/lib/pascal.exp
|
--- gdb-7.12.50.20170207.orig/gdb/testsuite/lib/pascal.exp 2017-02-26 19:15:28.565824844 +0100
|
||||||
@@ -37,6 +37,9 @@ proc pascal_init {} {
|
+++ gdb-7.12.50.20170207/gdb/testsuite/lib/pascal.exp 2017-02-26 19:15:36.607882387 +0100
|
||||||
gdb_persistent_global pascal_compiler_is_fpc
|
@@ -37,6 +37,9 @@
|
||||||
gdb_persistent_global gpc_compiler
|
global pascal_compiler_is_fpc
|
||||||
gdb_persistent_global fpc_compiler
|
global gpc_compiler
|
||||||
+ gdb_persistent_global fpcversion_major
|
global fpc_compiler
|
||||||
+ gdb_persistent_global fpcversion_minor
|
+ global fpcversion_major
|
||||||
+ gdb_persistent_global fpcversion_release
|
+ global fpcversion_minor
|
||||||
|
+ global fpcversion_release
|
||||||
global env
|
global env
|
||||||
|
|
||||||
if { $pascal_init_done == 1 } {
|
if { $pascal_init_done == 1 } {
|
||||||
@@ -64,6 +67,20 @@ proc pascal_init {} {
|
@@ -64,6 +67,20 @@
|
||||||
set pascal_compiler_is_fpc 1
|
set pascal_compiler_is_fpc 1
|
||||||
verbose -log "Free Pascal compiler found"
|
verbose -log "Free Pascal compiler found"
|
||||||
}
|
}
|
||||||
|
|
534
gdb-archer.patch
534
gdb-archer.patch
|
@ -1,11 +1,3 @@
|
||||||
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-archer.patch
|
|
||||||
|
|
||||||
;; Python patches of: http://sourceware.org/gdb/wiki/ProjectArcher
|
|
||||||
;;=push
|
|
||||||
|
|
||||||
http://sourceware.org/gdb/wiki/ProjectArcher
|
http://sourceware.org/gdb/wiki/ProjectArcher
|
||||||
http://sourceware.org/gdb/wiki/ArcherBranchManagement
|
http://sourceware.org/gdb/wiki/ArcherBranchManagement
|
||||||
|
|
||||||
|
@ -14,26 +6,93 @@ commit 718a1618b2f691a7f407213bb50f100ac59f91c3
|
||||||
|
|
||||||
tromey/python
|
tromey/python
|
||||||
|
|
||||||
|
|
||||||
|
diff --git a/README.archer b/README.archer
|
||||||
|
new file mode 100644
|
||||||
|
index 0000000..173b8ea
|
||||||
|
--- /dev/null
|
||||||
|
+++ b/README.archer
|
||||||
|
@@ -0,0 +1,2 @@
|
||||||
|
+This branch originally held the Python code for gdb. It still exists
|
||||||
|
+because a small amount of code here has not yet been merged upstream.
|
||||||
|
diff --git a/gdb/Makefile.in b/gdb/Makefile.in
|
||||||
|
index 291b1a0..150a8ef 100644
|
||||||
|
--- a/gdb/Makefile.in
|
||||||
|
+++ b/gdb/Makefile.in
|
||||||
|
@@ -2350,6 +2350,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
|
diff --git a/gdb/data-directory/Makefile.in b/gdb/data-directory/Makefile.in
|
||||||
|
index 304d4b0..d2007a4 100644
|
||||||
--- a/gdb/data-directory/Makefile.in
|
--- a/gdb/data-directory/Makefile.in
|
||||||
+++ b/gdb/data-directory/Makefile.in
|
+++ b/gdb/data-directory/Makefile.in
|
||||||
@@ -80,6 +80,7 @@ PYTHON_FILE_LIST = \
|
@@ -77,7 +77,11 @@ PYTHON_FILE_LIST = \
|
||||||
|
gdb/types.py \
|
||||||
gdb/unwinder.py \
|
gdb/unwinder.py \
|
||||||
gdb/xmethod.py \
|
gdb/xmethod.py \
|
||||||
|
+ gdb/types.py \
|
||||||
gdb/command/__init__.py \
|
gdb/command/__init__.py \
|
||||||
+ gdb/command/ignore_errors.py \
|
+ gdb/command/ignore_errors.py \
|
||||||
|
+ gdb/command/pahole.py \
|
||||||
|
+ gdb/command/xmethods.py \
|
||||||
gdb/command/explore.py \
|
gdb/command/explore.py \
|
||||||
gdb/command/backtrace.py \
|
|
||||||
gdb/command/frame_filters.py \
|
gdb/command/frame_filters.py \
|
||||||
@@ -92,6 +93,7 @@ PYTHON_FILE_LIST = \
|
gdb/command/pretty_printers.py \
|
||||||
|
@@ -89,6 +93,8 @@ PYTHON_FILE_LIST = \
|
||||||
gdb/function/as_string.py \
|
gdb/function/as_string.py \
|
||||||
gdb/function/caller_is.py \
|
gdb/function/caller_is.py \
|
||||||
gdb/function/strfns.py \
|
gdb/function/strfns.py \
|
||||||
|
+ gdb/function/caller_is.py \
|
||||||
+ gdb/function/in_scope.py \
|
+ gdb/function/in_scope.py \
|
||||||
gdb/printer/__init__.py \
|
gdb/printer/__init__.py \
|
||||||
gdb/printer/bound_registers.py
|
gdb/printer/bound_registers.py
|
||||||
|
|
||||||
|
diff --git a/gdb/doc/gdb.texinfo b/gdb/doc/gdb.texinfo
|
||||||
|
index 300d78e..699f2cb 100644
|
||||||
|
--- a/gdb/doc/gdb.texinfo
|
||||||
|
+++ b/gdb/doc/gdb.texinfo
|
||||||
|
@@ -1230,6 +1230,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 ce5810e..4ceb108 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
|
diff --git a/gdb/gdb-gdb.gdb.in b/gdb/gdb-gdb.gdb.in
|
||||||
|
index 05a38b2..9801fdf 100644
|
||||||
--- a/gdb/gdb-gdb.gdb.in
|
--- a/gdb/gdb-gdb.gdb.in
|
||||||
+++ b/gdb/gdb-gdb.gdb.in
|
+++ b/gdb/gdb-gdb.gdb.in
|
||||||
@@ -1,5 +1,15 @@
|
@@ -1,5 +1,15 @@
|
||||||
|
@ -52,8 +111,163 @@ diff --git a/gdb/gdb-gdb.gdb.in b/gdb/gdb-gdb.gdb.in
|
||||||
if !$gdb_init_done
|
if !$gdb_init_done
|
||||||
set variable $gdb_init_done = 1
|
set variable $gdb_init_done = 1
|
||||||
|
|
||||||
|
diff --git a/gdb/main.c b/gdb/main.c
|
||||||
|
index df4b111..6aca8b0 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"
|
||||||
|
@@ -459,7 +460,7 @@ struct cmdarg
|
||||||
|
};
|
||||||
|
|
||||||
|
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;
|
||||||
|
@@ -676,10 +677,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;
|
||||||
|
|
||||||
|
@@ -697,6 +702,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;
|
||||||
|
@@ -855,7 +863,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
|
||||||
|
@@ -1125,7 +1157,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)
|
||||||
|
{
|
||||||
|
@@ -1138,16 +1171,29 @@ 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)
|
||||||
|
+ {
|
||||||
|
+ extern int pagination_enabled;
|
||||||
|
+ pagination_enabled = 0;
|
||||||
|
+ run_python_script (context->argc - optind, &context->argv[optind]);
|
||||||
|
+ return;
|
||||||
|
+ }
|
||||||
|
+ else
|
||||||
|
+#endif
|
||||||
|
{
|
||||||
|
- catch_errors (captured_command_loop, 0, "", RETURN_MASK_ALL);
|
||||||
|
+ /* 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)
|
||||||
|
+ {
|
||||||
|
+ catch_errors (captured_command_loop, 0, "", RETURN_MASK_ALL);
|
||||||
|
+ }
|
||||||
|
}
|
||||||
|
/* No exit -- exit is through quit_command. */
|
||||||
|
}
|
||||||
|
@@ -1190,6 +1236,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 (_("\
|
||||||
|
@@ -1234,6 +1286,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
|
diff --git a/gdb/python/lib/gdb/command/ignore_errors.py b/gdb/python/lib/gdb/command/ignore_errors.py
|
||||||
new file mode 100644
|
new file mode 100644
|
||||||
|
index 0000000..6fa48ff
|
||||||
--- /dev/null
|
--- /dev/null
|
||||||
+++ b/gdb/python/lib/gdb/command/ignore_errors.py
|
+++ b/gdb/python/lib/gdb/command/ignore_errors.py
|
||||||
@@ -0,0 +1,37 @@
|
@@ -0,0 +1,37 @@
|
||||||
|
@ -94,8 +308,96 @@ new file mode 100644
|
||||||
+ pass
|
+ pass
|
||||||
+
|
+
|
||||||
+IgnoreErrorsCommand ()
|
+IgnoreErrorsCommand ()
|
||||||
|
diff --git a/gdb/python/lib/gdb/command/pahole.py b/gdb/python/lib/gdb/command/pahole.py
|
||||||
|
new file mode 100644
|
||||||
|
index 0000000..e08eaf5
|
||||||
|
--- /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
|
diff --git a/gdb/python/lib/gdb/function/in_scope.py b/gdb/python/lib/gdb/function/in_scope.py
|
||||||
new file mode 100644
|
new file mode 100644
|
||||||
|
index 0000000..8742680
|
||||||
--- /dev/null
|
--- /dev/null
|
||||||
+++ b/gdb/python/lib/gdb/function/in_scope.py
|
+++ b/gdb/python/lib/gdb/function/in_scope.py
|
||||||
@@ -0,0 +1,47 @@
|
@@ -0,0 +1,47 @@
|
||||||
|
@ -146,7 +448,178 @@ new file mode 100644
|
||||||
+ return wanted == found
|
+ return wanted == found
|
||||||
+
|
+
|
||||||
+InScope ()
|
+InScope ()
|
||||||
|
diff --git a/gdb/python/python-internal.h b/gdb/python/python-internal.h
|
||||||
|
index e84c8d2..69305b4 100644
|
||||||
|
--- a/gdb/python/python-internal.h
|
||||||
|
+++ b/gdb/python/python-internal.h
|
||||||
|
@@ -672,6 +672,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 7e0c507..a67fbc3 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
|
||||||
|
@@ -1187,6 +1212,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)
|
||||||
|
@@ -1881,6 +1992,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 e407faa..fc1c632 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
|
diff --git a/gdb/testsuite/gdb.python/py-frame.exp b/gdb/testsuite/gdb.python/py-frame.exp
|
||||||
|
index f5d4a3c..3546f7b 100644
|
||||||
--- a/gdb/testsuite/gdb.python/py-frame.exp
|
--- a/gdb/testsuite/gdb.python/py-frame.exp
|
||||||
+++ b/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
|
@@ -95,6 +95,8 @@ gdb_test "python print ('result = %s' % f0.read_var ('a'))" " = 1" "test Frame.r
|
||||||
|
@ -159,9 +632,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')))" \
|
gdb_test "python print ('result = %s' % (gdb.selected_frame ().read_register ('sp') == gdb.parse_and_eval ('\$sp')))" \
|
||||||
" = True" \
|
" = True" \
|
||||||
diff --git a/gdb/testsuite/gdb.python/py-value.exp b/gdb/testsuite/gdb.python/py-value.exp
|
diff --git a/gdb/testsuite/gdb.python/py-value.exp b/gdb/testsuite/gdb.python/py-value.exp
|
||||||
|
index 1781887..8a2ddd6 100644
|
||||||
--- a/gdb/testsuite/gdb.python/py-value.exp
|
--- a/gdb/testsuite/gdb.python/py-value.exp
|
||||||
+++ b/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"
|
"print value's type"
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@ -177,11 +651,43 @@ 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
|
# Regression test for invalid subscript operations. The bug was that
|
||||||
# the type of the value was not being checked before allowing a
|
# the type of the value was not being checked before allowing a
|
||||||
# subscript operation to proceed.
|
# subscript operation to proceed.
|
||||||
@@ -606,6 +615,7 @@ test_value_in_inferior
|
@@ -512,6 +521,7 @@ if ![runto_main] then {
|
||||||
test_value_from_buffer
|
test_value_in_inferior
|
||||||
test_inferior_function_call
|
test_inferior_function_call
|
||||||
test_value_after_death
|
test_value_after_death
|
||||||
+test_cast_regression
|
+test_cast_regression
|
||||||
|
|
||||||
# Test either C or C++ values.
|
# Test either C or C++ values.
|
||||||
|
|
||||||
|
diff --git a/gdb/varobj.c b/gdb/varobj.c
|
||||||
|
index 5f21d84..18506f1 100644
|
||||||
|
--- a/gdb/varobj.c
|
||||||
|
+++ b/gdb/varobj.c
|
||||||
|
@@ -226,6 +226,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 e35c1b8..12339d1 100644
|
||||||
|
--- a/gdb/varobj.h
|
||||||
|
+++ b/gdb/varobj.h
|
||||||
|
@@ -320,6 +320,8 @@ extern int varobj_has_more (const struct varobj *var, int to);
|
||||||
|
|
||||||
|
extern int varobj_is_dynamic_p (const struct varobj *var);
|
||||||
|
|
||||||
|
+extern struct cleanup *varobj_ensure_python_env (const struct varobj *var);
|
||||||
|
+
|
||||||
|
extern int varobj_default_value_is_changeable_p (const struct varobj *var);
|
||||||
|
extern int varobj_value_is_changeable_p (const struct varobj *var);
|
||||||
|
|
||||||
|
|
|
@ -1,12 +1,5 @@
|
||||||
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
|
|
||||||
|
|
||||||
;; Print reasons for failed attach/spawn incl. SELinux deny_ptrace (BZ 786878).
|
|
||||||
;;=push+jan
|
|
||||||
|
|
||||||
http://sourceware.org/ml/gdb-patches/2012-03/msg00171.html
|
http://sourceware.org/ml/gdb-patches/2012-03/msg00171.html
|
||||||
|
Subject: [patch 3/3] attach-fail-reasons: SELinux deny_ptrace
|
||||||
|
|
||||||
Hi,
|
Hi,
|
||||||
|
|
||||||
|
@ -16,9 +9,11 @@ and here is the last bit for new SELinux 'deny_ptrace':
|
||||||
As even PTRACE_TRACEME fails in such case it needs to install hook for even
|
As even PTRACE_TRACEME fails in such case it needs to install hook for even
|
||||||
that event.
|
that event.
|
||||||
|
|
||||||
|
|
||||||
Thanks,
|
Thanks,
|
||||||
Jan
|
Jan
|
||||||
|
|
||||||
|
|
||||||
gdb/
|
gdb/
|
||||||
2012-03-06 Jan Kratochvil <jan.kratochvil@redhat.com>
|
2012-03-06 Jan Kratochvil <jan.kratochvil@redhat.com>
|
||||||
|
|
||||||
|
@ -42,10 +37,185 @@ gdb/gdbserver/
|
||||||
(linux_create_inferior, linux_tracefork_child): Call it instead of
|
(linux_create_inferior, linux_tracefork_child): Call it instead of
|
||||||
direct ptrace.
|
direct ptrace.
|
||||||
|
|
||||||
diff --git a/gdb/config.in b/gdb/config.in
|
Index: gdb-7.12.50.20170226/gdb/nat/linux-ptrace.c
|
||||||
--- a/gdb/config.in
|
===================================================================
|
||||||
+++ b/gdb/config.in
|
--- gdb-7.12.50.20170226.orig/gdb/nat/linux-ptrace.c 2017-02-26 21:27:14.780009449 +0100
|
||||||
@@ -253,6 +253,9 @@
|
+++ gdb-7.12.50.20170226/gdb/nat/linux-ptrace.c 2017-02-26 21:27:18.838038193 +0100
|
||||||
|
@@ -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 @@
|
||||||
|
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_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
|
||||||
|
Index: gdb-7.12.50.20170226/gdb/nat/linux-ptrace.h
|
||||||
|
===================================================================
|
||||||
|
--- gdb-7.12.50.20170226.orig/gdb/nat/linux-ptrace.h 2017-02-26 21:27:14.780009449 +0100
|
||||||
|
+++ gdb-7.12.50.20170226/gdb/nat/linux-ptrace.h 2017-02-26 21:27:18.838038193 +0100
|
||||||
|
@@ -185,6 +185,7 @@
|
||||||
|
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);
|
||||||
|
Index: gdb-7.12.50.20170226/gdb/configure.ac
|
||||||
|
===================================================================
|
||||||
|
--- gdb-7.12.50.20170226.orig/gdb/configure.ac 2017-02-26 21:27:14.781009456 +0100
|
||||||
|
+++ gdb-7.12.50.20170226/gdb/configure.ac 2017-02-26 21:27:18.839038200 +0100
|
||||||
|
@@ -2092,6 +2092,10 @@
|
||||||
|
esac
|
||||||
|
AC_DEFINE_UNQUOTED(GDBINIT,"$gdbinit",[The .gdbinit filename.])
|
||||||
|
|
||||||
|
+dnl Check security_get_boolean_active availability.
|
||||||
|
+AC_CHECK_HEADERS(selinux/selinux.h)
|
||||||
|
+AC_CHECK_LIB(selinux, security_get_boolean_active)
|
||||||
|
+
|
||||||
|
dnl Handle optional features that can be enabled.
|
||||||
|
|
||||||
|
# Support for --with-sysroot is a copy of GDB_AC_WITH_DIR,
|
||||||
|
Index: gdb-7.12.50.20170226/gdb/gdbserver/configure.ac
|
||||||
|
===================================================================
|
||||||
|
--- gdb-7.12.50.20170226.orig/gdb/gdbserver/configure.ac 2017-02-26 21:27:14.781009456 +0100
|
||||||
|
+++ gdb-7.12.50.20170226/gdb/gdbserver/configure.ac 2017-02-26 21:27:18.839038200 +0100
|
||||||
|
@@ -469,6 +469,10 @@
|
||||||
|
fi
|
||||||
|
fi
|
||||||
|
|
||||||
|
+dnl Check security_get_boolean_active availability.
|
||||||
|
+AC_CHECK_HEADERS(selinux/selinux.h)
|
||||||
|
+AC_CHECK_LIB(selinux, security_get_boolean_active)
|
||||||
|
+
|
||||||
|
AC_SUBST(GDBSERVER_DEPFILES)
|
||||||
|
AC_SUBST(GDBSERVER_LIBS)
|
||||||
|
AC_SUBST(srv_xmlbuiltin)
|
||||||
|
Index: gdb-7.12.50.20170226/gdb/gdbserver/linux-low.c
|
||||||
|
===================================================================
|
||||||
|
--- gdb-7.12.50.20170226.orig/gdb/gdbserver/linux-low.c 2017-02-26 21:27:14.783009470 +0100
|
||||||
|
+++ gdb-7.12.50.20170226/gdb/gdbserver/linux-low.c 2017-02-26 21:27:18.841038214 +0100
|
||||||
|
@@ -946,6 +946,29 @@
|
||||||
|
return lwp;
|
||||||
|
}
|
||||||
|
|
||||||
|
+/* Execute PTRACE_TRACEME with error checking. */
|
||||||
|
+
|
||||||
|
+static void
|
||||||
|
+linux_traceme (const char *program)
|
||||||
|
+{
|
||||||
|
+ int save_errno;
|
||||||
|
+ struct buffer buffer;
|
||||||
|
+
|
||||||
|
+ errno = 0;
|
||||||
|
+ if (ptrace (PTRACE_TRACEME, 0,
|
||||||
|
+ (PTRACE_TYPE_ARG3) 0, (PTRACE_TYPE_ARG4) 0) == 0)
|
||||||
|
+ return;
|
||||||
|
+
|
||||||
|
+ save_errno = errno;
|
||||||
|
+ buffer_init (&buffer);
|
||||||
|
+ linux_ptrace_create_warnings (&buffer);
|
||||||
|
+ buffer_grow_str0 (&buffer, "");
|
||||||
|
+ fprintf (stderr, _("%sCannot trace created process %s: %s.\n"),
|
||||||
|
+ buffer_finish (&buffer), program, strerror (save_errno));
|
||||||
|
+ fflush (stderr);
|
||||||
|
+ _exit (0177);
|
||||||
|
+}
|
||||||
|
+
|
||||||
|
/* Start an inferior process and returns its pid.
|
||||||
|
ALLARGS is a vector of program-name and args. */
|
||||||
|
|
||||||
|
@@ -969,7 +992,7 @@
|
||||||
|
if (pid == 0)
|
||||||
|
{
|
||||||
|
close_most_fds ();
|
||||||
|
- ptrace (PTRACE_TRACEME, 0, (PTRACE_TYPE_ARG3) 0, (PTRACE_TYPE_ARG4) 0);
|
||||||
|
+ linux_traceme (program);
|
||||||
|
|
||||||
|
setpgid (0, 0);
|
||||||
|
|
||||||
|
Index: gdb-7.12.50.20170226/gdb/linux-nat.c
|
||||||
|
===================================================================
|
||||||
|
--- gdb-7.12.50.20170226.orig/gdb/linux-nat.c 2017-02-26 21:27:14.785009484 +0100
|
||||||
|
+++ gdb-7.12.50.20170226/gdb/linux-nat.c 2017-02-26 21:27:18.842038221 +0100
|
||||||
|
@@ -1110,6 +1110,7 @@
|
||||||
|
{
|
||||||
|
struct cleanup *restore_personality
|
||||||
|
= maybe_disable_address_space_randomization (disable_randomization);
|
||||||
|
+ volatile struct gdb_exception ex;
|
||||||
|
|
||||||
|
/* The fork_child mechanism is synchronous and calls target_wait, so
|
||||||
|
we have to mask the async mode. */
|
||||||
|
@@ -1117,7 +1118,28 @@
|
||||||
|
/* 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);
|
||||||
|
+ 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
|
||||||
|
|
||||||
|
do_cleanups (restore_personality);
|
||||||
|
}
|
||||||
|
Index: gdb-7.12.50.20170226/gdb/config.in
|
||||||
|
===================================================================
|
||||||
|
--- gdb-7.12.50.20170226.orig/gdb/config.in 2017-02-26 21:27:14.786009491 +0100
|
||||||
|
+++ gdb-7.12.50.20170226/gdb/config.in 2017-02-26 21:27:18.842038221 +0100
|
||||||
|
@@ -270,6 +270,9 @@
|
||||||
/* Define if librpm library is being used. */
|
/* Define if librpm library is being used. */
|
||||||
#undef HAVE_LIBRPM
|
#undef HAVE_LIBRPM
|
||||||
|
|
||||||
|
@ -55,7 +225,7 @@ diff --git a/gdb/config.in b/gdb/config.in
|
||||||
/* Define to 1 if you have the <libunwind-ia64.h> header file. */
|
/* Define to 1 if you have the <libunwind-ia64.h> header file. */
|
||||||
#undef HAVE_LIBUNWIND_IA64_H
|
#undef HAVE_LIBUNWIND_IA64_H
|
||||||
|
|
||||||
@@ -388,6 +391,9 @@
|
@@ -402,6 +405,9 @@
|
||||||
/* Define to 1 if you have the `scm_new_smob' function. */
|
/* Define to 1 if you have the `scm_new_smob' function. */
|
||||||
#undef HAVE_SCM_NEW_SMOB
|
#undef HAVE_SCM_NEW_SMOB
|
||||||
|
|
||||||
|
@ -65,10 +235,11 @@ diff --git a/gdb/config.in b/gdb/config.in
|
||||||
/* Define to 1 if you have the `setlocale' function. */
|
/* Define to 1 if you have the `setlocale' function. */
|
||||||
#undef HAVE_SETLOCALE
|
#undef HAVE_SETLOCALE
|
||||||
|
|
||||||
diff --git a/gdb/configure b/gdb/configure
|
Index: gdb-7.12.50.20170226/gdb/configure
|
||||||
--- a/gdb/configure
|
===================================================================
|
||||||
+++ b/gdb/configure
|
--- gdb-7.12.50.20170226.orig/gdb/configure 2017-02-26 21:27:14.790009519 +0100
|
||||||
@@ -16861,6 +16861,64 @@ cat >>confdefs.h <<_ACEOF
|
+++ gdb-7.12.50.20170226/gdb/configure 2017-02-26 21:27:18.846038249 +0100
|
||||||
|
@@ -15492,6 +15492,64 @@
|
||||||
_ACEOF
|
_ACEOF
|
||||||
|
|
||||||
|
|
||||||
|
@ -133,107 +304,13 @@ diff --git a/gdb/configure b/gdb/configure
|
||||||
|
|
||||||
# Support for --with-sysroot is a copy of GDB_AC_WITH_DIR,
|
# Support for --with-sysroot is a copy of GDB_AC_WITH_DIR,
|
||||||
# except that the argument to --with-sysroot is optional.
|
# except that the argument to --with-sysroot is optional.
|
||||||
diff --git a/gdb/configure.ac b/gdb/configure.ac
|
Index: gdb-7.12.50.20170226/gdb/gdbserver/config.in
|
||||||
--- a/gdb/configure.ac
|
===================================================================
|
||||||
+++ b/gdb/configure.ac
|
--- gdb-7.12.50.20170226.orig/gdb/gdbserver/config.in 2017-02-26 21:27:14.791009527 +0100
|
||||||
@@ -1900,6 +1900,10 @@ case $host_os in
|
+++ gdb-7.12.50.20170226/gdb/gdbserver/config.in 2017-02-26 21:27:18.846038249 +0100
|
||||||
esac
|
@@ -123,6 +123,9 @@
|
||||||
AC_DEFINE_UNQUOTED(GDBINIT,"$gdbinit",[The .gdbinit filename.])
|
/* Define to 1 if you have the `mcheck' library (-lmcheck). */
|
||||||
|
#undef HAVE_LIBMCHECK
|
||||||
+dnl Check security_get_boolean_active availability.
|
|
||||||
+AC_CHECK_HEADERS(selinux/selinux.h)
|
|
||||||
+AC_CHECK_LIB(selinux, security_get_boolean_active)
|
|
||||||
+
|
|
||||||
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
|
|
||||||
|
|
||||||
+/* Define to 1 if you have the `selinux' library (-lselinux). */
|
+/* Define to 1 if you have the `selinux' library (-lselinux). */
|
||||||
+#undef HAVE_LIBSELINUX
|
+#undef HAVE_LIBSELINUX
|
||||||
|
@ -241,9 +318,9 @@ diff --git a/gdbserver/config.in b/gdbserver/config.in
|
||||||
/* Define if the target supports branch tracing. */
|
/* Define if the target supports branch tracing. */
|
||||||
#undef HAVE_LINUX_BTRACE
|
#undef HAVE_LINUX_BTRACE
|
||||||
|
|
||||||
@@ -249,6 +252,9 @@
|
@@ -199,6 +202,9 @@
|
||||||
/* Define to 1 if you have the `sbrk' function. */
|
/* Define to 1 if you have the `pwrite' function. */
|
||||||
#undef HAVE_SBRK
|
#undef HAVE_PWRITE
|
||||||
|
|
||||||
+/* Define to 1 if you have the <selinux/selinux.h> header file. */
|
+/* Define to 1 if you have the <selinux/selinux.h> header file. */
|
||||||
+#undef HAVE_SELINUX_SELINUX_H
|
+#undef HAVE_SELINUX_SELINUX_H
|
||||||
|
@ -251,10 +328,11 @@ diff --git a/gdbserver/config.in b/gdbserver/config.in
|
||||||
/* Define to 1 if you have the `setns' function. */
|
/* Define to 1 if you have the `setns' function. */
|
||||||
#undef HAVE_SETNS
|
#undef HAVE_SETNS
|
||||||
|
|
||||||
diff --git a/gdbserver/configure b/gdbserver/configure
|
Index: gdb-7.12.50.20170226/gdb/gdbserver/configure
|
||||||
--- a/gdbserver/configure
|
===================================================================
|
||||||
+++ b/gdbserver/configure
|
--- gdb-7.12.50.20170226.orig/gdb/gdbserver/configure 2017-02-26 21:27:14.793009541 +0100
|
||||||
@@ -10683,6 +10683,64 @@ if $want_ipa ; then
|
+++ gdb-7.12.50.20170226/gdb/gdbserver/configure 2017-02-26 21:27:18.848038263 +0100
|
||||||
|
@@ -8429,6 +8429,64 @@
|
||||||
fi
|
fi
|
||||||
fi
|
fi
|
||||||
|
|
||||||
|
@ -319,38 +397,3 @@ 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
|
|
||||||
fi
|
|
||||||
fi
|
|
||||||
|
|
||||||
+dnl Check security_get_boolean_active availability.
|
|
||||||
+AC_CHECK_HEADERS(selinux/selinux.h)
|
|
||||||
+AC_CHECK_LIB(selinux, security_get_boolean_active)
|
|
||||||
+
|
|
||||||
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 ()
|
|
||||||
{
|
|
||||||
if (ptrace (PTRACE_TRACEME, 0, (PTRACE_TYPE_ARG3) 0,
|
|
||||||
(PTRACE_TYPE_ARG4) 0) < 0)
|
|
||||||
- trace_start_error_with_name ("ptrace");
|
|
||||||
+ {
|
|
||||||
+ int save_errno = errno;
|
|
||||||
+
|
|
||||||
+ std::string msg (linux_ptrace_create_warnings ());
|
|
||||||
+
|
|
||||||
+ msg += _("Cannot trace created process");
|
|
||||||
+
|
|
||||||
+ errno = save_errno;
|
|
||||||
+ trace_start_error_with_name (msg.c_str ());
|
|
||||||
+ }
|
|
||||||
|
|
||||||
if (setpgid (0, 0) < 0)
|
|
||||||
trace_start_error_with_name ("setpgid");
|
|
||||||
|
|
|
@ -1,20 +1,13 @@
|
||||||
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-btrobust.patch
|
|
||||||
|
|
||||||
;; Continue backtrace even if a frame filter throws an exception (Phil Muldoon).
|
|
||||||
;;=push
|
|
||||||
|
|
||||||
This should fix the error with glib. An error message will still be
|
This should fix the error with glib. An error message will still be
|
||||||
printed, but a default backtrace will occur in this case.
|
printed, but a default backtrace will occur in this case.
|
||||||
|
|
||||||
--
|
--
|
||||||
|
|
||||||
diff --git a/gdb/python/py-framefilter.c b/gdb/python/py-framefilter.c
|
Index: gdb-7.12.50.20170226/gdb/python/py-framefilter.c
|
||||||
--- a/gdb/python/py-framefilter.c
|
===================================================================
|
||||||
+++ b/gdb/python/py-framefilter.c
|
--- gdb-7.12.50.20170226.orig/gdb/python/py-framefilter.c 2017-02-26 21:33:23.150618708 +0100
|
||||||
@@ -1204,6 +1204,7 @@ gdbpy_apply_frame_filter (const struct extension_language_defn *extlang,
|
+++ gdb-7.12.50.20170226/gdb/python/py-framefilter.c 2017-02-26 21:33:29.993667179 +0100
|
||||||
|
@@ -1388,6 +1388,7 @@
|
||||||
htab_eq_pointer,
|
htab_eq_pointer,
|
||||||
NULL));
|
NULL));
|
||||||
|
|
||||||
|
@ -22,23 +15,19 @@ diff --git a/gdb/python/py-framefilter.c b/gdb/python/py-framefilter.c
|
||||||
while (true)
|
while (true)
|
||||||
{
|
{
|
||||||
gdbpy_ref<> item (PyIter_Next (iterable.get ()));
|
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 @@
|
||||||
{
|
|
||||||
if (PyErr_Occurred ())
|
if (PyErr_Occurred ())
|
||||||
{
|
{
|
||||||
- gdbpy_print_stack_or_quit ();
|
gdbpy_print_stack ();
|
||||||
- return EXT_LANG_BT_ERROR;
|
- return EXT_LANG_BT_ERROR;
|
||||||
+ gdbpy_print_stack ();
|
|
||||||
+ return count_printed > 0 ? EXT_LANG_BT_ERROR : EXT_LANG_BT_NO_FILTERS;
|
+ return count_printed > 0 ? EXT_LANG_BT_ERROR : EXT_LANG_BT_NO_FILTERS;
|
||||||
}
|
}
|
||||||
break;
|
break;
|
||||||
}
|
}
|
||||||
@@ -1245,7 +1246,8 @@ gdbpy_apply_frame_filter (const struct extension_language_defn *extlang,
|
@@ -1409,6 +1410,7 @@
|
||||||
/* Do not exit on error printing a single frame. Print the
|
|
||||||
error and continue with other frames. */
|
error and continue with other frames. */
|
||||||
if (success == EXT_LANG_BT_ERROR)
|
if (success == EXT_LANG_BT_ERROR)
|
||||||
- gdbpy_print_stack_or_quit ();
|
gdbpy_print_stack ();
|
||||||
+ gdbpy_print_stack ();
|
|
||||||
+ count_printed++;
|
+ count_printed++;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
|
@ -1,12 +1,5 @@
|
||||||
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
|
|
||||||
|
|
||||||
;; Never kill PID on: gdb exec PID (Jan Kratochvil, RH BZ 1219747).
|
|
||||||
;;=push+jan
|
|
||||||
|
|
||||||
http://sourceware.org/ml/gdb-patches/2015-10/msg00301.html
|
http://sourceware.org/ml/gdb-patches/2015-10/msg00301.html
|
||||||
|
Subject: [PATCH 1/3] Never kill PID on: gdb exec PID
|
||||||
|
|
||||||
Hi,
|
Hi,
|
||||||
|
|
||||||
|
@ -23,13 +16,25 @@ A program is being debugged already. Kill it? (y or n) _
|
||||||
|
|
||||||
The first attachment of "/tmp/sleep" commandline argument errors at:
|
The first attachment of "/tmp/sleep" commandline argument errors at:
|
||||||
|
|
||||||
|
#0 throw_error (error=GENERIC_ERROR, fmt=0x116d135 "%s.") at ./common/common-exceptions.c:371
|
||||||
|
#1 in throw_perror_with_name (errcode=GENERIC_ERROR, string=0x7fffffffdb96 "/dfsfds") at utils.c:974
|
||||||
|
#2 in perror_with_name (string=0x7fffffffdb96 "/dfsfds") at utils.c:982
|
||||||
|
#3 in exec_file_attach (filename=0x7fffffffdb96 "/dfsfds", from_tty=1) at exec.c:268
|
||||||
267 if (scratch_chan < 0)
|
267 if (scratch_chan < 0)
|
||||||
268 perror_with_name (filename);
|
268 perror_with_name (filename);
|
||||||
|
#4 in catch_command_errors_const (command=0x80f59f <exec_file_attach>, arg=0x7fffffffdb96 "/dfsfds", from_tty=1) at main.c:395
|
||||||
|
#5 in captured_main (data=0x7fffffffd6f0) at main.c:1051
|
||||||
1051 if (catch_command_errors_const (exec_file_attach, execarg,
|
1051 if (catch_command_errors_const (exec_file_attach, execarg,
|
||||||
1052 !batch_flag))
|
1052 !batch_flag))
|
||||||
|
|
||||||
Then GDB tries to attach to the process $p:
|
Then GDB tries to attach to the process $p:
|
||||||
|
|
||||||
|
#0 inferior_appeared (inf=0x240e0b0, pid=29210) at inferior.c:305
|
||||||
|
#1 in inf_ptrace_attach (ops=0x2339540, args=0x21dcdc0 "29210", from_tty=1) at inf-ptrace.c:206
|
||||||
|
#2 in linux_nat_attach (ops=0x2339540, args=0x21dcdc0 "29210", from_tty=1) at linux-nat.c:1278
|
||||||
|
#3 in attach_command (args=0x21dcdc0 "29210", from_tty=1) at infcmd.c:2748
|
||||||
|
#4 in catch_command_errors (command=0x79d7e5 <attach_command>, arg=0x7fffffffdb9e "29210", from_tty=1) at main.c:368
|
||||||
|
#5 in captured_main (data=0x7fffffffd6f0) at main.c:1082
|
||||||
1082 if (catch_command_errors (attach_command, pid_or_core_arg,
|
1082 if (catch_command_errors (attach_command, pid_or_core_arg,
|
||||||
1083 !batch_flag) == 0)
|
1083 !batch_flag) == 0)
|
||||||
|
|
||||||
|
@ -40,14 +45,37 @@ the lines
|
||||||
still fail because consequently attach_command() fails to find the associated
|
still fail because consequently attach_command() fails to find the associated
|
||||||
executable file:
|
executable file:
|
||||||
|
|
||||||
|
#0 throw_error (error=GENERIC_ERROR, fmt=0x116d135 "%s.") at ./common/common-exceptions.c:371
|
||||||
|
#1 in throw_perror_with_name (errcode=GENERIC_ERROR, string=0x2477860 "/tmp/sleep (deleted)") at utils.c:974
|
||||||
|
#2 in perror_with_name (string=0x2477860 "/tmp/sleep (deleted)") at utils.c:982
|
||||||
|
#3 in exec_file_attach (filename=0x2477860 "/tmp/sleep (deleted)", from_tty=1) at exec.c:268
|
||||||
267 if (scratch_chan < 0)
|
267 if (scratch_chan < 0)
|
||||||
268 perror_with_name (filename);
|
268 perror_with_name (filename);
|
||||||
|
#4 in exec_file_locate_attach (pid=29210, from_tty=1) at exec.c:173
|
||||||
|
#5 in attach_command_post_wait (args=0x24739b0 "29210", from_tty=1, async_exec=0) at infcmd.c:2628
|
||||||
|
#6 in attach_command_continuation (args=0x2473590, err=0) at infcmd.c:2700
|
||||||
|
#7 in do_my_continuations_1 (pmy_chain=0x7fffffffd190, err=0) at continuations.c:59
|
||||||
|
#8 in do_my_continuations (list=0x240e130, err=0) at continuations.c:83
|
||||||
|
#9 in do_all_inferior_continuations (err=0) at continuations.c:125
|
||||||
|
#10 in inferior_event_handler (event_type=INF_EXEC_COMPLETE, client_data=0x0) at inf-loop.c:60
|
||||||
|
#11 in fetch_inferior_event (client_data=0x0) at infrun.c:3929
|
||||||
|
#12 in inferior_event_handler (event_type=INF_REG_EVENT, client_data=0x0) at inf-loop.c:44
|
||||||
|
#13 in handle_target_event (error=0, client_data=0x0) at linux-nat.c:4681
|
||||||
|
#14 in handle_file_event (file_ptr=0x21e4170, ready_mask=1) at event-loop.c:708
|
||||||
|
#15 in gdb_wait_for_event (block=0) at event-loop.c:834
|
||||||
|
#16 in gdb_do_one_event () at event-loop.c:298
|
||||||
|
#17 in wait_sync_command_done () at top.c:373
|
||||||
|
#18 in maybe_wait_sync_command_done (was_sync=0) at top.c:388
|
||||||
|
#19 in catch_command_errors (command=0x79d7e5 <attach_command>, arg=0x7fffffffdb9e "29210", from_tty=1) at main.c:370
|
||||||
|
#20 in captured_main (data=0x7fffffffd6f0) at main.c:1082
|
||||||
1082 if (catch_command_errors (attach_command, pid_or_core_arg,
|
1082 if (catch_command_errors (attach_command, pid_or_core_arg,
|
||||||
1083 !batch_flag) == 0)
|
1083 !batch_flag) == 0)
|
||||||
|
|
||||||
and therefore GDB executes the following:
|
and therefore GDB executes the following:
|
||||||
|
|
||||||
(gdb) bt
|
(gdb) bt
|
||||||
|
#5 in query (ctlstr=0x1141ae8 "A program is being debugged already. Kill it? ") at utils.c:1371
|
||||||
|
#6 in target_preopen (from_tty=1) at target.c:2183
|
||||||
2179 if (have_inferiors ())
|
2179 if (have_inferiors ())
|
||||||
2180 {
|
2180 {
|
||||||
2181 if (!from_tty
|
2181 if (!from_tty
|
||||||
|
@ -57,14 +85,20 @@ and therefore GDB executes the following:
|
||||||
2185 else
|
2185 else
|
||||||
2186 error (_("Program not killed."));
|
2186 error (_("Program not killed."));
|
||||||
2187 }
|
2187 }
|
||||||
|
#7 in core_open (arg=0x7fffffffdb9f "9694", from_tty=1) at corelow.c:283
|
||||||
|
#8 in core_file_command (filename=0x7fffffffdb9f "9694", from_tty=1) at corefile.c:77
|
||||||
|
#9 in catch_command_errors (command=0x86ca16 <core_file_command>, arg=0x7fffffffdb9f "9694", from_tty=1) at main.c:368
|
||||||
|
#10 in captured_main (data=0x7fffffffd6f0) at main.c:1084
|
||||||
1084 catch_command_errors (core_file_command, pid_or_core_arg,
|
1084 catch_command_errors (core_file_command, pid_or_core_arg,
|
||||||
1085 !batch_flag);
|
1085 !batch_flag);
|
||||||
|
|
||||||
No regressions on {x86_64,x86_64-m32,i686}-fedora24pre-linux-gnu.
|
No regressions on {x86_64,x86_64-m32,i686}-fedora24pre-linux-gnu.
|
||||||
|
|
||||||
|
|
||||||
Thanks,
|
Thanks,
|
||||||
Jan
|
Jan
|
||||||
|
|
||||||
|
|
||||||
gdb/ChangeLog
|
gdb/ChangeLog
|
||||||
2015-10-16 Jan Kratochvil <jan.kratochvil@redhat.com>
|
2015-10-16 Jan Kratochvil <jan.kratochvil@redhat.com>
|
||||||
|
|
||||||
|
@ -76,24 +110,32 @@ gdb/testsuite/ChangeLog
|
||||||
|
|
||||||
* gdb.base/attach-kills.c: New.
|
* gdb.base/attach-kills.c: New.
|
||||||
* gdb.base/attach-kills.exp: New.
|
* gdb.base/attach-kills.exp: New.
|
||||||
|
---
|
||||||
|
gdb/testsuite/gdb.base/attach-kills.c | 25 ++++++++++++++++
|
||||||
|
gdb/testsuite/gdb.base/attach-kills.exp | 49 +++++++++++++++++++++++++++++++
|
||||||
|
2 files changed, 74 insertions(+)
|
||||||
|
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
|
diff --git a/gdb/main.c b/gdb/main.c
|
||||||
|
index 49c9b68..bc19699 100644
|
||||||
--- a/gdb/main.c
|
--- a/gdb/main.c
|
||||||
+++ b/gdb/main.c
|
+++ b/gdb/main.c
|
||||||
@@ -1199,7 +1199,10 @@ captured_main_1 (struct captured_main_args *context)
|
@@ -1080,7 +1080,10 @@ captured_main (void *data)
|
||||||
|
if (isdigit (pid_or_core_arg[0]))
|
||||||
{
|
{
|
||||||
ret = catch_command_errors (attach_command, pid_or_core_arg,
|
if (catch_command_errors (attach_command, pid_or_core_arg,
|
||||||
!batch_flag);
|
- !batch_flag) == 0)
|
||||||
- if (ret == 0)
|
+ !batch_flag) == 0
|
||||||
+ if (ret == 0
|
|
||||||
+ /* attach_command could succeed partially and core_file_command
|
+ /* attach_command could succeed partially and core_file_command
|
||||||
+ would try to kill it. */
|
+ would try to kill it. */
|
||||||
+ && !have_inferiors ())
|
+ && !have_inferiors ())
|
||||||
ret = catch_command_errors (core_file_command,
|
catch_command_errors (core_file_command, pid_or_core_arg,
|
||||||
pid_or_core_arg,
|
!batch_flag);
|
||||||
!batch_flag);
|
}
|
||||||
diff --git a/gdb/testsuite/gdb.base/attach-kills.c b/gdb/testsuite/gdb.base/attach-kills.c
|
diff --git a/gdb/testsuite/gdb.base/attach-kills.c b/gdb/testsuite/gdb.base/attach-kills.c
|
||||||
new file mode 100644
|
new file mode 100644
|
||||||
|
index 0000000..2398f00
|
||||||
--- /dev/null
|
--- /dev/null
|
||||||
+++ b/gdb/testsuite/gdb.base/attach-kills.c
|
+++ b/gdb/testsuite/gdb.base/attach-kills.c
|
||||||
@@ -0,0 +1,25 @@
|
@@ -0,0 +1,25 @@
|
||||||
|
@ -124,6 +166,7 @@ new file mode 100644
|
||||||
+}
|
+}
|
||||||
diff --git a/gdb/testsuite/gdb.base/attach-kills.exp b/gdb/testsuite/gdb.base/attach-kills.exp
|
diff --git a/gdb/testsuite/gdb.base/attach-kills.exp b/gdb/testsuite/gdb.base/attach-kills.exp
|
||||||
new file mode 100644
|
new file mode 100644
|
||||||
|
index 0000000..9a93cb7
|
||||||
--- /dev/null
|
--- /dev/null
|
||||||
+++ b/gdb/testsuite/gdb.base/attach-kills.exp
|
+++ b/gdb/testsuite/gdb.base/attach-kills.exp
|
||||||
@@ -0,0 +1,49 @@
|
@@ -0,0 +1,49 @@
|
||||||
|
@ -176,3 +219,4 @@ new file mode 100644
|
||||||
+}
|
+}
|
||||||
+
|
+
|
||||||
+kill_wait_spawned_process $test_spawn_id
|
+kill_wait_spawned_process $test_spawn_id
|
||||||
|
|
||||||
|
|
|
@ -1,11 +1,3 @@
|
||||||
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-bz533176-fortran-omp-step.patch
|
|
||||||
|
|
||||||
;; Fix stepping with OMP parallel Fortran sections (BZ 533176).
|
|
||||||
;;=push+jan: It requires some better DWARF annotations.
|
|
||||||
|
|
||||||
https://bugzilla.redhat.com/show_bug.cgi?id=533176#c4
|
https://bugzilla.redhat.com/show_bug.cgi?id=533176#c4
|
||||||
|
|
||||||
I find it a bug in DWARF and gdb behaves correctly according to it. From the
|
I find it a bug in DWARF and gdb behaves correctly according to it. From the
|
||||||
|
@ -27,10 +19,13 @@ 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
|
threads need to get synchronized at some point. This is a more general
|
||||||
debugging problem of GOMP outside of the scope of this Bug.
|
debugging problem of GOMP outside of the scope of this Bug.
|
||||||
|
|
||||||
diff --git a/gdb/infrun.c b/gdb/infrun.c
|
|
||||||
--- a/gdb/infrun.c
|
|
||||||
+++ b/gdb/infrun.c
|
Index: gdb-7.7.90.20140613/gdb/infrun.c
|
||||||
@@ -6788,6 +6788,16 @@ process_event_stop_test (struct execution_control_state *ecs)
|
===================================================================
|
||||||
|
--- gdb-7.7.90.20140613.orig/gdb/infrun.c 2014-06-13 21:59:10.835805512 +0200
|
||||||
|
+++ gdb-7.7.90.20140613/gdb/infrun.c 2014-06-13 21:59:31.064829121 +0200
|
||||||
|
@@ -4820,6 +4820,16 @@ process_event_stop_test (struct executio
|
||||||
|
|
||||||
if (ecs->event_thread->control.step_over_calls == STEP_OVER_ALL)
|
if (ecs->event_thread->control.step_over_calls == STEP_OVER_ALL)
|
||||||
{
|
{
|
||||||
|
@ -38,16 +33,16 @@ diff --git a/gdb/infrun.c b/gdb/infrun.c
|
||||||
+ struct minimal_symbol *stopf = lookup_minimal_symbol_by_pc (stop_pc).minsym;
|
+ struct minimal_symbol *stopf = lookup_minimal_symbol_by_pc (stop_pc).minsym;
|
||||||
+
|
+
|
||||||
+ if ((stop_fn == NULL
|
+ 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. */
|
+ /* gcc-4.7.2-9.fc19.x86_64 uses a new format. */
|
||||||
+ && (stopf == NULL
|
+ && (stopf == NULL
|
||||||
+ || strstr (stopf->linkage_name (), "._omp_fn.") == NULL))
|
+ || strstr (MSYMBOL_LINKAGE_NAME (stopf), "._omp_fn.") == NULL))
|
||||||
+{ /* ".omp_fn." */
|
+{ /* ".omp_fn." */
|
||||||
+
|
+
|
||||||
/* We're doing a "next".
|
/* We're doing a "next".
|
||||||
|
|
||||||
Normal (forward) execution: set a breakpoint at the
|
Normal (forward) execution: set a breakpoint at the
|
||||||
@@ -6821,6 +6831,7 @@ process_event_stop_test (struct execution_control_state *ecs)
|
@@ -4855,6 +4865,7 @@ process_event_stop_test (struct executio
|
||||||
|
|
||||||
keep_going (ecs);
|
keep_going (ecs);
|
||||||
return;
|
return;
|
||||||
|
@ -55,10 +50,10 @@ diff --git a/gdb/infrun.c b/gdb/infrun.c
|
||||||
}
|
}
|
||||||
|
|
||||||
/* If we are in a function call trampoline (a stub between the
|
/* 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
|
Index: gdb-7.7.90.20140613/gdb/testsuite/gdb.fortran/omp-step.exp
|
||||||
new file mode 100644
|
===================================================================
|
||||||
--- /dev/null
|
--- /dev/null 1970-01-01 00:00:00.000000000 +0000
|
||||||
+++ b/gdb/testsuite/gdb.fortran/omp-step.exp
|
+++ gdb-7.7.90.20140613/gdb/testsuite/gdb.fortran/omp-step.exp 2014-06-13 21:59:22.801819481 +0200
|
||||||
@@ -0,0 +1,31 @@
|
@@ -0,0 +1,31 @@
|
||||||
+# Copyright 2009 Free Software Foundation, Inc.
|
+# Copyright 2009 Free Software Foundation, Inc.
|
||||||
+
|
+
|
||||||
|
@ -91,10 +86,10 @@ new file mode 100644
|
||||||
+
|
+
|
||||||
+gdb_breakpoint [gdb_get_line_number "success"]
|
+gdb_breakpoint [gdb_get_line_number "success"]
|
||||||
+gdb_continue_to_breakpoint "success" ".*success.*"
|
+gdb_continue_to_breakpoint "success" ".*success.*"
|
||||||
diff --git a/gdb/testsuite/gdb.fortran/omp-step.f90 b/gdb/testsuite/gdb.fortran/omp-step.f90
|
Index: gdb-7.7.90.20140613/gdb/testsuite/gdb.fortran/omp-step.f90
|
||||||
new file mode 100644
|
===================================================================
|
||||||
--- /dev/null
|
--- /dev/null 1970-01-01 00:00:00.000000000 +0000
|
||||||
+++ b/gdb/testsuite/gdb.fortran/omp-step.f90
|
+++ gdb-7.7.90.20140613/gdb/testsuite/gdb.fortran/omp-step.f90 2014-06-13 21:59:22.801819481 +0200
|
||||||
@@ -0,0 +1,32 @@
|
@@ -0,0 +1,32 @@
|
||||||
+! Copyright 2009 Free Software Foundation, Inc.
|
+! Copyright 2009 Free Software Foundation, Inc.
|
||||||
+
|
+
|
||||||
|
|
|
@ -0,0 +1,165 @@
|
||||||
|
Index: gdb-7.11.90.20160807/gdb/config/i386/linux64.mh
|
||||||
|
===================================================================
|
||||||
|
--- gdb-7.11.90.20160807.orig/gdb/config/i386/linux64.mh 2016-08-07 22:27:13.889285274 +0200
|
||||||
|
+++ gdb-7.11.90.20160807/gdb/config/i386/linux64.mh 2016-08-07 22:29:20.451311124 +0200
|
||||||
|
@@ -7,7 +7,7 @@
|
||||||
|
linux-procfs.o linux-ptrace.o linux-btrace.o \
|
||||||
|
linux-waitpid.o linux-personality.o x86-linux.o \
|
||||||
|
x86-linux-dregs.o amd64-linux-siginfo.o linux-namespaces.o
|
||||||
|
-NAT_FILE= config/nm-linux.h
|
||||||
|
+NAT_FILE= nm-linux64.h
|
||||||
|
NAT_CDEPS = $(srcdir)/proc-service.list
|
||||||
|
|
||||||
|
# The dynamically loaded libthread_db needs access to symbols in the
|
||||||
|
Index: gdb-7.11.90.20160807/gdb/config/i386/linux.mh
|
||||||
|
===================================================================
|
||||||
|
--- gdb-7.11.90.20160807.orig/gdb/config/i386/linux.mh 2016-08-07 22:27:13.889285274 +0200
|
||||||
|
+++ gdb-7.11.90.20160807/gdb/config/i386/linux.mh 2016-08-07 22:29:20.451311124 +0200
|
||||||
|
@@ -1,6 +1,6 @@
|
||||||
|
# Host: Intel 386 running GNU/Linux.
|
||||||
|
|
||||||
|
-NAT_FILE= config/nm-linux.h
|
||||||
|
+NAT_FILE= nm-linux.h
|
||||||
|
NATDEPFILES= inf-ptrace.o fork-child.o \
|
||||||
|
x86-nat.o x86-dregs.o i386-linux-nat.o x86-linux-nat.o \
|
||||||
|
proc-service.o linux-thread-db.o \
|
||||||
|
Index: gdb-7.11.90.20160807/gdb/config/i386/nm-linux.h
|
||||||
|
===================================================================
|
||||||
|
--- /dev/null 1970-01-01 00:00:00.000000000 +0000
|
||||||
|
+++ gdb-7.11.90.20160807/gdb/config/i386/nm-linux.h 2016-08-07 22:29:20.451311124 +0200
|
||||||
|
@@ -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 */
|
||||||
|
Index: gdb-7.11.90.20160807/gdb/config/i386/nm-linux64.h
|
||||||
|
===================================================================
|
||||||
|
--- /dev/null 1970-01-01 00:00:00.000000000 +0000
|
||||||
|
+++ gdb-7.11.90.20160807/gdb/config/i386/nm-linux64.h 2016-08-07 22:29:20.451311124 +0200
|
||||||
|
@@ -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 */
|
||||||
|
Index: gdb-7.11.90.20160807/gdb/target.h
|
||||||
|
===================================================================
|
||||||
|
--- gdb-7.11.90.20160807.orig/gdb/target.h 2016-08-07 22:27:13.889285274 +0200
|
||||||
|
+++ gdb-7.11.90.20160807/gdb/target.h 2016-08-07 22:29:20.452311132 +0200
|
||||||
|
@@ -1939,9 +1939,11 @@
|
||||||
|
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. */
|
||||||
|
Index: gdb-7.11.90.20160807/gdb/testsuite/gdb.base/watchpoint-hw-before-run.exp
|
||||||
|
===================================================================
|
||||||
|
--- /dev/null 1970-01-01 00:00:00.000000000 +0000
|
||||||
|
+++ gdb-7.11.90.20160807/gdb/testsuite/gdb.base/watchpoint-hw-before-run.exp 2016-08-07 22:29:20.452311132 +0200
|
||||||
|
@@ -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.*"
|
||||||
|
Index: gdb-7.11.90.20160807/gdb/breakpoint.c
|
||||||
|
===================================================================
|
||||||
|
--- gdb-7.11.90.20160807.orig/gdb/breakpoint.c 2016-08-07 22:33:38.835405458 +0200
|
||||||
|
+++ gdb-7.11.90.20160807/gdb/breakpoint.c 2016-08-07 22:34:45.023941950 +0200
|
||||||
|
@@ -14953,7 +14953,7 @@
|
||||||
|
|
||||||
|
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,
|
|
@ -0,0 +1,68 @@
|
||||||
|
http://sourceware.org/ml/gdb-patches/2010-06/msg00005.html
|
||||||
|
Subject: [rfc patch] nomem: internal_error -> error
|
||||||
|
|
||||||
|
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.
|
||||||
|
|
||||||
|
Index: gdb-7.3.50.20110722/gdb/utils.c
|
||||||
|
===================================================================
|
||||||
|
--- gdb-7.3.50.20110722.orig/gdb/utils.c 2011-07-22 19:28:58.000000000 +0200
|
||||||
|
+++ gdb-7.3.50.20110722/gdb/utils.c 2011-07-22 19:34:25.000000000 +0200
|
||||||
|
@@ -1219,13 +1219,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."));
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
|
@ -1,15 +1,7 @@
|
||||||
From FEDORA_PATCHES Mon Sep 17 00:00:00 2001
|
Index: gdb-7.7/gdb/testsuite/gdb.dwarf2/rh-dwarf4-x86_64.S
|
||||||
From: Fedora GDB patches <invalid@email.com>
|
===================================================================
|
||||||
Date: Fri, 27 Oct 2017 21:07:50 +0200
|
--- /dev/null 1970-01-01 00:00:00.000000000 +0000
|
||||||
Subject: gdb-bz601887-dwarf4-rh-test.patch
|
+++ gdb-7.7/gdb/testsuite/gdb.dwarf2/rh-dwarf4-x86_64.S 2014-02-06 22:02:21.981449555 +0100
|
||||||
|
|
||||||
;; Backport DWARF-4 support (BZ 601887, Tom Tromey).
|
|
||||||
;;=fedoratest
|
|
||||||
|
|
||||||
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
|
|
||||||
--- /dev/null
|
|
||||||
+++ b/gdb/testsuite/gdb.dwarf2/rh-dwarf4-x86_64.S
|
|
||||||
@@ -0,0 +1,167 @@
|
@@ -0,0 +1,167 @@
|
||||||
+/* This testcase is part of GDB, the GNU debugger.
|
+/* This testcase is part of GDB, the GNU debugger.
|
||||||
+
|
+
|
||||||
|
@ -178,10 +170,10 @@ new file mode 100644
|
||||||
+ .string "main"
|
+ .string "main"
|
||||||
+ .ident "GCC: (GNU) 4.4.4 20100503 (Red Hat 4.4.4-2)"
|
+ .ident "GCC: (GNU) 4.4.4 20100503 (Red Hat 4.4.4-2)"
|
||||||
+ .section .note.GNU-stack,"",@progbits
|
+ .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
|
Index: gdb-7.7/gdb/testsuite/gdb.dwarf2/rh-dwarf4-x86_64.c
|
||||||
new file mode 100644
|
===================================================================
|
||||||
--- /dev/null
|
--- /dev/null 1970-01-01 00:00:00.000000000 +0000
|
||||||
+++ b/gdb/testsuite/gdb.dwarf2/rh-dwarf4-x86_64.c
|
+++ gdb-7.7/gdb/testsuite/gdb.dwarf2/rh-dwarf4-x86_64.c 2014-02-06 22:02:21.981449555 +0100
|
||||||
@@ -0,0 +1,22 @@
|
@@ -0,0 +1,22 @@
|
||||||
+/* This testcase is part of GDB, the GNU debugger.
|
+/* This testcase is part of GDB, the GNU debugger.
|
||||||
+
|
+
|
||||||
|
@ -205,10 +197,10 @@ new file mode 100644
|
||||||
+{
|
+{
|
||||||
+ return 0;
|
+ return 0;
|
||||||
+}
|
+}
|
||||||
diff --git a/gdb/testsuite/gdb.dwarf2/rh-dwarf4-x86_64.exp b/gdb/testsuite/gdb.dwarf2/rh-dwarf4-x86_64.exp
|
Index: gdb-7.7/gdb/testsuite/gdb.dwarf2/rh-dwarf4-x86_64.exp
|
||||||
new file mode 100644
|
===================================================================
|
||||||
--- /dev/null
|
--- /dev/null 1970-01-01 00:00:00.000000000 +0000
|
||||||
+++ b/gdb/testsuite/gdb.dwarf2/rh-dwarf4-x86_64.exp
|
+++ gdb-7.7/gdb/testsuite/gdb.dwarf2/rh-dwarf4-x86_64.exp 2014-02-06 22:12:10.788032417 +0100
|
||||||
@@ -0,0 +1,42 @@
|
@@ -0,0 +1,42 @@
|
||||||
+# Copyright 2010 Free Software Foundation, Inc.
|
+# Copyright 2010 Free Software Foundation, Inc.
|
||||||
+
|
+
|
||||||
|
|
|
@ -1,17 +1,7 @@
|
||||||
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-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).
|
Fix gdb.solib_address (fix by Phil Muldoon).
|
||||||
|
|
||||||
s/solib_address/solib_name/ during upstreaming.
|
s/solib_address/solib_name/ during upstreaming.
|
||||||
|
|
||||||
diff --git a/gdb/testsuite/gdb.python/rh634108-solib_address.exp b/gdb/testsuite/gdb.python/rh634108-solib_address.exp
|
|
||||||
new file mode 100644
|
|
||||||
--- /dev/null
|
--- /dev/null
|
||||||
+++ b/gdb/testsuite/gdb.python/rh634108-solib_address.exp
|
+++ b/gdb/testsuite/gdb.python/rh634108-solib_address.exp
|
||||||
@@ -0,0 +1,24 @@
|
@@ -0,0 +1,24 @@
|
||||||
|
|
|
@ -1,15 +1,6 @@
|
||||||
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-ccache-workaround.patch
|
|
||||||
|
|
||||||
;; Workaround ccache making lineno non-zero for command-line definitions.
|
|
||||||
;;=fedoratest: ccache is rarely used and it is even fixed now.
|
|
||||||
|
|
||||||
diff --git a/gdb/testsuite/gdb.base/macscp.exp b/gdb/testsuite/gdb.base/macscp.exp
|
|
||||||
--- a/gdb/testsuite/gdb.base/macscp.exp
|
--- a/gdb/testsuite/gdb.base/macscp.exp
|
||||||
+++ b/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-*"] } {
|
@@ -33,6 +33,14 @@ if [test_compiler_info gcc*] {
|
||||||
lappend options additional_flags=-g3
|
lappend options additional_flags=-g3
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
|
@ -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
|
|
|
@ -1,15 +1,6 @@
|
||||||
From FEDORA_PATCHES Mon Sep 17 00:00:00 2001
|
--- gdb-7.11/gdb/remote.c-orig 2016-04-06 17:46:52.428921496 +0200
|
||||||
From: Fedora GDB patches <invalid@email.com>
|
+++ gdb-7.11/gdb/remote.c 2016-04-06 18:28:26.781923516 +0200
|
||||||
Date: Fri, 27 Oct 2017 21:07:50 +0200
|
@@ -13002,7 +13002,17 @@ remote_pid_to_exec_file (struct target_o
|
||||||
Subject: gdb-container-rh-pkg.patch
|
|
||||||
|
|
||||||
;; Add messages suggesting more recent RHEL gdbserver (RH BZ 1321114).
|
|
||||||
;;=fedora
|
|
||||||
|
|
||||||
diff --git a/gdb/remote.c b/gdb/remote.c
|
|
||||||
--- a/gdb/remote.c
|
|
||||||
+++ b/gdb/remote.c
|
|
||||||
@@ -14031,7 +14031,17 @@ remote_target::pid_to_exec_file (int pid)
|
|
||||||
char *annex = NULL;
|
char *annex = NULL;
|
||||||
|
|
||||||
if (packet_support (PACKET_qXfer_exec_file) != PACKET_ENABLE)
|
if (packet_support (PACKET_qXfer_exec_file) != PACKET_ENABLE)
|
||||||
|
@ -26,5 +17,5 @@ diff --git a/gdb/remote.c b/gdb/remote.c
|
||||||
+ return NULL;
|
+ return NULL;
|
||||||
+ }
|
+ }
|
||||||
|
|
||||||
inferior *inf = find_inferior_pid (this, pid);
|
if (filename != NULL)
|
||||||
if (inf == NULL)
|
xfree (filename);
|
||||||
|
|
|
@ -1,12 +1,3 @@
|
||||||
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-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@.*>
|
|
||||||
|
|
||||||
http://sourceware.org/ml/gdb-patches/2009-10/msg00142.html
|
http://sourceware.org/ml/gdb-patches/2009-10/msg00142.html
|
||||||
Subject: [patch] Fix GNU/Linux core open: Can't read pathname for load map: Input/output error.
|
Subject: [patch] Fix GNU/Linux core open: Can't read pathname for load map: Input/output error.
|
||||||
|
|
||||||
|
@ -16,9 +7,10 @@ commit 7d760051ffb8a23cdc51342d4e6243fbc462f73f
|
||||||
Author: Ulrich Weigand <uweigand@de.ibm.com>
|
Author: Ulrich Weigand <uweigand@de.ibm.com>
|
||||||
Date: Wed Sep 25 11:52:50 2013 +0000
|
Date: Wed Sep 25 11:52:50 2013 +0000
|
||||||
|
|
||||||
diff --git a/gdb/testsuite/gdb.base/solib-symbol.exp b/gdb/testsuite/gdb.base/solib-symbol.exp
|
Index: gdb-7.6.50.20130731-cvs/gdb/testsuite/gdb.base/solib-symbol.exp
|
||||||
--- a/gdb/testsuite/gdb.base/solib-symbol.exp
|
===================================================================
|
||||||
+++ b/gdb/testsuite/gdb.base/solib-symbol.exp
|
--- gdb-7.6.50.20130731-cvs.orig/gdb/testsuite/gdb.base/solib-symbol.exp 2013-08-02 16:27:28.833259471 +0200
|
||||||
|
+++ gdb-7.6.50.20130731-cvs/gdb/testsuite/gdb.base/solib-symbol.exp 2013-08-02 16:28:22.549330973 +0200
|
||||||
@@ -29,6 +29,7 @@ set testfile "solib-symbol-main"
|
@@ -29,6 +29,7 @@ set testfile "solib-symbol-main"
|
||||||
set srcfile ${srcdir}/${subdir}/${testfile}.c
|
set srcfile ${srcdir}/${subdir}/${testfile}.c
|
||||||
set binfile [standard_output_file ${testfile}]
|
set binfile [standard_output_file ${testfile}]
|
||||||
|
@ -27,7 +19,7 @@ diff --git a/gdb/testsuite/gdb.base/solib-symbol.exp b/gdb/testsuite/gdb.base/so
|
||||||
|
|
||||||
if [get_compiler_info] {
|
if [get_compiler_info] {
|
||||||
return -1
|
return -1
|
||||||
@@ -71,8 +72,26 @@ gdb_test "br foo2" \
|
@@ -72,8 +73,26 @@ gdb_test "br foo2" \
|
||||||
"Breakpoint.*: foo2. .2 locations..*" \
|
"Breakpoint.*: foo2. .2 locations..*" \
|
||||||
"foo2 in mdlib"
|
"foo2 in mdlib"
|
||||||
|
|
||||||
|
|
|
@ -1,17 +1,10 @@
|
||||||
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-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
|
https://bugzilla.redhat.com/show_bug.cgi?id=1020004
|
||||||
|
|
||||||
diff --git a/gdb/data-directory/Makefile.in b/gdb/data-directory/Makefile.in
|
Index: gdb-7.12.50.20170207/gdb/data-directory/Makefile.in
|
||||||
--- a/gdb/data-directory/Makefile.in
|
===================================================================
|
||||||
+++ b/gdb/data-directory/Makefile.in
|
--- gdb-7.12.50.20170207.orig/gdb/data-directory/Makefile.in 2017-02-26 21:10:31.418894975 +0100
|
||||||
@@ -71,6 +71,8 @@ PYTHON_FILE_LIST = \
|
+++ gdb-7.12.50.20170207/gdb/data-directory/Makefile.in 2017-02-26 21:11:07.083147930 +0100
|
||||||
|
@@ -71,6 +71,8 @@
|
||||||
gdb/__init__.py \
|
gdb/__init__.py \
|
||||||
gdb/FrameDecorator.py \
|
gdb/FrameDecorator.py \
|
||||||
gdb/FrameIterator.py \
|
gdb/FrameIterator.py \
|
||||||
|
@ -20,18 +13,18 @@ diff --git a/gdb/data-directory/Makefile.in b/gdb/data-directory/Makefile.in
|
||||||
gdb/frames.py \
|
gdb/frames.py \
|
||||||
gdb/printing.py \
|
gdb/printing.py \
|
||||||
gdb/prompt.py \
|
gdb/prompt.py \
|
||||||
@@ -79,6 +81,7 @@ PYTHON_FILE_LIST = \
|
@@ -83,6 +85,7 @@
|
||||||
gdb/xmethod.py \
|
gdb/command/pahole.py \
|
||||||
gdb/command/__init__.py \
|
gdb/command/xmethods.py \
|
||||||
gdb/command/explore.py \
|
gdb/command/explore.py \
|
||||||
+ gdb/command/backtrace.py \
|
+ gdb/command/backtrace.py \
|
||||||
gdb/command/frame_filters.py \
|
gdb/command/frame_filters.py \
|
||||||
gdb/command/pretty_printers.py \
|
gdb/command/pretty_printers.py \
|
||||||
gdb/command/prompt.py \
|
gdb/command/prompt.py \
|
||||||
diff --git a/gdb/python/lib/gdb/FrameWrapper.py b/gdb/python/lib/gdb/FrameWrapper.py
|
Index: gdb-7.12.50.20170207/gdb/python/lib/gdb/FrameWrapper.py
|
||||||
new file mode 100644
|
===================================================================
|
||||||
--- /dev/null
|
--- /dev/null 1970-01-01 00:00:00.000000000 +0000
|
||||||
+++ b/gdb/python/lib/gdb/FrameWrapper.py
|
+++ gdb-7.12.50.20170207/gdb/python/lib/gdb/FrameWrapper.py 2017-02-26 21:10:31.419894983 +0100
|
||||||
@@ -0,0 +1,122 @@
|
@@ -0,0 +1,122 @@
|
||||||
+# Wrapper API for frames.
|
+# Wrapper API for frames.
|
||||||
+
|
+
|
||||||
|
@ -155,10 +148,10 @@ new file mode 100644
|
||||||
+
|
+
|
||||||
+ def __getattr__ (self, name):
|
+ def __getattr__ (self, name):
|
||||||
+ return getattr (self.frame, name)
|
+ return getattr (self.frame, name)
|
||||||
diff --git a/gdb/python/lib/gdb/backtrace.py b/gdb/python/lib/gdb/backtrace.py
|
Index: gdb-7.12.50.20170207/gdb/python/lib/gdb/backtrace.py
|
||||||
new file mode 100644
|
===================================================================
|
||||||
--- /dev/null
|
--- /dev/null 1970-01-01 00:00:00.000000000 +0000
|
||||||
+++ b/gdb/python/lib/gdb/backtrace.py
|
+++ gdb-7.12.50.20170207/gdb/python/lib/gdb/backtrace.py 2017-02-26 21:10:31.419894983 +0100
|
||||||
@@ -0,0 +1,42 @@
|
@@ -0,0 +1,42 @@
|
||||||
+# Filtering backtrace.
|
+# Filtering backtrace.
|
||||||
+
|
+
|
||||||
|
@ -202,10 +195,10 @@ new file mode 100644
|
||||||
+ return iter
|
+ return iter
|
||||||
+ return old_frame_filter (iter)
|
+ return old_frame_filter (iter)
|
||||||
+
|
+
|
||||||
diff --git a/gdb/python/lib/gdb/command/backtrace.py b/gdb/python/lib/gdb/command/backtrace.py
|
Index: gdb-7.12.50.20170207/gdb/python/lib/gdb/command/backtrace.py
|
||||||
new file mode 100644
|
===================================================================
|
||||||
--- /dev/null
|
--- /dev/null 1970-01-01 00:00:00.000000000 +0000
|
||||||
+++ b/gdb/python/lib/gdb/command/backtrace.py
|
+++ gdb-7.12.50.20170207/gdb/python/lib/gdb/command/backtrace.py 2017-02-26 21:10:31.419894983 +0100
|
||||||
@@ -0,0 +1,106 @@
|
@@ -0,0 +1,106 @@
|
||||||
+# New backtrace command.
|
+# New backtrace command.
|
||||||
+
|
+
|
||||||
|
|
|
@ -1,71 +1,63 @@
|
||||||
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-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.
|
Fedora: Force libncursesw over libncurses to match the includes.
|
||||||
https://bugzilla.redhat.com/show_bug.cgi?id=1270534
|
https://bugzilla.redhat.com/show_bug.cgi?id=1270534
|
||||||
|
|
||||||
diff --git a/gdb/configure b/gdb/configure
|
diff -dup -rup gdb-7.10.50.20151113-orig/gdb/configure gdb-7.10.50.20151113/gdb/configure
|
||||||
--- a/gdb/configure
|
--- gdb-7.10.50.20151113-orig/gdb/configure 2015-11-14 16:14:04.404118312 +0100
|
||||||
+++ b/gdb/configure
|
+++ gdb-7.10.50.20151113/gdb/configure 2015-11-14 16:17:59.074566047 +0100
|
||||||
@@ -9649,6 +9649,7 @@ if test x"$prefer_curses" = xyes; then
|
@@ -8463,6 +8463,7 @@ if test x"$prefer_curses" = xyes; then
|
||||||
# search /usr/local/include, if ncurses is installed in /usr/local. A
|
# search /usr/local/include, if ncurses is installed in /usr/local. A
|
||||||
# default installation of ncurses on alpha*-dec-osf* will lead to such
|
# default installation of ncurses on alpha*-dec-osf* will lead to such
|
||||||
# a situation.
|
# a situation.
|
||||||
+ # Fedora: Force libncursesw over libncurses to match the includes.
|
+ # Fedora: Force libncursesw over libncurses to match the includes.
|
||||||
{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for library containing waddstr" >&5
|
{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for library containing waddstr" >&5
|
||||||
$as_echo_n "checking for library containing waddstr... " >&6; }
|
$as_echo_n "checking for library containing waddstr... " >&6; }
|
||||||
if ${ac_cv_search_waddstr+:} false; then :
|
if test "${ac_cv_search_waddstr+set}" = set; then :
|
||||||
@@ -9673,7 +9674,7 @@ return waddstr ();
|
@@ -8487,7 +8488,7 @@ return waddstr ();
|
||||||
return 0;
|
return 0;
|
||||||
}
|
}
|
||||||
_ACEOF
|
_ACEOF
|
||||||
-for ac_lib in '' ncursesw ncurses cursesX curses; do
|
-for ac_lib in '' ncurses cursesX curses; do
|
||||||
+for ac_lib in '' ncursesw; do
|
+for ac_lib in '' ncursesw; do
|
||||||
if test -z "$ac_lib"; then
|
if test -z "$ac_lib"; then
|
||||||
ac_res="none required"
|
ac_res="none required"
|
||||||
else
|
else
|
||||||
@@ -9747,6 +9748,7 @@ case $host_os in
|
@@ -8561,6 +8562,7 @@ case $host_os in
|
||||||
esac
|
esac
|
||||||
|
|
||||||
# These are the libraries checked by Readline.
|
# These are the libraries checked by Readline.
|
||||||
+# Fedora: Force libncursesw over libncurses to match the includes.
|
+# Fedora: Force libncursesw over libncurses to match the includes.
|
||||||
{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for library containing tgetent" >&5
|
{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for library containing tgetent" >&5
|
||||||
$as_echo_n "checking for library containing tgetent... " >&6; }
|
$as_echo_n "checking for library containing tgetent... " >&6; }
|
||||||
if ${ac_cv_search_tgetent+:} false; then :
|
if test "${ac_cv_search_tgetent+set}" = set; then :
|
||||||
@@ -9771,7 +9773,7 @@ return tgetent ();
|
@@ -8585,7 +8587,7 @@ return tgetent ();
|
||||||
return 0;
|
return 0;
|
||||||
}
|
}
|
||||||
_ACEOF
|
_ACEOF
|
||||||
-for ac_lib in '' termcap tinfow tinfo curses ncursesw ncurses; do
|
-for ac_lib in '' termcap tinfo curses ncurses; do
|
||||||
+for ac_lib in '' ncursesw; do
|
+for ac_lib in '' termcap tinfo ncursesw; do
|
||||||
if test -z "$ac_lib"; then
|
if test -z "$ac_lib"; then
|
||||||
ac_res="none required"
|
ac_res="none required"
|
||||||
else
|
else
|
||||||
diff --git a/gdb/configure.ac b/gdb/configure.ac
|
diff -dup -rup gdb-7.10.50.20151113-orig/gdb/configure.ac gdb-7.10.50.20151113/gdb/configure.ac
|
||||||
--- a/gdb/configure.ac
|
--- gdb-7.10.50.20151113-orig/gdb/configure.ac 2015-11-14 16:14:04.404118312 +0100
|
||||||
+++ b/gdb/configure.ac
|
+++ gdb-7.10.50.20151113/gdb/configure.ac 2015-11-14 16:17:54.898540284 +0100
|
||||||
@@ -712,7 +712,8 @@ if test x"$prefer_curses" = xyes; then
|
@@ -771,7 +771,8 @@ if test x"$prefer_curses" = xyes; then
|
||||||
# search /usr/local/include, if ncurses is installed in /usr/local. A
|
# search /usr/local/include, if ncurses is installed in /usr/local. A
|
||||||
# default installation of ncurses on alpha*-dec-osf* will lead to such
|
# default installation of ncurses on alpha*-dec-osf* will lead to such
|
||||||
# a situation.
|
# a situation.
|
||||||
- AC_SEARCH_LIBS(waddstr, [ncursesw ncurses cursesX curses])
|
- AC_SEARCH_LIBS(waddstr, [ncurses cursesX curses])
|
||||||
+ # Fedora: Force libncursesw over libncurses to match the includes.
|
+ # Fedora: Force libncursesw over libncurses to match the includes.
|
||||||
+ AC_SEARCH_LIBS(waddstr, [ncursesw])
|
+ AC_SEARCH_LIBS(waddstr, [ncursesw])
|
||||||
|
|
||||||
if test "$ac_cv_search_waddstr" != no; then
|
if test "$ac_cv_search_waddstr" != no; then
|
||||||
curses_found=yes
|
curses_found=yes
|
||||||
@@ -754,7 +755,8 @@ case $host_os in
|
@@ -813,7 +814,8 @@ case $host_os in
|
||||||
esac
|
esac
|
||||||
|
|
||||||
# These are the libraries checked by Readline.
|
# These are the libraries checked by Readline.
|
||||||
-AC_SEARCH_LIBS(tgetent, [termcap tinfow tinfo curses ncursesw ncurses])
|
-AC_SEARCH_LIBS(tgetent, [termcap tinfo curses ncurses])
|
||||||
+# Fedora: Force libncursesw over libncurses to match the includes.
|
+# 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
|
if test "$ac_cv_search_tgetent" = no; then
|
||||||
CONFIG_OBS="$CONFIG_OBS stub-termcap.o"
|
CONFIG_OBS="$CONFIG_OBS stub-termcap.o"
|
||||||
|
|
|
@ -0,0 +1,27 @@
|
||||||
|
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 2009-12-21 20:26:30.000000000 +0100
|
||||||
|
+++ ./gdb/infrun.c 2009-12-21 20:26:11.000000000 +0100
|
||||||
|
@@ -375,6 +375,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
|
|
@ -1,19 +1,15 @@
|
||||||
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
|
|
||||||
|
|
||||||
;; Display Fortran strings in backtraces.
|
|
||||||
;;=fedoratest
|
|
||||||
|
|
||||||
http://sourceware.org/ml/gdb-patches/2014-07/msg00709.html
|
http://sourceware.org/ml/gdb-patches/2014-07/msg00709.html
|
||||||
|
Subject: [patch] Display Fortran strings in backtraces
|
||||||
|
|
||||||
|
|
||||||
Hi,
|
Hi,
|
||||||
|
|
||||||
for Fortran it fixes displaying normal strings also in frames/backtraces:
|
for Fortran it fixes displaying normal strings also in frames/backtraces:
|
||||||
|
|
||||||
(gdb) frame
|
(gdb) frame
|
||||||
|
#0 f (s=..., _s=3) at ./gdb.fortran/fortran-frame-string.f90:24
|
||||||
->
|
->
|
||||||
|
#0 f (s='foo', _s=3) at ./gdb.fortran/fortran-frame-string.f90:24
|
||||||
|
|
||||||
The patch is simple and I do not see why it should not be this way.
|
The patch is simple and I do not see why it should not be this way.
|
||||||
|
|
||||||
|
@ -25,11 +21,14 @@ the Intel VLA patchset as it in fact is completely unrelated to "VLA".
|
||||||
|
|
||||||
No regressions on {x86_64,x86_64-m32,i686}-fedora22pre-linux-gnu.
|
No regressions on {x86_64,x86_64-m32,i686}-fedora22pre-linux-gnu.
|
||||||
|
|
||||||
|
|
||||||
Thanks,
|
Thanks,
|
||||||
Jan
|
Jan
|
||||||
|
|
||||||
|
|
||||||
diff --git a/gdb/testsuite/gdb.fortran/fortran-frame-string.exp b/gdb/testsuite/gdb.fortran/fortran-frame-string.exp
|
diff --git a/gdb/testsuite/gdb.fortran/fortran-frame-string.exp b/gdb/testsuite/gdb.fortran/fortran-frame-string.exp
|
||||||
new file mode 100644
|
new file mode 100644
|
||||||
|
index 0000000..4b78266
|
||||||
--- /dev/null
|
--- /dev/null
|
||||||
+++ b/gdb/testsuite/gdb.fortran/fortran-frame-string.exp
|
+++ b/gdb/testsuite/gdb.fortran/fortran-frame-string.exp
|
||||||
@@ -0,0 +1,36 @@
|
@@ -0,0 +1,36 @@
|
||||||
|
@ -71,6 +70,7 @@ new file mode 100644
|
||||||
+gdb_test "frame" { \(s='foo', .*}
|
+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
|
diff --git a/gdb/testsuite/gdb.fortran/fortran-frame-string.f90 b/gdb/testsuite/gdb.fortran/fortran-frame-string.f90
|
||||||
new file mode 100644
|
new file mode 100644
|
||||||
|
index 0000000..3d1576f
|
||||||
--- /dev/null
|
--- /dev/null
|
||||||
+++ b/gdb/testsuite/gdb.fortran/fortran-frame-string.f90
|
+++ b/gdb/testsuite/gdb.fortran/fortran-frame-string.f90
|
||||||
@@ -0,0 +1,28 @@
|
@@ -0,0 +1,28 @@
|
||||||
|
|
|
@ -0,0 +1,171 @@
|
||||||
|
http://sourceware.org/ml/gdb-patches/2010-07/msg00184.html
|
||||||
|
Subject: Re: [0/4] RFC: add DWARF index support
|
||||||
|
|
||||||
|
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/ChangeLog | 5 +++++
|
||||||
|
gdb/Makefile.in | 11 ++++++++++-
|
||||||
|
gdb/doc/ChangeLog | 4 ++++
|
||||||
|
gdb/doc/gdb.texinfo | 8 ++++++++
|
||||||
|
gdb/gdb-add-index | 30 ++++++++++++++++++++++++++++++
|
||||||
|
5 files changed, 57 insertions(+), 1 deletions(-)
|
||||||
|
create mode 100755 gdb/gdb-add-index
|
||||||
|
|
||||||
|
Index: gdb-7.6.90.20140127/gdb/Makefile.in
|
||||||
|
===================================================================
|
||||||
|
--- gdb-7.6.90.20140127.orig/gdb/Makefile.in 2014-02-06 17:37:54.555975958 +0100
|
||||||
|
+++ gdb-7.6.90.20140127/gdb/Makefile.in 2014-02-06 17:38:52.110038415 +0100
|
||||||
|
@@ -1093,6 +1093,15 @@ install-only: install-gstack $(CONFIG_IN
|
||||||
|
$(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:
|
||||||
|
Index: gdb-7.6.90.20140127/gdb/doc/gdb.texinfo
|
||||||
|
===================================================================
|
||||||
|
--- gdb-7.6.90.20140127.orig/gdb/doc/gdb.texinfo 2014-02-06 17:37:50.822971940 +0100
|
||||||
|
+++ gdb-7.6.90.20140127/gdb/doc/gdb.texinfo 2014-02-06 17:37:54.565975968 +0100
|
||||||
|
@@ -17749,6 +17749,14 @@ There are currently some limitation on i
|
||||||
|
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
|
||||||
|
|
||||||
|
@@ -43878,6 +43886,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
|
||||||
|
@@ -44530,6 +44539,54 @@ gdb(1), @code{info -f gdb -n Startup}
|
||||||
|
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
|
||||||
|
+
|
||||||
|
+@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
|
||||||
|
Index: gdb-7.6.90.20140127/gdb/doc/Makefile.in
|
||||||
|
===================================================================
|
||||||
|
--- gdb-7.6.90.20140127.orig/gdb/doc/Makefile.in 2014-02-06 17:37:50.824971942 +0100
|
||||||
|
+++ gdb-7.6.90.20140127/gdb/doc/Makefile.in 2014-02-06 17:37:54.565975968 +0100
|
||||||
|
@@ -165,7 +165,7 @@ POD2MAN5 = pod2man --center="GNU Develop
|
||||||
|
--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)
|
||||||
|
|
||||||
|
@@ -590,6 +590,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
|
|
@ -1,16 +1,39 @@
|
||||||
From FEDORA_PATCHES Mon Sep 17 00:00:00 2001
|
Index: gdb-7.7.90.20140613/gdb/dwarf2read.c
|
||||||
From: Fedora GDB patches <invalid@email.com>
|
===================================================================
|
||||||
Date: Fri, 27 Oct 2017 21:07:50 +0200
|
--- gdb-7.7.90.20140613.orig/gdb/dwarf2read.c 2014-06-13 21:56:54.744653443 +0200
|
||||||
Subject: gdb-glibc-strstr-workaround.patch
|
+++ gdb-7.7.90.20140613/gdb/dwarf2read.c 2014-06-13 22:01:51.529990684 +0200
|
||||||
|
@@ -17695,6 +17695,26 @@ new_symbol_full (struct die_info *die, s
|
||||||
;; Workaround PR libc/14166 for inferior calls of strstr.
|
/* Cache this symbol's name and the name's demangled form (if any). */
|
||||||
;;=fedoratest: Compatibility with RHELs (unchecked which ones).
|
SYMBOL_SET_LANGUAGE (sym, cu->language, &objfile->objfile_obstack);
|
||||||
|
linkagename = dwarf2_physname (name, die, cu);
|
||||||
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
|
+ /* Workaround for:
|
||||||
--- /dev/null
|
+ * invalid IFUNC DW_AT_linkage_name: memmove strstr time
|
||||||
+++ b/gdb/testsuite/gdb.base/gnu-ifunc-strstr-workaround.exp
|
+ * http://sourceware.org/bugzilla/show_bug.cgi?id=14166 */
|
||||||
@@ -0,0 +1,115 @@
|
+ 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
|
||||||
|
Index: gdb-7.7.90.20140613/gdb/testsuite/gdb.base/gnu-ifunc-strstr-workaround.exp
|
||||||
|
===================================================================
|
||||||
|
--- /dev/null 1970-01-01 00:00:00.000000000 +0000
|
||||||
|
+++ gdb-7.7.90.20140613/gdb/testsuite/gdb.base/gnu-ifunc-strstr-workaround.exp 2014-06-13 21:59:41.174840871 +0200
|
||||||
|
@@ -0,0 +1,108 @@
|
||||||
+# Copyright (C) 2012 Free Software Foundation, Inc.
|
+# Copyright (C) 2012 Free Software Foundation, Inc.
|
||||||
+
|
+
|
||||||
+# This program is free software; you can redistribute it and/or modify
|
+# This program is free software; you can redistribute it and/or modify
|
||||||
|
@ -73,10 +96,6 @@ new file mode 100644
|
||||||
+ set addr $expect_out(1,string)
|
+ set addr $expect_out(1,string)
|
||||||
+ pass "$test (fixed glibc)"
|
+ 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 $" {
|
+ -re " = {char \\*\\(const char \\*, const char \\*\\)} 0x\[0-9a-f\]+ <strstr>\r\n$gdb_prompt $" {
|
||||||
+ untested "$test (gnu-ifunc not in use by glibc)"
|
+ untested "$test (gnu-ifunc not in use by glibc)"
|
||||||
+ return 0
|
+ return 0
|
||||||
|
@ -116,9 +135,6 @@ new file mode 100644
|
||||||
+ -re " = {<text gnu-indirect-function variable, no debug info>} $addr <__libc_strstr>\r\n$gdb_prompt $" {
|
+ -re " = {<text gnu-indirect-function variable, no debug info>} $addr <__libc_strstr>\r\n$gdb_prompt $" {
|
||||||
+ pass "$test (fixed glibc)"
|
+ 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 $" {
|
+ -re " = {void \\*\\(void\\)} 0x\[0-9a-f\]+ <strstr>\r\n$gdb_prompt $" {
|
||||||
+ fail $test
|
+ fail $test
|
||||||
+ }
|
+ }
|
||||||
|
|
|
@ -0,0 +1,31 @@
|
||||||
|
http://sourceware.org/ml/gdb-patches/2011-08/msg00331.html
|
||||||
|
Subject: [RFC] Work around PR libc/13097 "linux-vdso.so.1" #2
|
||||||
|
|
||||||
|
Hi,
|
||||||
|
|
||||||
|
missed the x86_64-m32 case:
|
||||||
|
|
||||||
|
gdb/
|
||||||
|
2011-08-16 Jan Kratochvil <jan.kratochvil@redhat.com>
|
||||||
|
|
||||||
|
Work around PR libc/13097.
|
||||||
|
* solib.c (update_solib_list): Ignore "linux-vdso.so.1".
|
||||||
|
|
||||||
|
Index: gdb-7.9.50.20150520/gdb/solib.c
|
||||||
|
===================================================================
|
||||||
|
--- gdb-7.9.50.20150520.orig/gdb/solib.c 2015-05-31 17:04:16.870802493 +0200
|
||||||
|
+++ gdb-7.9.50.20150520/gdb/solib.c 2015-05-31 17:04:38.824941054 +0200
|
||||||
|
@@ -893,8 +893,11 @@ update_solib_list (int from_tty, struct
|
||||||
|
|
||||||
|
TRY
|
||||||
|
{
|
||||||
|
- /* Fill in the rest of the `struct so_list' node. */
|
||||||
|
- if (!solib_map_sections (i))
|
||||||
|
+ /* Fill in the rest of the `struct so_list' node.
|
||||||
|
+ Work around PR libc/13097. */
|
||||||
|
+ if (!solib_map_sections (i)
|
||||||
|
+ && strcmp (i->so_original_name, "linux-vdso.so.1") != 0
|
||||||
|
+ && strcmp (i->so_original_name, "linux-gate.so.1") != 0)
|
||||||
|
{
|
||||||
|
not_found++;
|
||||||
|
if (not_found_filename == NULL)
|
|
@ -1,12 +1,6 @@
|
||||||
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
|
|
||||||
|
|
||||||
;; Fix crash of -readnow /usr/lib/debug/usr/bin/gnatbind.debug (BZ 1069211).
|
|
||||||
;;=push+jan
|
|
||||||
|
|
||||||
http://sourceware.org/ml/gdb-patches/2014-02/msg00731.html
|
http://sourceware.org/ml/gdb-patches/2014-02/msg00731.html
|
||||||
|
Subject: [patch] gdb_assert -> complaint for weird DWARF
|
||||||
|
|
||||||
|
|
||||||
--6TrnltStXW4iwmi0
|
--6TrnltStXW4iwmi0
|
||||||
Content-Type: text/plain; charset=us-ascii
|
Content-Type: text/plain; charset=us-ascii
|
||||||
|
@ -27,6 +21,7 @@ Fedora GCC build, not in FSF GCC build, more info at:
|
||||||
https://bugzilla.redhat.com/show_bug.cgi?id=1069382
|
https://bugzilla.redhat.com/show_bug.cgi?id=1069382
|
||||||
http://people.redhat.com/jkratoch/gcc-debuginfo-4.8.2-7.fc20.x86_64-gnatbind.debug
|
http://people.redhat.com/jkratoch/gcc-debuginfo-4.8.2-7.fc20.x86_64-gnatbind.debug
|
||||||
|
|
||||||
|
|
||||||
Thanks,
|
Thanks,
|
||||||
Jan
|
Jan
|
||||||
|
|
||||||
|
@ -39,181 +34,22 @@ gdb/
|
||||||
|
|
||||||
* dwarf2read.c (process_die): Change gdb_assert to complaint.
|
* dwarf2read.c (process_die): Change gdb_assert to complaint.
|
||||||
|
|
||||||
diff --git a/gdb/dwarf2/read.c b/gdb/dwarf2/read.c
|
Index: gdb-7.99.90.20170420/gdb/dwarf2read.c
|
||||||
--- a/gdb/dwarf2/read.c
|
===================================================================
|
||||||
+++ b/gdb/dwarf2/read.c
|
--- gdb-7.99.90.20170420.orig/gdb/dwarf2read.c 2017-04-20 23:15:26.578897210 +0200
|
||||||
@@ -10162,6 +10162,13 @@ class process_die_scope
|
+++ gdb-7.99.90.20170420/gdb/dwarf2read.c 2017-04-20 23:15:57.805106371 +0200
|
||||||
static void
|
@@ -8426,7 +8426,13 @@
|
||||||
process_die (struct die_info *die, struct dwarf2_cu *cu)
|
struct cleanup *in_process;
|
||||||
{
|
|
||||||
|
/* We should only be processing those not already in process. */
|
||||||
|
- gdb_assert (!die->in_process);
|
||||||
+ if (die->in_process)
|
+ if (die->in_process)
|
||||||
+ {
|
+ {
|
||||||
+ complaint (_("DIE at 0x%s attempted to be processed twice"),
|
+ complaint (&symfile_complaints,
|
||||||
+ sect_offset_str (die->sect_off));
|
+ _("DIE at 0x%x attempted to be processed twice"),
|
||||||
|
+ to_underlying (die->sect_off));
|
||||||
+ return;
|
+ return;
|
||||||
+ }
|
+ }
|
||||||
+
|
|
||||||
process_die_scope scope (die, cu);
|
|
||||||
|
|
||||||
switch (die->tag)
|
die->in_process = 1;
|
||||||
diff --git a/gdb/linux-nat.c b/gdb/linux-nat.c
|
in_process = make_cleanup (reset_die_in_process,die);
|
||||||
--- 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;
|
|
||||||
|
|
||||||
+#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" {
|
|
||||||
|
|
|
@ -1,15 +1,8 @@
|
||||||
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-jit-reader-multilib.patch
|
|
||||||
|
|
||||||
;; Fix jit-reader.h for multi-lib.
|
|
||||||
;;=push+jan
|
|
||||||
|
|
||||||
diff --git a/gdb/configure b/gdb/configure
|
diff --git a/gdb/configure b/gdb/configure
|
||||||
|
index 7ff74ba..00a5b5b 100755
|
||||||
--- a/gdb/configure
|
--- a/gdb/configure
|
||||||
+++ b/gdb/configure
|
+++ b/gdb/configure
|
||||||
@@ -9968,10 +9968,12 @@ _ACEOF
|
@@ -7382,10 +7382,12 @@ _ACEOF
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
@ -26,9 +19,10 @@ diff --git a/gdb/configure b/gdb/configure
|
||||||
TARGET_PTR="unsigned __int128"
|
TARGET_PTR="unsigned __int128"
|
||||||
else
|
else
|
||||||
diff --git a/gdb/configure.ac b/gdb/configure.ac
|
diff --git a/gdb/configure.ac b/gdb/configure.ac
|
||||||
|
index ec776d7..c02ace9 100644
|
||||||
--- a/gdb/configure.ac
|
--- a/gdb/configure.ac
|
||||||
+++ b/gdb/configure.ac
|
+++ b/gdb/configure.ac
|
||||||
@@ -803,10 +803,12 @@ AC_CHECK_SIZEOF(unsigned long long)
|
@@ -648,10 +648,12 @@ AC_CHECK_SIZEOF(unsigned long long)
|
||||||
AC_CHECK_SIZEOF(unsigned long)
|
AC_CHECK_SIZEOF(unsigned long)
|
||||||
AC_CHECK_SIZEOF(unsigned __int128)
|
AC_CHECK_SIZEOF(unsigned __int128)
|
||||||
|
|
||||||
|
|
|
@ -1,37 +1,16 @@
|
||||||
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-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
|
|
||||||
|
|
||||||
diff --git a/gdb/contrib/gdb-add-index.sh b/gdb/contrib/gdb-add-index.sh
|
diff --git a/gdb/contrib/gdb-add-index.sh b/gdb/contrib/gdb-add-index.sh
|
||||||
|
index cca7153..73181ec 100755
|
||||||
--- a/gdb/contrib/gdb-add-index.sh
|
--- a/gdb/contrib/gdb-add-index.sh
|
||||||
+++ b/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}
|
OBJCOPY=${OBJCOPY:=objcopy}
|
||||||
READELF=${READELF:=readelf}
|
|
||||||
|
|
||||||
+GDB2=/usr/libexec/gdb
|
+GDB2=/usr/libexec/gdb
|
||||||
+if test -x $GDB2 && ! which $GDB &>/dev/null; then
|
+if test -x $GDB2 && ! which $GDB &>/dev/null; then
|
||||||
+ GDB=$GDB2
|
+ GDB=$GDB2
|
||||||
+fi
|
+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##*/}"
|
myname="${0##*/}"
|
||||||
|
|
||||||
dwarf5=""
|
if test $# != 1; then
|
||||||
|
|
|
@ -1,11 +1,3 @@
|
||||||
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-lineno-makeup-test.patch
|
|
||||||
|
|
||||||
;; Testcase for "Do not make up line information" fix by Daniel Jacobowitz.
|
|
||||||
;;=fedoratest
|
|
||||||
|
|
||||||
New testcase for:
|
New testcase for:
|
||||||
https://bugzilla.redhat.com/show_bug.cgi?id=466222
|
https://bugzilla.redhat.com/show_bug.cgi?id=466222
|
||||||
(for the first / customer recommended fix)
|
(for the first / customer recommended fix)
|
||||||
|
@ -14,10 +6,10 @@ http://sourceware.org/ml/gdb-patches/2006-11/msg00253.html
|
||||||
[rfc] Do not make up line information
|
[rfc] Do not make up line information
|
||||||
http://sourceware.org/ml/gdb-cvs/2006-11/msg00127.html
|
http://sourceware.org/ml/gdb-cvs/2006-11/msg00127.html
|
||||||
|
|
||||||
diff --git a/gdb/testsuite/gdb.base/lineno-makeup-func.c b/gdb/testsuite/gdb.base/lineno-makeup-func.c
|
Index: gdb-7.10.90.20160211/gdb/testsuite/gdb.base/lineno-makeup-func.c
|
||||||
new file mode 100644
|
===================================================================
|
||||||
--- /dev/null
|
--- /dev/null 1970-01-01 00:00:00.000000000 +0000
|
||||||
+++ b/gdb/testsuite/gdb.base/lineno-makeup-func.c
|
+++ gdb-7.10.90.20160211/gdb/testsuite/gdb.base/lineno-makeup-func.c 2016-02-15 23:29:16.595161971 +0100
|
||||||
@@ -0,0 +1,21 @@
|
@@ -0,0 +1,21 @@
|
||||||
+/* This testcase is part of GDB, the GNU debugger.
|
+/* This testcase is part of GDB, the GNU debugger.
|
||||||
+
|
+
|
||||||
|
@ -40,10 +32,10 @@ new file mode 100644
|
||||||
+func (void)
|
+func (void)
|
||||||
+{
|
+{
|
||||||
+}
|
+}
|
||||||
diff --git a/gdb/testsuite/gdb.base/lineno-makeup.c b/gdb/testsuite/gdb.base/lineno-makeup.c
|
Index: gdb-7.10.90.20160211/gdb/testsuite/gdb.base/lineno-makeup.c
|
||||||
new file mode 100644
|
===================================================================
|
||||||
--- /dev/null
|
--- /dev/null 1970-01-01 00:00:00.000000000 +0000
|
||||||
+++ b/gdb/testsuite/gdb.base/lineno-makeup.c
|
+++ gdb-7.10.90.20160211/gdb/testsuite/gdb.base/lineno-makeup.c 2016-02-15 23:29:23.873213646 +0100
|
||||||
@@ -0,0 +1,35 @@
|
@@ -0,0 +1,35 @@
|
||||||
+/* This testcase is part of GDB, the GNU debugger.
|
+/* This testcase is part of GDB, the GNU debugger.
|
||||||
+
|
+
|
||||||
|
@ -80,10 +72,10 @@ new file mode 100644
|
||||||
+ func ();
|
+ func ();
|
||||||
+ return 0;
|
+ return 0;
|
||||||
+}
|
+}
|
||||||
diff --git a/gdb/testsuite/gdb.base/lineno-makeup.exp b/gdb/testsuite/gdb.base/lineno-makeup.exp
|
Index: gdb-7.10.90.20160211/gdb/testsuite/gdb.base/lineno-makeup.exp
|
||||||
new file mode 100644
|
===================================================================
|
||||||
--- /dev/null
|
--- /dev/null 1970-01-01 00:00:00.000000000 +0000
|
||||||
+++ b/gdb/testsuite/gdb.base/lineno-makeup.exp
|
+++ gdb-7.10.90.20160211/gdb/testsuite/gdb.base/lineno-makeup.exp 2016-02-15 23:29:23.873213646 +0100
|
||||||
@@ -0,0 +1,78 @@
|
@@ -0,0 +1,78 @@
|
||||||
+# Copyright 2009 Free Software Foundation, Inc.
|
+# Copyright 2009 Free Software Foundation, Inc.
|
||||||
+
|
+
|
||||||
|
|
|
@ -1,38 +1,8 @@
|
||||||
From FEDORA_PATCHES Mon Sep 17 00:00:00 2001
|
Index: gdb-7.11.90.20160904/gdb/nat/linux-btrace.h
|
||||||
From: Fedora GDB patches <invalid@email.com>
|
===================================================================
|
||||||
Date: Fri, 27 Oct 2017 21:07:50 +0200
|
--- gdb-7.11.90.20160904.orig/gdb/nat/linux-btrace.h 2016-09-04 04:02:13.000000000 +0200
|
||||||
Subject: gdb-linux_perf-bundle.patch
|
+++ gdb-7.11.90.20160904/gdb/nat/linux-btrace.h 2016-09-04 20:11:47.375275492 +0200
|
||||||
|
@@ -28,6 +28,177 @@
|
||||||
;; [dts+el7] [x86*] Bundle linux_perf.h for libipt (RH BZ 1256513).
|
|
||||||
;;=fedora
|
|
||||||
|
|
||||||
diff --git a/gdb/gdb.c b/gdb/gdb.c
|
|
||||||
--- a/gdb/gdb.c
|
|
||||||
+++ b/gdb/gdb.c
|
|
||||||
@@ -20,11 +20,19 @@
|
|
||||||
#include "main.h"
|
|
||||||
#include "interps.h"
|
|
||||||
|
|
||||||
+#ifdef PERF_ATTR_SIZE_VER5_BUNDLE
|
|
||||||
+extern "C" void __libipt_init(void);
|
|
||||||
+#endif
|
|
||||||
+
|
|
||||||
int
|
|
||||||
main (int argc, char **argv)
|
|
||||||
{
|
|
||||||
struct captured_main_args args;
|
|
||||||
|
|
||||||
+#ifdef PERF_ATTR_SIZE_VER5_BUNDLE
|
|
||||||
+ __libipt_init();
|
|
||||||
+#endif
|
|
||||||
+
|
|
||||||
memset (&args, 0, sizeof args);
|
|
||||||
args.argc = argc;
|
|
||||||
args.argv = argv;
|
|
||||||
diff --git a/gdb/nat/linux-btrace.h b/gdb/nat/linux-btrace.h
|
|
||||||
--- a/gdb/nat/linux-btrace.h
|
|
||||||
+++ b/gdb/nat/linux-btrace.h
|
|
||||||
@@ -27,6 +27,177 @@
|
|
||||||
# include <linux/perf_event.h>
|
# include <linux/perf_event.h>
|
||||||
#endif
|
#endif
|
||||||
|
|
||||||
|
@ -210,15 +180,53 @@ diff --git a/gdb/nat/linux-btrace.h b/gdb/nat/linux-btrace.h
|
||||||
struct target_ops;
|
struct target_ops;
|
||||||
|
|
||||||
#if HAVE_LINUX_PERF_EVENT_H
|
#if HAVE_LINUX_PERF_EVENT_H
|
||||||
diff --git a/gdbsupport/common.m4 b/gdbsupport/common.m4
|
Index: gdb-7.11.90.20160904/gdb/configure
|
||||||
--- a/gdbsupport/common.m4
|
===================================================================
|
||||||
+++ b/gdbsupport/common.m4
|
--- gdb-7.11.90.20160904.orig/gdb/configure 2016-09-04 20:11:47.238274285 +0200
|
||||||
@@ -145,7 +145,7 @@ AC_DEFUN([GDB_AC_COMMON], [
|
+++ gdb-7.11.90.20160904/gdb/configure 2016-09-04 20:11:47.378275519 +0200
|
||||||
AC_PREPROC_IFELSE([AC_LANG_SOURCE([[
|
@@ -10601,7 +10601,7 @@
|
||||||
#include <linux/perf_event.h>
|
|
||||||
#ifndef PERF_ATTR_SIZE_VER5
|
#include <linux/perf_event.h>
|
||||||
- # error
|
#ifndef PERF_ATTR_SIZE_VER5
|
||||||
+ // error // PERF_ATTR_SIZE_VER5_BUNDLE is not available here - Fedora+RHEL
|
-# error
|
||||||
#endif
|
+// error // PERF_ATTR_SIZE_VER5_BUNDLE is not available here - Fedora+RHEL
|
||||||
]])], [perf_event=yes], [perf_event=no])
|
#endif
|
||||||
if test "$perf_event" != yes; then
|
|
||||||
|
_ACEOF
|
||||||
|
Index: gdb-7.11.90.20160904/gdb/configure.ac
|
||||||
|
===================================================================
|
||||||
|
--- gdb-7.11.90.20160904.orig/gdb/configure.ac 2016-09-04 20:11:47.238274285 +0200
|
||||||
|
+++ gdb-7.11.90.20160904/gdb/configure.ac 2016-09-04 20:11:47.379275528 +0200
|
||||||
|
@@ -1461,7 +1461,7 @@
|
||||||
|
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
|
||||||
|
Index: gdb-7.11.90.20160904/gdb/gdb.c
|
||||||
|
===================================================================
|
||||||
|
--- gdb-7.11.90.20160904.orig/gdb/gdb.c 2016-09-04 04:02:13.000000000 +0200
|
||||||
|
+++ gdb-7.11.90.20160904/gdb/gdb.c 2016-09-04 20:12:28.018633552 +0200
|
||||||
|
@@ -20,11 +20,19 @@
|
||||||
|
#include "main.h"
|
||||||
|
#include "interps.h"
|
||||||
|
|
||||||
|
+#ifdef PERF_ATTR_SIZE_VER5_BUNDLE
|
||||||
|
+extern "C" void __libipt_init(void);
|
||||||
|
+#endif
|
||||||
|
+
|
||||||
|
int
|
||||||
|
main (int argc, char **argv)
|
||||||
|
{
|
||||||
|
struct captured_main_args args;
|
||||||
|
|
||||||
|
+#ifdef PERF_ATTR_SIZE_VER5_BUNDLE
|
||||||
|
+ __libipt_init();
|
||||||
|
+#endif
|
||||||
|
+
|
||||||
|
memset (&args, 0, sizeof args);
|
||||||
|
args.argc = argc;
|
||||||
|
args.argv = argv;
|
||||||
|
|
|
@ -1,25 +1,16 @@
|
||||||
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-moribund-utrace-workaround.patch
|
|
||||||
|
|
||||||
;; Workaround non-stop moribund locations exploited by kernel utrace (BZ 590623).
|
|
||||||
;;=push+jan: Currently it is still not fully safe.
|
|
||||||
|
|
||||||
https://bugzilla.redhat.com/show_bug.cgi?id=590623
|
https://bugzilla.redhat.com/show_bug.cgi?id=590623
|
||||||
http://sources.redhat.com/bugzilla/show_bug.cgi?id=11593
|
http://sources.redhat.com/bugzilla/show_bug.cgi?id=11593
|
||||||
|
|
||||||
Bug in FSF GDB exploited by the ptrace-on-utrace interaction.
|
Bug in FSF GDB exploited by the ptrace-on-utrace interaction.
|
||||||
|
|
||||||
diff --git a/gdb/breakpoint.c b/gdb/breakpoint.c
|
|
||||||
--- a/gdb/breakpoint.c
|
--- a/gdb/breakpoint.c
|
||||||
+++ b/gdb/breakpoint.c
|
+++ b/gdb/breakpoint.c
|
||||||
@@ -11948,6 +11948,8 @@ update_global_location_list (enum ugll_insert_mode insert_mode)
|
@@ -9084,6 +9084,8 @@ update_global_location_list (int should_insert)
|
||||||
= 3 * (thread_count (proc_target) + 1);
|
traps we can no longer explain. */
|
||||||
else
|
|
||||||
old_loc->events_till_retirement = 1;
|
old_loc->events_till_retirement = 3 * (thread_count () + 1);
|
||||||
+ /* Red Hat Bug 590623. */
|
+ /* Red Hat Bug 590623. */
|
||||||
+ old_loc->events_till_retirement *= 10;
|
+ old_loc->events_till_retirement *= 10;
|
||||||
old_loc->owner = NULL;
|
old_loc->owner = NULL;
|
||||||
|
|
||||||
moribund_locations.push_back (old_loc);
|
VEC_safe_push (bp_location_p, moribund_locations, old_loc);
|
||||||
|
|
|
@ -1,39 +1,5 @@
|
||||||
From FEDORA_PATCHES Mon Sep 17 00:00:00 2001
|
--- /dev/null 2016-01-16 21:50:55.732812229 +0100
|
||||||
From: Fedora GDB patches <invalid@email.com>
|
+++ gdb-7.6.1/gdb/testsuite/gdb.arch/amd64-clflushopt.exp 2016-01-16 22:49:19.950683918 +0100
|
||||||
Date: Fri, 27 Oct 2017 21:07:50 +0200
|
|
||||||
Subject: gdb-opcodes-clflushopt-test.patch
|
|
||||||
|
|
||||||
;; Test clflushopt instruction decode (for RH BZ 1262471).
|
|
||||||
;;=fedoratest
|
|
||||||
|
|
||||||
diff --git a/gdb/testsuite/gdb.arch/amd64-clflushopt.S b/gdb/testsuite/gdb.arch/amd64-clflushopt.S
|
|
||||||
new file mode 100644
|
|
||||||
--- /dev/null
|
|
||||||
+++ b/gdb/testsuite/gdb.arch/amd64-clflushopt.S
|
|
||||||
@@ -0,0 +1,19 @@
|
|
||||||
+/* Copyright 2016 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/>.
|
|
||||||
+
|
|
||||||
+ This file is part of the gdb testsuite. */
|
|
||||||
+
|
|
||||||
+_start: .globl _start
|
|
||||||
+ clflushopt (%edi)
|
|
||||||
diff --git a/gdb/testsuite/gdb.arch/amd64-clflushopt.exp b/gdb/testsuite/gdb.arch/amd64-clflushopt.exp
|
|
||||||
new file mode 100644
|
|
||||||
--- /dev/null
|
|
||||||
+++ b/gdb/testsuite/gdb.arch/amd64-clflushopt.exp
|
|
||||||
@@ -0,0 +1,25 @@
|
@@ -0,0 +1,25 @@
|
||||||
+# Copyright 2016 Free Software Foundation, Inc.
|
+# Copyright 2016 Free Software Foundation, Inc.
|
||||||
+
|
+
|
||||||
|
@ -60,3 +26,25 @@ 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"
|
+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"
|
||||||
|
--- /dev/null 2016-01-16 21:50:55.732812229 +0100
|
||||||
|
+++ gdb-7.6.1/gdb/testsuite/gdb.arch/amd64-clflushopt.S 2016-01-16 22:49:26.398725209 +0100
|
||||||
|
@@ -0,0 +1,19 @@
|
||||||
|
+/* Copyright 2016 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/>.
|
||||||
|
+
|
||||||
|
+ This file is part of the gdb testsuite. */
|
||||||
|
+
|
||||||
|
+_start: .globl _start
|
||||||
|
+ clflushopt (%edi)
|
||||||
|
|
|
@ -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()
|
|
@ -1,17 +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-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
|
http://sourceware.org/ml/gdb-patches/2010-12/msg00263.html
|
||||||
|
|
||||||
diff --git a/gdb/testsuite/gdb.cp/pr11734-1.cc b/gdb/testsuite/gdb.cp/pr11734-1.cc
|
Index: gdb-7.2/gdb/testsuite/gdb.cp/pr11734-1.cc
|
||||||
new file mode 100644
|
===================================================================
|
||||||
--- /dev/null
|
--- /dev/null 1970-01-01 00:00:00.000000000 +0000
|
||||||
+++ b/gdb/testsuite/gdb.cp/pr11734-1.cc
|
+++ gdb-7.2/gdb/testsuite/gdb.cp/pr11734-1.cc 2011-02-03 22:28:01.000000000 +0100
|
||||||
@@ -0,0 +1,30 @@
|
@@ -0,0 +1,30 @@
|
||||||
+/* This testcase is part of GDB, the GNU debugger.
|
+/* This testcase is part of GDB, the GNU debugger.
|
||||||
+
|
+
|
||||||
|
@ -43,10 +35,10 @@ new file mode 100644
|
||||||
+ return 0;
|
+ return 0;
|
||||||
+}
|
+}
|
||||||
+
|
+
|
||||||
diff --git a/gdb/testsuite/gdb.cp/pr11734-2.cc b/gdb/testsuite/gdb.cp/pr11734-2.cc
|
Index: gdb-7.2/gdb/testsuite/gdb.cp/pr11734-2.cc
|
||||||
new file mode 100644
|
===================================================================
|
||||||
--- /dev/null
|
--- /dev/null 1970-01-01 00:00:00.000000000 +0000
|
||||||
+++ b/gdb/testsuite/gdb.cp/pr11734-2.cc
|
+++ gdb-7.2/gdb/testsuite/gdb.cp/pr11734-2.cc 2011-02-03 22:28:01.000000000 +0100
|
||||||
@@ -0,0 +1,27 @@
|
@@ -0,0 +1,27 @@
|
||||||
+/* This testcase is part of GDB, the GNU debugger.
|
+/* This testcase is part of GDB, the GNU debugger.
|
||||||
+
|
+
|
||||||
|
@ -75,10 +67,10 @@ new file mode 100644
|
||||||
+{
|
+{
|
||||||
+}
|
+}
|
||||||
+
|
+
|
||||||
diff --git a/gdb/testsuite/gdb.cp/pr11734-3.cc b/gdb/testsuite/gdb.cp/pr11734-3.cc
|
Index: gdb-7.2/gdb/testsuite/gdb.cp/pr11734-3.cc
|
||||||
new file mode 100644
|
===================================================================
|
||||||
--- /dev/null
|
--- /dev/null 1970-01-01 00:00:00.000000000 +0000
|
||||||
+++ b/gdb/testsuite/gdb.cp/pr11734-3.cc
|
+++ gdb-7.2/gdb/testsuite/gdb.cp/pr11734-3.cc 2011-02-03 22:28:01.000000000 +0100
|
||||||
@@ -0,0 +1,27 @@
|
@@ -0,0 +1,27 @@
|
||||||
+/* This testcase is part of GDB, the GNU debugger.
|
+/* This testcase is part of GDB, the GNU debugger.
|
||||||
+
|
+
|
||||||
|
@ -107,10 +99,10 @@ new file mode 100644
|
||||||
+{
|
+{
|
||||||
+}
|
+}
|
||||||
+
|
+
|
||||||
diff --git a/gdb/testsuite/gdb.cp/pr11734-4.cc b/gdb/testsuite/gdb.cp/pr11734-4.cc
|
Index: gdb-7.2/gdb/testsuite/gdb.cp/pr11734-4.cc
|
||||||
new file mode 100644
|
===================================================================
|
||||||
--- /dev/null
|
--- /dev/null 1970-01-01 00:00:00.000000000 +0000
|
||||||
+++ b/gdb/testsuite/gdb.cp/pr11734-4.cc
|
+++ gdb-7.2/gdb/testsuite/gdb.cp/pr11734-4.cc 2011-02-03 22:28:01.000000000 +0100
|
||||||
@@ -0,0 +1,27 @@
|
@@ -0,0 +1,27 @@
|
||||||
+/* This testcase is part of GDB, the GNU debugger.
|
+/* This testcase is part of GDB, the GNU debugger.
|
||||||
+
|
+
|
||||||
|
@ -139,10 +131,10 @@ new file mode 100644
|
||||||
+{
|
+{
|
||||||
+}
|
+}
|
||||||
+
|
+
|
||||||
diff --git a/gdb/testsuite/gdb.cp/pr11734.exp b/gdb/testsuite/gdb.cp/pr11734.exp
|
Index: gdb-7.2/gdb/testsuite/gdb.cp/pr11734.exp
|
||||||
new file mode 100644
|
===================================================================
|
||||||
--- /dev/null
|
--- /dev/null 1970-01-01 00:00:00.000000000 +0000
|
||||||
+++ b/gdb/testsuite/gdb.cp/pr11734.exp
|
+++ gdb-7.2/gdb/testsuite/gdb.cp/pr11734.exp 2011-02-03 22:28:01.000000000 +0100
|
||||||
@@ -0,0 +1,55 @@
|
@@ -0,0 +1,55 @@
|
||||||
+# Copyright 2010 Free Software Foundation, Inc.
|
+# Copyright 2010 Free Software Foundation, Inc.
|
||||||
+#
|
+#
|
||||||
|
@ -199,10 +191,10 @@ new file mode 100644
|
||||||
+
|
+
|
||||||
+gdb_exit
|
+gdb_exit
|
||||||
+return 0
|
+return 0
|
||||||
diff --git a/gdb/testsuite/gdb.cp/pr11734.h b/gdb/testsuite/gdb.cp/pr11734.h
|
Index: gdb-7.2/gdb/testsuite/gdb.cp/pr11734.h
|
||||||
new file mode 100644
|
===================================================================
|
||||||
--- /dev/null
|
--- /dev/null 1970-01-01 00:00:00.000000000 +0000
|
||||||
+++ b/gdb/testsuite/gdb.cp/pr11734.h
|
+++ gdb-7.2/gdb/testsuite/gdb.cp/pr11734.h 2011-02-03 22:28:01.000000000 +0100
|
||||||
@@ -0,0 +1,28 @@
|
@@ -0,0 +1,28 @@
|
||||||
+/* This testcase is part of GDB, the GNU debugger.
|
+/* This testcase is part of GDB, the GNU debugger.
|
||||||
+
|
+
|
||||||
|
|
|
@ -1,17 +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-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
|
http://sourceware.org/ml/gdb-patches/2010-12/msg00264.html
|
||||||
|
|
||||||
diff --git a/gdb/testsuite/gdb.cp/pr12273.cc b/gdb/testsuite/gdb.cp/pr12273.cc
|
Index: gdb-7.2/gdb/testsuite/gdb.cp/pr12273.cc
|
||||||
new file mode 100644
|
===================================================================
|
||||||
--- /dev/null
|
--- /dev/null 1970-01-01 00:00:00.000000000 +0000
|
||||||
+++ b/gdb/testsuite/gdb.cp/pr12273.cc
|
+++ gdb-7.2/gdb/testsuite/gdb.cp/pr12273.cc 2011-02-03 22:31:01.000000000 +0100
|
||||||
@@ -0,0 +1,37 @@
|
@@ -0,0 +1,37 @@
|
||||||
+/* This test case is part of GDB, the GNU debugger.
|
+/* This test case is part of GDB, the GNU debugger.
|
||||||
+
|
+
|
||||||
|
@ -50,10 +42,10 @@ new file mode 100644
|
||||||
+ + GDB<char>::even_harder<int> ('a');
|
+ + GDB<char>::even_harder<int> ('a');
|
||||||
+ return GDB<int>::simple ();
|
+ return GDB<int>::simple ();
|
||||||
+}
|
+}
|
||||||
diff --git a/gdb/testsuite/gdb.cp/pr12273.exp b/gdb/testsuite/gdb.cp/pr12273.exp
|
Index: gdb-7.2/gdb/testsuite/gdb.cp/pr12273.exp
|
||||||
new file mode 100644
|
===================================================================
|
||||||
--- /dev/null
|
--- /dev/null 1970-01-01 00:00:00.000000000 +0000
|
||||||
+++ b/gdb/testsuite/gdb.cp/pr12273.exp
|
+++ gdb-7.2/gdb/testsuite/gdb.cp/pr12273.exp 2011-02-03 22:31:01.000000000 +0100
|
||||||
@@ -0,0 +1,46 @@
|
@@ -0,0 +1,46 @@
|
||||||
+# Copyright 2010 Free Software Foundation, Inc.
|
+# Copyright 2010 Free Software Foundation, Inc.
|
||||||
+#
|
+#
|
||||||
|
|
|
@ -1,13 +1,3 @@
|
||||||
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-ppc-power7-test.patch
|
|
||||||
|
|
||||||
;; Test power7 ppc disassembly.
|
|
||||||
;;=fedoratest
|
|
||||||
|
|
||||||
diff --git a/gdb/testsuite/gdb.arch/powerpc-power7rh.exp b/gdb/testsuite/gdb.arch/powerpc-power7rh.exp
|
|
||||||
new file mode 100644
|
|
||||||
--- /dev/null
|
--- /dev/null
|
||||||
+++ b/gdb/testsuite/gdb.arch/powerpc-power7rh.exp
|
+++ b/gdb/testsuite/gdb.arch/powerpc-power7rh.exp
|
||||||
@@ -0,0 +1,178 @@
|
@@ -0,0 +1,178 @@
|
||||||
|
@ -189,8 +179,6 @@ new file mode 100644
|
||||||
+func_check 0x194 "frsqrtes f14,f15"
|
+func_check 0x194 "frsqrtes f14,f15"
|
||||||
+func_check 0x198 "frsqrtes. f14,f15"
|
+func_check 0x198 "frsqrtes. f14,f15"
|
||||||
+func_check 0x19c "isel r2,r3,r4,28"
|
+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
|
|
||||||
--- /dev/null
|
--- /dev/null
|
||||||
+++ b/gdb/testsuite/gdb.arch/powerpc-power7rh.s
|
+++ b/gdb/testsuite/gdb.arch/powerpc-power7rh.s
|
||||||
@@ -0,0 +1,107 @@
|
@@ -0,0 +1,107 @@
|
||||||
|
|
Some files were not shown because too many files have changed in this diff Show More
Loading…
Reference in New Issue