Compare commits

...

1047 Commits

Author SHA1 Message Date
Kevin Buettner ed8730b4d9 Rebase to FSF GDB 10.1.
Bump 'snapgnulib' date.
Drop gdb-rhbz1818011-bfd-gcc10-error.patch.
Drop gdb-rhbz1822715-fix-python-deprecation.patch.
Drop gdb-rhbz1829702-fix-python39.patch.
Drop gdb-rhbz1838777-debuginfod.patch.
Drop gdb-rhbz1844458-use-fputX_unfiltered.patch.
Drop gdb-rhbz1869484-deleted-working-directory.
Adjust build-id related patches.
Ajust VLA patches.
2020-11-05 14:17:24 -07:00
Keith Seitz d7b61266b7 Sync w/Fedora 33 -- add missing patch:
gdb-rhbz1869484-deleted-working-directory
2020-11-02 12:38:45 -08:00
Keith Seitz 3ab415fc4a Fix "missing debuginfo" messages
Resolves: RHBZ 1887025
2020-11-02 11:05:13 -08:00
Keith Seitz 6aff62077b Disable LTO until upstream sorts out ODR problems. 2020-08-10 14:54:31 -07:00
Keith Seitz ab7962ace7 Update libipt to v2.0.2. 2020-08-04 10:45:45 -07:00
Fedora Release Engineering 3c0f61139e - Second attempt - Rebuilt for https://fedoraproject.org/wiki/Fedora_33_Mass_Rebuild
Signed-off-by: Fedora Release Engineering <releng@fedoraproject.org>
2020-08-01 01:07:52 +00:00
Fedora Release Engineering 578aa401ab - Rebuilt for https://fedoraproject.org/wiki/Fedora_33_Mass_Rebuild
Signed-off-by: Fedora Release Engineering <releng@fedoraproject.org>
2020-07-27 18:22:27 +00:00
Tom Stellard 12a215835b Use make macros
https://fedoraproject.org/wiki/Changes/UseMakeBuildInstallMacro
2020-07-22 00:54:13 +00:00
Jeff Law 51337c28d9 Fix more broken configure files 2020-07-21 00:58:44 -06:00
Jeff Law 50ea6a9154 - Fix broken configure tests compromised by LTO
- Add BuildRequires: autoconf
2020-07-21 00:15:20 -06:00
Troy Dawson f9a00bf2a5 Minor conditional tweak for ELN
Signed-off-by: Troy Dawson tdawson@redhat.com
2020-07-08 16:27:20 +00:00
Keith Seitz db493ec1a2 Add debuginfod support. 2020-06-17 10:35:49 -07:00
Keith Seitz b2003eae67 Rebase to FSF GDB 9.2 and fix a bunch of issues. 2020-06-09 07:54:16 -07:00
Keith Seitz 28b99d9981 Fix python build and re-enable it.
(RH BZ 1829702, Kevin Buettner and Keith Seitz)
2020-06-05 15:45:45 -07:00
Miro Hrončok a6ec4e0365 Disable Python support to workaround problems with Python 3.9 (RHBZ 1829702) 2020-05-21 23:27:31 +02:00
Kevin Buettner c54196c27b Fix build breakage of gdb/python/python.c due to use of deprecated
Python function (RHBZ 1822715, Kevin Buettner)
2020-04-16 05:49:13 -07:00
Kevin Buettner c3e0b255c8 Fix build breakage when compiling bfd/elf.c with gcc 10. (RHBZ 1818011,
H.J. Lu)
2020-04-09 10:34:41 -04:00
Sergio Durigan Junior 03ff51b230 Fix generate-patches-from-git-repo.sh's use of "--keep-subject". 2020-04-08 16:25:25 -04:00
Sergio Durigan Junior 9e0dc4d5fc Add '--without-guile' to GDB_MINIMAL_CONFIGURE_FLAGS. 2020-03-02 10:54:58 -05:00
Sergio Durigan Junior 76de449876 Fix 'Recursive call to 'missing_rpm_list_print' when pagination is
on and missing RPM list is big' (RHBZ 1801974, Sergio Durigan
  Junior).
2020-02-13 14:21:00 -05:00
Sergio Durigan Junior cd3e3d1a80 Rename README.local-patches to README.local-patches.md 2020-02-11 15:34:42 -05:00
Sergio Durigan Junior 2a1cf3d881 Reformat README.local-patches to Markdown. 2020-02-11 15:33:51 -05:00
Sergio Durigan Junior 63fa2e2956 Enable libxxhash during build. 2020-02-10 15:46:11 -05:00
Sergio Durigan Junior c172b26911 Rebase to FSF GDB 9.1. 2020-02-08 11:17:48 -05:00
Dan Čermák e67700bf46 Re-enable guile support. 2020-02-04 16:19:46 -05:00
Sergio Durigan Junior a5d2c85367 Rebase to FSF GDB 9.0.90.20200203 (9.1pre).
Bump 'snapgnulib' date.
Update URL to 'https'.
Adjust build-id patchset.
Adjust VLA patchset.
Drop 'gdb-6.8-bz436037-reg-no-longer-active.patch'.
Drop 'gdb-6.6-scheduler_locking-step-is-default.patch'.
2020-02-04 15:07:12 -05:00
Fedora Release Engineering f258b03b2f - Rebuilt for https://fedoraproject.org/wiki/Fedora_32_Mass_Rebuild
Signed-off-by: Fedora Release Engineering <releng@fedoraproject.org>
2020-01-28 19:43:06 +00:00
Sergio Durigan Junior 99dc38b0d5 Rebase to FSF GDB 9.0.50.20191119 (9.1pre).
Drop 'gdb-readline62-ask-more-rh.patch'.
Drop 'gdb-6.5-bz216711-clone-is-outermost.patch'.
Adjust 'gdb-archer-pie-addons-keep-disabled.patch'.
2019-11-21 12:10:32 -05:00
Sergio Durigan Junior 2f578f51e4 Rebase to FSF GDB 9.0.50.20191018 (9.1pre).
Expand comment on "bundled(binutils)".
Remove libctf's files from RPM_BUILD_ROOT.
2019-10-19 14:30:13 -04:00
Jerry James 86fc1101ee Rebuild for mpfr 4 2019-10-09 19:49:47 -06:00
Sergio Durigan Junior 0a2f2a5526 Rebase to FSF GDB 8.3.50.20190924 (8.4pre).
Update 'gdb-6.6-buildid-locate.patch'.
2019-09-25 17:39:24 -04:00
Sergio Durigan Junior 8ac06474ff Rebase to FSF GDB 8.3.50.20190824 (8.4pre).
Update 'v1.5-libipt-static.patch'.
2019-08-25 16:37:00 -04:00
Miro Hrončok 92508e7ce6 Rebuilt for Python 3.8 2019-08-21 19:16:05 +02:00
Sergio Durigan Junior 9949e18054 Update bundled libipt copy to v2.0.1. 2019-08-18 17:33:14 -04:00
Sergio Durigan Junior 9c37e8a0b1 Rebase to FSF GDB 8.3.50.20190816 (8.4pre).
Drop 'gdb-testsuite-readline63-sigint.patch'.
Cleanup 'gdb-archer.patch' and remove several things, like the '-P' feature.
2019-08-18 16:06:28 -04:00
Miro Hrončok ece6742a5f Rebuilt for Python 3.8 2019-08-14 21:48:32 +02:00
Sergio Durigan Junior f7760f831c Rebase to FSF GDB 8.3.50.20190802 (8.4pre). 2019-08-02 19:25:51 -04:00
Fedora Release Engineering f3efb4b040 - Rebuilt for https://fedoraproject.org/wiki/Fedora_31_Mass_Rebuild
Signed-off-by: Fedora Release Engineering <releng@fedoraproject.org>
2019-07-25 01:36:59 +00:00
Sergio Durigan Junior c79314bd92 Rebase to FSF GDB 8.3.50.20190702 (8.4pre).
Remove gdb-bz568248-oom-is-error.patch.
2019-07-02 18:30:05 -04:00
Sergio Durigan Junior 292cb418af Rebase to FSF GDB 8.3.50.20190625 (8.4pre). 2019-06-25 15:49:31 -04:00
Sergio Durigan Junior 2ff911f2f5 Rebuild for librpm9 (RH BZ 1720305). 2019-06-21 12:59:59 -04:00
Sergio Durigan Junior b1c3400f7f Rebase to FSF GDB 8.3.50.20190610 (8.4pre). 2019-06-10 11:33:29 -04:00
Sergio Durigan Junior 30a397d1b3 Sync gdb.spec with RHEL-8 GDB (thanks to Keith Seitz). 2019-06-05 11:57:36 -04:00
Sergio Durigan Junior cb6c609428 Rebase to FSF GDB 8.3.50.20190601 (8.4pre). 2019-06-02 00:02:45 -04:00
Sergio Durigan Junior f0a9ac3b0f Rebase to FSF GDB 8.3.50.20190528 (8.4pre). 2019-05-28 14:42:06 -04:00
Sergio Durigan Junior 06f4849386 Rebase to FSF GDB 8.3.50.20190517 (8.4pre). 2019-05-17 18:54:39 -04:00
Sergio Durigan Junior a17be6a448 Rebase to FSF GDB 8.3.50.20190510 (8.4pre). 2019-05-10 15:58:41 -04:00
Sergio Durigan Junior 865e2df5ec Unbreak previous commit.
Rebase to FSF GDB 8.3.50.20190501 (8.4pre).
Adjust VLA testcases.
Fix "gcore does not support COREFILTER_ELF_HEADERS" (RH BZ 1371380,
  Sergio Durigan Junior).
2019-05-02 20:08:19 -04:00
Sergio Durigan Junior 654fb507d8 Rebase to FSF GDB 8.3.50.20190501 (8.4pre). 2019-05-01 23:08:41 -04:00
Sergio Durigan Junior 0ec4d78c4e Share '/usr/bin/gdb-add-index' between gdb-minimal and gdb-headless
(Igor Gnatenko, RHBZ 1695015).
2019-04-29 10:30:20 -04:00
Igor Gnatenko d96e24456a
Add gdb-add-index to gdb-minimal
Signed-off-by: Igor Gnatenko <ignatenkobrain@fedoraproject.org>
2019-04-29 11:43:32 +02:00
Sergio Durigan Junior cc7695234a Provide 'gdb-minimal' package, specific for the buildroot (RHBZ 1695015).
Adjust 'gdb-libexec-add-index.patch' for the gdb-minimal case.
2019-04-28 20:46:29 -04:00
Sergio Durigan Junior 1b0ecbf0a5 Rebase to FSF GDB 8.3.50.20190425 (8.4pre), and fix build breakage. 2019-04-25 16:29:43 -04:00
Sergio Durigan Junior e507809c35 Rebase to FSF GDB 8.3.50.20190424 (8.4pre). 2019-04-24 14:28:02 -04:00
Sergio Durigan Junior a5d0cd87e1 Remove 'gdb-x86_64-i386-syscall-restart.patch'. 2019-04-12 18:22:24 -04:00
Sergio Durigan Junior e90857f9de Rebase to FSF GDB 8.3.50.20190412 (8.4pre).
Adjust 'gdb-6.3-rh-testversion-20041202.patch'.
Remove 'gdb-follow-child-stale-parent.patch'.
Remove 'gdb-rhbz795424-bitpos-20of25.patch'.
Remove 'gdb-rhbz795424-bitpos-21of25.patch'.
Remove 'gdb-rhbz795424-bitpos-22of25.patch'.
Remove 'gdb-rhbz795424-bitpos-23of25.patch'.
Remove 'gdb-rhbz795424-bitpos-25of25.patch'.
Remove 'gdb-rhbz795424-bitpos-25of25-test.patch'.
Remove 'gdb-rhbz795424-bitpos-arrayview.patch'.
Remove 'gdb-rhbz795424-bitpos-lazyvalue.patch'.
Remove 'gdb-bz541866-rwatch-before-run.patch'.
2019-04-12 16:35:59 -04:00
Sergio Durigan Junior 116197567a Fix 'gdb-8.3.50.20190321-3.fc31.x86_64: crashing' (by fixing
gdb-6.6-buildid-locate-rpm.patch) (RH BZ 1694091).
2019-03-29 14:14:19 -04:00
Sergio Durigan Junior 252ce24e08 Rebase to FSF GDB 8.3.50.20190321 (8.4pre).
Remove gdb-temporary-fix-arm-build-error.patch.
Fix "GDB crashes when using Python xmethods" (RH BZ 1690120).
2019-03-21 19:59:16 -04:00
Sergio Durigan Junior d1a098601d Temporarily add gdb-temporary-fix-arm-build-error.patch. 2019-03-19 19:19:25 -04:00
Sergio Durigan Junior 96770ac25f Rebase to FSF GDB 8.3.50.20190319 (8.4pre). 2019-03-19 18:07:06 -04:00
Sergio Durigan Junior 29841d1068 Rebase to FSF GDB 8.3.50.20190304 (8.4pre).
Rewrite gdb-6.6-buildid-locate.patch.
Remove gdb-python-gil.patch.
2019-03-05 11:27:44 -05:00
Sergio Durigan Junior b1bf7bc649 Rebase to FSF GDB 8.2.50.20190219 (8.3pre).
BuildRequire on 'source-highlight-devel' and enable styled output.
2019-02-19 19:06:53 -05:00
Igor Gnatenko 9404c96ac6
Disable temporarily guile support
guile 2.0 currently fails to build from source so it is not possible to
get it to use readline 8.0.

Let's disable guile support until GDB will be ported to 2.2[0] or 2.0
build will be fixed[1].

[0] https://sourceware.org/bugzilla/show_bug.cgi?id=21104
[1] https://bugzilla.redhat.com/show_bug.cgi?id=1675089

Signed-off-by: Igor Gnatenko <ignatenkobrain@fedoraproject.org>
2019-02-17 22:57:49 +01:00
Igor Gnatenko e5955df97a Rebuild for readline 8.0 2019-02-17 09:30:50 +01:00
Sergio Durigan Junior c60e39b61c Remove libmpx dependency when using '--with testsuite', since GCC9
has dropped support for it.
2019-02-05 13:26:09 -05:00
Fedora Release Engineering 46d477eac9 - Rebuilt for https://fedoraproject.org/wiki/Fedora_30_Mass_Rebuild
Signed-off-by: Fedora Release Engineering <releng@fedoraproject.org>
2019-01-31 20:41:52 +00:00
Igor Gnatenko 538775743e Remove obsolete Group tag
References: https://fedoraproject.org/wiki/Changes/Remove_Group_Tag
2019-01-28 20:24:03 +01:00
Sergio Durigan Junior 0172100cc0 Fix:
BUILDSTDERR: ../../bfd/elf32-arm.c: In function 'elf32_arm_final_link_relocate':
BUILDSTDERR: ../../bfd/elf32-arm.c:10907:10: error: absolute value function 'labs' given an argument of type 'bfd_signed_vma' {aka 'long long int'} but has parameter of type 'long int' which may cause truncation of value [-Werror=absolute-value]
BUILDSTDERR: 10907 |  value = labs (relocation);
BUILDSTDERR:       |          ^~~~

And unbreak the build.
2019-01-21 15:26:26 -05:00
Sergio Durigan Junior 31f5b96fb9 Rebase to FSF GDB 8.2.50.20190120 (8.3pre).
Fix 'gdb does crash randomly on loading symbols or setting a breakpoint'
  (RHBZ 1638798, Keith Seitz).
2019-01-21 12:16:00 -05:00
Sergio Durigan Junior 2111580a73 Rebase to FSF GDB 8.2.50.20181220 (8.3pre). 2018-12-20 17:52:01 -05:00
Sergio Durigan Junior 83f9b09ebf Update gdb-6.3-gstack-20050411.patch (Pedro Alves).
Update gdb-archer-next-over-throw-cxx-exec.patch (Pedro Alves).
Update gdb-glibc-strstr-workaround.patch (Pedro Alves).
2018-12-11 16:37:09 -05:00
Sergio Durigan Junior 1ea4563053 Upload sources for gdb-8.2.50.20181130 2018-12-03 13:46:12 -05:00
Sergio Durigan Junior 9c7d730fb9 Rebase to FSF GDB 8.2.50.20181130 (8.3pre). 2018-12-03 13:40:10 -05:00
Sergio Durigan Junior f11faa1e6a Declare _python_bytecompile_extra.
Fix typo on gdb-x86_64-i386-syscall-restart.patch.
2018-11-20 13:54:57 -05:00
Miro Hrončok dba70321b8 https://fedoraproject.org/wiki/Changes/No_more_automagic_Python_bytecompilation_phase_2 2018-11-15 12:53:54 +01:00
Sergio Durigan Junior 6ee43aeabb Rebase to FSF GDB 8.2.50.20181114 (8.3pre).
Drop gdb-6.3-ppc64syscall-20040622.patch.
Drop gdb-6.3-ppc64displaysymbol-20041124.patch.
Drop gdb-6.8-watchpoint-conditionals-test.patch.
2018-11-14 16:12:07 -05:00
Sergio Durigan Junior 4336687790 Use "--enable-unit-tests" flag when compiling GDB. 2018-10-17 23:26:03 -04:00
Sergio Durigan Junior e18aa17153 Rebase to FSF GDB 8.2.50.20181016 (8.3pre).
Enable and always run the unittests when building the package.
2018-10-16 18:34:23 -04:00
Sergio Durigan Junior d82716127f Rebase to FSF GDB 8.2.50.20181010 (8.3pre).
Remove 'gdb-6.8-sparc64-silence-memcpy-check.patch'.
Remove 'gdb-7.2.50-sparc-add-workaround-to-broken-debug-files.patch'.
2018-10-10 18:37:53 -04:00
Sergio Durigan Junior a3b5cf46c2 Rebase to FSF GDB 8.2.50.20181006 (8.3pre). 2018-10-07 01:19:34 -04:00
Jan Kratochvil 453d99770b Fix annobin complaints (RH BZ 1630564):
--without-stage1-ldflags: Disable static libstdc++ and libgcc linking.
  --disable-libmcheck: That is a distro-level decision, not package decision.
2018-10-04 21:56:50 +02:00
Sergio Durigan Junior fc163ce193 Remove 'gdb-6.5-bz203661-emit-relocs.patch'.
Update changelog entry for last release.
2018-09-19 16:28:35 -04:00
Sergio Durigan Junior 0702d0d3e8 Rebase to FSF GDB 8.2.50.20180917 (8.3pre).
Add 'gdb-rhbz795424-bitpos-arrayview.patch'.
2018-09-17 18:38:14 -04:00
Sergio Durigan Junior 56040033ea Enable verbose output when running "make". 2018-08-21 15:33:32 -04:00
Jan Kratochvil 22998d94f7 Add GDB support to access/display POWER8 registers (IBM, RH BZ 1187581). 2018-08-09 18:37:55 +02:00
Sergio Durigan Junior af8b999134 Reenable libipt. 2018-08-09 00:50:25 -04:00
Sergio Durigan Junior b9ce1a2833 Again, temporarily disable libipt (needed to upgrade libipt to 2.0). 2018-08-08 18:33:33 -04:00
Sergio Durigan Junior f774761950 Reenable libipt.
Rebuild due to new libipt release.
Adjust bundled libipt; remove unnecessary patch.
Sync IPv6 patch with F-28 GDB.
2018-08-08 18:00:06 -04:00
Sergio Durigan Junior 657623c611 Temporarily disable libipt (needed to upgrade libipt to 2.0). 2018-08-08 17:12:09 -04:00
Sergio Durigan Junior c26726c3ff Revert "Rebuild due to new libipt release."
This reverts commit 76ddc56b6d.
2018-08-08 16:27:05 -04:00
Sergio Durigan Junior 76ddc56b6d Rebuild due to new libipt release.
Adjust bundled libipt; remove unnecessary patch.
Sync IPv6 patch with F-28 GDB.
2018-08-08 15:04:49 -04:00
Jan Kratochvil f21bb2353c [dts] Fix build by removing a patch for already removed pahole.py .
[dts rhel6] Fix build by updating gdb-gnat-dwarf-crash-3of3.patch .
2018-08-08 17:30:20 +02:00
Sergio Durigan Junior 2ef085ccae Recompile to fix RH BZ 1609504 (due to RH BZ 1609577). 2018-07-30 16:01:20 -04:00
Sergio Durigan Junior 4f0bc6641e Rebase to FSF GDB 8.1.90.20180727 (8.2pre). 2018-07-28 15:23:17 -04:00
Sergio Durigan Junior 47b02ba87c Rebase to FSF GDB 8.1.90.20180724 (8.2pre). 2018-07-25 21:03:56 -04:00
Sergio Durigan Junior 2e649f71e0 Improve error handling on generate-* scripts 2018-07-25 17:35:59 -04:00
Sergio Durigan Junior 2f6fc56e9a Upload source files for last version 2018-07-15 12:31:12 -04:00
Sergio Durigan Junior 2cbda85f1c Rebase to FSF GDB 8.1.90.20180714 (8.2pre).
Backport IPv6 patch (RH BZ 881849, Sergio Durigan Junior).
2018-07-15 12:27:21 -04:00
Sergio Durigan Junior 17183a1d49 Extend specfile to run testsuites for native-gdbserver and native-extended-gdbserver 2018-07-14 16:04:17 -04:00
Fedora Release Engineering d790689b70 - Rebuilt for https://fedoraproject.org/wiki/Fedora_29_Mass_Rebuild
Signed-off-by: Fedora Release Engineering <releng@fedoraproject.org>
2018-07-13 01:12:54 +00:00
Jan Kratochvil 138f53b360 [dts] [rhel6] Do not use mpfr as rhel6 has mpfr-2 while GDB requires mpfr-3. 2018-07-12 12:26:40 +02:00
Jan Kratochvil 5cc516897b Remove as no longer needed:
Workaround gcc-8.0: -Wno-error=cast-function-type,stringop-truncation
2018-07-12 11:16:09 +02:00
Jan Kratochvil 4f936c1cb8 [dts] Upgrade libstdc++-v3-python to 8.1.1-20180626. 2018-07-12 10:49:15 +02:00
Sergio Durigan Junior 0ec66a7bfb Rebuild due to GCC ABI change. 2018-07-12 00:36:08 -04:00
Sergio Durigan Junior 100fc38c45 Remove BuildRoot: directive from specfile.
Ref.: https://lists.fedoraproject.org/archives/list/devel@lists.fedoraproject.org/message/JJC5E3YKO4HNVLTKCLSDKLS6WMZSXOBK/
2018-07-10 17:23:26 -04:00
Sergio Durigan Junior e95ed4b7b3 Rebase to FSF GDB 8.1.90.20180708 (8.2pre). 2018-07-08 18:48:11 -04:00
Sergio Durigan Junior 9d054c36c2 Delete old sources 2018-07-04 23:23:41 -04:00
Sergio Durigan Junior 26734721d0 Upload source files for last version 2018-07-04 23:23:08 -04:00
Sergio Durigan Junior af046d7244 Rebase to FSF GDB 8.1.50.20180704 (8.2pre).
Remove defattr directives from specfile.
2018-07-04 20:59:29 -04:00
Miro Hrončok 57c3c609d3 Rebuilt for Python 3.7 2018-07-02 14:02:14 +02:00
Sergio Durigan Junior bf87ff816c Rebase to FSF GDB 8.1.50.20180629 (8.2pre).
Remove pahole.py.
Adjust handling of gdb-gdb.py.
2018-06-29 19:32:31 -04:00
Sergio Durigan Junior ab024a6de1 Rebase to FSF GDB 8.1.50.20180624 (8.2pre). 2018-06-27 15:50:46 -04:00
Sergio Durigan Junior a0d6e14aa3 Add BuildRequires: mpfr-devel (RH BZ 1593280).
Resolves: rhbz#1593280
2018-06-20 16:52:00 -04:00
Sergio Durigan Junior fd7e5d77a8 Remove need for "FileName:" line on the header of the patches. 2018-06-18 20:10:24 -04:00
Sergio Durigan Junior 3638ec5fec Upload sources to lookaside cache 2018-06-18 17:34:55 -04:00
Sergio Durigan Junior f3cfd8cd2d Rebase to FSF GDB 8.1.50.20180618 (8.2pre). 2018-06-18 17:33:24 -04:00
Sergio Durigan Junior 4f2cb1818a Do not run /sbin/install-info when installing the documentation
(except for DTS).
2018-06-18 13:47:30 -04:00
Sergio Durigan Junior 399e22022a Rebase to FSF GDB 8.1.50.20180613 (8.2pre). 2018-06-13 15:37:00 -04:00
Miro Hrončok ea73a43ec5 Rebuilt for Python 3.7 2018-06-13 16:03:58 +02:00
Miro Hrončok a902391148 Bootstrap for Python 3.7 2018-06-13 14:51:24 +02:00
Sergio Durigan Junior 8014ace474 Fix Python 3.7 breakage (RH BZ 1577396).
Resolves: rhbz#1577396
2018-06-08 17:04:24 -04:00
Sergio Durigan Junior 732f37d3a4 Add gdb-aarch64-guard-sve-macros.patch and unbreak Aarch64 build 2018-06-07 14:14:40 -04:00
Sergio Durigan Junior c9daf93497 Rebase to FSF GDB 8.1.50.20180605 (8.2pre). 2018-06-05 15:25:07 -04:00
Sergio Durigan Junior 56d681a596 Remove missing "^index .*" lines from patches, and regenerate them 2018-06-05 11:25:20 -04:00
Sergio Durigan Junior 9e41188f8d Rebase to FSF GDB 8.1.50.20180529 (8.2pre). 2018-06-04 16:28:10 -04:00
Sergio Durigan Junior 2bcd68d7bf Rebase to FSF GDB 8.1.50.20180522 (8.2pre). 2018-05-31 14:47:56 -04:00
Sergio Durigan Junior b7dc57f2a9 Improve generate-patches-from-git-repo.sh script
This commit improves the script used to generate the patches from the
upstream git repo.  Basically, it removes even more cruft that was
being added by 'git format-patch', making the output really simple and
deterministic (determinism which was a problem before).

Aside from the metadata, nothing else has been changed and therefore
it doesn't justify a new Fedora GDB release.
2018-05-17 16:11:29 -04:00
Sergio Durigan Junior f62b682777 Re-add "[aarch64] Fix missed unaligned hardware watchpoints (RH BZ 1347993)."
This commit re-adds the patch, using the current patch framework.
2018-05-17 16:02:26 -04:00
Sergio Durigan Junior 9736ebfbb0 Revert "[aarch64] Fix missed unaligned hardware watchpoints (RH BZ 1347993)."
This reverts commit 397c8a5922.
2018-05-17 14:52:53 -04:00
Jan Kratochvil 397c8a5922 [aarch64] Fix missed unaligned hardware watchpoints (RH BZ 1347993). 2018-05-05 18:54:28 +02:00
Jan Kratochvil fd48d313b8 Revert 'Fix PDF build on Rawhide/F-29', rm -rf texinfo/ (from RH BZ 1562580). 2018-04-02 18:55:20 +02:00
Jan Kratochvil 4262bf0e32 Fix PDF build on Rawhide/F-29. 2018-03-31 19:34:45 +02:00
Jan Kratochvil 35cdcb6a32 Add test: [s390x] Backport arch12 instructions decoding (RH BZ 1553104). 2018-03-23 20:50:27 +01:00
Jan Kratochvil ad1404c938 Add: BuildRequires: gcc-c++
https://fedoraproject.org/wiki/Packaging:C_and_C%2B%2B#BuildRequires_and_Requires
2018-03-03 05:35:46 +01:00
Rex Dieter 4ec1a6344c rebuild (guile) 2018-02-20 14:01:48 -06:00
Jan Kratochvil 3b2269511e [testsuite] Revert disable of BuildRequires: gcc-go (for RH BZ 1541639). 2018-02-17 17:22:13 +01:00
Igor Gnatenko 828d4ecb65
Remove %clean section
None of currently supported distributions need that.
Last one was EL5 which is EOL for a while.

Signed-off-by: Igor Gnatenko <ignatenkobrain@fedoraproject.org>
2018-02-14 08:02:45 +01:00
Igor Gnatenko c287c646a5
Escape macros in %changelog
Reference: https://lists.fedoraproject.org/archives/list/devel@lists.fedoraproject.org/thread/Y2ZUKK2B7T2IKXPMODNF6HB2O5T5TS6H/
Signed-off-by: Igor Gnatenko <ignatenkobrain@fedoraproject.org>
2018-02-09 09:04:34 +01:00
Fedora Release Engineering f9b3dfe2c9 - Rebuilt for https://fedoraproject.org/wiki/Fedora_28_Mass_Rebuild
Signed-off-by: Fedora Release Engineering <releng@fedoraproject.org>
2018-02-07 10:44:34 +00:00
Jan Kratochvil 1919df08fd Fix .spec build compatibility with <=F-27 and <=RHEL-7.
[testsuite] Temporarily disable BuildRequires: gcc-go (for RH BZ 1541639).
2018-02-06 06:27:37 +01:00
Sergio Durigan Junior 82f299dd3b Make generate-patches-from-git-repo.sh use "_git_upstream_commit" instead of "origin/master" for "git merge-base". 2018-02-05 13:01:55 -05:00
Jan Kratochvil 4a848ebc38 Workaround gcc-8.0: -Wno-error=cast-function-type,stringop-truncation
Fix ppc64 stwux encoding as found by gcc-8.0 -Werror=tautological-compare.
2018-02-04 21:49:30 +01:00
Jan Kratochvil 188c9fbf90 Fix -D_GLIBCXX_DEBUG gdb-add-index regression (RH BZ 1540559). 2018-02-04 21:04:11 +01:00
Sergio Durigan Junior 57200186ba Upload gdb-8.1.tar.xz to cache 2018-01-31 17:51:25 -05:00
Sergio Durigan Junior 6f7202ecff Rebase to FSF GDB 8.1. 2018-01-31 17:47:02 -05:00
esakaiev@redhat.com 3a396f9ecd Adding tests to the new_tests branch 2018-01-24 11:08:41 -05:00
Sergio Durigan Junior 21011c1e9c 8.0.90.20180109-2.fc26
Remove gdb-6.3-rh-dummykfail-20041202.patch (RH BZ 1535228).
Remove gdb-glibc-vdso-workaround.patch (RH BZ 1535244).

Resolves: rhbz#1535228
Resolves: rhbz#1535244
2018-01-19 16:03:40 -05:00
Sergio Durigan Junior a749f1b208 Upload source files for last commit 2018-01-10 14:25:28 -05:00
Sergio Durigan Junior c42f0297dc 8.0.90.20180109-1.fc26
Rebase to pre-FSF GDB 8.1 (8.1.90.20180109).
2018-01-10 14:21:10 -05:00
Sergio Durigan Junior 4632e1fa80 Rebase to FSF GDB 8.0.50.20171213 (8.1pre). 2017-12-18 12:28:39 -05:00
Sergio Durigan Junior a8767b37e5 8.0.50.20171204-34.fc26
- chmod +x on the generate-*.sh script.s
- Remove references to gdb-8.0.1 from 'sources' and '.gitignore'.
- Regenerate first line of the patches (remove commit hash).
- Fix empty Source line.
2017-12-10 17:00:49 -05:00
Sergio Durigan Junior b7971c4818 Fix build failure from last commit (add the _gdb.spec* files as Source) 2017-12-08 01:04:24 -05:00
Sergio Durigan Junior f637971ee3 - Rebase to FSF GDB 8.0.50.20171204 (8.1pre).
- Implemented new method for dealing with local patches.
2017-12-07 23:31:26 -05:00
Sergio Durigan Junior f524ac5870 Convert all the patches to 'git-am' format. 2017-12-04 14:24:00 -05:00
Jan Kratochvil bb1c5356b1 [testsuite] Fix BuildRequires for non-x86* arches. 2017-12-02 18:59:34 +01:00
Jan Kratochvil f408ba821f Use inlined func name for printing breakpoints (RH BZ 1228556, Keith Seitz). 2017-10-27 21:07:50 +02:00
Jan Kratochvil d614670f9d [s390x] Backport arch14 guarded-storage register support (RH BZ 1498758). 2017-10-07 16:14:55 +02:00
Jan Kratochvil 5210cb945e Performance fix of gcore to use --readnever (for RH BZ 1493675). 2017-09-28 19:56:23 +02:00
Troy Dawson 1b69fa99d4 Cleanup spec file conditionals 2017-09-26 15:31:01 -07:00
Jan Kratochvil 364e8a5927 Rebase to FSF GDB 8.0.1 (8.0 stable branch). 2017-09-12 09:43:19 +02:00
Jan Kratochvil f318b4ab7b [rhel6] Fix T-stopping of processes after their detachment (RH BZ 1486223). 2017-08-30 20:44:56 +02:00
Jan Kratochvil d4a557a0ab Backport DWARF-5 and breakpoint fixes from upstream stable branch 8.0. 2017-08-24 16:51:41 +02:00
Jan Kratochvil 4f1de05c3f [s390x] Backport arch12 support and other s390x fixes (RH BZ 1420304). 2017-08-19 22:40:32 +02:00
Jan Kratochvil 99b34dc784 Backport a fix for clang && -gsplit-dwarf debuggees (RH BZ 1482892). 2017-08-18 14:04:02 +02:00
Jan Kratochvil 9eb42f22d5 Fix compatibility with F-27 debuginfo packaging.
Fix compatibility with F-27 librpm version 8.
2017-08-13 13:22:19 +02:00
Jan Kratochvil 3bff4d98ba Two fixes from upstream stable branch 8.0. 2017-08-03 19:02:03 +02:00
Fedora Release Engineering 2d3d9675a7 - Rebuilt for https://fedoraproject.org/wiki/Fedora_27_Binutils_Mass_Rebuild 2017-08-02 21:00:38 +00:00
Fedora Release Engineering d1308d3e8b - Rebuilt for https://fedoraproject.org/wiki/Fedora_27_Mass_Rebuild 2017-07-26 09:11:20 +00:00
Jan Kratochvil 4d0140dca1 [rhel6 dts] Use devtoolset gcc for GDB being now in C++11. 2017-06-12 21:57:44 +02:00
Jan Kratochvil c52da2003f [dts] Upgrade libstdc++-v3-python to 7.1.1-20170526. 2017-06-10 08:25:34 +02:00
Jan Kratochvil 39868f2076 [rhel dts libipt] Fix#2 [-Werror=implicit-fallthrough=] with gcc-7.1.1. 2017-06-09 15:45:38 +02:00
Jan Kratochvil 80d902f397 [rhel dts libipt] Fix [-Werror=implicit-fallthrough=] with gcc-7.1.1. 2017-06-09 07:35:25 +02:00
Jan Kratochvil 7e382f5dd2 Rebase to FSF GDB 8.0 final.
[rhel7 dts] Rebase bundled libipt to 1.6.1.
2017-06-09 06:22:17 +02:00
Jan Kratochvil b5e2ceba4b Move 'dnf-command(debuginfo-install)' gdb-headless -> gdb (RH BZ 1452335). 2017-05-20 20:12:10 +02:00
Fedora Release Engineering 7c86337b97 - Rebuilt for https://fedoraproject.org/wiki/Fedora_26_27_Mass_Rebuild 2017-05-15 20:49:22 +00:00
Jan Kratochvil e6074aa8c0 [.spec] Update patches categorization. 2017-05-08 23:06:41 +02:00
Jan Kratochvil ee50e95c11 [ppc*] Fix gdb.arch/powerpc-power7.exp testcase regression (RH BZ 1440044). 2017-05-02 23:05:38 +02:00
Jan Kratochvil 5bb0f3bac3 Rebase to FSF GDB 7.99.90.20170420 (pre-8.0 stable branch). 2017-04-21 14:47:41 +02:00
Jan Kratochvil 5e93e40f3c Fix reported gdb-vla-intel-stringbt-fix.patch regression (SuSE).
Remove gcc-7 compilation compatibility hack.
2017-04-19 22:54:25 +02:00
Jan Kratochvil 5b3c4903f6 [testsuite] [ppc*,s390*] Do not FAIL rhbz1261564-aarch64-watchpoint.exp
(RH BZ 1352563).
2017-03-10 23:36:53 +01:00
Jan Kratochvil dbc649db15 Rebase to pre-7.13 FSF GDB trunk. 2017-03-09 23:53:59 +01:00
Jan Kratochvil 0fffd6c99d Fix gdb-vla-intel-fortran-strides.patch rebase regression. 2017-03-02 11:02:25 +01:00
Jan Kratochvil b1807ab4e1 Fix gdb.arch/amd64-entry-value-paramref.exp rebase regression. 2017-02-28 23:05:31 +01:00
Jan Kratochvil f9739f5031 [rhel] Fix gdb.python/py-gil-mthread.exp for Python 2 compat. (RH BZ 1427487). 2017-02-28 16:36:04 +01:00
Jan Kratochvil af2c2a5422 Rebase to pre-7.13 FSF GDB trunk.
Dropped gdb-6.7-bz426600-DW_TAG_interface_type-test.patch as GCJ is no more.
2017-02-27 22:30:32 +01:00
Jan Kratochvil 26c3bd5ab5 New testcase for: Fix <tab>-completion crash (Gary Benson, RH BZ 1398387).
[testsuite] Use more standard_output_file.
2017-02-25 06:45:31 +01:00
Jan Kratochvil 8d40388f0a Fix <tab>-completion crash (Gary Benson, RH BZ 1398387). 2017-02-15 17:06:33 +01:00
Jan Kratochvil 04e185f768 Release bump. 2017-02-14 19:23:34 +01:00
Jan Kratochvil f3b44f72fc [dts] Upgrade libstdc++-v3-python to 6.3.1-20170212. 2017-02-12 14:28:20 +01:00
Jan Kratochvil 7a79f904cf Fix build compatibility with gcc-7. 2017-02-08 18:41:52 +01:00
Jan Kratochvil 082583feeb Add missing %license macro 2017-02-08 16:34:17 +01:00
Jan Kratochvil 1d69420972 Rebase to released FSF GDB 7.12.1. 2017-01-21 19:27:42 +01:00
Jan Kratochvil 7a45095ecc Enable libinproctrace.so on all archs except arm32. 2017-01-17 19:35:17 +01:00
Jan Kratochvil 194c0860de Fix gdb-readline62-ask-more-rh.patch for Rawhide readline-7.0. 2017-01-13 11:27:14 +01:00
Igor Gnatenko 21eae8e63e Rebuild for readline 7.x
Signed-off-by: Igor Gnatenko <ignatenko@redhat.com>
2017-01-12 17:30:28 +01:00
Jan Kratochvil 35d56bae33 [rhel6] Fix missing /usr/bin/realpath. 2017-01-12 11:16:39 +01:00
Jan Kratochvil 718f2d69b3 Update from FSF GDB 7.12 stable branch to snapshot: gdb-7.12.0.20170111 2017-01-11 18:11:21 +01:00
Jan Kratochvil 6022fd9542 sources: md5->sha512 2017-01-11 17:38:06 +01:00
Jan Kratochvil a06a12e15b Fix Python backtraces for 32-bit inferiors (Tom Tromey, RH BZ 1411094). 2017-01-08 13:00:47 +01:00
Jan Kratochvil b6aa878929 Fix gdb-add-index for 444 *.debug files. 2017-01-06 19:38:37 +01:00
Rex Dieter 7fedccf706 fix logic of prior Conflicts
theoretically should not be required due to versioned dependeny
on -headless already, but it cannot hurt either
2017-01-02 18:52:52 -06:00
Rex Dieter 602e87ce15 avoid hard-coded python
python isn't present in buildroot, try %__python instead
2017-01-02 18:40:33 -06:00
Rex Dieter 714c89f6bc Conflicts: gdb-headless < 7.12-29 (#1402554) 2017-01-02 18:07:51 -06:00
Charalampos Stratakis 246098eea8 Python 3.6 rebuild: Rebuild with python3 support. 2016-12-10 11:46:53 +01:00
Charalampos Stratakis 9bafb7c0fd Python 3.6: Rebuild without python3 support 2016-12-09 15:54:49 +01:00
Jan Kratochvil 5eb569c1b7 Fix gdb-headless /usr/bin/ executables (BZ 1390251). 2016-10-31 21:08:30 +01:00
Jan Kratochvil b513153c46 Fix testcase: gdb.base/gdb-rhbz1156192-recursive-dlopen.exp 2016-10-24 23:23:00 +02:00
Jan Kratochvil 43d7d2a8eb More work on missing testcases present in rhel6 GDB; some still FAIL. 2016-10-23 22:09:55 +02:00
Jan Kratochvil 29d49d9491 Add missing testcases present in rhel6 GDB; some still FAIL. 2016-10-20 22:30:43 +02:00
Jan Kratochvil 2b94f0063a [rhel6] Fix .spec without devtoolset-6-build installed (RH BZ 1384947). 2016-10-14 19:21:40 +02:00
Jan Kratochvil d08a20f70d Fix TLS (such as 'errno') regression. 2016-10-12 10:50:06 +02:00
Jan Kratochvil 425d099f6b [testsuite] Various testsuite fixes.
- [aarch64] Fix gdb.cp/nextoverthrow.exp regression (Yao Qi).
2016-10-12 10:26:19 +02:00
Jan Kratochvil 1c3e2fa7ac Fix .spec build: error: Macro %buildisa has empty body 2016-10-07 23:28:47 +02:00
Jan Kratochvil 53edfc5dad Rebase to FSF GDB 7.12. 2016-10-07 23:19:55 +02:00
Jan Kratochvil eed01b8fe7 Rebase to FSF GDB 7.11.90.20161006 (pre-7.12 branch snapshot). 2016-10-06 15:22:49 +02:00
Jan Kratochvil 25e02352ec Rebase to FSF GDB 7.11.90.20160929 (pre-7.12 branch snapshot).
- Fixes GDB crashes on inf. function call scripts (RH BZ 1378147, Pedro Alves).
2016-09-29 10:57:10 +02:00
Jan Kratochvil 4ca26b1f03 Fix attachment of JIT-debug-enabled inf. (7.11.1 regression, RH BZ 1375553).
- Rebase to FSF GDB 7.11.90.20160928 (pre-7.12 branch snapshot).
2016-09-28 17:34:37 +02:00
Jan Kratochvil 2f00fc1fdb Fix description empty lines. 2016-09-15 22:54:02 +02:00
Jan Kratochvil 303cd25eb9 Provide gdb-headless package (RH BZ 1195005). 2016-09-14 23:33:09 +02:00
Jan Kratochvil 60c662d53a [testsuite] More testsuite fixes. 2016-09-12 23:09:34 +02:00
Jan Kratochvil 235c57bc26 Various mostly testsuite compatibility and regression fixes. 2016-09-12 22:56:27 +02:00
Jan Kratochvil d258670d64 Rebase to FSF GDB 7.11.90.20160907 (pre-7.12 branch snapshot).
- Rebase Intel VLA patchset.
2016-09-07 22:47:48 +02:00
Jan Kratochvil 35cbc92246 [rhel6+7] Fix compatibility of bison <3.1 and gcc >=6. 2016-09-07 13:45:40 +02:00
Jan Kratochvil 0414aeba5a Release bump for a mistaken build. 2016-09-04 21:05:39 +02:00
Jan Kratochvil dc6b8f4f24 Fix libipt bundling in 7.12. 2016-09-04 20:19:06 +02:00
Jan Kratochvil 0300a2eb2d Rebase to FSF GDB 7.11.90.20160904 (pre-7.12 branch snapshot).
- Make Version tag 7.12; but it is still a pre-release.
2016-09-04 19:32:35 +02:00
Jan Kratochvil d987921748 Rebase to FSF GDB 7.11.90.20160829 (pre-7.12 branch snapshot). 2016-08-29 09:50:02 +02:00
Jan Kratochvil 72aed9dc5e Fix Intel VLA patchset regression: dynamic.exp: p varw filled 2016-08-26 17:09:47 +02:00
Jan Kratochvil 8cff818ba3 Merge Fedora packaging changes from Fedora 24 gdb-7.11.1-83.fc24: 2016-08-23 21:04:27 +02:00
Jan Kratochvil a5a9adcd40 Merge commit '3f32311b4a6fe79de1a3da7bca5c08613eb3734e' 2016-08-23 20:54:15 +02:00
Jan Kratochvil efdba24c8f [dts+el7] [x86*] Bundle libipt - fix#3 its initialization (RH BZ 1256513). 2016-08-23 09:52:01 +02:00
Jan Kratochvil aacdec2a04 [dts+el7] [x86*] Bundle libipt - fix#2 its initialization (RH BZ 1256513). 2016-08-23 09:37:55 +02:00
Jan Kratochvil 92d45fce5d [dts+el7] [x86*] Bundle libipt - fix its initialization (RH BZ 1256513). 2016-08-23 09:22:28 +02:00
Jan Kratochvil b4d85c5451 [dts] Upgrade libstdc++-v3-python to 6.1.1-20160817. 2016-08-22 11:13:25 +02:00
Jan Kratochvil a4c8bcab20 [dts60+el7] [x86*] Bundle linux_perf.h for libipt (RH BZ 1256513). 2016-08-19 20:58:09 +02:00
Jan Kratochvil 1d224e61d8 [dts60+el7] [x86*] Bundle libipt (RH BZ 1256513). 2016-08-17 23:48:10 +02:00
Jan Kratochvil 9faadbe569 Rebase to FSF GDB 7.11.90.20160807 (pre-7.12 branch snapshot). 2016-08-07 23:29:04 +02:00
Jan Kratochvil 3f32311b4a [aarch64] Fix ARMv8.1/v8.2 for hw watchpoint and breakpoint
(Andrew Pinski, RH BZ 1363635).
2016-08-03 23:14:22 +02:00
Jan Kratochvil 5c5eb100c4 Testcase for: Load strictly build-id-checked core files only if no executable
is specified (Jan Kratochvil, RH BZ 1339862).
2016-07-31 23:28:07 +02:00
Jan Kratochvil 2e29a3ec7b Do not apply RHEL-6 patches on non-RHEL-6 even for testsuite. 2016-07-28 20:11:28 +02:00
Jan Kratochvil 1e35566c47 Rebase to FSF GDB 7.11.50.20160721 (pre-7.12 trunk snapshot). 2016-07-21 16:36:21 +02:00
Jan Kratochvil 7306e88eb4 Rebase to FSF GDB 7.11.50.20160716 (pre-7.12 trunk snapshot). 2016-07-17 16:35:49 +02:00
Jan Kratochvil fb74e3a749 Test 'info type-printers' Python error (RH BZ 1350436). 2016-06-27 23:24:13 +02:00
Jan Kratochvil 8e7b06e27c Rebase to released FSF GDB 7.11.1. 2016-06-07 10:14:38 +02:00
Jan Kratochvil 6b46b9b395 Import bare DW_TAG_lexical_block (RH BZ 1325396). 2016-05-30 15:01:00 +02:00
Jan Kratochvil 8dde8d1082 Fix compilation error by upstream symfile.c fix. 2016-05-03 22:56:22 +02:00
Jan Kratochvil d6851d1cc9 Fix messages suggesting more recent RHEL gdbserver (RH BZ 1321114). 2016-05-03 22:38:13 +02:00
Jan Kratochvil 223268c6f0 Import upstream 7.11 branch stable fixes. 2016-04-27 22:25:37 +02:00
Jan Kratochvil ae97bb9470 New test for Python "Cannot locate object file for block" (for RH BZ 1325795). 2016-04-23 21:38:31 +02:00
Jan Kratochvil 7ecbbb2a16 Never kill PID on: gdb exec PID (Jan Kratochvil, RH BZ 1219747). 2016-04-12 21:36:15 +02:00
Jan Kratochvil 2e49bd4dad [--with testsuite] Add two more BuildRequires. 2016-04-08 22:11:04 +02:00
Jan Kratochvil dd7d988932 [testsuite] Fix several false FAILs. 2016-04-08 17:32:35 +02:00
Jan Kratochvil bd0820fa32 Import upstream 7.11 branch stable fixes. 2016-04-06 21:34:34 +02:00
Jan Kratochvil 98045fb9ce Add messages suggesting more recent RHEL gdbserver (RH BZ 1321114). 2016-04-06 20:36:28 +02:00
Jan Kratochvil 76251d6102 Fix non-stop gdb -p <container>: internal error (pedro Alves, RH BZ 1318049). 2016-04-06 17:36:24 +02:00
Jan Kratochvil c0cbb1aae4 .spec cleanup: Drop strict-aliasing GCC bug workaround (from RH BZ 1315191). 2016-03-19 21:26:41 +01:00
Jan Kratochvil 4dd46aad51 .spec cleanup: Drop SCL obsoletes of devtoolset-1.1*: *-1.0* 2016-03-18 20:12:14 +01:00
Jan Kratochvil 04d3aefc17 Add message suggesting gdbserver for non-matching PID namespaces. 2016-03-17 21:57:11 +01:00
Jan Kratochvil b84e3d603f New Fedora GDB testfile: rhbz1261564-aarch64-watchpoint.exp
- Backport gdb-7.11 stable branch PR gdb/19676 fix (Pedro Alves).
2016-03-15 19:31:32 +01:00
Jan Kratochvil 01264bee10 Fix strict-aliasing rules compilation error (RH BZ 1315191). 2016-03-08 15:03:26 +01:00
Jan Kratochvil fdbd5e346b Rebase VLA (Fortran dynamic arrays) strides (multi-dim. subarrays) from Intel. 2016-02-26 21:58:14 +01:00
Jan Kratochvil 09aea42a99 Release bump only. 2016-02-25 15:44:28 +01:00
Jan Kratochvil 1ed22de73e Release bump only. 2016-02-24 21:51:25 +01:00
Jan Kratochvil 46311ecd89 Rebase to released FSF GDB 7.11. 2016-02-24 17:01:24 +01:00
Jan Kratochvil 32b1677f0e Rebase to FSF GDB 7.10.90.20160216 (pre-7.11 branch snapshot). 2016-02-16 11:25:12 +01:00
Jan Kratochvil 22d1e60a36 Drop gdb-testsuite-subdirs-revert.patch. 2016-02-16 10:54:56 +01:00
Jan Kratochvil c4c35c27fd Rebase to FSF GDB 7.10.90.20160211 (pre-7.11 branch snapshot). 2016-02-13 22:53:22 +01:00
Dennis Gilmore 7759e5bf5e - Rebuilt for https://fedoraproject.org/wiki/Fedora_24_Mass_Rebuild 2016-02-03 21:06:21 +00:00
Jan Kratochvil 92913c305e Rebase to FSF GDB 7.10.50.20160131 (trunk snapshot). 2016-01-31 19:50:48 +01:00
Jan Kratochvil 2e597932c2 Fix another false gcc6 compilation warning (Mark Wielaard). 2016-01-31 19:14:10 +01:00
Jan Kratochvil 4f2557176f Fix false gcc6 compilation warning for: bfd/elf64-s390.c 2016-01-31 19:00:51 +01:00
Jan Kratochvil 5a2431c246 [testsuite] Fix false selftest.exp FAIL from system readline-6.3+ (Patrick Palka). 2016-01-31 15:48:57 +01:00
Jan Kratochvil 3a8cee8e79 Fix gdb.gdb/selftest.exp false FAIL. 2016-01-22 20:46:30 +01:00
Jan Kratochvil c16b44507f Rebase to FSF GDB 7.10.50.20160121 (trunk snapshot). 2016-01-22 19:00:27 +01:00
Jan Kratochvil 6f06b1f20c Suppress librpm non-absolute filename warnings for /^remote:/ filenames. 2016-01-20 22:22:06 +01:00
Jan Kratochvil 65adaa87b1 Test clflushopt instruction decode (for RH BZ 1262471). 2016-01-16 22:57:23 +01:00
Jan Kratochvil eca6388b15 Simplify .spec: Remove conditional revert of: gdb-pahole-python2.patch 2016-01-09 15:13:35 +01:00
Jan Kratochvil 5d173531c0 Simplify .spec: Remove conditional revert of: gdb-6.8-attach-signalled-detach-stopped.patch
- Simplify .spec: Remove conditional revert of: gdb-6.8-quit-never-aborts.patch
2016-01-09 15:11:44 +01:00
Jan Kratochvil ccd56ac8c9 Merge gdb-rhel5-compat.patch into: gdb-6.8-attach-signalled-detach-stopped.patch 2016-01-09 15:02:21 +01:00
Jan Kratochvil 13d2cd5e8a Simplify .spec: Remove conditional revert of: gdb-readline62-ask-more-rh.patch 2016-01-09 14:55:47 +01:00
Jan Kratochvil 46cc044291 Simplify .spec: Remove conditional revert of: gdb-6.6-buildid-locate-rpm-scl.patch 2016-01-09 14:46:42 +01:00
Jan Kratochvil a4961b9190 Simplify .spec: Remove conditional revert of: gdb-dts-rhel6-python-compat.patch 2016-01-09 14:38:42 +01:00
Jan Kratochvil 046f33b589 VLA (Fortran dynamic arrays) strides (multi-dimensional subarrays) from Intel. 2016-01-09 11:58:30 +01:00
Jan Kratochvil 4800a9bd4b Fix false FAILs on too long base directory. 2016-01-08 23:35:15 +01:00
Jan Kratochvil 2116e53327 Rebase to FSF GDB 7.10.50.20160106 (trunk snapshot). 2016-01-08 22:19:09 +01:00
Jan Kratochvil c296a6a29e Rebase to FSF GDB 7.10.50.20151113 (trunk snapshot).
- [testsuite] BuildRequire libmpx for --with testsuite.
- Force libncursesw over libncurses to match the includes (RH BZ 1270534).
2015-11-14 17:06:06 +01:00
Peter Robinson 07b8587e82 - Rebuilt for https://fedoraproject.org/wiki/Changes/python3.5 2015-11-12 12:14:06 +00:00
Jan Kratochvil 41e6c203a2 [aarch64] Fix build regression (RH BZ 1278902, bugreport by Peter Robinson). 2015-11-08 10:38:42 +01:00
Jan Kratochvil 23f398e61a Rebase to FSF GDB 7.10.50.20151027 (trunk snapshot). 2015-11-03 22:28:36 +01:00
Jan Kratochvil ebe9b7c7c7 Fix internal error on DW_OP_bregx(-1) (RH BZ 1270564). 2015-10-12 21:33:25 +02:00
Jan Kratochvil 29ca342f5e Add --with buildisa, remove %{?_isa} from BuildRequires by default:
https://github.com/msimacek/koschei/issues/54
2015-09-28 09:17:31 +02:00
Jan Kratochvil 213eccacf2 [rhel6,rhel7] Keep pahole.py and make it Python2 compatible. 2015-09-24 09:18:32 +02:00
Jan Kratochvil a2e5681941 [rhel7] Provide libstdc++-v3-python with C++11 even on RHEL-7 (RH BZ 1239290).
- Do not provide libstdc++-v3-python lib64 files on 32-bit archs.
- [rhel6,rhel7] Delete pahole.py on Python2 systems.
2015-09-23 21:39:42 +02:00
Robert Kuska ac7f21685a Python3.5 rebuild: build with python3 support 2015-09-23 15:49:22 +02:00
Robert Kuska 99387a5556 Python3.5 Rebuild: Build gdb without python support 2015-09-23 10:44:07 +02:00
Jan Kratochvil e32f96fe44 Fix the pahole command breakage due to its Python3 port (RH BZ 1264532). 2015-09-18 21:01:11 +02:00
Jan Kratochvil 44ca5e4d1e Fix gstack to use gdb from $PATH (bugreport by Frank Hirtz, RH BZ 1262589). 2015-09-13 20:39:13 +02:00
Jan Kratochvil fe8a89ffd6 [testsuite] Fix gcc-gdb-plugin and gcc-go BuildRequires for --with testsuite. 2015-09-11 10:27:51 +02:00
Jan Kratochvil 276edb821d [ppc64le] Use skip_entrypoint for skip_trampoline_code (RH BZ 1260558). 2015-09-10 23:51:47 +02:00
Jan Kratochvil a6321db170 Add changelog entry and fix librpm dependency broken by Peter Robinson. 2015-09-10 23:36:30 +02:00
Peter Robinson 595c255949 fix FTBFS on f-23 2015-09-09 00:50:20 +01:00
Jan Kratochvil 569c63c04c Enable libipt (Intel Processor Trace Decoder Library). 2015-09-03 20:23:17 +02:00
Sergio Durigan Junior 1c8228902d Fix 'Make the probes-based dynamic linker interface more robust to errors' (Sergio Durigan Junior, RH BZ 1259132). 2015-09-02 16:02:54 -04:00
Jan Kratochvil 2f1c4cf200 [RHEL] Fix librpm Recommends compatibility. 2015-09-01 17:44:10 +02:00
Jan Kratochvil 23a14272f3 Rebase to FSF GDB 7.10 final. 2015-08-29 16:11:52 +02:00
Jan Kratochvil 7fe027b002 Re-enable --with testsuite BuildRequires: prelink for RHELs. 2015-08-23 07:24:39 +02:00
Jan Kratochvil 1dfcf42ec5 Rebase to FSF GDB 7.9.90.20150822 (7.10 branch snapshot).
- Remove --with testsuite BuildRequires: prelink (prelink is orphaned in F-23+).
2015-08-22 21:50:42 +02:00
Sergio Durigan Junior 886d770627 Fix last commit. Add %changelog entry, bump version.
Add "Recommends: default-yama-scope" (for RH BZ 1209492).
2015-08-06 15:31:02 -04:00
Sergio Durigan Junior c779d454ec Adding "Recommends: default-yama-scope" for GDB
This is necessary because of Bug 1209492.
2015-08-06 15:18:58 -04:00
Jan Kratochvil 15c3af2823 Fix librpm version for f23. 2015-08-06 19:34:04 +02:00
Jan Kratochvil 1309eacac1 Fix unpackaged d-exp.c source for the debuginfo rpm.
- Fix librpm version dependency Koji build failure (for RH BZ 1249325).
2015-08-02 10:02:40 +02:00
Jan Kratochvil e18a36d366 Fix librpm version dependency (for RH BZ 1249325, from Igor Gnatenko). 2015-08-02 09:43:44 +02:00
Jan Kratochvil ddc0fde6fd Fix librpm version 3->7 for Rawhide
(RH BZ 1249325, bugreport by Zbigniew Jędrzejewski-Szmek).
- Fix yum vs. dnf message suggestion for Rawhide
  (RH BZ 1249326, bugreport by Zbigniew Jędrzejewski-Szmek).
2015-08-01 20:12:51 +02:00
Jan Kratochvil 90127c91f8 Rebase to FSF GDB 7.9.90.20150717 (7.10 branch snapshot). 2015-07-17 13:24:06 +02:00
Jan Kratochvil ae96b4a095 Rebase to FSF GDB 7.9.90.20150709 (7.10 branch snapshot). 2015-07-10 10:25:09 +02:00
Jan Kratochvil d92234971d Upgrade libstdc++-v3-python to r225521 (RH BZ 1239290). 2015-07-07 18:57:14 +02:00
Jan Kratochvil cebf6f9af9 [RHEL] Use Python2, disable Guile. 2015-07-02 22:50:37 +02:00
Jan Kratochvil 80780792f9 Fix 'info type-printers' Python error (Clem Dickey, RH BZ 1085576). 2015-06-26 15:50:18 +02:00
Jan Kratochvil a688fb8c5a Fix enum e e 'Attempt to use a type name as an expr.' (Keith Seitz, PR 16253). 2015-06-16 18:30:03 +02:00
Jan Kratochvil 32f92b2e34 Rebase to FSF GDB 7.9.50.20150531 (pre-7.10 trunk snapshot). 2015-05-31 20:47:21 +02:00
Jan Kratochvil 19dab0f219 Fix ignored Requires for gdb-doc (RH BZ 1221814). 2015-05-15 09:00:04 +02:00
Jan Kratochvil d03633a0c0 Change 'Recommends: dnf-plugins-core' to 'dnf-command(debuginfo-install)'. 2015-05-14 15:00:00 +02:00
Jan Kratochvil 6d1599f359 Rebase to FSF GDB 7.9.1 (7.9 stable branch).
- Add 'Recommends: dnf-plugins-core' for 'dnf debuginfo-install'.
2015-05-13 21:59:17 +02:00
Jan Kratochvil c2620a4c45 Suggest s/debuginfo-install/dnf debuginfo-install/ (BZ 1208650, Omair Majid). 2015-04-02 21:34:18 +02:00
Jan Kratochvil 186e7e4733 Rebase to the final 7.9 release. 2015-02-22 19:38:08 +01:00
Jan Kratochvil e209b86292 Change Require->Recommends for gcc-gdb-plugin (RH BZ 1195005). 2015-02-22 19:03:49 +01:00
Till Maas 6c08fa48ef Rebuilt for Fedora 23 Change
https://fedoraproject.org/wiki/Changes/Harden_all_packages_with_position-independent_code
2015-02-21 21:47:05 +01:00
Jan Kratochvil 61676c0354 Switch Python 2->3 (RH BZ 1014549). 2015-02-16 15:56:42 +01:00
Jan Kratochvil 7cbf529231 Rebase to 7.9-branch snapshot 7.8.90.20150214. 2015-02-14 19:33:09 +01:00
Jan Kratochvil 21fb199a6f Enable guile support. 2015-02-11 16:09:28 +01:00
Jan Kratochvil 5d84d7a16a Fix gcc5 compilation errors (RH BZ 1190649). 2015-02-11 15:31:05 +01:00
Jan Kratochvil b6bc0d5376 Require gcc-gdb-plugin. 2015-02-09 21:29:05 +01:00
Jan Kratochvil 072837144c Rebase to 7.9-branch snapshot 7.8.90.20150202.
- Temporarily disable dg-extract-results.py to fix gdb.sum sorting.
2015-02-02 23:09:42 +01:00
Jan Kratochvil 2f7f533ae7 Rebase to pre-7.9 snapshot 7.8.50.20150108.
- Fix jit-reader.h for multi-lib.
2015-01-08 21:53:17 +01:00
Jan Kratochvil 1445be5574 Rebase to 7.8.1.20141228 for a performance fix (PR binutils/17677). 2014-12-28 13:55:09 +01:00
Jan Kratochvil b132e8a8fd Fix resolve_dynamic_struct: Assertion `TYPE_NFIELDS (type) > 0' (PR 17642). 2014-12-13 16:13:05 +01:00
Jan Kratochvil a438e05d6f [ppc64] Fix compatibility of Fedora errno workaround (for RH BZ 1166549). 2014-11-22 18:36:47 +01:00
Jan Kratochvil a79edc166a Fix regression accessing errno from a core file (RH BZ 1166549). 2014-11-21 19:29:14 +01:00
Sergio Durigan Junior 4fb72aaac3 Fix 'Unowned dir /usr/include/gdb/' (RH BZ 1164991). 2014-11-20 13:19:56 -05:00
Sergio Durigan Junior ae793cbabe Fix '[RFE] please add add-auto-load-scripts-directory command'
RH BZ 1163339, Jan Kratochvil
2014-11-15 04:45:06 +01:00
Jan Kratochvil 43b0bce1db Rebase to FSF GDB 7.8.1. 2014-10-30 22:21:18 +01:00
Jan Kratochvil 8095c33951 Backport vDSO regression.
- Revert the makeinfo workaround from 7.8-27.fc21.
- Further 1.75x improvement of the interactive symbols lookup (Doug Evans).
2014-10-27 15:47:21 +01:00
Jan Kratochvil 862e0ed47f Accelerate interactive symbols lookup 15x. 2014-10-21 07:55:19 +02:00
Jan Kratochvil 3cf9dd58a7 Workaround makeinfo F-22 Bug 1154436. 2014-10-19 20:41:16 +02:00
Jan Kratochvil 8a983520e3 Import 5 upstream gdb-7.8 branch fixes (async fix by Pedro Alves). 2014-10-19 18:44:20 +02:00
Sergio Durigan Junior e3bcba8731 Fix 'Slow gstack performance'
(RH BZ 1103894, Jan Kratochvil).
2014-10-06 15:01:39 -04:00
Jan Kratochvil 58638f8971 Fix "save breakpoints" for signal catchpoints and disabled breakpoints
(BZ 1146170, Miroslav Franc).
2014-10-03 22:58:23 +02:00
Sergio Durigan Junior 77c099e703 Install gdb/jit-reader.h on include directory (BZ 1141968). 2014-09-15 18:31:44 -04:00
Jan Kratochvil 3887bdb15a [testsuite] Fix runaway gdb.base/attach processes. 2014-09-14 19:22:44 +02:00
Jan Kratochvil 448d46bddf Fix GDB SIGTT* Stopped when using the PID argument (BZ 1136704, Pedro Alves). 2014-09-07 21:29:27 +02:00
Jan Kratochvil 263b58000d Fix babeltrace errors (Yao Qi).
- Fix crash on Python frame filters with unreadable arg (BZ 1126177).
2014-08-20 21:03:44 +02:00
Peter Robinson d3f8b94c47 - Rebuilt for https://fedoraproject.org/wiki/Fedora_21_22_Mass_Rebuild 2014-08-16 13:55:16 +00:00
Jan Kratochvil 5175ae097f [rhel] Adjust the previous patch for compilation on older GCCs. 2014-08-14 07:55:59 +02:00
Jan Kratochvil 0d2fda651f Fix Python GIL with gdb.execute("continue") (Phil Muldoon, BZ 1116957). 2014-08-13 22:56:01 +02:00
Jan Kratochvil 533da91091 Enable babeltrace compile-time feature. 2014-08-04 22:52:22 +02:00
Jan Kratochvil 191ccfbccd Rebase to FSF GDB 7.8.
- Display Fortran strings in backtraces.
2014-08-02 12:58:20 +02:00
Jan Kratochvil 902c8e5abc Rebase to FSF GDB 7.7.91.20140724 (pre-7.8 snapshot).
- Import TUI regression fix (Pedro Alves, BZ 1123003).
2014-07-24 20:04:47 +02:00
Jan Kratochvil c1c430cb5f Bump the package version number to final 7.8; still using 7.7.91.20140721.tar. 2014-07-22 21:15:13 +02:00
Jan Kratochvil a972d47b4c Rebase to FSF GDB 7.7.91.20140721 (pre-7.8 snapshot).
- Rebase the Intel VLA patchset.
- New fix of the optimized-out entry data values crash (BZ 1111910).
- [testsuite] Fix paginate-*.exp race for "read1".
2014-07-22 20:38:38 +02:00
Jan Kratochvil 33d54d9950 Fix regression#2 of the optimized-out entry data values fix (of BZ 1111910).
- Rebase to FSF GDB 7.7.90.20140711 (pre-7.8 snapshot).
- [testsuite] Disable --with testsuite PIE testing, it has too many false FAILs.
2014-07-11 18:24:01 +02:00
Jan Kratochvil 4f54fc4526 Fix regression of the optimized-out entry data values fix (of BZ 1111910). 2014-07-09 13:02:50 +02:00
Jan Kratochvil cec9297712 Rebase the Intel VLA patchset.
- Python completion w/overriden completer (Sergio Durigan Junior, BZ 1075199).
- Remove %{_bindir}/mono-gdb.py workaround of mono BZ 815501.
2014-07-08 21:11:05 +02:00
Jan Kratochvil b73009e1d2 Do not remove %{_datadir}/gdb/syscalls/ppc*.xml as it is secondary target.
- Remove: %{_datadir}/gdb/guile
- Remove: %{_datadir}/gdb/system-gdbinit
2014-07-01 19:54:42 +02:00
Jan Kratochvil 2a0fd8ad84 Fix crash on optimized-out entry data values (BZ 1111910). 2014-06-30 23:30:31 +02:00
Jan Kratochvil de9f421a3c Rebase to FSF GDB 7.7.90.20140627 (pre-7.8 snapshot). 2014-06-27 18:00:57 +02:00
Jan Kratochvil dd2c5ed0e6 Continue backtrace even if a frame filter throws an exception (Phil Muldoon). 2014-06-27 17:47:58 +02:00
Jan Kratochvil 2b55d27fdb [aarch64] Fix compilation error. 2014-06-24 16:09:02 +02:00
Jan Kratochvil 11195233b5 Fix --with-system-readline with readline-6.3 patch 5.
- Use --enable-werror again.
2014-06-20 12:53:48 +02:00
Jan Kratochvil b3b50862b2 Temporarily use --disable-werror for readline-6.3's deprecated 'VFunction'. 2014-06-19 22:32:58 +02:00
Jan Kratochvil eb6cb2db36 Rebase to FSF GDB 7.7.90.20140613 (pre-7.8 snapshot). 2014-06-19 22:14:32 +02:00
Dennis Gilmore 730f2712ef - Rebuilt for https://fedoraproject.org/wiki/Fedora_21_Mass_Rebuild 2014-06-07 08:34:34 -05:00
Jan Kratochvil b472cbae9c Fix#2 /usr/share/gdb/system-gdbinit/ timestamps causing non-matching *.py[oc]. 2014-06-03 20:57:43 +02:00
Jan Kratochvil fbd3253d15 Fix /usr/share/gdb/auto-load/ (safely) dangling symlinks.
- Fix /usr/share/gdb/system-gdbinit/ timestamps causing non-matching *.py[oc].
2014-06-03 20:26:54 +02:00
Jan Kratochvil 7082135fc2 [ppc64le testsuite] Add comments about prelink+valgrind not yet ported. 2014-06-03 16:58:56 +02:00
Jan Kratochvil 4eee7557d1 [arm*,aarch64] Turn on --enable-werror, fix aarch64 for it. 2014-05-30 23:31:53 +02:00
Jan Kratochvil c70b5a54fd [aarch64] Fix signal frame unwinding (BZ 1086894, upstream). 2014-05-30 22:57:40 +02:00
Jan Kratochvil 7ae270c46d [testsuite] Drop BuildRequires: gcc-java+libgcj on Fedora (no longer in F21+). 2014-05-26 20:45:38 +02:00
Jan Kratochvil 68e26e6ce3 [rhel5] Drop the RHEL-5 support - simplify this .spec file. 2014-05-16 22:38:25 +02:00
Jan Kratochvil 9b1a6425a1 [s390*] Import upstream fix for 64->32 debugging. 2014-05-14 21:21:44 +02:00
Jan Kratochvil 1ecbbdb62a [s390*] Fix compilation error. 2014-05-12 20:27:00 +02:00
Jan Kratochvil 6e0665a33c [ppc*] Import ppc64le support (BZ 1096303, Ulrich Weigand). 2014-05-09 21:30:33 +02:00
Jan Kratochvil 936befa814 Rebase to FSF GDB 7.7.1. 2014-05-06 20:16:56 +02:00
Sergio Durigan Junior 0a42762f26 * Mon May 5 2014 Sergio Durigan Junior <sergiodj@redhat.com> - 7.7-9.fc21
- Improve testcase message for RH BZ 981154.
2014-05-05 18:44:10 -03:00
Jan Kratochvil 699758c055 Fix TLS access for -static -pthread (BZ 1080660). 2014-05-05 22:40:56 +02:00
Jan Kratochvil 7f2a1f7d83 Fix TLS access for -static -pthread (BZ 1080660). 2014-05-05 22:40:04 +02:00
Jan Kratochvil 331a1f1adc Add GFDL License to the main package (man pages are generated from .texinfo). 2014-05-05 18:00:02 +02:00
Sergio Durigan Junior da639865c1 * Thu Apr 24 2014 Sergio Durigan Junior <sergiodj@redhat.com> - 7.7-6.fc21
- Fix build failures for GCC 4.9 (Nick Clifton).
2014-04-24 19:23:17 -03:00
Sergio Durigan Junior fceb2c10d4 * Thu Apr 24 2014 Sergio Durigan Junior <sergiodj@redhat.com> - 7.7-5.fc21
- Fix 'gdb gives highly misleading error when debuginfo pkg is present,
  but not corresponding binary pkg' (RH BZ 981154).

This is mainly a RHEL-6.6 testcase backport, with a necessary small fix.
2014-04-24 17:31:03 -03:00
Jan Kratochvil 3e564422d3 Fix crash of -readnow /usr/lib/debug/usr/bin/gnatbind.debug (BZ 1069211). 2014-02-24 23:29:17 +01:00
Jan Kratochvil 3af2cc602d [rhel6] DTS backward Python compatibility API (BZ 1020004, Phil Muldoon).
- [rhel6] Do not install its man page if gdb-add-index is not installed.
- [rhel] Do not migrate /usr/share/gdb/auto-load/ with symlinks on RHELs.
- Fix gdb-7.7 auto-load from /usr/share/gdb/auto-load/ regression.
2014-02-23 22:57:50 +01:00
Jan Kratochvil e86a0cc13a [rhel] Fix rebase build regression on RHEL systems (Tobias Burnus). 2014-02-09 19:23:04 +01:00
Jan Kratochvil 2c55a5441d Rebase to FSF GDB 7.7.
- New rpmbuild option: --with asan
2014-02-07 19:38:14 +01:00
Jan Kratochvil ff3b0d487c [s390*,ppc*] Enable secondary targets s390* and ppc* (BZ 1056259). 2014-01-23 20:43:43 +01:00
Jan Kratochvil 1be7752b2c Backport several gdb-7.6.x stable branch fixes (BZ 1055155). 2014-01-19 19:38:05 +01:00
Jan Kratochvil 0f5a62e3a0 [aarch64] Backport two breakpoint/watchpoint fixes. 2013-12-25 20:55:37 +01:00
Jan Kratochvil 6ca3c187db [rhel7] [--with testsuite] Remove gcc-java&co. BuildRequires. 2013-11-18 15:53:36 +01:00
Jan Kratochvil 2d6d1b2f58 Fix explicit Class:: inside class scope (BZ 874817, Keith Seitz). 2013-11-09 19:28:27 +01:00
Jan Kratochvil 1d5872dcff [aarch64] Backport two fixes (BZ 1026484). 2013-11-05 14:59:39 +01:00
Jan Kratochvil fe74423b08 Fix %{_bindir}gdb-add-index to also use -iex 'set auto-load no'. 2013-11-03 16:10:08 +01:00
Jan Kratochvil 25caf289cd [rhel5] Fix /etc/gdbinit compatibility with python-2.4. 2013-10-30 12:53:46 +01:00
Sergio Durigan Junior de8f297ee0 - Fix the case when GDB leaks memory because value_struct_elt does not call
check_typedef.  (Doug Evans, BZ 15695, filed as RH BZ 1013453).
2013-10-01 01:38:05 -03:00
Jan Kratochvil 39657054d5 Enable arm-linux-gnu and aarch64-linux-gnu targets on all archs (BZ 1011647). 2013-09-25 18:25:10 +02:00
Jan Kratochvil a717e23abf Fix the version string to be GNU standards compliant (BZ 1004949). 2013-09-09 17:54:30 +02:00
Jan Kratochvil bdf0f25112 Load /etc/gdbinit.d/*.{gdb,py} files automatically (BZ 981520). 2013-08-30 22:37:39 +02:00
Jan Kratochvil a97ee30c3d New %pre to fix failed upgrade of the previous commit (BZ 999645).
- Fix false warnings of new %pre during future upgrades (BZ 999645).
2013-08-30 19:13:45 +02:00
Jan Kratochvil 5a0302a66d Fix /usr/share/gdb/auto-load/ need of filesystem symlinks (BZ 999645).
It needs: yum remove gdb-heap; yum reinstall gdb; yum install gdb-heap
2013-08-28 22:06:31 +02:00
Jan Kratochvil 2ed9630f59 [rhel5] tps-srpmtest does not set %{rhel} (BZ 1002198, Miroslav Franc). 2013-08-28 18:12:25 +02:00
Jan Kratochvil ad6c9a2ec1 Simplify BuildRequires by texlive-collection-latexrecommended (see BZ 919891). 2013-08-08 19:20:09 +02:00
Jan Kratochvil 7ffdf589d4 Revert the texlive-collection-latexrecommended change (see BZ 919891). 2013-08-06 17:06:43 +02:00
Jan Kratochvil 77f735272d Simplify BuildRequires by texlive-collection-latexrecommended (see BZ 919891).
- Fix crash on 'enable count' (Simon Marchi, BZ 993118).
2013-08-06 16:30:24 +02:00
Jan Kratochvil b6e7beb35c Drop ia64 patches and .spec support. 2013-08-02 22:49:56 +02:00
Jan Kratochvil 872aab074e Rebase to FSF GDB 7.6.50.20130731 (pre-7.6 snapshot). 2013-08-02 22:26:03 +02:00
Jan Kratochvil 2f9bb15290 Remove %{gdb_docdir}, rebuild for unversioned docdirs (for BZ 986871). 2013-07-29 15:54:58 +02:00
Jan Kratochvil 9be0c23ca4 [ppc] Support Power8 CPU (IBM, BZ 731875). 2013-07-24 17:53:34 +02:00
Jan Kratochvil 44de066dfd Remove --disablerepo='*' from BZ 554152 as it conflicts with BZ 981154. 2013-07-17 20:08:38 +02:00
Jan Kratochvil 752ff760ca Fix yum install command output when the binary RPM is missing (BZ 981154).
- Fix the changlog entry formatting for 6.3.0.0-0.1.
2013-07-17 05:55:02 +02:00
Jan Kratochvil 19d4458238 [scl] Disable Python frame filters on scl.
- Update libraries opening performance fix from upstream.
- Fix C++ lookups performance regression (Doug Evans, BZ 972677).
2013-06-10 15:04:37 +02:00
Jan Kratochvil a5cf0a66f1 [ppc] Backport hardware watchpoints fix (Edjunior Machado, BZ 967915). 2013-05-28 18:11:47 +02:00
Jan Kratochvil 89fbbfccaf Backported Python frame filters (Phil Muldoon).
- Backported breakpoint conditions crash fix (Sergio Durigan Junior).
2013-05-21 13:54:33 +02:00
Jan Kratochvil 6d620330a4 Fix performance regression when inferior opens many libraries (Gary Benson). 2013-05-19 18:44:05 +02:00
Jan Kratochvil 5c14ffc194 Fix needless expansion of non-gdbindex symtabs (Doug Evans). 2013-05-09 15:08:44 +02:00
Jan Kratochvil 01f32662b6 [testsuite] [RHEL-5] Fix gdb-orphanripper.c runtime error. 2013-05-06 17:30:58 +02:00
Jan Kratochvil a3d12927af Fix gcore for vDSO (on ppc64). 2013-05-03 03:43:06 +02:00
Jan Kratochvil 3344b6ba48 Fix false "Unknown error 512" on x32 (H.J. Lu, BZ 956883). 2013-04-27 18:40:38 +02:00
Jan Kratochvil 46f79e2112 Rebase to FSF GDB 7.6. 2013-04-26 15:34:36 +02:00
Jan Kratochvil f8a4995541 Fix man page BuildRequires (for BZ 881892). 2013-04-24 16:37:54 +02:00
Jan Kratochvil c3b2d52489 [spec] Fix virtual bundles after GDB has been branched. 2013-04-23 17:27:14 +02:00
Jan Kratochvil d6a3040467 Rebase to FSF GDB 7.5.91.20130423 (pre-7.6 snapshot). 2013-04-23 17:01:16 +02:00
Jan Kratochvil 05b22fe0aa [SCL] Skip deprecated .gdb_index warning for Red Hat built files (BZ 953585). 2013-04-22 16:23:49 +02:00
Sergio Durigan Junior 9dd2140456 [RHEL-6] Regression test for RH BZ 947564. 2013-04-22 03:55:56 -03:00
Jan Kratochvil cf0b61abc0 Provide man page for gcore.1 and gdb-add-index.1 (BZ 881892). 2013-04-11 19:07:45 +02:00
Jan Kratochvil 9b8aeef05e [RHEL-5] Fix noarch doc build. 2013-04-07 09:17:34 +02:00
Jan Kratochvil ac3dde5b9b Rebase to FSF GDB 7.5.91.20130407 (pre-7.6 snapshot).
- [SCL] Remove BuildRequires of gcc-go on SCL (Miroslav Franc, BZ 948982).
- Provide man page for gdbinit.5 (BZ 881892), document gdb -p in man (BZ 659000).
2013-04-07 08:25:27 +02:00
Jan Kratochvil 402506cde5 Rebase to FSF GDB 7.5.91.20130402 (pre-7.6 snapshot). 2013-04-02 22:38:05 +02:00
Jan Kratochvil 43e595b798 Rebase to FSF GDB 7.5.91.20130310 (pre-7.6 snapshot).
- Fix crash regression from the dlopen of libpthread.so fix (BZ 911712).
2013-03-23 20:32:15 +01:00
Jan Kratochvil b7ec76456e [RHEL-5] Import build regression fix. 2013-03-11 15:26:11 +01:00
Jan Kratochvil f2d6b407bf Add workaround of PDF gdb-doc build (filed as RH BZ 919891). 2013-03-10 19:26:23 +01:00
Jan Kratochvil f1490f0b05 Re-enable (again) PDF in gdb-doc after texinfo RH BZ 876710 has been fixed. 2013-03-10 17:14:12 +01:00
Jan Kratochvil 1054fa6d0b Rebase to FSF GDB 7.5.50.20130310 (pre-7.6 snapshot).
- Fix various entry-values sub-optimal results.
2013-03-10 17:12:43 +01:00
Jan Kratochvil 350d5a31c9 testsuite: Fix gdb.arch/powerpc-power6.exp testcase (IBM, RH BZ 890900). 2013-02-25 14:32:58 +01:00
Jan Kratochvil dd75969f7b Temporarily disable PDF in gdb-doc for still unavailable texinfo RH BZ 876710. 2013-02-19 14:50:45 +01:00
Jan Kratochvil ab333d9938 Rebase to FSF GDB 7.5.50.20130215 (pre-7.6 snapshot). 2013-02-18 18:14:00 +01:00
Jan Kratochvil 99cd04126a Re-enable PDF in gdb-doc after texinfo RH BZ 876710 has been fixed. 2013-02-08 13:59:30 +01:00
Jan Kratochvil fd14833eee Re-enable PDF in gdb-doc after texinfo RH BZ 876710 has been fixed. 2013-02-08 13:47:32 +01:00
Jan Kratochvil f7d32d5142 Release bump only. 2013-02-04 18:45:42 +01:00
Jan Kratochvil 88bebb3fb1 Fix assert crashes with minidebuginfo (BZ 903522). 2013-02-01 20:06:54 +01:00
Jan Kratochvil ebaa23aa6c Release bump only. 2013-01-25 12:55:06 +01:00
Jan Kratochvil 5677fb2373 [RHEL] Reintroduce gdb-6.8-quit-never-aborts.patch. 2013-01-21 16:54:01 +01:00
Jan Kratochvil 556378e101 Rebase to FSF GDB 7.5.50.20130118 (pre-7.6 snapshot). 2013-01-19 23:41:55 +01:00
Jan Kratochvil ab816baf60 [testsuite] Fix gdb-orphanripper.c lockup on F-17 (/dev/pts/* glibc chown). 2013-01-13 08:22:50 +01:00
Jan Kratochvil f92430a872 Update dlopen to support map_failed probe of glibc (Gary Benson, BZ 886516). 2013-01-08 15:44:35 +01:00
Jan Kratochvil 5f3b63a0d4 [ppc*] Fix PowerPC disassembly regression (Alan Modra, Edjunior Machado). 2013-01-04 00:06:50 +01:00
Jan Kratochvil ed2617e547 'dwz -m' parsing fix (Tom Tromey). 2012-12-13 10:18:00 +01:00
Jan Kratochvil 4bb744e410 Fix DW_OP_GNU_implicit_pointer offset bug (Tom Tromey). 2012-12-03 21:09:12 +01:00
Jan Kratochvil 707343965f Temporarily disable PDF in gdb-doc before texinfo RH BZ 876710 gets fixed. 2012-12-02 18:18:13 +01:00
Jan Kratochvil e5ad958b76 Provide Source URL when it is a release. 2012-11-29 19:02:41 +01:00
Jan Kratochvil 26b4790954 Fix (unsplit) split info doc. 2012-11-29 18:44:55 +01:00
Jan Kratochvil 54956de3d3 Rebase to FSF GDB 7.5.1 (7.5 stable branch). 2012-11-29 15:05:08 +01:00
Jan Kratochvil 92b52c5e6f Fix `GDB cannot access struct member whose offset is larger than 256MB'
(RH BZ 871066).
2012-11-09 19:03:10 +01:00
Jan Kratochvil 75aac11369 entry values: Fix resolving in inlined frames. 2012-10-05 15:43:06 +02:00
Jan Kratochvil 979799fd0b Permit passing pointers as address number even for C++ methods (Keith Seitz). 2012-09-27 22:38:54 +02:00
Jan Kratochvil 60a99dfbcf Fix crash printing classes (BZ 849357, Tom Tromey). 2012-09-27 20:50:35 +02:00
Jan Kratochvil a7d7affa1c Fix .spec 'bundled' Provides for the stable branch rebase. 2012-09-26 20:28:34 +02:00
Jan Kratochvil fb02fc3940 [ppc32] Fix stepping over symbol-less code crash regression (BZ 860696).
- Rebase to FSF GDB 7.5.0.20120926 (7.5 stable branch).
  - Remove the .spec Source keyword URL as not valid now.
2012-09-26 19:54:59 +02:00
Jan Kratochvil 29e1388476 [RHEL-6] Disable no longer valid workaround of man pages .gz suffix. 2012-09-14 16:30:07 +02:00
Jan Kratochvil 30f2069f6e Rebase to FSF GDB 7.5.
- Update dlopen to support two variants of glibc (Gary Benson, BZ 669432).
2012-08-18 09:41:09 +02:00
Jan Kratochvil 87ed9489e3 Drop Source URL for snapshots.
- Separate %{snapgnulib} from %{snap}.
- Fix %{libstdcxxpython} to be %{name}-prefixed.
- Fix debug info for go-exp.y and go-exp.c.
- Include RHEL-5 compatible %{buildroot} cleanup.
- Use %__global_ldflags.
2012-08-17 18:57:31 +02:00
Jan Kratochvil 4945b2263d Rebase to FSF GDB 7.4.91.20120801.
- [dwz] Rebase it from FSF GDB HEAD.
2012-08-01 21:40:12 +02:00
Dennis Gilmore 914739c6e2 - Rebuilt for https://fedoraproject.org/wiki/Fedora_18_Mass_Rebuild 2012-07-18 23:12:00 -05:00
Jan Kratochvil 536bc96db1 [devtoolset] Include Obsoletes of devtoolset-1.0-* by devtoolset-1.1-*. 2012-07-16 19:31:07 +02:00
Jan Kratochvil 8aabf36e77 Rebase to FSF GDB 7.4.50.20120714.
- Fix entryval feature crash on some .debug files optimized by dwz (BZ 839596).
- Fix another stale frame_info * (PR 11914, like PR 13866).
2012-07-15 10:41:46 +02:00
Jan Kratochvil 642e08f465 [RHEL] Disable MiniDebugInfo F-18 feature on RHEL <= 6 (BZ 834068). 2012-07-06 22:12:53 +02:00
Jan Kratochvil a4cfcd84af Fix .spec metadata for the MiniDebugInfo F-18 feature (BZ 834068). 2012-07-06 21:31:21 +02:00
Jan Kratochvil e7f1c832a7 [archer-tromey-dwz-multifile-rebase] Fix DWARF files reading (Tom Tromey). 2012-07-06 19:30:32 +02:00
Jan Kratochvil 5387893eab Fix build-id-core-loads internal error (BZ 837870). 2012-07-06 16:01:10 +02:00
Jan Kratochvil c501c4bdb1 Implement MiniDebugInfo F-18 Feature consumer (Alexander Larsson, BZ 834068). 2012-07-05 23:18:24 +02:00
Jan Kratochvil 11eae30806 Rebase to FSF GDB 7.4.50.20120703.
- [archer-tromey-dwz-multifile-rebase] Merge new branch (Tom Tromey).
- [arm] <--with testsuite>: Disable fpc BuildRequires as it is not yet built.
- Revert function returning pointer fix (PR 9514) regressing Fedora errno patch.
2012-07-03 20:54:05 +02:00
Sergio Durigan Junior a9b4b48ee3 Reorder `Patch' entry for BZ 818343; include missing `fedoratest'. 2012-06-26 18:47:51 -03:00
Sergio Durigan Junior 31a43c2209 Include testcase for BZ 818343. 2012-06-21 07:09:31 -03:00
Jan Kratochvil a930df3ffb Fix regression of undisplayed missing shared libraries caused by a fix for:
GNU/Linux core open: Can't read pathname for load map: Input/output error.
2012-06-19 22:30:55 +02:00
Sergio Durigan Junior 2b568b7d72 Include testcase for BZ 823789. 2012-06-17 18:00:10 -03:00
Jan Kratochvil 31e8955039 Support DW_OP_GNU_parameter_ref for -O2 -g inferiors (BZ 827375). 2012-06-14 09:41:43 +02:00
Jan Kratochvil c382081360 Disable -lmcheck in the development builds.
- Fix assertion on some files as glibc-2.15.90-8.fc18 (Doug Evans).
2012-06-06 19:23:02 +02:00
Jan Kratochvil 500c813e17 Fix Release.
- Make yum --enablerepo compatible with at least mock-1.1.21-1.fc16 Rawhide cfg.
2012-06-03 20:22:28 +02:00
Jan Kratochvil f8eee05550 Rebase to FSF GDB 7.4.50.20120602.
- [testsuite] BuildRequire gcc-go.
- Drop printing 2D C++ vectors as matrices which no longer worked (BZ 562763).
- Fix dejagnu-1.5-4.fc17 compatibility for Go (for BZ 635651).
- Use librpm.so.3 for rpm-4.10.0 in Fedora 18.
- Revert recent breakage of UNIX objfiles order for symbols lookup.
2012-06-03 19:40:44 +02:00
Jan Kratochvil 0c6cb6731e [ppc] Fix hardware watchpoints on PowerPC (BZ 827600, Edjunior Machado). 2012-06-02 15:47:38 +02:00
Jan Kratochvil 3071876327 Workaround PR libc/14166 for inferior calls of strstr. 2012-05-28 17:16:39 +02:00
Jan Kratochvil d1151d6581 [RHEL5] Workaround doc build race. 2012-05-14 18:22:20 +02:00
Jan Kratochvil 43d8d62a03 Rename "set auto-load" patchset variable $ddir to $datadir. 2012-05-14 15:54:44 +02:00
Jan Kratochvil de3a592768 Fix in "set auto-load" patchset for SCL scripts inheritance (BZ 815910). 2012-05-09 22:39:25 +02:00
Jan Kratochvil 72cb82c2bf [RHEL5] Workaround kernel for detaching SIGSTOPped processes (BZ 809382). 2012-04-25 20:59:19 +02:00
Jan Kratochvil fdf21a3584 Update "set auto-load" patchset and the --with-auto-load-safe-path setting.
- [RHEL] Disable gdb-add-index even on RHEL-6 as RHEL-6.0 had too old elfutils.
2012-04-24 22:24:12 +02:00
Jan Kratochvil bd04ff0041 [RHEL] Fix --with-auto-load-safe-path systems prior to /usr move. 2012-04-18 20:16:36 +02:00
Jan Kratochvil 08451779f9 Security fix for loading untrusted inferiors, see "set auto-load" (BZ 756117). 2012-04-18 02:17:28 +02:00
Jan Kratochvil f289ba9c21 [RHEL7] Fix/remove readline-devel BuildRequires redundant distro suffic .fc17. 2012-04-13 16:26:39 +02:00
Jan Kratochvil fbf39fd05f Workaround crashes from stale frame_info pointer (BZ 804256). 2012-04-04 21:56:56 +02:00
Jan Kratochvil 78a785d4c5 testsuite: Fix break-interp.exp expections for updated glibc (BZ 752834). 2012-04-04 17:21:33 +02:00
Jan Kratochvil e26cb4d20f [RHEL5,RHEL6] Reintroduce fix attaching to stopped processes. 2012-04-04 16:35:40 +02:00
Jan Kratochvil ea0fcb4584 Fix performance regressions with .gdb_index (Tom Tromey, BZ 805274). 2012-03-31 00:00:30 +02:00
Jan Kratochvil 572702753c Fixup %{_datadir}/gdb timestamps for multilib conflicts on RHELs. 2012-03-30 10:54:24 +02:00
Jan Kratochvil 9d32f32f26 [vla] Fix regression on no type for subrange from IBM XLF Fortran (BZ 806920). 2012-03-26 21:25:32 +02:00
Jan Kratochvil 3d3c8f2d4a Fix loading of core files without build-ids but with build-ids in executables. 2012-03-17 12:41:20 +01:00
Jan Kratochvil 380b734913 Fix an implied regression by the inferior calls fix below (BZ 799531). 2012-03-09 22:30:50 +01:00
Jan Kratochvil 01b1870f18 Fix SELinux deny_ptrace .spec build rules (BZ 786878). 2012-03-09 19:11:09 +01:00
Jan Kratochvil d8e4a58344 Fix inferior calls, particularly uncaught thrown exceptions (BZ 799531).
- Fix DWARF DIEs CU vs. section relative offsets (Joel Brobecker, me).
2012-03-09 00:17:10 +01:00
Jan Kratochvil c64e73263b Print reasons for failed attach/spawn incl. SELinux deny_ptrace (BZ 786878). 2012-03-06 07:57:07 +01:00
Jan Kratochvil 46d8530cd6 [rhel5] Fix up the previous commit (BZ 799318). 2012-03-04 18:52:21 +01:00
Jan Kratochvil 9fd125663d [rhel5] Fix up the previous commit (BZ 799318). 2012-03-04 18:19:48 +01:00
Jan Kratochvil 1c8cc3b9e6 [rhel5] Workaround rpmbuild to make the doc subpkg noarch again (BZ 799318). 2012-03-04 10:43:26 +01:00
Jan Kratochvil fb7506558d [vla] Fix crash for dynamic.exp with gcc-gfortran-4.1.2-51.el5.x86_64.
- Reintroduce RHEL-5 glibc workaround for bt-clone-stop.exp.
- testsuite: Update/fix rh634108-solib_address.exp for the upstreamed API.
2012-03-02 23:16:12 +01:00
Jan Kratochvil e05ce76998 Add kernel vDSO workaround (`no loadable ...') on RHEL-5 (kernel BZ 765875).
- Fix skipping of prologues on RHEL-5 gcc-4.1 -O2 -g code (BZ 797889).
- Fix breakpoint warning during 'next' over exit() (Tom Tromey, BZ 797892).
2012-02-29 11:13:05 +01:00
Jan Kratochvil 9e9d7b2bbb testsuite: Fix gdb.base/macscp.exp ccache workaround in SCL mode.
- Adjust the RHEL/F version string automatically (BZ 797651, BZ 797646).
- Provide gdbtui for RHEL-5 and RHEL-6 as it is removed upstream (BZ 797664).
2012-02-28 18:05:01 +01:00
Jan Kratochvil 9ce5c44987 Do not use gcc44/gfortran44 on RHEL-5 if in SCL mode. 2012-02-24 17:20:30 +01:00
Jan Kratochvil 55c3b84dd7 Fix libinproctrace.so build on RHEL-5 i386 (disable it on RHEL-5). 2012-02-22 23:08:37 +01:00
Jan Kratochvil 3a4ee84176 Implement SCL (scl-utils-build) macros. 2012-02-22 19:22:10 +01:00
Jan Kratochvil e81f470147 Fix debuginfo gdb-gdb.py build without redhat-rpm-config and on RHEL-5.
- Provide precompiled variants of gdb-gdb.py.
2012-02-21 20:05:03 +01:00
Jan Kratochvil 67644b518c gstack: Turn off --readnever (suggested by Oliver Henshaw). 2012-02-13 20:17:47 +01:00
Jan Kratochvil 5c4cedb759 [RHELs] Drop simulation of legacy behavior - new GDB should behave as new GDB. 2012-02-10 21:03:13 +01:00
Jan Kratochvil 750e47124c Simplify %setup .spec rule. 2012-02-10 05:30:04 +01:00
Jan Kratochvil 84ef6008bd Drop --with upstream .spec rules. 2012-02-10 05:06:58 +01:00
Jan Kratochvil 62c93b3435 Drop --with debug .spec rules. 2012-02-10 05:03:15 +01:00
Jan Kratochvil 3000de323b Improve performance for C++ symbols expansion (Tom Tromey, BZ 787487).
- Install also gdb-gdb.py pretty printers.
2012-02-09 22:25:44 +01:00
Jan Kratochvil a50d5b63a7 Fix possible NULL crash in find_charset_names (Trom Tromey, BZ 786091).
- [ppc*] Fix build failure due to GCC aliasing warning (BZ 786504).
2012-02-09 20:09:41 +01:00
Jan Kratochvil c5c713f196 Rebase to FSF GDB 7.4.50.20120120.
Drop the g77 .spec provisioning as it has been fixed in FSF GDB.
2012-01-21 00:27:28 +01:00
Jan Kratochvil cc92f09aa1 Enable smaller %{_bindir}/gdb in future by no longer using -rdynamic.
Make --enablerepo to use '*-debug*' for RHEL compatibility (BZ 781571).
On older RHELs make readline bundled again (BZ 701131).
Fix build compatibility with RHEL-5 due to false noarch build.
2012-01-19 21:44:54 +01:00
Jan Kratochvil a5cb59e730 Disable unexpected GDB directories relocatability. 2012-01-11 23:35:43 +01:00
Jan Kratochvil ec26424839 Fix BuildRequires for RHEL compatibility (BZ 701131). 2012-01-11 17:18:28 +01:00
Jan Kratochvil 2d09ea90fb Provide %snap timestamp for: Provides: bundled(librarypackage)
Replace %define by %global.
Replace Java in Summary with Fortran (only GCC-compiled Java is supported).
Unbundle readline-6.2 with a workaround of skipped "ask" (BZ 701131).
Work around readline-6.2 incompatibility not asking for --more-- (BZ 701131).
2012-01-11 17:04:42 +01:00
Jan Kratochvil 7cb24ade9a Mark %{_sysconfdir}/gdbinit as %config(noreplace).
Add appropriate: Provides: bundled(librarypackage).
Remove excessive explicit Requires: librarypackage.
2012-01-07 22:45:52 +01:00
Jan Kratochvil 2f2930eb78 Fix linking on non-x86* (such as s390*) after libgdb.a removal. 2012-01-05 14:44:59 +01:00
Jan Kratochvil e6cdbfd018 Reinclude gdb-dlopen-stap-probe.patch (missing in Fedora glibc - BZ 752476). 2012-01-04 09:46:32 +01:00
Jan Kratochvil 191f4d2883 Fix SystemTap support regression on i686 (Sergio Durigan Junior). 2012-01-03 21:06:12 +01:00
Jan Kratochvil 254f0e90bc Rebase to FSF GDB 7.4.50.20120103. 2012-01-03 16:00:12 +01:00
Jan Kratochvil 4862a154d1 No longer build bundled libstdc++ pretty printers on RHELs >= 7. 2011-11-28 14:29:49 +01:00
Sergio Durigan Junior e349329c80 Backport fix for crash in cp_scan_for_anonymous_namespace
(Aleksandar Ristovski, BZ 750341).
2011-11-08 18:46:42 -02:00
Jan Kratochvil 52bb570800 Backport `info os processes' crash fix - for Eclipse (Pedro Alves, BZ 746294). 2011-10-14 22:13:26 +02:00
Jan Kratochvil 7218d159e3 Fix PIE testsuite run; new lib/future.exp hack and use -fPIC instead of -fPIE. 2011-10-11 17:11:36 +02:00
Jan Kratochvil 7649e489fb [vla] Fix VLA arrays displayed in `bt full' (BZ 738482).
Fix DW_OP_GNU_implicit_pointer for DWARF32 v3+ on 64-bit arches.
Fix internal error on some optimized-out values.
2011-09-26 23:13:14 +02:00
Jan Kratochvil c6934442a9 Python command/function auto-loading (Phil Muldoon, BZ 730976).
Work around PR libc/13097 "linux-vdso.so.1" warning message.
[TUI] Fix stepi on stripped code.
Add BuildRequires: systemtap-sdt-devel for archer-sergiodj-stap-patch-split.
2011-08-16 16:21:06 +02:00
Jan Kratochvil 922e4a0796 Fix dlopen of libpthread.so, patched glibc required (Gary Benson, BZ 669432). 2011-08-10 19:42:06 +02:00
Jan Kratochvil b9aa4c4c7b Improve GDB performance on inferior dlopen calls (Gary Benson, BZ 698001).
[python] Fix crash when pretty printer fails (Phil Muldoon, BZ 712715).
Fix crash on invalid C++ mangled names (BZ 729283).
2011-08-09 15:18:29 +02:00
Jan Kratochvil ebad377b2d Fix regression from VLA merge affecting -O0 -g watchpoints. 2011-07-29 22:55:31 +02:00
Jan Kratochvil 9a9da3171c Include gcc -g3 .debug_macro implementation by Tom Tromey. 2011-07-29 18:59:36 +02:00
Jan Kratochvil eceaa13e09 Rebase to FSF GDB 7.3.50.20110722.
Improve gcc-4.6 stdarg false prologue end workaround (GDB PR 12435 + GCC PR 47471).
2011-07-23 00:45:00 +02:00
Jan Kratochvil 3b55f7833b Rebase to FSF GDB 7.3.50.20110722.
Improve gcc-4.6 stdarg false prologue end workaround (GDB PR 12435 + GCC PR 47471).
2011-07-23 00:41:56 +02:00
Jan Kratochvil e6e9cf3987 Rebase to FSF GDB 7.2.90.20110703 (which is a 7.3 pre-release).
Adjust the `print errno' patch due to the DW_AT_linkage_name following again.
2011-07-03 17:22:23 +02:00
Jan Kratochvil 847a670287 Fix install-info for the gdb-doc subpackage (BZ 715228). 2011-06-24 12:20:35 +02:00
Jan Kratochvil c8a4544144 Rebase to FSF GDB 7.2.90.20110525 (which is a 7.3 pre-release).
[stap] Fix double free (Sergio Durigan Junior).
2011-05-25 21:25:26 +02:00
Jan Kratochvil 4adfc8b85c Search also for .<seqno> files in /usr/lib/debug/.build-id (BZ 641377). 2011-05-03 05:23:10 +02:00
Jan Kratochvil 7180591ac5 Bundle readline-6.2 with a workaround of skipped "ask" (BZ 701131).
Use --without-system-readline, disable Requires and BuildRequires of readline.
Drop gdb-6.5-readline-long-line-crash.patch and gdb-readline-6.0-signal.patch.
2011-05-02 16:17:50 +02:00
Jan Kratochvil f314eb3eb5 Rebase to FSF GDB 7.2.90.20110429 (which is a 7.3 pre-release).
Fix -O2 -g breakpoints internal error + prologue skipping (BZ 612253).
Fix case insensitive symbols for Fortran by iFort (BZ 645773).
Fix physname-related CU expansion issue for C++ (PR 12708).
Fix Python access to inlined frames (BZ 694824).
2011-04-29 10:04:45 +02:00
Jan Kratochvil 09dd7775eb Rebase to FSF GDB 7.2.90.20110411 (which is a 7.3 pre-release).
Include the proper fix for anonymous struct typedefs (Tom Tromey, BZ 672230).
2011-04-11 22:48:13 +02:00
Fabio M. Di Nitto 1cd4f3809f - Cleanup spec file to add sparc|sparcv9|sparc64.
- Add sparc specific workarounds to toolchain badness:
  - disable mmap in bdf/ via --without-mmap configure option.
  - add patch to not build mmap support on sparc for gdb/.
  - gdb code is NOT at fault, but we need a working gdb while we sort out
    the toolchain and rebuild all packages. this workaround is NOT for upstream

Signed-off-by: Fabio M. Di Nitto <fdinitto@redhat.com>
2011-03-30 14:08:36 +02:00
Jan Kratochvil 98c0c7adab Fix occasional crash on `print errno' with no -pthread and no -g3 (BZ 690908). 2011-03-29 11:29:26 +02:00
Jan Kratochvil 46a1caf62e Rebase to FSF GDB 7.2.50.20110328 (which is a 7.3 pre-release).
Bundle %{libstdcxxpython}.tar.bz2 unconditionally - for rebulds on RHELs.
2011-03-28 20:06:31 +02:00
Jan Kratochvil 5752ad02c2 Fix threading internal error on corrupted memory (BZ 677654).
Fix i386 rwatch+awatch before run (BZ 688788, on top of BZ 541866).
2011-03-20 22:23:58 +01:00
Jan Kratochvil 48cf710500 Rebase to FSF GDB 7.2.50.20110320 (which is a 7.3 pre-release).
Merge archer-sergiodj-stap, the SystemTap probes breakpoints feature.
[stap] Fix -O2 warnings.
Fix Ada support crash on uninitialized gdbarch.
2011-03-20 21:44:20 +01:00
Jan Kratochvil d5159132e2 Rebase to FSF GDB 7.2.50.20110305 (which is a 7.3 pre-release). 2011-03-05 13:24:53 +01:00
Jan Kratochvil 9aa6e1de63 Include doc also in the PDF form; new BuildRequires: texinfo-tex. 2011-02-25 09:37:52 +01:00
Jan Kratochvil 833b1257d3 - Rebase to FSF GDB 7.2.50.20110222 (which is a 7.3 pre-release).
- Fix attach/core-load of {,un}prelinked i386 libs (bugreport by Michal Toman).
2011-02-23 00:35:53 +01:00
Jan Kratochvil 14982af20a - Drop %{_datadir}/gdb/syscalls/* for unsupported arches. 2011-02-21 19:45:30 +01:00
Jan Kratochvil 3080c0e54f - Rebase to FSF GDB 7.2.50.20110218 (which is a 7.3 pre-release).
- [vla] Fox Fortran vector slices for allocated arrays (for BZ 609782).
2011-02-18 11:25:34 +01:00
Jan Kratochvil 6b44006b8d - Move the GFDL License to gdb-doc. 2011-02-15 16:26:53 +01:00
Jan Kratochvil 4d79cf2e34 Fix gdb-doc Group to be Documentation, also provide it as noarch. 2011-02-15 15:19:52 +01:00
Jan Kratochvil 6f7687c33f - Drop non-user (gdbint) and obsolete (stabs) documentation.
- Install also HTML files besides the INFO file.
- Create new subpackage gdb-doc for both INFO and HTML files.
2011-02-15 00:39:22 +01:00
Jan Kratochvil af2402c03d - Rebase to FSF GDB 7.2.50.20110213 (which is a 7.3 pre-release).
- Fix occasionall unfound source lines (affecting at least glibc debugging).
- Fix const/volatile qualifiers of C++ types (PR c++/12328).
- Be backward compatible for --rebuild with <=fc14 librpm.so.1.
2011-02-13 20:09:54 +01:00
Dennis Gilmore 9f971d482a - Rebuilt for https://fedoraproject.org/wiki/Fedora_15_Mass_Rebuild 2011-02-08 17:25:49 -06:00
Jan Kratochvil e266c66da6 - Fix regressions on C++ names resolving (PR 11734, PR 12273, Keith Seitz). 2011-02-06 23:48:08 +01:00
Jan Kratochvil cb641a7fa4 - Rebase to FSF GDB 7.2.50.20110206 (which is a 7.3 pre-release). 2011-02-06 22:46:57 +01:00
Jan Kratochvil c00fd45a3e - Fix Python new-backtrace command (BZ 672235, Phil Muldoon). 2011-01-27 11:55:59 +01:00
Jan Kratochvil 16c47e7f0c - Temporary fix of F15 gcc-4.6 child DIEs of DW_TAG_typedef (BZ 672230).
- Workaround gcc-4.6 stdarg false prologue end (GDB PR 12435 + GCC PR 47471).
2011-01-26 15:41:26 +01:00
Jan Kratochvil ea07d44ec2 - Rebase to FSF GDB 7.2.50.20110125 (which is a 7.3 pre-release).
- Fix discontiguous address ranges in .gdb_index - v3->v4 (BZ 672281).
- Fix DWARF-3+ DW_AT_accessibility default assumption for F15 gcc-4.6.
2011-01-25 22:59:16 +01:00
Jan Kratochvil 8973456f5a - Rebase to FSF GDB 7.2.50.20110125 (which is a 7.3 pre-release).
- Fix discontiguous address ranges in .gdb_index - v3->v4 (BZ 672281).
- Fix DWARF-3+ DW_AT_accessibility default assumption for F15 gcc-4.6.
2011-01-25 22:51:27 +01:00
Jan Kratochvil f4677c421e - Use librpm.so.2 for rpm-4.9.0 in Fedora 15. 2011-01-20 17:05:53 +01:00
Jan Kratochvil 6b3e65b584 - Use %{?dist} for sanity checking tools compliance (suggested by Petr Muller). 2011-01-17 19:16:23 +01:00
Jan Kratochvil b0e03f562d - Rebase to FSF GDB 7.2.50.20110117 (which is a 7.3 pre-release).
- Fix callback-mode readline-6.0 regression for CTRL-C (for RHEL-6.0).
  - Fix occasional NULL dereference of the readline-6.0 workaround (BZ 575516).
2011-01-17 16:31:43 +01:00
Jan Kratochvil a174f683ec - [delayed-symfile] Test a backtrace regression on CFIs without DIE (BZ 614604).
- [archer-tromey-delayed-symfile] New test gdb.dwarf2/dw2-aranges.exp.
- [archer-keiths-expr-cumulative+upstream] Import C++ testcases.
  - testsuite: Fix gdb-test-expr-cumulative-archer.patch compatibility.
2011-01-15 12:19:30 +01:00
Jan Kratochvil 0bba59c99f - Remove --with-pythondir as no longer valid.
- Provide %{_bindir}gdb-add-index even on RHEL-5.
- Provide again libstdc++ pretty printers for any RHEL.
2011-01-14 07:17:24 +01:00
Jan Kratochvil 33ff7091ac - Rebase to FSF GDB 7.2.50.20110107 (which is a 7.3 pre-release).
- Import archer-tromey-python (BZ 666177, branch update by Phil Muldoon).
2011-01-07 09:47:27 +01:00
Jan Kratochvil 278e869a86 - Rebase to FSF GDB 7.2.50.20110104 (which is a 7.3 pre-release).
- New testcase py-prettyprint.exp:print hint_error (for BZ 611569, BZ 629236).
- New test gdb.arch/x86_64-pid0-core.exp for kernel PID 0 cores (BZ 611435).
2011-01-04 06:39:35 +01:00
Jan Kratochvil 0b11bd2616 - Fix --with-system-readline doc build upstream regression. 2011-01-01 09:11:53 +01:00
Jan Kratochvil 6fa2f55b27 - Rebase to FSF GDB 7.2.50.20101231 (which is a 7.3 pre-release).
- Remove gdb-6.3-bt-past-zero-20051201.patch, gdb-archer-ada.patch and
  gdb-6.3-framepczero-20040927.patch already removed from .spec before.
- Remove gdb-6.5-dwarf-stack-overflow.patch, upstreamed (Tom Tromey).
- Remove gdb-6.6-bz225783-gdb-debuginfo-paths.patch, upstreamed (Tom Tromey).
- Remove gdb-6.6-readline-system.patch, reimplemented upstream (Tom Tromey).
- Remove gdb-bz642879-elfread-sigint-stale.patch, upstreamed (Jan Kratochvil).
- Remove gdb-next-over-throw.patch, upstreamed (Tom Tromey).
2011-01-01 01:27:30 +01:00
Jan Kratochvil a56307ebf7 - Provide stub %{_sysconfdir}/gdbinit (BZ 651232). 2010-12-27 05:50:41 +01:00
Jan Kratochvil b0a94c2ea0 - Fix ppc* compilation of PRPSINFO in the core files (BZ 662995, for BZ 254229).
- Fix (disable) non-x86* compilation of libinproctrace.so (for BZ 662995).
2010-12-27 03:25:06 +01:00
Jan Kratochvil ef59bb9bcc - Drop gdb-6.8-glibc-headers-compat.patch: GNU/Linux irrelevant (Tom Tromey).
- Drop gdb-6.3-terminal-fix-20050214.patch: The bug is not reproducible.
- Drop gdb-6.7-kernel-headers-compat.patch: kernel-headers seem to be fixed.
- Drop gdb-archer-ada.patch: No longer needed for Ada (Keith Seitz).
- New PR backtrace/12237, drop gdb-6.3-framepczero-20040927.patch
  gdb-6.3-bt-past-zero-20051201.patch as they already had no effect.
- Drop gdb-6.8-gcc35998-ada-memory-trash.patch as a different fix is upstream.
- Drop gdb-6.3-inheritance-20050324.patch: the call is redundent (Tom Tromey).
- Drop gdb-6.3-large-core-20051206.patch: obsoleted by MAX_COPY_BYTES.
2010-11-19 23:08:56 +01:00
Jan Kratochvil ac0fd38455 - Drop gdb-6.8-glibc-headers-compat.patch: GNU/Linux irrelevant (Tom Tromey).
- Drop gdb-6.3-terminal-fix-20050214.patch: The bug is not reproducible.
- Drop gdb-6.7-kernel-headers-compat.patch: kernel-headers seem to be fixed.
- Drop gdb-archer-ada.patch: No longer needed for Ada (Keith Seitz).
- New PR backtrace/12237, drop gdb-6.3-framepczero-20040927.patch
  gdb-6.3-bt-past-zero-20051201.patch as they already had no effect.
- Drop gdb-6.8-gcc35998-ada-memory-trash.patch as a different fix is upstream.
- Drop gdb-6.3-inheritance-20050324.patch: the call is redundent (Tom Tromey).
2010-11-19 21:53:28 +01:00
Jan Kratochvil 41aeaf682d - Drop gdb-6.8-glibc-headers-compat.patch: GNU/Linux irrelevant (Tom Tromey).
- Drop gdb-6.3-terminal-fix-20050214.patch: The bug is not reproducible.
- Drop gdb-6.7-kernel-headers-compat.patch: kernel-headers seem to be fixed.
- Drop gdb-archer-ada.patch: No longer needed for Ada (Keith Seitz).
- New PR backtrace/12237, drop gdb-6.3-framepczero-20040927.patch
  gdb-6.3-bt-past-zero-20051201.patch as they already had no effect.
- Drop gdb-6.8-gcc35998-ada-memory-trash.patch as a different fix is upstream.
2010-11-19 06:27:53 +01:00
Jan Kratochvil 4546826203 - Drop gdb-6.8-glibc-headers-compat.patch: GNU/Linux irrelevant (Tom Tromey).
- Drop gdb-6.3-terminal-fix-20050214.patch: The bug is not reproducible.
- Drop gdb-6.7-kernel-headers-compat.patch: kernel-headers seem to be fixed.
- Drop gdb-archer-ada.patch: No longer needed for Ada (Keith Seitz).
- New PR backtrace/12237, drop gdb-6.3-framepczero-20040927.patch
  gdb-6.3-bt-past-zero-20051201.patch as they already had no effect.
2010-11-19 00:32:47 +01:00
Jan Kratochvil 1d7d503e7e - Drop gdb-6.8-glibc-headers-compat.patch: GNU/Linux irrelevant (Tom Tromey).
- Drop gdb-6.3-terminal-fix-20050214.patch: The bug is not reproducible.
- Drop gdb-6.7-kernel-headers-compat.patch: kernel-headers seem to be fixed.
- Drop gdb-archer-ada.patch: No longer needed for Ada (Keith Seitz).
2010-11-18 21:26:21 +01:00
Jan Kratochvil 1d459d3886 - Drop gdb-6.8-glibc-headers-compat.patch: GNU/Linux irrelevant (Tom Tromey).
- Drop gdb-6.3-terminal-fix-20050214.patch: The bug is not reproducible.
- Drop gdb-6.7-kernel-headers-compat.patch: kernel-headers seem to be fixed.
2010-11-18 21:11:57 +01:00
Jan Kratochvil 458c182c85 - Drop gdb-6.8-glibc-headers-compat.patch: GNU/Linux irrelevant (Tom Tromey).
- Drop gdb-6.3-terminal-fix-20050214.patch: The bug is not reproducible.
2010-11-18 20:42:17 +01:00
Jan Kratochvil 8b8af94462 - Drop gdb-6.8-glibc-headers-compat.patch: GNU/Linux irrelevant (Tom Tromey). 2010-11-18 20:33:51 +01:00
Jan Kratochvil 336050181d - Drop gdb-6.8-glibc-headers-compat.patch: GNU/Linux irrelevant (Tom Tromey). 2010-11-18 16:24:15 +01:00
Jan Kratochvil c804fb8a8f - Rebase to FSF GDB 7.2.50.20101117 (which is a 7.3 pre-release). 2010-11-18 05:11:13 +01:00
Jan Kratochvil 58ea63ab49 - Rebase to FSF GDB 7.2.50.20101117 (which is a 7.3 pre-release). 2010-11-17 17:58:00 +01:00
Jan Kratochvil 60add66ae4 - Rebase to FSF GDB 7.2.50.20101117 (which is a 7.3 pre-release). 2010-11-17 07:44:53 +01:00
Jan Kratochvil e00e5eae57 - Rebase to FSF GDB 7.2.50.20101117 (which is a 7.3 pre-release). 2010-11-17 03:58:16 +01:00
Jan Kratochvil 1bcf9b6604 - iFort compat. - case insensitive DWARF not in lowercase (BZ 645773). 2010-11-16 05:54:18 +01:00
Fedora Release Engineering 5abe5add8a dist-git conversion 2010-07-28 15:15:58 +00:00
Mamoru Tasaka 924e99b419 - Rebuild against python 2.7 2010-07-28 07:06:49 +00:00
Jan Kratochvil 44969d3e6c - Fix /usr/bin/gdb-add-index $d -> $dir typo. 2010-07-22 11:28:58 +00:00
Jan Kratochvil 20f9f675af - Import archer-tromey-python.
- Import archer-tromey-optional-psymtab (as present in FSF GDB post-7.2).
- Provide /usr/bin/gdb-add-index for rpm-build (Tom Tromey).
2010-07-22 10:49:58 +00:00
dmalcolm 4d3bc055ec - Rebuilt for
https://fedoraproject.org/wiki/Features/Python_2.7/MassRebuild
2010-07-22 05:22:00 +00:00
Jan Kratochvil f13fc54bce - Fix prelinked executables with sepdebug and copy relocations (BZ 614659). 2010-07-21 21:50:13 +00:00
Jan Kratochvil dd46ae6cd0 - Rebase to FSF GDB 7.1.90.20100721 (which is 7.2 pre-release). 2010-07-21 21:30:20 +00:00
Jan Kratochvil 1c901a1d76 - Disable temporarily Python files before the new rebase is done (BZ
613710).
2010-07-13 06:51:09 +00:00
Jan Kratochvil bc0aadfac7 Described issues are all known now. 2010-07-11 18:10:40 +00:00
Jan Kratochvil ee681d3b2f - Rebuild for Fedora 14. 2010-07-11 18:06:33 +00:00
Jan Kratochvil c874340ae4 - Fix i386+x86_64 rwatch+awatch before run, regression against 6.8 (BZ
541866).
2010-02-08 21:00:12 +00:00
Jan Kratochvil 3b3433b0b0 - Rediff gdb-6.8-bz254229-gcore-prpsinfo.patch for older patch(1)
compatibility.
2010-02-03 06:36:20 +00:00
Jan Kratochvil aee5861550 - archer-jankratochvil-fedora13 commit:
59c35a31f0981a0f0b884b32c91ae6325b2126cd
- Fortran: Fix regression on setting breakpoint at toplevel symbols (BZ
    559291; David Moore, Intel).
2010-02-03 06:05:13 +00:00
Jan Kratochvil 8b7a3e1875 - archer-jankratochvil-fedora13 commit:
5a573e8b26a2f0a6947d4c0249e43e5456610860
- Remove ExcludeArch on ia64 as it is now fixed up.
2010-02-01 00:41:35 +00:00
Jan Kratochvil a04bc95fa3 - Fix failed gdb_assert due to the PIE patchset (BZ 559414). 2010-01-31 01:57:45 +00:00
Jan Kratochvil 45f79714b9 - Upgrade to the FSF GDB snapshot: 7.0.50.20100128
- archer-jankratochvil-fedora13 commit:
    39c5a8b75fad3acd7204903db5dee025055a4594
- Fix a regression on "AAA::ALPHA" test due to a merge from FSF GDB.
- Fix a regression of previous release due to false identification as core
    file.
- Move ifunc .patch into the GIT-managed archer-jankratochvil-fedora13
    branch.
- Update gdb.pie/corefile.exp from 2007-01-26 FSF GDB commit by Andreas
    Schwab.
2010-01-28 22:26:15 +00:00
Jan Kratochvil b469073e48 - Enable loading a core file just as a single argument to /usr/bin/gdb. 2010-01-25 17:13:16 +00:00
Jan Kratochvil 7abf5f4318 - testsuite: Fix gdb.arch/i386-bp_permanent.exp regression 2010-01-24 04:38:20 +00:00
Jan Kratochvil 755bb6f90b - Update gdb.arch/powerpc-power7.exp for current binutils HEAD. 2010-01-24 03:56:31 +00:00
Jan Kratochvil 9291de59d7 - Disable addon (finish) due to inline-cmds.exp: up from outer_inline2
assert.
- Fix gdb.arch/powerpc-power7.exp compatibility.
2010-01-23 00:00:24 +00:00
Jan Kratochvil e9671f2471 - Disable break-by-name on inlined functions due to a regression on
parameters of inlined functions falsely <optimized out> (BZ 556975
    Comment 8).
2010-01-22 11:06:51 +00:00
Jan Kratochvil c5a9fdc6a7 - Adjust BuildRequires for RHELs, add ExcludeArch on ia64.
- Disable one PIE-introduced assertion on RHELs.
2010-01-22 01:26:39 +00:00
Jan Kratochvil 39d52ac1d6 - Revert FSF GDB gdbserver tracepoints as incomplete now. 2010-01-21 19:53:41 +00:00
Jan Kratochvil 5542e358c5 - archer-jankratochvil-fedora13 commit:
21e418c04290aa5d2e75543d31fe3fe5d70d6d41
- [expr-cumulative] Fix "break expr if (cond)" regression.
2010-01-21 18:25:34 +00:00
Jan Kratochvil 79563d6f81 - Upgrade to the FSF GDB snapshot: 7.0.50.20100121
- archer-jankratochvil-fedora13 commit:
    ccde1530479cc966374351038057b9dda90aa251
- [expr-cumulative] Archer branch is now included.
2010-01-21 16:09:11 +00:00
Jan Kratochvil a7d6efc17b - Fix false PASS->FAIL of gdb.arch/i386-biarch-core.exp. 2010-01-19 00:46:54 +00:00
Jan Kratochvil 626a9059b8 - Upgrade to the FSF GDB snapshot: 7.0.50.20100118
- Upgrade libstdc++-v3-python to r155978 (Phil Muldoon).
2010-01-18 23:22:41 +00:00
Jan Kratochvil 8c4c91efd9 - Upgrade to the FSF GDB snapshot: 7.0.50.20100116
- archer-jankratochvil-fedora13 commit:
    81810a20b2d2c3bf18e151de3cddfc96445b3c46
- [expr-cumulative] Archer branch is missing in this release.
- Update rpm.org#76 workaround for rpm-4.8 using librpm.so.1.
- Dissect archer-jankratochvil-misc into Patch403...Patch408.
- Some regressions exist in this release.
2010-01-16 22:32:10 +00:00
Jan Kratochvil 0911f375d9 Rebase to: gdb-7.0.1-25.fc12 2010-01-12 22:15:57 +00:00
Bill Nottingham bef45217a0 Fix typo that causes a failure to update the common directory. (releng
#2781)
2009-11-25 23:19:21 +00:00
Jan Kratochvil ab901d8ee8 - Fix broken python "help()" command "modules" (BZ 526552).
- Upgrade to the FSF GDB gdb-7.0 snapshot: 6.8.91.20090930
- archer-jankratochvil-fedora12 commit:
    7cb860f03e2437c97239334ebe240d06f45723e0
2009-09-30 20:58:50 +00:00
Jan Kratochvil 40f8d2fd9b - New test for step-resume breakpoint placed in multiple threads at once. 2009-09-27 15:51:46 +00:00
Jan Kratochvil 580e05685a - Fix buildid-loading libs w/matching name but different build-id (BZ
524572).
2009-09-25 11:06:47 +00:00
Jan Kratochvil 4d3aa56117 - Upgrade to the FSF GDB gdb-7.0 snapshot: 6.8.91.20090925
- archer-jankratochvil-fedora12 commit:
    4338ea85c798007c32594032f602db9fd230eba9
- [python] Don't directly reference self.frame (Tom Tromey).
- [expr] Updates from branch (Keith Seitz).
2009-09-25 06:49:21 +00:00
Jan Kratochvil a8e7ccc4fd - Upgrade to the FSF GDB gdb-7.0 snapshot: 6.8.91.20090921
- archer-jankratochvil-fedora12 commit:
    0d5c38dd89050c0ee1cf049656f177c170d675d4
- [expr] Check has_stack_frames before calling find_pc_line (Sami
    Wagiaalla).
2009-09-21 15:49:36 +00:00
Jan Kratochvil 8ae3364a4f - Include bundled libstdc++ python; it will be in libstdc++-devel since
gcc-4.5.
2009-09-17 22:00:12 +00:00
Jan Kratochvil e93d3474d8 - Upgrade to the FSF GDB gdb-7.0 branch and snapshot: 6.8.91.20090917
- archer-jankratochvil-fedora12 commit:
    16f3f01cc2cbc15283462eaabdfcde92cf42cdc6
- Drop the qsort_cmp workaround as resolved in FSF GDB now (BZ 515434).
2009-09-17 12:15:42 +00:00
Jan Kratochvil 806f8c893c - Upgrade to the FSF GDB gdb-6.8.50 snapshot: 6.8.50.20090910
- archer-jankratochvil-fedora12 commit:
    941eb487a42933e442cb4d11344cda96ecb8a04d
- [next-over-throw] Fix exceptions thrown during next (Tom Tromey).
- [bp_location-accel] Do not (much) slow down on 500+ breakpoints (me).
2009-09-10 21:37:41 +00:00
Jan Kratochvil 2164cdaf2a - archer-jankratochvil-fedora12 commit:
a081d2f12945e9468edd5f4341d3e945bd0fefe9
- [expr] Fix too slow lookups in large C++ programs (Sami Wagiaalla).
- [python] Fix varobj changed values reporting (GDB PR 10584, Tom Tromey).
2009-09-03 19:45:38 +00:00
Jan Kratochvil 594e04b937 - archer-jankratochvil-fedora12 commit:
d25596676e8811b03f8c9aba6bbd04ebaa9ff5db
- [call-frame-cfa] Fix parsing CFA-relative frames (BZ 516627, Tom Tromey).
- [vla] variable length Fortran strings for -O -g code (part of BZ 508406,
    me).
- [python] varobj + general fixes (Tom Tromey).
2009-09-01 13:19:03 +00:00
Jan Kratochvil 8bf73e0a01 - Real upstream fixup of qsort_cmp (BZ 515434).
- Revert bitfields regression (BZ 520129).
2009-08-28 18:24:06 +00:00
Jan Kratochvil ab83f240e4 - Temporarily disable assertion checks crashing in qsort_cmp (BZ 515434). 2009-08-25 13:13:04 +00:00
Jan Kratochvil 0435006f87 - Fixup "bad type" internal error, import from FSF GDB.
- archer-jankratochvil-fedora12 commit:
    2ba2bc451eb832182ef84c3934115de7a329da7c
2009-08-19 16:19:15 +00:00
Jan Kratochvil 6370c17fdf - archer-jankratochvil-fedora12 commit:
850e3cb38a25cb7fdfa4cef667626ffbde51bcac
- Fix the hardware watchpoints.
2009-08-18 19:37:35 +00:00
Jan Kratochvil f340c03820 - Fix patch fuzz 0. 2009-08-18 19:10:33 +00:00
Jan Kratochvil a97b573f83 - Upgrade to the FSF GDB gdb-6.8.50 snapshot: 6.8.50.20090818
- archer-jankratochvil-fedora12 commit:
    5e0d1cc74f119391a2c3ae25ef5749fc28674f06
2009-08-18 18:51:17 +00:00
Jan Kratochvil 2280d5542d - Fix minor regressions introduced by the rebase from F-11
(6.8.50.20090302).
2009-08-12 14:36:09 +00:00
Jan Kratochvil 833a63eb37 - archer-jankratochvil-fedora12 commit:
2888fafe63889757c6fd27ccc2f25661d43fd1a4
- Drop archer-jankratochvil-vla VAROBJ invalidate/revalidate split to fix
    regressions against FSF GDB HEAD.
2009-08-11 21:15:13 +00:00
Jan Kratochvil 99fa6c959f - archer-jankratochvil-fedora12 commit:
93f5e942bdcdcc376ece452c309bedabae71def9
- Fix "can't compute CFA for this frame" (by Tom Tromey, BZ 516627).
2009-08-11 18:07:06 +00:00
Jan Kratochvil 912c39689b - Support constant DW_AT_data_member_location by GCC PR debug/40659 (BZ
515377).
- Fix .spec URL.
- archer-jankratochvil-fedora12 commit:
    81de3c6abae4f7e3738aa9bcc0ab2f8725cce252
2009-08-11 14:42:47 +00:00
Jan Kratochvil 273e7e98b2 - Upgrade to the FSF GDB gdb-6.8.50 snapshot: 6.8.50.20090810
- archer-jankratochvil-fedora12 commit:
    93ec16e6f5000dd64d433d86674e820ed0f35b72
2009-08-10 13:22:51 +00:00
Jan Kratochvil 657c7f1700 - Drop the bundled libstdc++ python - it should be packaged on its own now. 2009-08-04 07:03:44 +00:00
Jan Kratochvil e5611bfae3 - Upgrade to the FSF GDB gdb-6.8.50 snapshot: 6.8.50.20090803
- archer-jankratochvil-fedora12 commit:
    0222cb1f4ddd1eda32965e464cb60b1e44e110b2
2009-08-04 05:37:29 +00:00
Jan Kratochvil 6ca358b064 - Release bump only. 2009-07-31 08:40:04 +00:00
Jan Kratochvil 620a59a5c4 - Fix compatibility of --with-system-readline and readline-6.0+.
- Temporarily disabled orphanripper on Fedora 12.
2009-07-31 08:36:06 +00:00
Jesse Keating d73adb8cd5 - Rebuilt for https://fedoraproject.org/wiki/Fedora_12_Mass_Rebuild 2009-07-24 23:40:11 +00:00
Jan Kratochvil 364647c376 - testsuite: Fix multiple runs in parallel on a single host.
- testsuite: Remove the rpmbuild option: --with parallel
- testsuite: Run the testsuite with default rpm _smp_mflags.
2009-07-06 21:05:46 +00:00
Jan Kratochvil 3b9bc6fe50 - Archer update to the snapshot: 17bfc0488f54aeeb7a9e20ef3caa7e31e8e985fb
- Archer backport: de9c5190034b84b0a5fb4b98b05b304cda187700
- [vla] Fix a crash regression on constant DW_AT_data_member_location.
2009-07-06 14:59:10 +00:00
Jan Kratochvil a0312d1afc - Replace the fix of cloned-TIDs with no pthread from upstream (BZ 471819).
- Fix a parallel testsuite runs incompatibility in
    gdb.base/gcore-shmid0.exp.
2009-06-29 20:21:12 +00:00
Jan Kratochvil b92be7d39b - Fix GDB crash on cloned-TIDs with no associated pthread (BZ 471819).
- Workaround rpm.org#76 rpm-devel requirement for debuginfo names (BZ
    508193).
2009-06-29 10:00:22 +00:00
Jan Kratochvil 6f1140096d - Accelerate sorting blocks on reading a file (found on WebKit) (BZ
507267).
2009-06-22 17:30:38 +00:00
Jan Kratochvil 536aae5e6a - Fix backtraces from core files with the executable found+loaded via
build-id.
- Due to F-11 GCC no longer needlessly duplicating .eh_frame as
    .debug_frame.
2009-06-22 11:19:51 +00:00
Jan Kratochvil f51c5abf98 - Archer update to the snapshot: 05c402a02716177c4ddd272a6e312cbd2908ed68
- Archer backport: 05c402a02716177c4ddd272a6e312cbd2908ed68
- Remove the [archer-pmuldoon-exception-rewind-master] branch.
- Include this functionality as a FSF GDB accepted patchset.
2009-06-16 14:36:09 +00:00
Jan Kratochvil bcdbb34cad - Fix crash on pending breakpoints with PIE (position-indep.-exec.) (BZ
505943).
2009-06-15 12:53:17 +00:00
Jan Kratochvil c030186760 - Fix an occasional crash during printing of missing debuginfo rpms (BZ
505401).
2009-06-12 21:57:38 +00:00
Jan Kratochvil 638b7b7c33 - Implement DW_OP_call_frame_cfa (for recent GCC). 2009-06-12 10:35:49 +00:00
Jan Kratochvil 859e1355cf - Archer update to the snapshot: 30c13da4efe18f43ee34aa4b29bc86e1a53de548
- Archer backport: 30c13da4efe18f43ee34aa4b29bc86e1a53de548
- Fix dereferencing unbound C arrays (BZ 505163).
2009-06-11 21:52:56 +00:00
Jan Kratochvil 6fcb74ef6e - Archer update to the snapshot: 000db8b7bfef8581ef099ccca8689cfddfea1be8
- Archer backport: b8d3bea36b137effc929e02c4dadf73716cb330b
- Ignore explicit die representing global scope '::' (gcc 4.1 bug).
- Archer backport: c2d5c4a39b10994d86d8f2f90dfed769e8f216f3
- Fix parsing DW_AT_const_value using DW_FORM_string
- Archer backport: 8d9ab68fc0955c9de6320bec2821a21e3244600d
db41e11ae0a3aec7120ad6ce86450d838af74dd6
- Fix Fortran modules/namespaces parsing (but no change was visible in
    F11).
- Archer backport: 000db8b7bfef8581ef099ccca8689cfddfea1be8
- Fix "some Python error when displaying some C++ objects" (BZ 504356).
- testsuite: Support new rpmbuild option: --with parallel
- testsuite: gdb-orphanripper.c: Fix uninitialized `termios.c_line'.
- Fix crashes due to (missing) varobj revalidation, for VLA (for BZ
    377541).
- Archer backport: 58dcda94ac5d6398f47382505e9d3d9d866d79bf
f3de7bbd655337fe6705aeaafcc970deff3dd5d5
- Implement Fortran modules namespaces (BZ 466118).
- Fix crash in the charset support.
2009-06-10 13:05:57 +00:00
Jan Kratochvil f4df2f361a - Fix race in the ia64 testcase `gdb-6.3-rh-testlibunwind-20041202.patch'. 2009-04-30 17:54:42 +00:00
Jan Kratochvil 8876ac66af - Support a new rpmbuild option: --without python 2009-04-27 22:40:40 +00:00
Jan Kratochvil b39dc5cfa9 - Support a new rpmbuild option: --without python 2009-04-27 22:39:41 +00:00
Jan Kratochvil 94cd124608 - The Koji build failures may have been by forgotten check-in of the
Patch360.
2009-04-27 17:55:34 +00:00
Jan Kratochvil dc95c8ce1c - Another new Koji build fix attempt now by: BuildPreReq: python 2009-04-27 17:38:25 +00:00
Jan Kratochvil 360c47d6af - Fix BuildRequires for new Koji. 2009-04-27 16:32:08 +00:00
Jan Kratochvil 06e575d259 - Fix pstack/gstack cutting very long lines (BZ 497849). 2009-04-27 15:22:01 +00:00
Jan Kratochvil 373e1bc565 - New test for parsing elf64-i386 files for kdump PAE vmcore dumps (BZ
457187).
2009-04-19 14:36:39 +00:00
Jan Kratochvil 5db4c14168 - Fix crash in the charset support. 2009-04-16 19:09:09 +00:00
Jan Kratochvil 8aaf99f932 - Fix crash on pretty-printer reading uninitialized std::string (BZ
495781).
2009-04-14 22:17:59 +00:00
Jan Kratochvil 906a06fdb4 - Archer update to the snapshot: d1fee5066408a09423621d1ebc64e6d3e248ed08
- Archer backport: 4854339f75bdaf4b228fc35579bddbb2a1fecdc1
- Fix Python FrameIterator.
2009-04-13 21:25:31 +00:00
Jan Kratochvil 88c9a17a81 - Archer update to the snapshot: 7c250ce99c90cf6097e2ec55ea0f205830979cee
- Archer backport: c14d9ab7eef43281b2052c885f89d2db96fb5f8e
- Revert a change regressing: gdb.objc/basicclass.exp
- Archer backport: ebd649b96e61a1fb481801b65d827bca998c6633
1f080e897996d60ab7fde20423e2947512115667
1948198702b51b31d79793fc49434b529b4e245f
e107fb9687bb1e7f74170aa3d19c4a8f6edbb10f
1e012c996e121cb35053d239a46bd5dc65b0ce60
- Update the Python API from upstream.
- Archer backport: d3c83ad5ec9f7672b87af9ad29279f459e53da11
- Fix a Python branch crash.
2009-04-13 20:52:59 +00:00
Dennis Gilmore 5b24c1447a enable gdbserver package on sparc64 2009-04-13 18:40:58 +00:00
Jan Kratochvil 6110293bb9 - Archer update to the snapshot: 7c7c77576669d17ad5072daa47ea3a4fd954483d
- Archer backport: 7c7c77576669d17ad5072daa47ea3a4fd954483d (Peter Bergner)
- Disassemble Power7 instructions right in the default/only -Many GDB mode.
2009-04-05 21:02:55 +00:00
Jan Kratochvil b5f2aa80ed - Archer update to the snapshot: f6273d446ff87e50976600ba3f71b88d61043e20
- Archer backport: f6273d446ff87e50976600ba3f71b88d61043e20
- Use pretty-printers to print base classes inside a derived class.
2009-04-05 20:34:21 +00:00
Jan Kratochvil 4fe9415174 - Archer update to the snapshot: d144a3633454046aaeae3e2c369c271834431d36
- Archer backport: a2c49b7640ebe7ce1376902d48d5bbbee600996b
- Fixup compilation older GCCs.
- Archer backport: fe48224ce1bd22f37a7fa6d111d54c1a340392bf
- KFAIL 4 cases of: gdb.arch/powerpc-power7.exp
- Archer backport: d144a3633454046aaeae3e2c369c271834431d36
- Fix C local extern variables (requires gcc-4.4.0-0.30).
2009-03-30 17:32:01 +00:00
Jan Kratochvil 3ce5394498 - Archer update to the snapshot: 837d9879980148af05eae540d92caeb7200f1813
- Archer backport: 8340d06295c8db80c544503458305197891e0348
- Fixes [master] regression for Eclipse CDT testsuite.
- Archer backport: 16328456d5740917ade0a49bcecc14c4564b9a99
- Fixes #2 [expr] compatibility with gcc-4.4 on gdb.cp/namespace-using.exp.
- Rebase [expr] on the Keith Seitz's sync with FSF GDB fixing the former
    merge.
2009-03-27 08:52:16 +00:00
Jan Kratochvil d5fb1cc724 - Archer update to the snapshot: e734ed95d296a3342d4147873c4641cea6c4d7fe
- Archer backport: 1e1d73cda98b1adda884b80e07c7b4929c175628
- Fixes [expr] compatibility with gcc-4.4 on gdb.cp/namespace-using.exp.
2009-03-22 20:57:30 +00:00
Jan Kratochvil 42988d9875 - Archer update to the snapshot: 935f217d3367a642374bc56c6b146d376fc3edab
- Archer backport: 281278326412f9d6a3fabb8adc1d419fd7ddc7d7
- Fix [expr] crash reading invalid DWARF C++ symbol "" (BZ 490319).
2009-03-15 18:31:43 +00:00
Jan Kratochvil 5b5fe7db1b - Archer backport: aafe933b497eee8cfab736a10bae1a90d4bceb18
- [python] Remove duplicate target-wide-charset parameter
2009-03-12 21:45:48 +00:00
Jan Kratochvil 5e5008a2ef - Archer update to the snapshot: a99e30d08ade4a2df0f943b036cd653bcd12b04d
- Fixes internal error on breaking at a multi-locations C++ caller (BZ
    488572).
2009-03-09 22:23:48 +00:00
Jan Kratochvil 1a30f6fafe - Archer update to the snapshot: ec29855686f2a78d90ebcc63765681249bbbe808
- Temporarily place libstdc++ pretty printers in this gdb.rpm.
2009-03-09 19:31:45 +00:00
Jan Kratochvil 984eecf70c - Archer update to the snapshot: 543fb2154d3bd551344b990b911be5c6cc703504
- Fixes [delayed-symfile] excessive `(no debugging symbols found)'
    messages.
2009-03-07 22:10:23 +00:00
Jan Kratochvil eb11e3c0e6 - Improve `gdb-6.6-buildid-locate-rpm.patch' by dlopen() (+pkg-config
compat.).
2009-03-07 16:52:39 +00:00
Jan Kratochvil 09c22fd5fb - Split `gdb-6.6-buildid-locate.patch' to
`gdb-6.6-buildid-locate-rpm.patch'.
2009-03-07 01:42:03 +00:00
Jan Kratochvil 8dadf56185 - Archer update to the snapshot: 6cf16c0711e844094ab694b3d929f7bd30b49f61
- Fix crash on the inlined functions support.
- Fix crash from the PIE support, its varobj_refresh() was called only
    before varobj_invalidate() which is sufficient.
- Fix BuildRequires for the `--with testsuite' runs.
- Use the newly introduced `--with-pythondir' option.
- Remove libstdcxx [python] pretty printers (as included in libstdc++ rpm
    now).
2009-03-07 00:32:30 +00:00
Jesse Keating 0d29c1b6dd - Rebuild for new rpm libs 2009-03-06 22:49:37 +00:00
Jan Kratochvil 36474ab6e8 - Include the Archer Project: http://sourceware.org/gdb/wiki/ProjectArcher
http://sourceware.org/gdb/wiki/PythonGdb
[catch-syscall] Trap and display syscalls.
[delayed-symfile] Improve startup performance by lazily read psymtabs.
[exception-rewind] Fix fatal C++ exceptions in an inferior function call.
[expr] Expressions, single-quote elimination, C++ input canonicalization.
[using-directive] C++ namespaces.
[vla] C variable length arrays / DW_FORM_block / Fortran dynamic arrays.
[misc] Fix debuginfoless `return' (BZ 365111), fix command-line macros for
    expected GCC (BZ 479914), new testcase for valgrind (for BZ 483262),
    implement `info common' for Fortran, fix Fortran logical-kind=8 (BZ
    465310), fix static variable in C++ constructors (BZ 445912), fix
    power7 (BZ 485319).
- Upgrade to the FSF GDB gdb-6.8.50 snapshot.
- Fix parsing elf64-i386 files for kdump PAE vmcore dumps (BZ 457187).
- Turn on 64-bit BFD support, globally enable AC_SYS_LARGEFILE.
2009-03-02 23:14:15 +00:00
Jan Kratochvil 159237942c Backup of a draft Archer port - before importing
archer-keiths-expr-cumulative.
2009-03-02 00:11:35 +00:00
Jesse Keating e241ec0a7b - Rebuilt for https://fedoraproject.org/wiki/Fedora_11_Mass_Rebuild 2009-02-24 19:59:51 +00:00
Jan Kratochvil a1707b2aa7 - Upgrade to the FSF GDB gdb-6.8.50 snapshot. 2009-02-11 00:43:22 +00:00
Jan Kratochvil 81783d0ff2 - Upgrade to the FSF GDB gdb-6.8.50 snapshot. 2009-02-11 00:04:48 +00:00
Jan Kratochvil ec0fcb652c - Fix crash / implement `finish' into inlined functions (BZ 479781).
- Drop the gdb.threads/attach-into-signal.exp change as obsolete.
2009-02-09 12:35:37 +00:00
Jan Kratochvil c1c2c92c21 Drop the gdb.threads/attach-into-signal.exp change as obsolete. 2009-02-05 15:54:27 +00:00
Jan Kratochvil f6cec01799 Add 6.8.50.20081214-1 port temporary notes. 2008-12-15 13:47:41 +00:00
Jan Kratochvil d8167bba62 Fix build on s390x - conflict for `gdb-6.8-bz254229-gcore-prpsinfo.patch'. 2008-12-14 20:44:09 +00:00
Jan Kratochvil be8869e59a Fix generating many core files during the testsuite:
http://sourceware.org/ml/gdb-patches/2008-12/msg00260.html
2008-12-14 18:30:22 +00:00
Jan Kratochvil 23cdd3f2da - Upgrade to the upstream gdb-6.8.50 snapshot. 2008-12-14 14:43:40 +00:00
Jan Kratochvil 407ebe9063 - Upgrade to the upstream gdb-6.8.50 snapshot. 2008-12-14 14:05:20 +00:00
Jan Kratochvil 39347a6c8a - Make `--with testsuite' BuildRequires properly conditional. 2008-12-01 18:07:19 +00:00
Štěpán Kasal 9b2688b72a cosmetic changes 2008-12-01 16:25:47 +00:00
Jan Kratochvil 3dc772c212 - Enable ia64 hardware watchpoints if created before starting inferior. 2008-11-18 20:01:02 +00:00
Jan Kratochvil 84892dcf86 - Fix a race in the testcase `gdb.threads/step-thread-exit.exp'. 2008-11-09 21:04:28 +00:00
Jan Kratochvil 917bed595e - Fix more the variable-length-arrays support (BZ 468266, feature BZ
377541).
- Integrate the `bt full' protection (for BZ 466901) into the VLA patch.
2008-11-09 14:39:26 +00:00
Jan Kratochvil 3883e15b9c - Fix the "never terminate `bt full'" patch false GCC warning / build
error.
2008-11-06 22:35:31 +00:00
Jan Kratochvil bdd0d9f59a Release number fixup. 2008-11-06 22:16:53 +00:00
Jan Kratochvil 74f680bfbd - Fix resolving of variables at locations lists in prelinked libs (BZ
466901), bugreported by Michal Babej.
- Never terminate `bt full' on a problem of variable resolving (for BZ
    466901).
2008-11-06 22:15:31 +00:00
Jan Kratochvil bb9a89cb8a - Fix more the variable-length-arrays support (BZ 468266, feature BZ
377541).
- Fix the watchpoints conditionals.
- Fix on PPC spurious SIGTRAPs on active watchpoints.
- Fix occasional stepping lockup on many threads, seen on ia64.
2008-11-06 20:52:36 +00:00
Jan Kratochvil 3e31985da5 Fix false FAIL due to uninitialized `i'. 2008-11-05 08:27:22 +00:00
Jan Kratochvil e168686c08 - Fix the watchpoints conditionals. 2008-11-04 05:51:22 +00:00
Jan Kratochvil 5c94ba08ee - Fix the variable-length-arrays support (BZ 468266, feature BZ 377541).
- Fix the debuginfo-install suggestions for missing base packages (BZ
    467901), also update the rpm/yum code to no longer require
    _RPM_4_4_COMPAT.
2008-11-03 03:34:39 +00:00
Jan Kratochvil fdeb421774 - Fix PIE patch regression for loading binaries from valgrind (BZ 460319). 2008-09-02 00:55:43 +00:00
Jan Kratochvil 10f824b955 - Fix attaching to stopped processes, based on the upstream version now.
- Just kernel-2.6.25 neither upstream nor utrace work with it; 2.6.9 works.
- Fix occasional crash on a removed watchpoint.
- Fix false testcase FAILs for `gdb.pie/break.exp'.
- Fix a false warning (+a testcase FAIL) on s390x watchpoints.
- Fix a false FAIL on s390x `gdb.base/dump.exp'.
2008-08-28 18:48:34 +00:00
Jan Kratochvil e3c8b47c74 - Remove `gdb-6.3-nonthreaded-wp-20050117.patch' as obsoleted + regressing
now.
- Make the GDB quit processing non-abortable to cleanup everything
    properly.
- Support DW_TAG_constant for Fortran in recent Fedora/RH GCCs.
- Fix crash on DW_TAG_module for Fortran in recent Fedora/RH GCCs.
- Readd resolving of bare names of constructors and destructors.
- Include various vendor testcases:
- Leftover zombie process (BZ 243845).
- Multithreaded watchpoints (`gdb.threads/watchthreads2.exp').
- PIE testcases (`gdb.pie/*').
- C++ contructors/destructors (`gdb.cp/constructortest.exp').
2008-08-27 11:07:47 +00:00
Jan Kratochvil 4f698ded6f - Fix MI debuginfo print on reloaded exec, found by Denys Vlasenko (BZ
459414).
- Extend the Fortran dynamic variables patch also for dynamic Fortran
    strings.
2008-08-23 21:49:42 +00:00
Jan Kratochvil bc809fee48 - Temporarily disable attaching to a stopped process (BZ 453688)
- To be reintroduced after a fix of the kernel BZ 454404.
2008-08-13 20:23:18 +00:00
Jan Kratochvil 4bbd3a23f8 - Fix `errno' printing on nonthreaded non-g3 inferiors (TLS minsym is
absolute).
2008-08-04 04:42:57 +00:00
Jan Kratochvil 3a094fb8da - Fix powerpc recent secure PLTs handling (shared library calls) (BZ
452960).
- Fix the testsuite .spec runner to run biarch also on ppc.
- Reenable testcases threadcrash.exp, chng-syms.exp, checkpoint.exp (BZ
    207002).
- Fix PRPSINFO in the core files dumped by gcore (BZ 254229), reformatted
    patch from Denys Vlasenko.
- Fix register assignments with no GDB stack frames, Denys Vlasenko (BZ
    436037).
2008-08-01 06:36:43 +00:00
Jan Kratochvil 8b1b3fd689 - Refresh the patchset with fuzz 0 (for new rpmbuild). 2008-07-14 09:09:04 +00:00
Jan Kratochvil 3f491b2d88 - Rebuild with the new rpm-4.5.90 in the buildroot. 2008-07-14 06:51:26 +00:00
Jan Kratochvil 535451a6ad - Temporary rpm-4.5.90 compatibility workaround by Panu Matilainen.
- Fix a regression in the constant watchpoints fix, found by Daniel
    Jacobowitz.
- Fix the prelink testcase for false FAILs on i386.
2008-07-12 07:02:33 +00:00
Jan Kratochvil 5ca2edcb43 - Fix crash due to calling an inferior function right after a watchpoint
stop.
2008-07-07 22:47:03 +00:00
Jan Kratochvil 942cd23f69 - Support transparent debugging of inlined functions for an optimized code. 2008-07-03 11:05:26 +00:00
Jan Kratochvil 666c0bad8d - Remove the gdb/gdbtui binaries duplicity. 2008-06-20 08:37:16 +00:00
Jan Kratochvil dd1aa7b0b3 - Fix the testsuite run for ia64 (where no -m64 is present).
- Test a crash on libraries missing the .text section.
- Protect development in the build tree by automatic Makefile dependencies.
- Refuse creating watchpoints of an address value, suggested by Martin
    Stransky.
- Disable randomization (such as by setarch -R), suggested by Jakub
    Jelinek.
- Fix compatibility with recent glibc headers.
2008-06-17 16:24:16 +00:00
Jan Kratochvil 2234aa8fd6 - Fix crash on a watchpoint update on an inferior stop.
- Fix the s390x part of the hardware watchpoints after a fork.
2008-06-01 13:14:20 +00:00
Jan Kratochvil ad4fdd5fb5 - Fix memory trashing on binaries from GNAT/Ada (workaround GCC PR 35998). 2008-05-22 20:37:43 +00:00
Tom Callaway e237432bca Silence memcpy check which returns false positive (sparc64) 2008-05-15 23:27:24 +00:00
Jan Kratochvil a8518f3891 Fixup the numbering. 2008-05-15 21:26:13 +00:00
Tom Callaway dccf7f213b fix gdb for sparcv9 and sparc64 2008-05-15 21:16:19 +00:00
Jan Kratochvil 4824eeeeb5 - Make the testsuite results of dfp-test.exp more stable. 2008-05-04 06:54:04 +00:00
Jan Kratochvil 1f8808d842 - Fix gdb.base/gcore-shmid0.exp to be unresolved on recent kernels. 2008-05-03 20:41:55 +00:00
Jan Kratochvil 70c7344648 Fix the Release number. 2008-04-27 20:30:02 +00:00
Jan Kratochvil 17a4f25e9f - Remove the kernel VDSO workaround (`no loadable ...') (kernel BZ 312011). 2008-04-27 20:28:26 +00:00
Jan Kratochvil c499105421 - Backport fix on various forms of threads tracking across exec() (BZ
442765).
- Testsuite: Include more biarch libraries on %{multilib_64_archs}.
- Disable the build-id warnings for the testsuite run as they cause some
    FAILs.
- Fix PIE support for 32bit inferiors on 64bit debugger.
- Fix trashing memory on one ada/gnat testcase.
- Make the testsuite results on ada more stable.
2008-04-22 22:13:56 +00:00
Jan Kratochvil 7db944e3bd - Fix ia64 compilation errors (Yi Zhan, BZ 442684).
- Fix build on non-standard rpm-devel includes (Robert Scheck, BZ 442449).
- Do not run the PIE mode for the testsuite during `--with upstream'.
- Fix test of the crash on a sw watchpoint condition getting out of the
    scope.
2008-04-16 15:00:25 +00:00
Jan Kratochvil 5f5d7d94b5 - Fix a regression due to PIE of reloading a changed exec file (BZ 433410).
- Include also biarch libgcc on %{multilib_64_archs} for the testsuite.
- Cosmetic fix of a testcase sanity breakpoint setting (part of BZ 233852).
- New test of hiding unexpected breakpoints on intentional step commands.
- New test of GCORE for shmid 0 shared memory mappings.
- New test of a crash on `focus cmd', `focus prev' commands.
- Fix a minor test race of the hardware watchpoints after the fork call.
- Test crash on a sw watchpoint condition getting out of the scope.
2008-04-13 23:51:48 +00:00
Jan Kratochvil a9e8793603 - Test crash on a sw watchpoint condition getting out of the scope. 2008-04-06 01:40:10 +00:00
Jan Kratochvil e923707749 - Fix a minor test race of the hardware watchpoints after the fork call. 2008-03-30 22:15:14 +00:00
Jan Kratochvil ed268f2814 - New test of hiding unexpected breakpoints on intentional step commands.
- New test of GCORE for shmid 0 shared memory mappings.
- New test of a crash on `focus cmd', `focus prev' commands.
2008-03-30 18:58:47 +00:00
Jan Kratochvil 4ebfb44ea4 - Cosmetic fix of a testcase sanity breakpoint setting (part of BZ 233852). 2008-03-29 15:31:15 +00:00
Jan Kratochvil 7d92950e83 - Upgrade to the latest upstream final release gdb-6.8. 2008-03-28 09:32:36 +00:00
Jan Kratochvil 338fe930a1 - build-id warnings integrated more with rpm and the lists of the warnings
got replaced usually by a single-line `debuginfo-install' advice.
- FIXME: Testsuite needs an update for the new pre-prompt messages.
- Fix the `--with upstream' compilation - gstack/pstack are now omitted.
2008-03-10 10:05:44 +00:00
Jan Kratochvil 5bed39139d - Drop the unused `ChangeLog.RedHat' file stubs.
- New rpm option `--with upstream' to drop the Fedora patches for testing.
- Drop some no longer valid .spec file comments.
- Include the Fortran dynamic arrays entry for %changlog of
    6.7.50.20080227-1.
2008-03-04 14:42:19 +00:00
Jan Kratochvil 25ff8a1663 - Upgrade to the upstream gdb-6.8 prerelease.
- Cleanup the leftover `.orig' files during %prep.
- Add expat-devel check by the configure script (for the other-arch
    builds).
- `--with testsuite' now also BuildRequires: fpc
- Backport fix of a segfault + PIE regression since 6.7.1 on PIE
    executables.
- Update the printed GDB version string to be Fedora specific.
2008-03-03 16:13:47 +00:00
Jan Kratochvil 2da8118ede - Run the full testsuite also in the `-fPIE -pie' mode. 2008-03-01 08:03:38 +00:00
Jan Kratochvil 082b63b1ab Update for the new multitestsuite layout since gdb-6.7.1-15.fc9. 2008-03-01 08:01:57 +00:00
Jan Kratochvil b3e4c8b04e - New --with parameters `testsuite' and `debug'.
- Testsuite is now run during the build only on explicit `--with
    testsuite'.
- Testsuite now possibly produces two outputs for the two GDB target
    arches.
2008-02-25 09:25:51 +00:00
Jan Kratochvil 917a6fb9db - Rename `set debug build-id' as `set build-id-verbose', former level 1
moved to level 2, default value is now 1, use `set build-id-verbose 0'
    now to disable the missing separate debug filenames messages (BZ
    432164).
2008-02-21 21:41:59 +00:00
Jan Kratochvil 08593f1932 - ia64 build fixes from Doug Chapman (BZ 428882).
- gdbserver separated into an extra package (BZ 405791).
- pstack obsoleted by included gstack (BZ 197020).
- Fix #include <asm/ptrace.h> on
    kernel-headers-2.6.25-0.40.rc1.git2.fc9.x86_64.
- Drop the PowerPC simulator as no longer being compatible with Fedora
    binaries.
2008-02-20 09:43:35 +00:00
Jan Kratochvil 4d1104a1ae - build-id debug messages print now the library names unconditionally. 2008-02-07 14:22:49 +00:00
Jan Kratochvil 6a80c39af8 - Improve the text UI messages for the build-id debug files locating.
- Require now the rpm libraries.
- Fix false `(no debugging symbols found)' on `-readnever' runs.
- Extend the testcase `gdb.arch/powerpc-prologue.exp' for ppc64.
2008-01-24 16:45:56 +00:00
Jan Kratochvil 2a6507443a - Compilation fixup (-9 was never released). 2008-01-12 16:28:31 +00:00
Jan Kratochvil d945816097 - Fix also threaded inferiors for hardware watchpoints after the fork call.
- Test debugging statically linked threaded inferiors (BZ 239652).
- It requires recent glibc to work in this case properly.
- Testcase cleanup fixup of the gcore memory and time requirements of
    6.7.1-8.
2008-01-12 16:16:46 +00:00
Jan Kratochvil 3f52bbd141 - Fix detaching from a threaded formerly stopped process with non-primary
thread currently active (general BZ 233852).
- Enable back again the testcases named `attachstop.exp' (no such exist
    now).
- Rename the testcase `gdb.threads/attachstop' to
    `gdb.threads/attachstop-mt'.
- Test ia64 memory leaks of the code using libunwind.
- Testcase delay increase (for BZ 247354).
- Test gcore memory and time requirements for large inferiors.
2008-01-10 17:17:49 +00:00
Jan Kratochvil d50521fae0 - Backport the gcc-4.3 compatibility -Werror fixes.
- Fix documentation on hardware watchpoints wrt multiple threads.
- Rename the patch file for BZ 235197 from its former name 234468.
- Fix the vendora testcase `attach-32.exp' affecting the other tests
    results.
- Support DW_TAG_interface_type the same way as DW_TAG_class_type (BZ
    426600).
2008-01-07 15:10:23 +00:00
Jan Kratochvil 4a930500c1 - Testsuite fixes for more stable/comparable results. 2007-12-10 23:05:54 +00:00
Jan Kratochvil cd60710ea7 - Reduce the excessive gcc-* packages dependencies outside of mock/koji. 2007-11-23 23:25:00 +00:00
Jan Kratochvil 92dc0e1867 - Fix `errno' resolving across separate debuginfo files.
- Fix segfault on no file loaded, `set debug solib 1', `info
    sharedlibrary'.
- Extend the testsuite run for all the languages if %{dist} is defined.
- Support gdb.fortran/ tests by substituting the g77 compiler by gfortran.
2007-11-16 02:15:40 +00:00
Jan Kratochvil b0ab3a801f - Fix `errno' resolving on recent glibc with broken
DW_AT_MIPS_linkage_name.
- Imported new test for 6.7 PPC hiding of call-volatile parameter register.
2007-11-04 17:55:57 +00:00
Jan Kratochvil 27c2469e2f - Backport `Breakpoints at multiple locations' patch primarily for C++. 2007-11-03 19:10:29 +00:00
Jan Kratochvil 50dab454bd - Upgrade to GDB 6.7.1. Drop redundant patches, forward-port remaining
ones.
2007-11-01 22:28:37 +00:00
Jan Kratochvil eb9d945afa - Upgrade to GDB 6.7. Drop redundant patches, forward-port remaining ones.
- Fix rereading of the main executable on its change.
2007-11-01 20:24:20 +00:00
Jan Kratochvil cc171577b7 - Fix hiding unexpected breakpoints on intentional step/next commands.
- Fix s390 compilation warning/failure due to a wrongly sized type-cast.
2007-10-19 00:12:58 +00:00
Bill Nottingham e42a86f6e6 makefile update to properly grab makefile.common 2007-10-15 18:46:45 +00:00
Jan Kratochvil 9a1b9888ac - Fix hardware watchpoints after inferior forks-off some process. 2007-10-14 20:11:42 +00:00
Jan Kratochvil bd518c30d9 - Fix non-threaded watchpoints CTRL-C regression on `set follow child'. 2007-10-13 18:40:40 +00:00
Jan Kratochvil 84f82bf43b - Fix gdbserver for threaded applications and recent glibc (BZ 328021). 2007-10-12 09:20:08 +00:00
Jan Kratochvil 7969725ab1 - Fix debug load for sparse assembler files (such as vDSO32 for
i386-on-x86_64).
2007-10-09 17:05:59 +00:00
Jan Kratochvil cafa2ff0c1 - Set the breakpoints always to all the ctors/dtors variants (BZ 301701).
- Fix a TUI visual corruption due to the build-id warnings (BZ 320061).
- Fixed the kernel i386-on-x86_64 VDSO loading (producing `Lowest section
    in').
2007-10-08 19:12:38 +00:00
Jan Kratochvil ddc50f97e3 - Fix address changes of the ctors/dtors breakpoints w/multiple PCs (BZ
301701).
- Delete an info doc file on `rpmbuild -bp' later rebuilt during `rpmbuild
    -bc'.
2007-10-05 15:00:27 +00:00
Jan Kratochvil 435483c64b - Fix re-setting of the ctors/dtors breakpoints with multiple PCs (BZ
301701).
- Avoid one useless user question in the core files locator (build-id).
2007-09-25 23:14:55 +00:00
Jan Kratochvil dd40115f74 - Fixed the kernel VDSO loading (`warning: no loadable sections found in
...').
- Fix the testcase for pending signals (from BZ 233852).
2007-09-23 15:42:37 +00:00
Jan Kratochvil add1a2d48d - Support also the `$allocate' and `$delete' ctor/dtor variants (BZ
301701).
- Fix the build compatibility with texinfo >= 4.10.
- Fix the testcase for pending signals (from BZ 233852).
2007-09-22 15:56:10 +00:00
Jan Kratochvil 41705867ad - Fix attaching to stopped processes and/or pending signals. 2007-09-16 22:34:35 +00:00
Jan Kratochvil 4e2e7886e3 - New fast verification whether the .debug file matches its peer
(build-id).
- New locating of the matching binaries from the pure core file (build-id).
2007-08-28 14:46:38 +00:00
Jan Kratochvil 864733e518 - Fixed excessive RPATH (related to BZ 228891). 2007-08-17 14:37:20 +00:00
Jan Kratochvil daafa059ee - Fixed compatibility with the Rawhide glibc open(2) syscall sanity
checking.
- Update the core_dump_elf_headers=1 compatibility code to the upstream
    variant.
2007-08-08 22:02:39 +00:00
Jan Kratochvil 7a31f8b0c5 - Update PPC unwinding patches to their upstream variants (BZ 140532). 2007-08-06 00:24:32 +00:00
Jesse Keating 6614f13981 - Rebuild for RH #249435 2007-07-25 17:16:51 +00:00
Jan Kratochvil 2d6435754d - Fixed compatibility with Rawhide kernel
fs.binfmt_elf.core_dump_elf_headers=1.
- .spec file updates to mostly pass RPMLINT - Fedora merge review (BZ
    225783).
- Fixed testcase of the exit of a thread group leader (of BZ 247354).
- Cleanup any leftover testsuite processes as it may stuck mock(1) builds.
2007-07-23 22:19:06 +00:00
Jan Kratochvil 5c49e68313 - Do not hang on exit of a thread group leader (BZ 247354).
- New test for upstream fix of VDSO decoding while attaching to an i386
    process.
- Fixed BZ # 232014 -> 232015.
2007-07-08 10:45:30 +00:00
Jan Kratochvil a0b6775162 - Link with libreadline provided by the operating system. 2007-07-05 12:13:42 +00:00
Jan Kratochvil c78c51c0de - Fix PPC software watchpoints active while stepping atomic instr. (BZ
237572).
2007-06-26 04:37:05 +00:00
Jan Kratochvil 5a72cdabf8 - Support for stepping over PPC atomic instruction sequences (BZ 237572).
- `set scheduler-locking step' is no longer enforced but it is now default.
2007-06-21 05:22:01 +00:00
Jan Kratochvil 4e636f8028 - Fix attaching a stopped process on expected + upstream kernels (BZ
233852).
- Fix attaching during a pending signal being delivered.
2007-06-20 14:25:46 +00:00
Jan Kratochvil aad703f07a - Testcase update to cover PPC Power6/DFP instructions disassembly (BZ
230000).
- Disable some known timeouting/failing testcases to reduce the build time.
- Fix crash on missing filenames debug info (BZ 242155).
2007-06-07 18:31:29 +00:00
Štěpán Kasal 8c68955da2 test commit 2007-05-30 14:38:39 +00:00
Jan Kratochvil f0d366b68d Support also the koji-checked-out `build-\d+' directory structure. 2007-05-25 14:33:07 +00:00
Jan Kratochvil acb618c727 - Fixup for the PPC Power6/DFP instructions disassembly (BZ 230000).
- New testcase for the GCORE buffer overflow (for BZ 238285, formerly
    235753).
- Related: rhbz#230000 rhbz#238285 rhbz#235753
2007-04-28 21:50:42 +00:00
Jan Kratochvil 1499556e03 - Fix `gcore' command for 32bit PPC inferiors on 64bit PPC hosts (BZ
232015).
- Resolves: rhbz#232015
2007-04-26 00:41:22 +00:00
Jan Kratochvil a32d62ae37 - Enable PowerPC to print 128-bit long double variables (BZ 237872).
- New testcase for 32bit inferiors on 64bit hosts.
- Resolves: rhbz#237872
- Related: rhbz#232014
2007-04-25 21:13:29 +00:00
Jan Kratochvil 8336d588bf - Package review, analysed by Ralf Corsepius (BZ 225783).
- Fix prelink(8) testcase for non-root $PATH missing `/usr/sbin' (BZ
    225783).
- Fix debugging GDB itself - the compiled in source files paths (BZ
    225783).
- Fix harmless GCORE stack buffer overflow, by _FORTIFY_SOURCE=2 (BZ
    235753).
- Fix XML support - the build was missing `expat-devel'.
- Updated the `info' files handling by the spec file.
- Building now with the standard Fedora code protections -
    _FORTIFY_SOURCE=2.
- Use multiple CPUs for the build (%{?_smp_mflags}).
- Separate testsuite run to its %check section.
- Fix (remove) non-ASCII spec file characters.
- Remove system tools versions dumping - already present in mock build
    logs.
- Reverts: rhbz#235197
- Related: rhbz#235197 rhbz#225783
- Resolves: rhbz#235753
2007-04-24 15:57:25 +00:00
Jan Kratochvil 4b94240967 - Notify user of a child forked process being detached (BZ 235197).
- Resolves: rhbz#235197
2007-04-22 20:16:04 +00:00
Jan Kratochvil b2d009af0c - Allow running `/usr/bin/gcore' with provided but inaccessible tty (BZ
229517).
- Fix testcase for watchpoints in threads (for BZ 237096).
- BuildRequires now `libunwind-devel' instead of the former `libunwind'.
- Use the runtime libunwind .so.7, it requires now >=
    0.99-0.1.frysk20070405cvs.
- Resolves: rhbz#229517
- Related: rhbz#237096
2007-04-22 13:13:52 +00:00
Jan Kratochvil b972eafb70 Permit excessive files with just a warning. 2007-04-22 08:52:09 +00:00
Jan Kratochvil 9a64326ab3 - Use definition of an empty structure as it is not an opaque type (BZ
233716).
- Fixed the gdb.base/attachstop.exp testcase false 2 FAILs.
- Resolves: rhbz#233716
2007-03-24 08:55:33 +00:00
Jan Kratochvil 24da262922 Fix an incorrect adaptation on utrace regression of
`kernel-xen-2.6.18-1.2767.el5.i686'.
2007-03-21 23:04:08 +00:00
Jan Kratochvil 8955b7e320 - Suggest SELinux permissions problem; no assertion failure anymore (BZ
232371).
- Related: rhbz#232371
2007-03-16 00:49:33 +00:00
Jan Kratochvil eaba00d1b0 - Fix occasional dwarf2_read_address: Corrupted DWARF expression (BZ
232353).
- Resolves: rhbz#232353
2007-03-15 08:37:14 +00:00
Jan Kratochvil e157c1b26f - Temporary support for shared libraries >2GB on 64bit hosts. (BZ 231832)
- Resolves: rhbz#231832
2007-03-12 16:02:43 +00:00
Jan Kratochvil 9548cfeea8 - Backport + testcase for PPC Power6/DFP instructions disassembly (BZ
230000).
- Resolves: rhbz#230000
2007-02-25 21:43:15 +00:00
Jan Kratochvil 2a21fb50ae - Fix a race during attaching to dying threads; backport (BZ 209445).
- Testcase of unwinding has now marked its unsolvable cases (for BZ
    140532).
- Resolves: rhbz#209445
- Related: rhbz#140532
2007-02-05 08:28:49 +00:00
Jan Kratochvil dfe7fd4669 - Backported post gdb-6.6 release PPC `show endian' fixup.
- Fix displaying of numeric char arrays as strings (BZ 224128).
- Simplified patches by merging upstream accepted ones into a single file.
- Resolves: rhbz#224128
2007-01-26 22:52:10 +00:00
Jan Kratochvil aefb0e1e23 - Upgrade to GDB 6.6. Drop redundant patches, forward-port remaining ones.
- Backported post gdb-6.6 release ia64 unwinding fixups.
- Testcase for exec() from threaded program (BZ 202689).
- Resolves: rhbz#221125
- Related: rhbz#202689
2007-01-21 01:53:01 +00:00
Jan Kratochvil 376c4280d4 - Fix the testsuite results broken in 6.5-26, stop invalid testsuite runs. 2007-01-15 21:08:52 +00:00
Jan Kratochvil 4dddad4251 - Fix unwinding of non-debug (.eh_frame) PPC code, Andreas Schwab (BZ
140532).
- Fix unwinding of debug (.debug_frame) PPC code, workaround GCC (BZ
    140532).
- Fix missing testsuite .log output of testcases using get_compiler_info().
- Resolves: rhbz#140532
2007-01-13 09:18:58 +00:00
Jan Kratochvil 48f079c103 - Fix unwinding of non-CFI (w/o debuginfo) PPC code by recent GCC (BZ
140532).
- Related: rhbz#140532
2007-01-12 21:07:47 +00:00
Jan Kratochvil 3cdd4d2bbe - Backport readline history for input mode commands like `command' (BZ
215816).
- Resolves: rhbz#215816
2007-01-11 21:28:57 +00:00
Jan Kratochvil 65bc5f9692 - Find symbols properly at their original (included) file (BZ 109921).
- Remove the stuck mock(1) builds disfunctional workaround (-> mock BZ
    221351).
- Resolves: rhbz#109921
- Related: rhbz#221351
2007-01-09 11:35:44 +00:00
Jan Kratochvil 8ad010c73b Support a new "-r" (reverse) argument. 2007-01-09 11:34:40 +00:00
Jan Kratochvil b76482a34c Properly sort both the versioned and the scratch builds against each other. 2007-01-07 22:47:44 +00:00
Jan Kratochvil 803b8bdf52 - Fix unwinding crash on older gcj(1) code (extended CFI support) (BZ
165025).
- Include testcase for the readline history of input mode commands (BZ
    215816).
- Related: rhbz#165025 rhbz#215816
2006-12-30 20:59:07 +00:00
Jan Kratochvil 6586341d1d Print the first unused patch number across all the current package's
branches.
2006-12-29 20:35:43 +00:00
Jan Kratochvil 418be7985a - Try to reduce sideeffects of skipping ppc .so libs trampolines (BZ
218379).
- Fix lockup on trampoline vs. its function lookup; unreproducible (BZ
    218379).
- Resolves: rhbz#218379
- Related: rhbz#192964
2006-12-23 21:32:21 +00:00
Jan Kratochvil b9610957d2 - Fix bogus 0x0 unwind of the thread's topmost function clone(3) (BZ
216711).
- Testcase for readline segfault on excessively long hand-typed lines.
- Related: rhbz#216711
2006-12-19 19:26:15 +00:00
Jan Kratochvil 9dc4b31d3d Simple script helper to diff(1) the outputs of `./gdb2fail.sh'. 2006-12-12 22:56:16 +00:00
Jan Kratochvil 2a22042c8a - Fix attachment also to a threaded stopped process (BZ 219118).
- Cleanup any leftover testsuite processes as it may stuck mock(1) builds.
- Resolves: rhbz#219118
2006-12-12 22:16:21 +00:00
Jan Kratochvil ba921cd95b - Fix readline history for input mode commands like `command' (BZ 215816).
- Related: rhbz#215816
2006-11-25 19:11:24 +00:00
Jan Kratochvil 67e6bd43b5 - Bugfix testcase typo of gdb-6.5-16. 2006-11-16 21:16:55 +00:00
Jan Kratochvil 509b0ab1f9 - Provide testcase for accessing the last address space byte.
- Related: rhbz#210614
2006-11-16 00:01:56 +00:00
Jan Kratochvil 03e2cd36ed - Fix readline segfault on excessively long hand-typed lines.
- Related: rhbz#214196
2006-11-09 09:39:43 +00:00
Jan Kratochvil dd1d9ea7c4 Disable "threadcrash.exp" as it is incompatible with older ia64 kernels:
- Improved testsuite results by the testsuite provided by the courtesy of
    BEA.
->
- Provided (disabled during build) threading testsuite from BEA.
2006-11-03 07:14:39 +00:00
Jan Kratochvil b048379f11 - Fix "??" resolving of symbols from (non-prelinked) debuginfo packages.
- Fix "??" resolving of symbols from overlapping functions (nanosleep(3)).
- Also disable testcase "checkpoint.exp" for a possible kernel Bug 207002.
- Improved testsuite results by the testsuite provided by the courtesy of
    BEA.
- Related: rhbz#179399
Note: i386 test results of the BEA testsuite uuencode(1)d for `gdb2fail.sh'
    are too bogus, retest (RHTS?) required on the matching kernel.
    `WONTFIX' by makem.
2006-11-02 22:58:41 +00:00
Jan Kratochvil 5b4413efb9 Bugzilla Bug 210614: [RHEL4U4] The gdb command hangs.
Sat Oct 14 2006 Jan Kratochvil <jan.kratochvil@redhat.com> - 6.5-13
- Fix deadlock accessing last address space byte; for corrupted backtraces.
2006-10-14 21:55:07 +00:00
Jan Kratochvil 09585624a5 - Disabled IPv6 until its user visible syntax gets stable upstream. 2006-10-08 17:09:12 +00:00
Jan Kratochvil 50a6238835 - No longer disassemble invalid i386 opcodes of movQ/movA (BZ 172034).
- Simplify the IPv6 patch for gdbserver (BZ 198365).
- Suggest fixing your target architecture for gdbserver(1) (BZ 190810).
- Fix dereferencing registers for 32bit inferiors on 64bit hosts (BZ
    181390).
- Fix `gcore' command for 32bit inferiors on 64bit hosts.
2006-10-01 19:21:15 +00:00
Jan Kratochvil 7e80c93779 - Support IPv6 for gdbserver (BZ 198365).
- Temporarily disable testcase "chng-syms.exp" for a possible kernel Bug
    207002.
2006-09-27 16:27:57 +00:00
Jan Kratochvil ba67a7996c - Fix crash on C++ symbol failing to be demangled (BZ 206813).
- Fix attach to stopped process, supersede
    `gdb-6.3-attach-stop-20051011.patch'.
- Fix TLS symbols resolving for objects with separate .debug file
    (-debuginfo).
- Fix TLS symbols resolving for shared libraries with a relative pathname.
- Support TLS symbols (+`errno' suggestion if no pthread is found) (BZ
    185337).
2006-09-21 13:07:53 +00:00
Jan Kratochvil 2c3eddc55e Fixed support of the pending '/work/tasks/' logs. 2006-09-20 22:27:01 +00:00
Jan Kratochvil fa9ba05eb9 Updated for brew. Behavior generally changed; "tests/" is now (safely)
deleted each time!
2006-09-20 21:56:56 +00:00
Jan Kratochvil b6646b39a2 - Fix gdb printf command argument using "%p" (BZ 205551). 2006-09-12 17:48:25 +00:00
aoliva c3984c8e90 - Fix bug in patch for CVE-2006-4146. (BZ 203873, BZ 203880) 2006-09-04 07:50:10 +00:00
aoliva e6628c4a6c gdb-6_5-7_fc6 from embargo branch. 2006-09-04 07:49:04 +00:00
aoliva a23697f5db gdb-6_5-6_fc6 from embargo branch. 2006-09-04 07:48:26 +00:00
aoliva 9920fee39f gdb-6_5-4_fc6 from embargo branch. 2006-09-04 07:38:43 +00:00
aoliva 9bd4e90e66 Initial revision 2006-09-04 07:38:09 +00:00
aoliva 753f5e6d3e - Backport support for i386 nop memory instructions.
- Fix debuginfo addresses resolving for --emit-relocs Linux kernels (BZ
    203661, from Jan Kratochvil, like the remaining changes).
- Bugfix segv on the source display by ^X 1 (fixes Patch130, BZ
200048).
- Do not step into the PPC solib trampolines (BZ 200533).
- Fix exec() from threaded program, partial CVS backport (BZ 182116).
- Fix occasional failure to load shared libraries (BZ 146810).
- Bugfix object names completion (fixes Patch116, BZ 193763).
- Avoid crash of 'info threads' if stale threads exist (BZ 195429).
- Handle corrupted or missing location list information (BZ 196439).
2006-08-24 06:18:06 +00:00
aoliva b13204b595 ??? Alexandre Oliva <aoliva@redhat.com> - 6.5-4
- Backport support for i386 nop memory instructions.
2006-08-23 06:54:55 +00:00
aoliva 3ef6e043a1 - Add missing definition of multilib_64_archs for glibc-devel buildreqs.
- Backport support for .gnu.hash sections.
2006-07-14 05:18:22 +00:00
aoliva 7c98e3b859 No prelink on ia64 2006-07-12 07:34:07 +00:00
aoliva de6a2a04d1 It's sharutils that provides uuencode 2006-07-12 07:13:31 +00:00
aoliva fef19e0df6 - BuildReq uuencode, prelink and, on multilib systems, 32-bit glibc-devel.
- Drop obsolete attach-stop patch.
- Fix testcases in threaded-watchpoints2 and step-thread-exit patches.
- Re-enable attach-pie.exp, asm-source.exp and sigstep.exp tests.
2006-07-12 07:04:22 +00:00
aoliva 21721b8b21 Fix s390x build. 2006-07-11 18:04:22 +00:00
aoliva aa01540273 Fix ppc build. 2006-07-11 15:36:44 +00:00
aoliva 1e7b928d5c Fix i386 build. 2006-07-11 08:25:57 +00:00
aoliva c59c374ffc Fix ia64 build, remove gdb-6.3.tar.bz2 from .cvsignore. 2006-07-11 08:06:56 +00:00
aoliva 78483f6257 Do not remove unsupported Ada and ObjC tests in a way that breaks the
build.
2006-07-11 07:05:14 +00:00
aoliva 9231e41bc3 - Upgrade to GDB 6.5. Drop redundant patches, forward-port remaining ones. 2006-07-11 06:33:02 +00:00
aoliva 8f1d1491a9 - Require flex and bison at build time. 2006-06-15 11:34:42 +00:00
aoliva 4177b134a2 - Require flex at build time. 2006-06-15 11:24:22 +00:00
aoliva 4917379716 - Additional patch for BZ 175083, to cope with waitpid setting status even
when returning zero.
2006-06-15 10:35:58 +00:00
aoliva 940bd52d43 - Require gettext at build time. (BZ193366) 2006-05-31 07:15:55 +00:00
aoliva bc67a32afc - Rewrite patch for BZ 175270, BZ 175083 so as to catch the exception
earlier.
- Remove too-fragile testcases from patches for CFA value and "S"
    augmentation.
2006-05-27 07:34:28 +00:00
aoliva 017d602381 - Add not-automatically-generated file to fopen64 patch (BZ 191948). 2006-05-17 13:59:46 +00:00
aoliva cb077a38c2 - Avoid race conditions caused by exceptions messing with signal masks. (BZ
175270, BZ 175083, maybe BZ 172938).
- Hardcode /bin and /usr/bin paths into gstack (BZ 179829).
- Build in a subdir of the source tree instead of in a sibling directory.
- Switch to versioning scheme that uses the same base revision number for
    all OSes, and uses a suffix to tell the builds apart and ensure
    upgradability.
2006-04-14 07:05:35 +00:00
aoliva 16b31aabef - Use fopen64 where available. Fixes BZ 179399.
- Use bigger numbers than int. Fixes BZ 171783.
2006-04-14 05:52:53 +00:00
aoliva 494ffa381e - Fix regression in PIE debugging (BZ 133944) (re?)introduced by the
prelink fix (BZ 175075). Improve testcase for the prelink fix.
- Revert dwarf2 frame identifier change.
2006-03-08 23:48:02 +00:00
aoliva 0c643cf34e [...]
- Do not try to compile x86_64-only CFA testcase on 32-bit x86.
2006-03-07 05:17:56 +00:00
aoliva 87809a744e - Change dwarf2 frame identifiers to use the actual PC instead of the
function's entry point.
- Fix FSF and GDB contact addresses in new testcases.
- Change prelink test to issue untested instead of warning message if
    system libraries are not prelinked.
2006-03-07 05:13:18 +00:00
aoliva 5aedf031b8 - Add support for "S" augmentation for signal stack frames.
- Add support for CFA value expressions and encodings.
- Various improvements to the prelink test.
2006-03-03 19:10:47 +00:00
aoliva 28868ad752 Fix date of previous %changelog entry. 2006-02-23 20:48:51 +00:00
aoliva de063e0442 - Enable gdb to debug core files and executables with mismatched prelink
base addresses. Fixes BZ 175075.
2006-02-23 20:47:29 +00:00
aoliva 57ce3582f8 Oops, update Release 2006-02-14 20:51:23 +00:00
aoliva ee1d9490a7 - Adjust type-punning patch to include fix not needed upstream. 2006-02-14 20:48:24 +00:00
aoliva e08f94c000 - Use type-punning warning fixes as accepted upstream. 2006-02-14 19:40:14 +00:00
Jesse Keating cc18d737e0 bump for bug in double-long on ppc(64) 2006-02-11 02:49:31 +00:00
Jesse Keating 9c2bcfac82 bump for new gcc/glibc 2006-02-07 11:44:29 +00:00
aoliva 667028970c - Bump up release number. 2006-01-16 16:27:08 +00:00
aoliva c9fd171760 - Fix type-punning warnings issued by GCC 4.1. 2005-12-19 18:59:07 +00:00
Jesse Keating 88ce67832e gcc bump 2005-12-16 23:20:30 +00:00
Jeff Johnston 6417cfccf0 - Bump up release number.
Thu Dec 01 2005 Jeff Johnston <jjohnstn@redhat.com> 6.3.0.0-1.90
- Add option to allow backtracing past zero pc value.
- Bugzilla 170275
2005-12-01 21:07:06 +00:00
Jeff Johnston fbb51ac204 - Bump up release number.
Tue Nov 15 2005 Jeff Johnston <jjohnstn@redhat.com> 6.3.0.0-1.86
- Fix ia64 user-specified SIGILL handling error.
- Bugzilla 165038.
2005-11-16 19:19:42 +00:00
Jeff Johnston fb9a5aa2e0 - Bump up release number.
Tue Oct 18 2005 Jeff Johnston <jjohnstn@redhat.com> 6.3.0.0-1.82
- Modify attach patch to add missing fclose.
- Bugzilla 166712
2005-10-20 15:48:27 +00:00
Jeff Johnston e00d0dda36 - Bump up release number.
Tue Oct 11 2005 Jeff Johnston <jjohnstn@redhat.com> 6.3.0.0-1.78
- Support gdb attaching to a stopped process.
2005-10-12 18:57:10 +00:00
Jeff Johnston c73684b204 - Bump up release number.
Thu Sep 29 2005 Jeff Johnston <jjohnstn@redhat.com> 6.3.0.0-1.74
- Fix up DSO read logic when process is attached.
2005-09-29 22:41:56 +00:00
Jeff Johnston 078093a0f2 - Bump up release number.
Mon Sep 26 2005 Jeff Johnston <jjohnstn@redhat.com> 6.3.0.0-1.70
- Fix frame pointer calculation for ia64 sigtramp frame.
2005-09-27 16:07:52 +00:00
Jeff Johnston 7c724ede90 - Bump up release number.
Thu Sep 22 2005 Jeff Johnston <jjohnstn@redhat.com> 6.3.0.0-1.66
- Remove extraneous xfree.
2005-09-22 21:55:32 +00:00
Jeff Johnston 658b48942f - Bump up release number.
Wed Sep 07 2005 Jeff Johnston <jjohnstn@redhat.com> 6.3.0.0-1.62
- Readd readnever option
2005-09-07 18:57:23 +00:00
Jeff Johnston a0101bc427 - Bump up release number. 2005-07-27 16:10:40 +00:00
Jeff Johnston 486c3bbc76 - Bump up release number.
Tue Jul 26 2005 Jeff Johnston <jjohnstn@redhat.com> 6.3.0.0-1.54
- Add testcase to verify printing of inherited members
- Bugzilla 146835
2005-07-26 21:29:05 +00:00
Jeff Johnston e1bcf9b74a - Bump up release number.
Mon Jul 25 2005 Jeff Johnston <jjohnstn@redhat.com> 6.3.0.0-1.50
- Fix bug with info frame and cursor address on ia64.
- Add testcase to verify pseudo-registers calculated for ia64 sigtramp.
- Bugzilla 160339
2005-07-25 22:43:34 +00:00
Jeff Johnston d5a2446950 - Bump up release number.
Fri Jul 22 2005 Jeff Johnston <jjohnstn@redhat.com> 6.3.0.0-1.46
- Fix attaching to 32-bit processes on 64-bit systems.
- Bugzilla 160254
2005-07-23 01:41:19 +00:00
Jeff Johnston 846419871a - Bump up release number.
Thu Jul 14 2005 Jeff Johnston <jjohnstn@redhat.com> 6.3.0.0-1.42
- Add work-around to make ia64 gcore work faster.
- Bugzilla 147436
2005-07-15 00:48:56 +00:00
Jeff Johnston 72cd19da15 - Bump up release number.
Mon Jul 11 2005 Jeff Johnston <jjohnstn@redhat.com> 6.3.0.0-1.38
- Fix backtracing across sigaltstack for ia64
- Bugzilla 151741
2005-07-14 19:11:18 +00:00
Jeff Johnston 82cee5f74c - Bump up release number.
Fri Jul 08 2005 Jeff Johnston <jjohnstn@redhat.com> 6.3.0.0-1.35
- Build pseudo-registers properly for sigtramp frame.
- Bugzilla 160339
2005-07-09 02:16:29 +00:00
Jeff Johnston adbc6b8f3a - Bump up release number.
Thu Jul 07 2005 Jeff Johnston <jjohnstn@redhat.com> 6.3.0.0-1.31
- Modify security errata to include additional bfd robustness updates
- Bugzilla 158680
2005-07-08 18:42:25 +00:00
Jeff Johnston d93994303f - Bump up release number.
Fri Jun 10 2005 Jeff Johnston <jjohnstn@redhat.com> 6.3.0.0-1.28
- Security errata for bfd and .gdbinit file usage
- Bugzilla 158680
2005-06-10 20:50:21 +00:00
Jeff Johnston b52f222775 - Bump up release number.
Wed May 18 2005 Jeff Johnston <jjohnstn@redhat.com> 6.3.0.0-1.23
- Bump up release number.
Wed May 18 2005 Jeff Johnston <jjohnstn@redhat.com> 6.3.0.0-1.22
- Specify SA_RESTART for linux-nat.c handlers and use my_waitpid which
    handles EINTR.
2005-05-18 19:25:28 +00:00
Jeff Johnston a5fe47c6ba - Bump up release number.
Tue May 03 2005 Jeff Johnston <jjohnstn@redhat.com> 6.3.0.0-1.20
- Bump up release number.
Tue May 03 2005 Jeff Johnston <jjohnstn@redhat.com> 6.3.0.0-1.19
- Fix for partial die in cache error
- Bugzilla 137904
2005-05-03 22:58:36 +00:00
Jeff Johnston fc61375721 - Bump up release number.
Wed Apr 27 2005 Jeff Johnston <jjohnstn@redhat.com> 6.3.0.0-1.17
- Bump up release number.
Wed Apr 27 2005 Jeff Johnston <jjohnstn@redhat.com> 6.3.0.0-1.16
- Update ia64 sigtramp support to use libunwind and fix top-level rse
    register reads to also use libunwind.
- Bugzilla 151741
2005-04-27 23:29:27 +00:00
Jeff Johnston 0e6b69254f - Bump up release number.
Thu Apr 21 2005 Jeff Johnston <jjohnstn@redhat.com> 6.3.0.0-1.14
- Bump up release number.
Thu Apr 21 2005 Jeff Johnston <jjohnstn@redhat.com> 6.3-0.0-1.13
- Do not issue warning message for gcore under ia64
- Bugzilla 146416
2005-04-21 20:10:16 +00:00
cagney 434306b94c - Update gstack patch, handle systems that lack /proc/<pid>/tasks. 2005-04-11 20:52:56 +00:00
cagney f8a3ed8e00 Fix tipo test/ -> tests/. 2005-04-08 20:09:05 +00:00
cagney 00764cbbb6 Oops, fix version number. 2005-04-08 19:18:04 +00:00
cagney a0fb58586a - Replace patch warning about DW_OP_piece with a patch that implements the
DW_OP_piece read path.
2005-04-08 19:16:52 +00:00
cagney d101d28d24 Upload gdb top-of-tree. 2005-04-03 00:30:15 +00:00
cagney 2b428b9e37 work with new log directory. 2005-04-02 22:39:14 +00:00
cagney 5ced33ee9c - Print a warning when the separate debug info's CRC doen't match; test. 2005-04-02 22:38:09 +00:00
Jeff Johnston 81e47be6db - Bump up release number.
Wed Mar 30 2005 Jeff Johnston <jjohnstn@redhat.com> 6.3.0.0-1.7
- Add proper vsyscall page support for ia64.
2005-03-30 23:40:51 +00:00
Jeff Johnston 2b9b6c13e2 - Bump up release number.
Thu Mar 24 2005 Jeff Johnston <jjohnstn@redhat.com> 6.3.0.0-1.4
- Fix printing of inherited members of C++ classes.
- Fix for Bugzilla 146835.
2005-03-25 00:17:33 +00:00
Jeff Johnston 8898d54c59 - Bump up release number.
Thu Mar 17 2005 Jeff Johnston <jjohnstn@redhat.com> 6.3.0.0-1.1
- Remove warnings that cause errors when compiled with gcc4 and -Werror.
2005-03-22 23:25:26 +00:00
Elliot Lee c3e970c431 oops, rebuild 2005-03-16 21:33:50 +00:00
Jeff Johnston bfc7c1d8bf - Bump up release number.
Thu Mar 03 2005 Jeff Johnston <jjohnstn@redhat.com> 6.3.0.0-0.35
- Add follow-fork fix from mainline sources.
2005-03-04 17:13:55 +00:00
Jeff Johnston 8a516c73c3 - Bump up release number.
Mon Feb 28 2005 Jeff Johnston <jjohnstn@redhat.com> 6.3.0.0-0.32
- Modify debug register handling for x86, x86-64 to be thread-specific.
- Modify threaded watchpoint code for x86, x86-64 to properly insert and
    remove watchpoints on all threads.
2005-03-03 20:42:47 +00:00
cagney 155a3e093e Bump version number twice (RHEL-3; RHEL-4). 2005-02-22 19:15:01 +00:00
cagney 367b952805 - Modify gdb-6.3-dwattype0-20050201.patch to check for a zero address and
not zero unsnd. Fix BE 32- vs 64-bit problem.
2005-02-22 17:34:05 +00:00
cagney 49d82ff464 Oops, really bump version to .28. 2005-02-21 18:25:42 +00:00
cagney 79b1522f47 - Back port patch adding symfile-mem.o to all GNU/Linux builds. Fix BZ
146087.
2005-02-21 18:24:09 +00:00
Jeff Johnston 6ba43c9d8c - Bump up release number.
Wed Feb 16 2005 Jeff Johnston <jjohnstn@redhat.com> 6.3.0.0-0.26
- Fix unload.exp testcase.
2005-02-16 21:37:58 +00:00
Jeff Johnston 955cd49926 - Bump up release number.
Mon Feb 14 2005 Jeff Johnston <jjohnstn@redhat.com> 6.3.0.0-0.24
- Fix gdb to always grab the terminal before a readline call.
- Bugzilla 147880
2005-02-14 22:10:53 +00:00
Jeff Johnston 3eb6817783 - Bump up release number.
Fixed problem to do with CFLAGS being set to -Wp,-D_FORTIFY_SOURCE which
    causes the build to fail because gdb has usage of functions without
    return types and uses the -Werror flag.
2005-02-12 00:43:50 +00:00
Jeff Johnston 28857cc59c - Bump up release number.
Fri Feb 11 2005 Jeff Johnston <jjohnstn@redhat.com> 6.3.0.0-0.21
- Fix gdb to handle stepping over the end of an exiting thread.
- Bugzilla 146848
2005-02-11 23:48:53 +00:00
Jeff Johnston 3bd6eba21d - Bump up release number. 2005-02-10 23:01:59 +00:00
Jeff Johnston 9dde329b20 - Modify previous gcore patch to not use linux_proc_xfer_memory even for
main thread.
2005-02-08 21:02:35 +00:00
Jeff Johnston 28fdd9467e - Modify previous gcore patch to only apply to ia64. 2005-02-08 01:25:23 +00:00
Jeff Johnston 20b150be89 - Fix gcore to work properly for threaded applications
- Bugzilla 145309, 145092
2005-02-05 04:21:32 +00:00
Jeff Johnston 020264b153 - Tolerate DW_AT_type referencing <0> and instead of generating an error,
treat as unknown type.
- Bugzilla 144852.
2005-02-05 03:49:11 +00:00
cagney 6cc37db5c7 - Separate out test patches. 2005-02-04 21:01:49 +00:00
Jeff Johnston 4bf80fb89a - Fix to allow ia64 gdb to backtrace from syscalls in a corefile.
- Bugzilla 145092.
2005-01-27 19:51:15 +00:00
Jeff Johnston f1c5dfd5e0 - Fix to support examining files even when the executable moves
- Bugzilla 142122
2005-01-26 23:16:12 +00:00
cagney bf41c59771 - gdb-6.3-ppcdotsyms-20050126.patch: Backport BFD changes for reading
synthetic symbols. Rewrite code reading elf minimal symbols so that it
    includes synthetics.
2005-01-26 20:22:17 +00:00
Jeff Johnston 3a3dff59e8 - Fix to prevent resetting unwind kernel table size to invalid value when
debugging a core file
- Bugzilla 145309
2005-01-22 01:37:58 +00:00
cagney 821ca2428b - When single stepping handle both back-to-back and nested signals.
- Disable .symbol patch, results in BFD errors.
2005-01-21 23:50:10 +00:00
cagney ac9e138c02 Bump to 0.9. 2005-01-21 23:48:36 +00:00
cagney b32bcbe5eb - When single stepping handle both back-to-back and nested signals. 2005-01-21 23:19:55 +00:00
Jeff Johnston 2e2750be6c - Support listing both in-charge and not-in-charge dtors when just the dtor
name is given.
- Add new test case for newly added ctor/dtor functionality.
2005-01-21 22:50:55 +00:00
Jeff Johnston 3361dd973b - Fix to allow breaking by line in both the in-charge and not-in-charge
ctor/dtor.
- Bugzilla 117826
2005-01-21 00:20:17 +00:00
cagney 97228c4d3d - Enable patch from 0.5 :-( 2005-01-20 22:01:20 +00:00
cagney 67b028d828 - Use bfd_get_synthetic_symtab to read in any synthetic symbols such as
64-bit PPC's ".symbol"s.
2005-01-20 21:07:29 +00:00
Jeff Johnston 0e6ea417f2 - Modify non-threaded watchpoint patch to use new observer. 2005-01-19 23:29:48 +00:00
Jeff Johnston bc60002377 - Fix for non-threaded watchpoints. 2005-01-18 16:37:00 +00:00
cagney 6edd3c8153 - Enable PPC CFI, remove merged ppc patches. 2005-01-17 17:28:54 +00:00
ezannoni 8f6f3f7dc6 Andrew Cagney <cagney@redhat.com> Jeff Johnston <jjohnstn@redhat.com>
- Various fixes to complete the import and merge.
2005-01-15 03:33:29 +00:00
cagney e4fa8d72e6 Add ppc's malloc patch. 2005-01-11 04:20:28 +00:00
Jeff Johnston f5d570986d Reapply self test patch to 6.3. 2005-01-11 01:07:18 +00:00
Jeff Johnston 84cb84b0ba Readd pie support. 2005-01-11 00:15:58 +00:00
Jeff Johnston a51648d704 Repair patch to build properly by adding single_step_through_delay to
gdbarch.
2005-01-07 22:49:23 +00:00
Jeff Johnston 95ac1d5dd2 Fix reference to older name of debug variable. 2005-01-07 21:07:55 +00:00
Jeff Johnston 7bde2fa50c Roland McGrath <roland@redhat.com>
Include "observer.h", "auxv.h", and "elf/common.h". (struct
    symbol_file_add_from_memory_args) (symbol_file_add_from_memory_wrapper,
    add_vsyscall_page) (_initialize_symfile_mem): Add an inferior_created
    observer, use to load the vsyscall page.
Update dependencies.
2004-07-08 Daniel J
Recognize __kernel_vsyscall as a signal trampoline.
Replacing 6.1post patch #50 to apply on 6.3.
2004-12-16 22:26:17 +00:00
Jeff Johnston 1390bba0c9 New struct. (backtrace_command_stub): New function. (backtrace_command):
Call backtrace_command_stub wrapped in a catch_errors call.
    (backtrace_full_command): Ditto.
New prototypes.
New functions. (error_stream_1): Ditto. (error_stream): Call
    error_stream_1.
Replacing 6.1post patch #78.
2004-12-16 22:12:47 +00:00
Jeff Johnston f643c0cd8b Add support for exposing not-in-charge constructors/destructors in the
demangled names.
2004-12-16 21:54:10 +00:00
Jeff Johnston 2d795dbf85 Removed. (thread_db_resume): Do not iterate and call clear_lwp_callback. 2004-12-16 21:36:54 +00:00
Jeff Johnston 160bca345d Add missing code for freeing up saved_trap_data area in lwp. 2004-12-15 21:21:25 +00:00
cagney dd9987d145 Move more patches forward. 2004-12-14 20:54:47 +00:00
Jeff Johnston 8e717966f9 Fix to support listing base and regular constructors from gdb list and
breakpoint commands.
2004-12-14 01:07:04 +00:00
Jeff Johnston eb9da9d18d Fix to ensure types are visible by gdb's ptype command. 2004-12-14 01:04:19 +00:00
Jeff Johnston e8aabd66a7 Readd ia64 backtrace fixes from 6.1post into 6.3. 2004-12-14 00:21:54 +00:00
Jeff Johnston 36ea501317 Add threaded watchpoint support. 2004-12-13 21:48:04 +00:00
Jeff Johnston aeaef799f4 Replacement 6.3 patch for 6.1post thread-step patch. Also remove traces of
patches already integrated into gdb 6.3.
2004-12-08 01:02:20 +00:00
cagney 707dff88ed Describe each patch. 2004-12-02 19:38:20 +00:00
cagney 43873a6422 Merge in most PPC fixes. 2004-12-02 18:30:25 +00:00
cagney f56d3db504 Merge PPC's .solib patch. 2004-12-02 17:44:10 +00:00
cagney 0febbeac76 Make cvs happy. 2004-12-02 17:08:33 +00:00
cagney 4e0e6d098e Remove the ``broken'' patches. 2004-12-02 16:55:01 +00:00
cagney b0a9b1228b Another dead patch. 2004-12-02 16:49:57 +00:00
cagney 75eaddb190 Merge libunwind testsuite, and signal patches. 2004-12-02 16:46:32 +00:00
cagney 5185b7b341 Another merged patch. 2004-12-02 16:18:26 +00:00
cagney c4efacfb32 Fix dwoppiece, remove more merged patches. 2004-12-02 16:10:51 +00:00
cagney bd0cbaaec2 Re-merge DW_OP_piece. 2004-12-02 15:55:49 +00:00
cagney 00cf53144c Merge in perpetuated testsuite patches. 2004-12-02 15:42:08 +00:00
cagney 7bf686ca3f Create empty[ish] ChangeLog.RedHat files. 2004-12-02 15:32:46 +00:00
cagney d8acd7ce85 Delete merged patches. 2004-12-02 15:07:06 +00:00
cagney 67453e86a4 Delete merged patch. 2004-12-02 15:03:07 +00:00
cagney 16ccb4d14f Checkpointing 6.3 merge. 2004-12-02 15:00:47 +00:00
Jeff Johnston ce12ca0d98 - When removing breakpoints, continue removing breakpoints even if an error
occurs on the list.
2004-11-30 23:44:26 +00:00
cagney 88bd634325 Bump version for rhel4 build. 2004-11-28 19:09:40 +00:00
cagney a92c345ec5 Add missing symbol name to display and examine output. 2004-11-25 00:14:14 +00:00
cagney c878e6553b Enable .malloc ppc64 fix. Only define kfail when missing. 2004-11-24 21:59:37 +00:00
cagney 8790eb109c Bump version. 2004-11-24 20:08:36 +00:00
cagney b599fc7a52 Fix patch84 name. 2004-11-24 19:43:02 +00:00
cagney 797c90b001 Add reggroups; stops GDB trashing PS register. 2004-11-24 19:37:48 +00:00
cagney e7973621f1 Fix pie test directory. 2004-11-23 21:31:56 +00:00
cagney 043030a1b9 Add gstack; backport fixes for i386 unwinding; add --readnever option. 2004-11-23 21:25:15 +00:00
Jeff Johnston 08dec1cdb5 Fix release number to be 56. 2004-11-23 01:19:44 +00:00
Jeff Johnston c78d1106cf - Bump up release number. 2004-11-23 01:16:52 +00:00
Jeff Johnston 13cc717605 - Multiple ia64 backtrace fixes. Bugzilla 125157 2004-11-22 23:42:47 +00:00
ezannoni 0a8ae59fe3 Bump version number 2004-11-11 22:57:20 +00:00
ezannoni 685d72404a Actually update version number 2004-11-11 22:52:34 +00:00
ezannoni 612764e2cd Fix problem with info files conflicting for different arches. 2004-11-11 22:46:03 +00:00
Jeff Johnston a2592e8611 - Bump up release number 2004-11-09 23:00:05 +00:00
Jeff Johnston 83e575af04 - Bump up release number 2004-11-09 22:57:43 +00:00
Jeff Johnston 19015dd87c - Expose $base, $allocate constructors and $delete, $base destructors for
breakpoints.
2004-11-09 22:52:57 +00:00
cagney 610a7a6892 Enable PPC CFI. 2004-11-09 14:51:46 +00:00
Jeff Johnston 9fa11b49c7 - Bump up release number 2004-11-08 16:38:55 +00:00
Jeff Johnston 8b1513dca6 - Bump up release number 2004-11-08 16:25:31 +00:00
Jeff Johnston e7202b70e7 - Allow macros to continue past a backtrace error 2004-11-05 22:53:28 +00:00
cagney 44f6132d3e Hopefully the last of the PPC fixes (or at least the really bad ones). 2004-10-27 04:31:14 +00:00
cagney 94a04ec3e1 PPC FPSCR and s390 general fixes. 2004-10-26 18:04:55 +00:00
cagney 7564bf320f Enable 64-bit .FN solib fix. Fix --ignore option being passed through to
runtest.
2004-10-22 19:17:12 +00:00
cagney ca25aa46d2 Add stuff to get around no dot symbols. 2004-10-20 15:15:31 +00:00
cagney d25ccdf76c Move pie stuff to gdb.pie directory. 2004-10-12 03:11:56 +00:00
cagney a007b5fc70 Fix for sigstep comment. 2004-10-11 19:25:43 +00:00
Jeff Johnston 25863f46c4 - Do not invalidate cached thread info when resuming threads.
- Bump up release number.
2004-10-07 18:53:18 +00:00
Jeff Johnston 8f3542a1fe - Fix S/390 watchpoint support to work better under threading. 2004-10-02 00:25:14 +00:00
Jeff Johnston 6540973d54 - Fix thread_db_get_lwp to handle 2nd format ptids. 2004-10-01 20:42:53 +00:00
cagney d3bc91a750 Enable stop backtrace past a zero pc. 2004-09-28 02:52:36 +00:00
Jeff Johnston b16c9237e6 - Add threaded watchpoint support for x86, x86-64, and ia64. 2004-09-27 23:09:09 +00:00
cagney 6d17aaa5cb Exclude bigcore.exp, don't delete it. 2004-09-27 17:45:18 +00:00
cagney dcaf10b4e1 Merge in mainline testsuite updates. Merge in mainline infrun.c fixes. 2004-09-24 13:57:06 +00:00
cagney 64459f3c78 Useful shell scripts. 2004-09-23 13:24:49 +00:00
cvsdist e17ef728e4 auto-import changelog data from gdb-6.1post-1.20040607.29.src.rpm
Thu Sep 02 2004 Jeff Johnston <jjohnstn@redhat.com> 1.200400607.29
- Fix low-level lin-lwp code to wait specifically for any stepping LWP
    (bugzilla 130896)
2004-09-09 05:27:57 +00:00
cvsdist 59a30cf831 auto-import changelog data from gdb-6.1post-1.20040607.28.src.rpm
Tue Aug 31 2004 Jeff Johnston <jjohnstn@redhat.com> 1.200400607.28
- Add test case for bugzilla 128618 fix.
2004-09-09 05:26:59 +00:00
cvsdist e6f875e668 auto-import gdb-6.1post-1.20040607.27 from
gdb-6.1post-1.20040607.27.src.rpm
2004-09-09 05:26:06 +00:00
cvsdist a497a2a721 auto-import gdb-6.1post-1.20040607.26 from
gdb-6.1post-1.20040607.26.src.rpm
2004-09-09 05:25:06 +00:00
cvsdist 70ec1eba8a auto-import gdb-6.1post-1.20040607.24 from
gdb-6.1post-1.20040607.24.src.rpm
2004-09-09 05:24:24 +00:00
cvsdist e488adf74e auto-import changelog data from gdb-6.1post-1.20040607.23.src.rpm
Mon Aug 30 2004 Elena Zannoni <ezannoni@redhat.com> 1.200400607.23
- Delete some part of gdb-6.1post-test-rh.patch, to avoid confusing gdb
    when testing itself, and loading separate debug info.
2004-09-09 05:23:40 +00:00
cvsdist 2bdd126bb9 auto-import changelog data from gdb-6.1post-1.20040607.22.src.rpm
Fri Aug 13 2004 Jeff Johnston <jjohnstn@redhat.com> 1.200400607.22
- Check in gdb mainline fix for applications calling clone directly.
2004-09-09 05:23:26 +00:00
cvsdist 6ca16471a0 auto-import changelog data from gdb-6.1post-1.20040607.21.src.rpm
Tue Aug 10 2004 Jeff Johnston <jjohnstn@redhat.com> 1.200400607.21
- Alter libunwind frame code to allow using libunwind 0.97 and up.
2004-09-09 05:23:00 +00:00
cvsdist 9d12a9bc44 auto-import gdb-6.1post-1.20040607.20 from
gdb-6.1post-1.20040607.20.src.rpm
2004-09-09 05:22:39 +00:00
cvsdist 6a3683b205 auto-import changelog data from gdb-6.1post-1.20040607.19.2.src.rpm
Tue Aug 03 2004 Jeff Johnston <jjohnstn@redhat.com> 1.200400607.20
- Fix the ia64 libunwind test to match current output.
2004-09-09 05:22:33 +00:00
cvsdist 8d2649bbc3 auto-import gdb-6.1post-1.20040607.19.1 from
gdb-6.1post-1.20040607.19.1.src.rpm
2004-09-09 05:21:53 +00:00
cvsdist 05f689b6b7 auto-import changelog data from gdb-6.1post-1.20040607.19.src.rpm
Fri Jul 30 2004 Elena Zannoni <ezannoni@redhat.com> 1.200400607.18.1
- Fix the tests where gdb debugs itself, as to not copy the executable to
    xgdb.
2004-09-09 05:21:35 +00:00
cvsdist 8afdde39e1 auto-import changelog data from gdb-6.1post-1.20040607.18.src.rpm
Mon Jul 26 2004 Elena Zannoni <ezannoni@redhat.com> 1.200400607.18
- Add Pie patches back in.
2004-09-09 05:21:00 +00:00
cvsdist da743c1bee auto-import changelog data from gdb-6.1post-1.20040607.17.1.src.rpm
Fri Jul 16 2004 Andrew Cagney <cagney@redhat.com> 1.200400607.17
- Fix stepping over a no-debug shared-library function.
- Fix patch vsyscall patch name.
Thu Jul 08 2004 Jeff Johnston <jjohnstn@redhat.com> 1.200400607.16
- Update thread code with fix from gdb HEAD
Wed Jul 07 2004 Andrew Cagney <cagney@redhat.com> 1.200400607.15
- disable vsyscall
- import Bob's crasher fix
- disable bigcore.exp
Mon Jul 05 2004 Andrew Cagney <cagney@redhat.com> 1.200400607.14
- Make large corefiles work on systems that require O_LARGEFILE.
Tue Jun 29 2004 Elena Zannoni <ezannoni@redhat.com> 1.200400607.13
- Fix BuildRequires for libunwind on ia64.
Mon Jun 28 2004 Andrew Cagney <cagney@redhat.com> 1.200400607.12
- Import wild frame ID patch. Stops GDB incorrectly matching invalid frame
    IDs.
- Disable bigcore on ia64 and amd64.
Fri Jun 25 2004 Andrew Cagney <cagney@redhat.com> 1.200400607.11
- Fix testsuite to kill attach process (from corrinna/mainline).
- Fix build problems with vsyscall patch.
Fri Jun 25 2004 Andrew Cagney <cagney@redhat.com> 1.200400607.10
- Fix annotate test messages.
- Recognize VSYSCALL pages.
Thu Jun 24 2004 Jeff Johnston <jjohnstn@redhat.com> 1.200400607.9
- Fix ia64 watchpoint support.
2004-09-09 05:20:30 +00:00
cvsdist 39e27b30f2 auto-import changelog data from gdb-6.1post-1.20040607.8.src.rpm
Wed Jun 23 2004 Andrew Cagney <cagney@redhat.com> 1.200400607.8
- Do not xfail signals on i387, convert KFAIL to FAIL and not XFAIL.
Wed Jun 23 2004 Andrew Cagney <cagney@redhat.com> 1.200400607.7
- Fix to ppc64 unwinder - handle glibcs function within syscall function
    hack.
- Update sigbpt.exp, ena-dis-br.exp observer.exp signull.exp, step-test.exp
    and sizeof.exp, so that test names are architecture clean.
- Disable bigcore.exp on PowerPC 64.
Tue Jun 22 2004 Andrew Cagney <cagney@redhat.com> 1.200400607.6
- Merge in mainline testsuite changes up to 2004-06-21.
- Re-implement 32 and 64-bit PPC signal trampolines.
- Check i386 and amd64 signal trampolines before dwarf2.
- Allow tramp-frame when there is a symbol.
- Test interaction between single-step, breakpoint and signal.
- ABI: Fix PPC64 function parameters, sizeof long-double, and enum return
    values.
Mon Jun 21 2004 Elena Zannoni <ezannoni@redhat.com> 1.200400607.5
- Fix sed line for gz info files.
Mon Jun 21 2004 Andrew Cagney <cagney@redhat.com> 1.200400607.4
- Tar/uuencode both the .sum and .log test results.
2004-09-09 05:18:30 +00:00
cvsdist 93462a8a7b auto-import gdb-6.1post-1.20040607.3.1 from
gdb-6.1post-1.20040607.3.1.src.rpm
2004-09-09 05:17:04 +00:00
cvsdist 7c97915b37 auto-import changelog data from gdb-6.1post-1.src.rpm
Tue Jun 15 2004 Elliot Lee <sopwith@redhat.com>
- rebuilt
2004-09-09 05:16:26 +00:00
cvsdist ea2c313488 auto-import gdb-6.1post-0.20040607.2.3 from
gdb-6.1post-0.20040607.2.3.src.rpm
2004-09-09 05:15:45 +00:00
cvsdist 39da6d9567 auto-import gdb-6.1post-0.20040607.2.2 from
gdb-6.1post-0.20040607.2.2.src.rpm
2004-09-09 05:15:31 +00:00
cvsdist 53dd1e9797 auto-import changelog data from gdb-6.1post-0.20040607.2.1.src.rpm
Fri Jun 11 2004 Andrew Cagney <cagney@redhat.com> 0.200400607.2.1
- Import latest testsuite changes. Fixes bogus KFAILs in structs.exp.
Thu Jun 10 2004 Elena Zannoni <ezannoni@redhat.com> 0.200400607.2
- Fix Requires and BuildRequires for libunwind dependencies.
- Add patch to silence gcc3.4 warnings.
Wed Jun 09 2004 Elena Zannoni <ezannoni@redhat.com> 0.200400607.1
- New import: revamp everything. Remove all patches for now.
- Update the Requires and BuildRequires sections.
- Removed stupid Ada testcases (there is no ada support in gdb yet).
Mon May 10 2004 Elena Zannoni <ezannoni@redhat.com> 0.20040223.20
- Disable PIE again.
- obsolete gdb64 only if on ppc64.
2004-09-09 05:15:21 +00:00
cvsdist a504e75de8 auto-import changelog data from gdb-6.0post-0.20040223.19.src.rpm
Mon May 03 2004 Jeff Johnston <jjohnstn@redhat.com> 0.20040223.19
- Add -u parameter to build ChangeLog patch.
Mon May 03 2004 Jeff Johnston <jjohnstn@redhat.com> 0.20040223.18
- Update thread fix made for .6 release to FSF version.
Thu Apr 22 2004 Elena Zannoni <ezannoni@redhat.com> 0.20040223.17
- Disable PIE again.
Thu Apr 22 2004 Jeff Johnston <jjohnstn@redhat.com> 0.20040223.16
- Bump version number.
Wed Apr 21 2004 Jeff Johnston <jjohnstn@redhat.com> 0.20040223.15
- fix ia64 info frame command
- also fix ia64 tdep file for which elf header file to include
Tue Mar 30 2004 Elena Zannoni <ezannoni@redhat.com> 0.20040223.14
- re-enable pie.
Tue Mar 30 2004 Elena Zannoni <ezannoni@redhat.com> 0.20040223.13
- Fix testsuite glitches.
Wed Mar 24 2004 Elena Zannoni <ezannoni@redhat.com> 0.20040223.12
- Fix typo.
Wed Mar 24 2004 Elena Zannoni <ezannoni@redhat.com> 0.20040223.11
- Make gdb compile w/o warnings with gcc-3.4.
- Reenable PIE support code.
Tue Mar 23 2004 Elena Zannoni <ezannoni@redhat.com> 0.20040223.10
- Bump version number
Tue Mar 23 2004 Elena Zannoni <ezannoni@redhat.com> 0.20040223.9
- temporarily disable PIE support.
- Add section to obsolete gdb64 package.
Sun Mar 21 2004 Elena Zannoni <ezannoni@redhat.com> 0.20040223.8
- Add support for debugging of PIE executables.
2004-09-09 05:13:56 +00:00
cvsdist 2473bd1660 auto-import changelog data from gdb-6.0post-0.20040223.7.src.rpm
Tue Mar 09 2004 Elena Zannoni <ezannoni@redhat.com> 0.20040223.7
- Bump version number.
Mon Mar 08 2004 Jeff Johnston <jjohnstn@redhat.com> 0.20040223.6
- Fix thread support to recognize new threads even when they reuse tids of
    expired threads. Also ensure that terminal is held by gdb while
    determining if a thread-create event has occurred.
Mon Mar 08 2004 Andrew Cagney <cagney@redhat.com> 0.20040223.5
- Sync with 6.1 branch; eliminate all amd64 patches; add more robust 32x64
    PPC64 patches.
Tue Mar 02 2004 Elliot Lee <sopwith@redhat.com>
- rebuilt
Tue Mar 02 2004 Andrew Cagney <cagney@redhat.com> 0.20040223.4
- 32x64 fixes that work with threads, replaced old non-thread 32x64 patch,
    add nat patch.
Wed Feb 25 2004 Elena Zannoni <ezannoni@redhat.com> 0.20040223.3
- Add patch for x86_64 in 32 bit mode.
Wed Feb 25 2004 Elena Zannoni <ezannoni@redhat.com> 0.20040223.2
- Remove ppc64 hacks.
- Refresh some patches.
Wed Feb 25 2004 Elena Zannoni <ezannoni@redhat.com> 0.20040223.1
- Import new gdb snapshot from mainline FSF.
- Update patch list.
Tue Feb 17 2004 Jeff Johnston <jjohnstn@redhat.com> 1.20031117.8
- Switch ia64-tdep.c to use new abi used by libunwind-0.95 and up.
- Fix gate area specification for ia64-linux-tdep.c.
- Fix long double support for ia64.
Fri Feb 13 2004 Elliot Lee <sopwith@redhat.com>
- rebuilt
2004-09-09 05:10:35 +00:00
cvsdist 95767172a4 auto-import changelog data from gdb-6.0post-0.20031117.7.src.rpm
Thu Jan 08 2004 Elena Zannoni <ezannoni@redhat.com> 0.20031117.7
- Add fixes for ppc32 support on ppc64 platform, from Andrew Cagney.
Tue Jan 06 2004 Elena Zannoni <ezannoni@redhat.com> 0.20031117.6
- Add patch to have unique binary names in the testsuite.
- Disable s390/s390x pthread.exp test (FIXME)
- Don't install any info files for the ppc platform. Let's take them from
    the ppc64 one (or we get install conflicts).
- Remove generated info files from the source tree. They are generated as
    part of the FSF snapshot process.
Mon Nov 24 2003 Elena Zannoni <ezannoni@redhat.com> 0.20031117.5
- Add patches from old rpm for i386 support on x86_64.
- Add build dependency on libunwind for ia64.
Fri Nov 21 2003 Jeremy Katz <katzj@redhat.com> 0.20031117.4
- more rpm tricks to get the gdb64 package happier
Thu Nov 20 2003 Elena Zannoni <ezannoni@redhat.com> 0.20031117.3
- Add sick and twisted workaround for ppc64 architecture.
Wed Nov 19 2003 Elena Zannoni <ezannoni@redhat.com> 0.20031117.2
- Fix typo in libunwind test.
Tue Nov 18 2003 Elena Zannoni <ezannoni@redhat.com> 0.20031117.1
- Import new gdb snapshot from mainline FSF.
- Fix some testfiles.
- Add fixes for gcore, and patch for libunwind support on ia64.
- Add tests to see what versions of gcc, binutils, glibc and kernel we are
    running with.
2004-09-09 05:09:07 +00:00
cvsdist 710c7cd1c9 auto-import changelog data from gdb-5.3.90-0.20030710.41.src.rpm
Wed Oct 15 2003 Elena Zannoni <ezannoni@redhat.com> 0.20030710.41
- Bump up version number.
Wed Sep 24 2003 Elena Zannoni <ezannoni@redhat.com> 0.20030710.40
- Fix problem with gcore and single threaded programs. (bugzilla 103531)
Mon Sep 22 2003 Jeff Johnston <jjohnstn@redhat.com> 0.20030710.39
- Fix call to quit_target from quit_force.
Sun Sep 21 2003 Andrew Cagney <cagney@redhat.com> 0.20030710.38
- Fix PPC64 push dummy call.
- Re-fix PPC64 return value (had wrong / old patch).
Sat Sep 20 2003 Andrew Cagney <cagney@redhat.com> 0.20030710.37
- Fix PPC32 return values.
Sat Sep 20 2003 Andrew Cagney <cagney@redhat.com> 0.20030710.36
- Rewrite ppc64 retun value methods so that they (hopefully) match the SysV
    spec.
- Enable ppc64 testsuite.
Thu Sep 18 2003 Andrew Cagney <cagney@redhat.com> 0.20030710.35
- Hack around problem "break main" vs "break .main" when there is only a
    minimal ppc64 symbol table. The former is a function descriptor and not
    where you want the breakpoint to go. Only convert descriptors to
    pointers when the address is in the ".opd" section.
Wed Sep 17 2003 Andrew Cagney <cagney@redhat.com> 0.20030710.34
- Fix ppc32 push_dummy_call.
Tue Sep 16 2003 Andrew Cagney <cagney@redhat.com> 0.20030710.33
- Pack gdb.sum and gdb.log using uuencode and bzip.
Tue Sep 16 2003 Jeff Johnston <jjohnstn@redhat.com> 0.20030710.32
- Catch errors when quitting so exit of gdb still occurs.
Mon Sep 15 2003 Andrew Cagney <cagney@redhat.com> 0.20030710.31
- Fix ppc32 use_struct_convention.
Thu Sep 11 2003 Andrew Cagney <cagney@redhat.com> 0.20030710.30
- Mods to dwarf2-frame.c to work around a lack of GCC/CFI info.
Thu Sep 11 2003 Elena Zannoni <ezannoni@redhat.com> 0.20030710.29
- Bump up version number.
Wed Sep 10 2003 Elena Zannoni <ezannoni@redhat.com> 0.20030710.28
- Fix a core dump with MI.
- Add new ChangeLog patch for mi changes.
Thu Sep 04 2003 Elena Zannoni <ezannoni@redhat.com> 0.20030710.27
- Change the name of the package to gdb64 in ppc64 case.
Tue Aug 26 2003 Elena Zannoni <ezannoni@redhat.com> 0.20030710.26
- Add testcase for separate debug info.
Tue Aug 26 2003 Andrew Cagney <cagney@redhat.com> 0.20030710.25
- fix i386 on x86-64 TLS
- add "base-aug2003" suffix to older x86i386 patch
Tue Aug 26 2003 Andrew Cagney <cagney@redhat.com> 0.20030710.24
- skip the ppc64 and x86-64 frame redzone.
Fri Aug 22 2003 Elena Zannoni <ezannoni@redhat.com> 0.20030710.23
- Relax one testcase in selftest.exp a bit.
- Accept different output as well in thread bt (platform dependent).
- Enable testsuite run for ia64, ppc, s390 and s390x. They are in
    reasonably good shape.
Thu Aug 21 2003 Jeff Johnston <jjohnstn@redhat.com> 0.20030710.22
- Multiple ia64 fixes.
- Fix ia64 printing of function pointers.
- Fix ia64 prologue examination to ignore predicated insns if we haven't
    found the return address yet.
- Skip dump.exp testcase for ia64
Thu Aug 21 2003 Elena Zannoni <ezannoni@redhat.com> 0.20030710.21
- Bump release number.
Wed Aug 20 2003 Elena Zannoni <ezannoni@redhat.com> 0.20030710.20
- Relax pattern in annota2.exp test.
Wed Aug 20 2003 Elena Zannoni <ezannoni@redhat.com> 0.20030710.19
- rename gdb binary to gdb64 for ppc64 platform.
Tue Aug 19 2003 Jeff Johnston <jjohnstn@redhat.com> 0.20030710.18
- Fix ia64 pc unwinding to include psr slot.
Mon Aug 18 2003 Elena Zannoni <ezannoni@redhat.com> 0.20030710.17
- Fix info installation for annotate.texi. (Bugzilla 102521)
Fri Aug 15 2003 Elena Zannoni <ezannoni@redhat.com> 0.20030710.16
- revamp tls tests a bit.
- Handle new output from gdb in relocate.exp
Wed Aug 13 2003 Elena Zannoni <ezannoni@redhat.com> 0.20030710.15
- Fix problem for processing of separate debug info files.
Wed Aug 13 2003 Jeff Johnston <jjohnstn@redhat.com> 0.20030710.14
- add ia64.inc file for testing ia64 in gdb.asm testsuite
Fri Aug 08 2003 Andrew Cagney <cagney@redhat.com> 0.20030710.13
- print the libthread_db library path, print when threads are enabled
Thu Aug 07 2003 Andrew Cagney <cagney@redhat.com> 0.20030710.12
- "cat" the test log into the build log
Wed Aug 06 2003 Jeff Johnston <jjohnstn@redhat.com> 0.20030710.11
- modernize ia64 gdb to use new frame model
- remove/replace deprecated interfaces used by ia64 gdb
Wed Aug 06 2003 Andrew Cagney <cagney@redhat.com> 0.20030710.10
- Sync to gdb-5.3.90-sync-20030806.patch.
Tue Jul 29 2003 Andrew Cagney <cagney@redhat.com> 0.20030710.9
- add x86-64 i386 fixes
Tue Jul 29 2003 Elena Zannoni <ezannoni@redhat.com> 0.20030710.8
- Fix some tests by xfailing the correct target triplet for RedHat.
- Remove include of config.h from pthreads.c testcases.
Mon Jul 28 2003 Elena Zannoni <ezannoni@redhat.com> 0.20030710.7
- Fix some test failures, by escaping correctly.
Thu Jul 24 2003 Elena Zannoni <ezannoni@redhat.com> 0.20030710.6
- Remove one testcase that is redundant.
Wed Jul 23 2003 Elena Zannoni <ezannoni@redhat.com> 0.20030710.5
- Bump up release number.
Wed Jul 23 2003 Elena Zannoni <ezannoni@redhat.com> 0.20030710.4
- Bring in sync with current head of gdb-6 branch.
- Remove linespec patch, because included in the new sync patch.
Fri Jul 18 2003 Elena Zannoni <ezannoni@redhat.com> 0.20030710.3
- Add patch to avoid gdb segfault with bad debug info.
- Change location of build tree to avoid conflicts with older versions
    possibly installed.
Thu Jul 17 2003 Elena Zannoni <ezannoni@redhat.com> 0.20030710.2
- Add patch to synchronize the current snapshot with the gdb-6 branch head.
- Remove some patches that are includd in such diff.
- Enable tests on AMD64 as well.
Fri Jul 11 2003 Elena Zannoni <ezannoni@redhat.com> 0.20030710.1
- Import new gdb snapshot.
- Revamp gdb.spec. Get rid of patches that apply to older versions.
- Add patches for ppc64 support, kfail and make gdb more robust in copingi
    with bad debug info.
Wed Jul 02 2003 Jeff Johnston <jjohnstn@redhat.com> 1.20021129.39
- Fix bug with ia64 checking of hardware breakpoints.
Mon Jun 30 2003 Elena Zannoni <ezannoni@redhat.com> 1.20021129.38
- Add necessary function for NPTL support on x86-64.
Wed Jun 04 2003 Elliot Lee <sopwith@redhat.com>
- rebuilt
Wed Jun 04 2003 Elena Zannoni <ezannoni@redhat.com> 0.20021129.37
Tue Jun 03 2003 Elena Zannoni <ezannoni@redhat.com> 0.20021129.36
- Enable warnings for x86_64, not x86-64.
- Fix warnings from infptrace.c and dwarfread.c.
- Print error message only when reading separate debug info really doesn't
    work (jimb@redhat.com).
Fri May 23 2003 Elena Zannoni <ezannoni@redhat.com> 0.20021129.35
- Fixes for fetching and storing access registers on s390x
    (jimb@redhat.com). Bugzilla 91455.
Wed May 21 2003 Jeff Johnston <jjohnstn@redhat.com> 0.20021129.34
- Do not generate error on detach failure. Bugzilla 90900.
Thu May 08 2003 Elena Zannoni <ezannoni@redhat.com> 0.20021129.33
- New tests for asm on s390x (jimb@redhat.com). Bugzilla 90503.
- Fixes for prologue analysis on s390x (jimb@redhat.com). Bugzilla 90506.
- bfd fix for 64-bit platforms (jimb@redhat.com).
- Disable ppc64 builds until we have a port.
Thu May 01 2003 Jeff Johnston <jjohnstn@redhat.com> 0.20021129.32
- Add ia64 support to the float.exp testcase.
Thu May 01 2003 Elena Zannoni <ezannoni@redhat.com> 0.20021129.31
- Clean up the tls tests some more.
- Fix problem with non US-eng locale. Bugzilla bug 88823.
Wed Apr 30 2003 Jeff Johnston <jjohnstn@redhat.com> 0.20021129.30
- Fix ia64 prologue skipping.
- Fix ia64 line table.
- Fix setting of prev_pc in infrun.c.
2004-09-09 05:07:35 +00:00
cvsdist 0ecfa67243 auto-import changelog data from gdb-5.3post-0.20021129.29.src.rpm
Mon Mar 31 2003 Elena Zannoni <ezannoni@redhat.com> 0.20021129.29
- Include the gcore script, as gdb_gcore.sh and install it in /usr/bin as
    gcore.
- One more disassembly fix for core files. Added to
    gdb-5.3post-disasm-mar2003.patch. Bugzilla 87677.
- Enable build warnings for x86-64.
Mon Mar 31 2003 Elena Zannoni <ezannoni@redhat.com> 0.20021129.28
- Fix Java strings printing.
- Fix memory corruption in disassembly code. Bugzilla 85644.
- Testsuite fixes (jimb@redhat.com). Bugzilla 85457.
- Fixes for s390 stack handling (jimb@redhat.com). Bugzilla 85039.
- Fixes for s390 struct return (jimb@redhat.com).
Wed Mar 26 2003 Elena Zannoni <ezannoni@redhat.com> 0.20021129.27
- Fixes for disassembly of code in threaded applications. Bugzilla 87495.
- Fixes for s390 prologue analysis. (jimb@redhat.com). Bugzilla bugs 85251,
    85214.
Thu Mar 20 2003 Elena Zannoni <ezannoni@redhat.com> 0.20021129.26
- Fix inferior function calls with void return on x86-64. Bugzilla bug
    83197.
- Fix for upstream PR/699.
- Fix some problems with gdb-5.3post-thrtst-feb2003.patch.
Wed Mar 19 2003 Jeff Johnston <jjohnstn@redhat.com> 0.20021129.25
- Fix for thread-db.c: check_event() - Bugzilla bug 86231.
Fri Mar 14 2003 Elena Zannoni <ezannoni@redhat.com> 0.20021129.24
- Fix some problems with inferior function calls on x86-64.
Fri Mar 07 2003 Elena Zannoni <ezannoni@redhat.com> 0.20021129.23
- testsuite patches. Bugzilla 85215 85028 85335.
Thu Mar 06 2003 Elena Zannoni <ezannoni@redhat.com> 0.20021129.22
- Fix testsuite problems related to having '+' in the directory name.
    Bugzilla 85031.
Mon Mar 03 2003 Elena Zannoni <ezannoni@redhat.com> 0.20021129.21
- Fix a few inferior function call problems.
Mon Mar 03 2003 Elena Zannoni <ezannoni@redhat.com> 0.20021129.20
- Split the changelog patches in two. Cleanup messy patch section.
Thu Feb 27 2003 Jeff Johnston <jjohnstn@redhat.com> 0.20021129.19
- Perform run-time check for tkill syscall in lin-lwp.c.
2004-09-09 05:05:49 +00:00
cvsdist 57e65f76e3 auto-import changelog data from gdb-5.3post-0.20021129.18.src.rpm
Mon Feb 24 2003 Elena Zannoni <ezannoni@redhat.com> 0.20021129.18
- Update copyright year printed in version.
Mon Feb 24 2003 Elena Zannoni <ezannoni@redhat.com> 0.20021129.17
- Refresh build.
Mon Feb 24 2003 Elena Zannoni <ezannoni@redhat.com> 0.20021129.16
- Add some testsuite cleanups, to avoid spurious test failures.
Fri Feb 21 2003 Jeff Johnston <jjohnstn@redhat.com> 0.20021129.15
- Add patch to handle thread exiting when LD_ASSUME_KERNEL=2.4.1 which
    fixes Bugzilla bug 84217.
Fri Feb 21 2003 Elena Zannoni <ezannoni@redhat.com> 0.20021129.14
- New patch to fix disassembly on s390. Bugzilla bug 84286.
- New patch for attach/ptrace fix. Bugzilla bug 84220.
- Reenable tests for x86.
Thu Feb 20 2003 Jeff Johnston <jjohnstn@redhat.com> 0.20021129.13
- Add patch for mixed stabs with dwarf2 - bugzilla bug 84253.
Wed Feb 12 2003 Elena Zannoni <ezannoni@redhat.com> 0.20021129.12
- Disable tests also for x86.
Tue Feb 11 2003 Elena Zannoni <ezannoni@redhat.com> 0.20021129.11
- Add patch for mi threads tests.
- Add patch for dwarf2 debug_ranges section.
- Add patch for detach bug.
Mon Feb 10 2003 Elena Zannoni <ezannoni@redhat.com> 0.20021129.10
- Add patch for testsuite auto answering internal error queries.
- Add new TLS tests.
- Add cleanup patches for thread tests.
Mon Feb 03 2003 Elena Zannoni <ezannoni@redhat.com> 0.20021129.9
- Add new patch for thread support. Apply on all arches.
- Do not apply old patches, but leave them around for now.
- Add new patch for dwarf2 debug info reading.
- Add new patch for dwarf2 cfi engine cleanup.
- Add new patch for uiout problems.
- Add new patch for s390 build.
- Disable tests on all platforms but x86.
Mon Jan 27 2003 Elena Zannoni <ezannoni@redhat.com> 0.20021129.8
- Move all the changelog entries to a single patch.
- Add tests to the args patch.
- Add new patch for until command fix (bugzilla Bug 19890).
- s390 and s390x can be built with -Werror.
- Run make check for s390 and s390x too.
- Include an updated version of the thread nptl patch (still WIP).
Wed Jan 15 2003 Phil Knirsch <pknirsch@redhat.com> 0.20021129.7
- Apply the 2nd misc patch for s390 and s390x, too.
Tue Jan 14 2003 Elena Zannoni <ezannoni@redhat.com> 0.20021129.6
- Add patches for NPTL support, to be applied on i386 only. (this is still
    WIP)
- Split old misc patch in two parts.
- Temporarily disable testsuite run on alpha.
Sun Jan 12 2003 Elena Zannoni <ezannoni@redhat.com> 0.20021129.5
- Add patch for --args with zero-length arguments. Fix for bug 79833.
Tue Dec 17 2002 Elliot Lee <sopwith@redhat.com> 0.20021129.4
- The define directive to rpm is significant even if the line it is in
    happens to start with a '#' character. Fixed.
Fri Dec 13 2002 Elena Zannoni <ezannoni@redhat.com> 0.20021129.3
- Merge previous patches for warnings into a single one.
- Add changelogs to patches.
- Add, but don't use, a macro to avoid stripping.
Fri Dec 06 2002 Elena Zannoni <ezannoni@redhat.com>
- Add patch to allow debugging of executables with debug info stored in
    separate files.
- Add patch for Makefile dependencies and disable warnings for building
    thread-db.c.
- Re-enable building with -Werror for alpha, ia64, ppc.
2004-09-09 05:05:09 +00:00
cvsdist 6f603ff253 auto-import changelog data from gdb-5.3post-0.20021129.2.src.rpm
Mon Dec 02 2002 Elena Zannoni <ezannoni@redhat.com>
- Don't pass to gdb an empty build warnings flag, or that will disable
    warnings completely. We want to build using gdb's standard warnings
    instead.
Mon Dec 02 2002 Elena Zannoni <ezannoni@redhat.com>
- Don't do testing for x86_64.
Sun Dec 01 2002 Elena Zannoni <ezannoni@redhat.com>
- x86_64 doesn't build with Werror yet.
- Add patch for alpha.
- Alpha doesn't build with -Werror either.
- Add patch for ia64.
- Add patch for ppc.
- Drop ia64 from -Werror list.
- Drop ppc from -Werror list.
Sun Dec 01 2002 Elena Zannoni <ezannoni@redhat.com>
- Add dejagnu to the build requirements.
- Enable make check.
- Add enable-gdb-build-warnings to the configure flags.
Fri Nov 29 2002 Elena Zannoni <ezannoni@redhat.com>
- Import new upstream sources.
- Change version and release strings.
- Upgrade patches.
- Build gdb/gdbserver as well.
- Define and use 'cvsdate'.
- Do %setup specifying the source directory name.
- Don't cd up one dir before removing tcl and friends.
- Change the configure command to allow for the new source tree name.
- Ditto for the copy of NEWS.
- Add some comments.
Mon Nov 25 2002 Elena Zannoni <ezannoni@redhat.com> 5.2.1-5 General revamp.
- Add patch for gdb/doc/Makefile.in. Part of fix for bug 77615.
- Add patch for mmalloc/Makefile.in. Part of fix for bug 77615.
- Change string printed in version.in to <version>-<release>rh.
- Move the deletion of dejagnu, expect, tcl to the prep section, from the
    build section.
- Add build directory housekeeping to build section.
- Use macros for configure parameters.
- Do the build in a separate directory.
- Prepare for testing, but not enable it yet.
- Correctly copy the NEWS file to the top level directory, for the doc
    section to find it.
- Cd to build directory before doing install.
- Use makeinstall macro, w/o options.
- Remove workaround for broken gdb info files. Part of fix for bug 77615.
- Remove share/locale directory, it is in binutils.
- Remove info/dir file.
- Clarify meaning of post-install section.
- Add gdbint info files to post-install, pre-uninstall and files sections.
    Part of fix for bugs 77615, 76423.
- Add libmmalloc.a to package.
2004-09-09 05:04:56 +00:00
cvsdist e97b8b5f02 auto-import changelog data from gdb-5.2.1-4.src.rpm
Fri Aug 23 2002 Florian La Roche <Florian.LaRoche@redhat.de>
- added mainframe patch from developerworks
2004-09-09 05:04:44 +00:00
cvsdist 61a435bd31 auto-import changelog data from gdb-5.2.1-3.src.rpm
Wed Aug 21 2002 Trond Eivind Glomsrd <teg@redhat.com> 5.2.1-3
- Add changelogs to the previous patch
2004-09-09 05:04:38 +00:00
cvsdist 8f71764d83 auto-import changelog data from gdb-5.2.1-2.src.rpm
Wed Aug 14 2002 Trond Eivind Glomsrd <teg@redhat.com> 5.2.1-2
- Add some patches from Elena Zannoni <ezannoni@redhat.com>
2004-09-09 05:04:16 +00:00
cvsdist 551df9bffe auto-import changelog data from gdb-5.2.1-1.src.rpm
Tue Jul 23 2002 Trond Eivind Glomsrd <teg@redhat.com> 5.2.1-1
- 5.2.1
Mon Jul 22 2002 Florian La Roche <Florian.LaRoche@redhat.de>
- compile on mainframe
Mon Jul 08 2002 Trond Eivind Glomsrd <teg@redhat.com> 5.2-3
- Rebuild
2004-09-09 05:04:11 +00:00
cvsdist 699211b6c1 auto-import gdb-5.2-2a from gdb-5.2-2a.src.rpm 2004-09-09 05:04:01 +00:00
cvsdist d171b67033 auto-import changelog data from gdb-5.2-2.src.rpm
Tue May 07 2002 Trond Eivind Glomsrd <teg@redhat.com> 5.2-2
- Rebuild
Mon Apr 29 2002 Trond Eivind Glomsrd <teg@redhat.com> 5.2-1
- 5.2
Mon Apr 29 2002 Trond Eivind Glomsrd <teg@redhat.com> 5.1.92-1
- 5.1.92. Hopefully identical to 5.2 final
Mon Apr 22 2002 Trond Eivind Glomsrd <teg@redhat.com> 5.1.91-1
- 5.1.91. 5.2 expected in a week
2004-09-09 05:03:49 +00:00
cvsdist b15a9944ab auto-import gdb-5.1.90CVS-5 from gdb-5.1.90CVS-5.src.rpm 2004-09-09 05:02:56 +00:00
cvsdist 0f34a3f16f auto-import gdb-5.1.90CVS-4 from gdb-5.1.90CVS-4.src.rpm 2004-09-09 05:02:49 +00:00
cvsdist 3725ffd4d7 auto-import gdb-5.1.1-0.1 from gdb-5.1.1-0.1.src.rpm 2004-09-09 05:02:31 +00:00
cvsdist b798c987d6 auto-import changelog data from gdb-5.1-0.71.0ppc.src.rpm
Wed Apr 03 2002 Guy Streeter <streeter@redhat.com> 5.1-0.71.0ppc
- slight change in kernel headers for the 64bit ppc kernel
Tue Nov 27 2001 Trond Eivind Glomsrd <teg@redhat.com> 5.1-0.71
- 5.1
2004-09-09 05:02:04 +00:00
cvsdist 04f7bcfba7 auto-import changelog data from gdb-5.1-0.71.src.rpm
Mon Nov 26 2001 Trond Eivind Glomsrd <teg@redhat.com> 5.1-0.71
- 5.1
Mon Nov 19 2001 Trond Eivind Glomsrd <teg@redhat.com> 5.0.94-0.71
- 5.0.94. Almost there....
Mon Nov 12 2001 Trond Eivind Glomsrd <teg@redhat.com> 5.0.93-2
- Add patch from jakub@redhat.com to improve handling of DWARF
Mon Nov 12 2001 Trond Eivind Glomsrd <teg@redhat.com> 5.0.93-1
- 5.0.93
- handle missing info pages in post/pre scripts
Wed Oct 31 2001 Trond Eivind Glomsrd <teg@redhat.com> 5.0.92-1
- 5.0.92
Fri Oct 26 2001 Trond Eivind Glomsrd <teg@redhat.com> 5.0.91rh-1
- New snapshot
- Use the 5.0.91 versioning from the snapshot
2004-09-09 05:01:59 +00:00
cvsdist d40fc7c0ef auto-import gdb-5.0rh-9 from gdb-5.0rh-9.src.rpm 2004-09-09 05:01:23 +00:00
cvsdist 2574af90e5 auto-import gdb-5.0rh-5 from gdb-5.0rh-5.src.rpm 2004-09-09 05:01:20 +00:00
131 changed files with 36309 additions and 90 deletions

View File

@ -1 +0,0 @@
gdb-5.0.tar.bz2

4
.gitignore vendored Normal file
View File

@ -0,0 +1,4 @@
/binutils-gdb
/gdb-libstdc++-v3-python-8.1.1-20180626.tar.xz
/v2.0.2.tar.gz
/gdb-10.1.tar.xz

View File

@ -1,6 +0,0 @@
# Makefile for source rpm: gdb
# $Id$
NAME := gdb
SPECFILE = $(firstword $(wildcard *.spec))
include ../common/Makefile.common

104
README.local-patches.md Normal file
View File

@ -0,0 +1,104 @@
# 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`

384
_gdb.spec.Patch.include Normal file
View File

@ -0,0 +1,384 @@
# 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

94
_gdb.spec.patch.include Normal file
View File

@ -0,0 +1,94 @@
%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
_git_upstream_commit Normal file
View File

@ -0,0 +1 @@
606e3fd147ed9a00df165e46f30fe5c46dcda345

97
_patch_order Normal file
View File

@ -0,0 +1,97 @@
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

View File

@ -0,0 +1,115 @@
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.3-attach-see-vdso-test.patch
;; 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 @@
+/* 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. */
+
+#include <unistd.h>
+
+int main ()
+{
+ pause ();
+ return 1;
+}
diff --git a/gdb/testsuite/gdb.base/attach-see-vdso.exp b/gdb/testsuite/gdb.base/attach-see-vdso.exp
new file mode 100644
--- /dev/null
+++ b/gdb/testsuite/gdb.base/attach-see-vdso.exp
@@ -0,0 +1,72 @@
+# Copyright 2007
+
+# 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.
+
+# This file was created by Jan Kratochvil <jan.kratochvil@redhat.com>.
+
+# This test only works on Linux
+if { ![istarget "*-*-linux-gnu*"] } {
+ return 0
+}
+
+set testfile "attach-see-vdso"
+set srcfile ${testfile}.c
+set binfile [standard_output_file ${testfile}]
+set escapedbinfile [string_to_regexp [standard_output_file ${testfile}]]
+
+# The kernel VDSO is used for the syscalls returns only on i386 (not x86_64).
+#
+if { [gdb_compile "${srcdir}/${subdir}/${srcfile}" "${binfile}" executable {debug additional_flags=-m32}] != "" } {
+ gdb_suppress_entire_file "Testcase nonthraded compile failed, so all tests in this file will automatically fail."
+}
+
+if [get_compiler_info ${binfile}] {
+ return -1
+}
+
+# Start the program running and then wait for a bit, to be sure
+# that it can be attached to.
+
+set testpid [eval exec $binfile &]
+
+# Avoid some race:
+sleep 2
+
+# Start with clean gdb
+gdb_exit
+gdb_start
+gdb_reinitialize_dir $srcdir/$subdir
+# Never call: gdb_load ${binfile}
+# as the former problem would not reproduce otherwise.
+
+set test "attach"
+gdb_test_multiple "attach $testpid" "$test" {
+ -re "Attaching to process $testpid\r?\n.*$gdb_prompt $" {
+ pass "$test"
+ }
+}
+
+gdb_test "bt" "#0 *0x\[0-9a-f\]* in \[^?\].*" "backtrace decodes VDSO"
+
+# Exit and detach the process.
+
+gdb_exit
+
+# Make sure we don't leave a process around to confuse
+# the next test run (and prevent the compile by keeping
+# the text file busy), in case the "set should_exit" didn't
+# work.
+
+remote_exec build "kill -9 ${testpid}"

View File

@ -0,0 +1,320 @@
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.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 @@
+/* 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. */
+
+ .section ".text"
+ .align 2
+ .globl func0
+ .type func0, @function
+func0:
+ stwu 1,-16(1)
+ mflr 0
+ stw 31,12(1)
+ stw 0,20(1)
+ mr 31,1
+ bl abort
+ .size func0, .-func0
+ .align 2
+ .globl func1
+ .type func1, @function
+func1:
+ stwu 1,-16(1)
+ mflr 0
+/* 20 = BO = branch always
+ 31 = BI = CR bit (ignored) */
+ bcl 20,31,.Lpie
+.Lpie: stw 31,12(1)
+ stw 0,20(1)
+ mr 31,1
+ bl func0
+ mr 0,3
+ lis 9,var@ha
+ lwz 9,var@l(9)
+ add 0,0,9
+ mr 3,0
+ lwz 11,0(1)
+ lwz 0,4(11)
+ mtlr 0
+ lwz 31,-4(11)
+ mr 1,11
+ blr
+ .size func1, .-func1
+ .section .note.GNU-stack,"",@progbits
+ .ident "GCC: (GNU) 3.4.6 20060404 (Red Hat 3.4.6-8)"
+
+/* Original source file:
+
+#include <stdlib.h>
+
+extern volatile int var;
+
+int func0 (void) __attribute__((__noinline__));
+int func0 (void)
+{
+ abort ();
+ return var;
+}
+
+int func1 (void) __attribute__((__noinline__));
+int func1 (void)
+{
+ return func0 () + var;
+}
+
+*/
diff --git a/gdb/testsuite/gdb.arch/powerpc-bcl-prologue-asm64.S b/gdb/testsuite/gdb.arch/powerpc-bcl-prologue-asm64.S
new file mode 100644
--- /dev/null
+++ b/gdb/testsuite/gdb.arch/powerpc-bcl-prologue-asm64.S
@@ -0,0 +1,98 @@
+/* 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. */
+
+ .section ".toc","aw"
+ .section ".text"
+ .align 2
+ .globl func0
+ .section ".opd","aw"
+ .align 3
+func0:
+ .quad .L.func0,.TOC.@tocbase
+ .previous
+ .type func0, @function
+.L.func0:
+ mflr 0
+ std 31,-8(1)
+ std 0,16(1)
+ stdu 1,-128(1)
+ mr 31,1
+ bl abort
+ nop
+ .long 0
+ .byte 0,0,0,1,128,1,0,1
+ .size func0,.-.L.func0
+ .section ".toc","aw"
+.LC1:
+ .tc var[TC],var
+ .section ".text"
+ .align 2
+ .globl func1
+ .section ".opd","aw"
+ .align 3
+func1:
+ .quad .L.func1,.TOC.@tocbase
+ .previous
+ .type func1, @function
+.L.func1:
+ mflr 0
+/* 20 = BO = branch always
+ 31 = BI = CR bit (ignored) */
+ bcl 20,31,.Lpie
+.Lpie: std 31,-8(1)
+ std 0,16(1)
+ stdu 1,-128(1)
+ mr 31,1
+ bl func0
+ mr 11,3
+ ld 9,.LC1@toc(2)
+ lwz 0,0(9)
+ add 0,11,0
+ extsw 0,0
+ mr 3,0
+ ld 1,0(1)
+ ld 0,16(1)
+ mtlr 0
+ ld 31,-8(1)
+ blr
+ .long 0
+ .byte 0,0,0,1,128,1,0,1
+ .size func1,.-.L.func1
+ .section .note.GNU-stack,"",@progbits
+ .ident "GCC: (GNU) 3.4.6 20060404 (Red Hat 3.4.6-8)"
+
+/* Original source file:
+
+#include <stdlib.h>
+
+extern volatile int var;
+
+int func0 (void) __attribute__((__noinline__));
+int func0 (void)
+{
+ abort ();
+ return var;
+}
+
+int func1 (void) __attribute__((__noinline__));
+int func1 (void)
+{
+ return func0 () + var;
+}
+
+*/
diff --git a/gdb/testsuite/gdb.arch/powerpc-bcl-prologue.c b/gdb/testsuite/gdb.arch/powerpc-bcl-prologue.c
new file mode 100644
--- /dev/null
+++ b/gdb/testsuite/gdb.arch/powerpc-bcl-prologue.c
@@ -0,0 +1,29 @@
+/* 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. */
+
+/* Force `-fpie' double jump bl->blrl. */
+/* No longer used. */
+volatile int var;
+
+extern int func1 (void);
+
+int main (void)
+{
+ func1 ();
+ return 0;
+}
diff --git a/gdb/testsuite/gdb.arch/powerpc-bcl-prologue.exp b/gdb/testsuite/gdb.arch/powerpc-bcl-prologue.exp
new file mode 100644
--- /dev/null
+++ b/gdb/testsuite/gdb.arch/powerpc-bcl-prologue.exp
@@ -0,0 +1,72 @@
+# Copyright 2006, 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.
+
+# Test unwinding fixes of the PPC platform, specifically on the coping with BCL
+# jump of the PIE code.
+
+if ![istarget "powerpc*-*-linux*"] then {
+ verbose "Skipping powerpc-linux prologue tests."
+ return
+}
+
+set testfile "powerpc-bcl-prologue"
+set srcfile1 ${testfile}.c
+set flags "debug"
+if [istarget "powerpc-*"] then {
+ set srcfile2 ${testfile}-asm32.S
+ set flags "$flags additional_flags=-m32"
+} elseif [istarget "powerpc64-*"] then {
+ set srcfile2 ${testfile}-asm64.S
+ set flags "$flags additional_flags=-m64"
+} else {
+ fail "powerpc arch test"
+ return
+}
+set objfile2 [standard_output_file ${testfile}-asm.o]
+set binfile [standard_output_file ${testfile}]
+
+if { [gdb_compile "${srcdir}/${subdir}/${srcfile1} ${srcdir}/${subdir}/${srcfile2}" ${binfile} executable $flags] != ""} {
+ return -1
+}
+
+gdb_exit
+gdb_start
+gdb_reinitialize_dir $srcdir/$subdir
+gdb_load ${binfile}
+
+# We should stop in abort(3).
+
+gdb_run_cmd
+
+gdb_test_multiple {} "continue to abort()" {
+ -re ".*Program received signal SIGABRT,.*$gdb_prompt $" {
+ pass "continue to abort()"
+ }
+}
+
+# Check backtrace:
+# #3 0x0804835f in func0 ()
+# #4 0x0804836a in func1 ()
+# #5 0x0804838c in main ()
+# (gdb)
+# `\\.?' prefixes are needed for ppc64 without `debug' (another bug).
+
+set test "matching unwind"
+gdb_test_multiple "backtrace" $test {
+ -re "\r\n#\[0-9\]\[^\r\n\]* in \\.?func0 \\(\[^\r\n\]*\r\n#\[0-9\]\[^\r\n\]* in \\.?func1 \\(\[^\r\n\]*\r\n#\[0-9\]\[^\r\n\]* in \\.?main \\(\[^\r\n\]*\r\n$gdb_prompt $" {
+ 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
+++ b/gdb/testsuite/gdb.arch/powerpc-prologue.exp
@@ -16,8 +16,9 @@
# Test PowerPC prologue analyzer.
# Do not run on AIX (where we won't be able to build the tests without
-# some surgery) or on PowerPC64 (ditto, dot symbols).
-if {[istarget *-*-aix*] || ![istarget "powerpc-*-*"]} then {
+# some surgery). PowerPC64 target would break due to dot symbols but we build
+# there PowerPC32 inferior.
+if {[istarget *-*-aix*] || ![istarget "powerpc*-*-*"]} then {
verbose "Skipping PowerPC prologue tests."
return
}

View File

@ -0,0 +1,109 @@
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>
* 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
--- /dev/null
+++ b/gdb/testsuite/gdb.threads/threaded-exec.c
@@ -0,0 +1,46 @@
+/* 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. */
+
+#include <stddef.h>
+#include <pthread.h>
+#include <assert.h>
+#include <stdlib.h>
+#include <unistd.h>
+
+
+static void *
+threader (void *arg)
+{
+ return NULL;
+}
+
+int
+main (void)
+{
+ pthread_t t1;
+ int i;
+
+ i = pthread_create (&t1, NULL, threader, (void *) NULL);
+ assert (i == 0);
+ i = pthread_join (t1, NULL);
+ assert (i == 0);
+
+ execl ("/bin/true", "/bin/true", NULL);
+ abort ();
+}
diff --git a/gdb/testsuite/gdb.threads/threaded-exec.exp b/gdb/testsuite/gdb.threads/threaded-exec.exp
new file mode 100644
--- /dev/null
+++ b/gdb/testsuite/gdb.threads/threaded-exec.exp
@@ -0,0 +1,41 @@
+# threaded-exec.exp -- Check reset of the tracked threads on exec*(2)
+# Copyright (C) 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
+
+set testfile threaded-exec
+set srcfile ${testfile}.c
+set binfile [standard_output_file ${testfile}]
+
+if {[gdb_compile_pthreads "${srcdir}/${subdir}/${srcfile}" "${binfile}" executable []] != "" } {
+ return -1
+}
+
+gdb_exit
+gdb_start
+gdb_reinitialize_dir $srcdir/$subdir
+
+gdb_load ${binfile}
+
+gdb_run_cmd
+
+gdb_test_multiple {} "Program exited" {
+ -re "\r\n\\\[Inferior .* exited normally\\\]\r\n$gdb_prompt $" {
+ pass "Program exited"
+ }
+}

View File

@ -0,0 +1,53 @@
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.3-focus-cmd-prev-test.patch
;; 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 @@
+# 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.
+
+if $tracelevel then {
+ strace $tracelevel
+}
+
+gdb_exit
+gdb_start
+
+# Do not use gdb_test or \r\n there since:
+# commit d7e747318f4d04af033f16325f9b6d74f67079ec
+# Eliminate make_cleanup_ui_file_delete / make ui_file a class hierarchy
+
+set test "focus cmd"
+gdb_test_multiple $test $test {
+ -re "$gdb_prompt $" {
+ pass $test
+ }
+}
+
+set test "focus prev"
+gdb_test_multiple $test $test {
+ -re "$gdb_prompt $" {
+ pass $test
+ }
+}

View File

@ -0,0 +1,258 @@
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>
* Makefile.in (uninstall-gstack, install-gstack): New rules, add
to install and uninstall.
* gstack.sh, gstack.1: New files.
diff --git a/gdb/Makefile.in b/gdb/Makefile.in
--- a/gdb/Makefile.in
+++ b/gdb/Makefile.in
@@ -1726,7 +1726,7 @@ info install-info clean-info dvi pdf install-pdf html install-html: force
install: all
@$(MAKE) $(FLAGS_TO_PASS) install-only
-install-only: $(CONFIG_INSTALL)
+install-only: install-gstack $(CONFIG_INSTALL)
transformed_name=`t='$(program_transform_name)'; \
echo gdb | sed -e "$$t"` ; \
if test "x$$transformed_name" = x; then \
@@ -1775,7 +1775,25 @@ install-guile:
install-python:
$(SHELL) $(srcdir)/../mkinstalldirs $(DESTDIR)$(GDB_DATADIR)/python/gdb
-uninstall: force $(CONFIG_UNINSTALL)
+GSTACK=gstack
+.PHONY: install-gstack
+install-gstack:
+ transformed_name=`t='$(program_transform_name)'; \
+ echo $(GSTACK) | sed -e "$$t"` ; \
+ if test "x$$transformed_name" = x; then \
+ transformed_name=$(GSTACK) ; \
+ else \
+ true ; \
+ fi ; \
+ $(SHELL) $(srcdir)/../mkinstalldirs $(DESTDIR)$(bindir) ; \
+ $(INSTALL_PROGRAM) $(srcdir)/$(GSTACK).sh \
+ $(DESTDIR)$(bindir)/$$transformed_name$(EXEEXT) ; \
+ : $(SHELL) $(srcdir)/../mkinstalldirs \
+ $(DESTDIR)$(man1dir) ; \
+ : $(INSTALL_DATA) $(srcdir)/gstack.1 \
+ $(DESTDIR)$(man1dir)/$$transformed_name.1
+
+uninstall: force uninstall-gstack $(CONFIG_UNINSTALL)
transformed_name=`t='$(program_transform_name)'; \
echo gdb | sed -e $$t` ; \
if test "x$$transformed_name" = x; then \
@@ -1798,6 +1816,18 @@ uninstall: force $(CONFIG_UNINSTALL)
fi
@$(MAKE) DO=uninstall "DODIRS=$(SUBDIRS)" $(FLAGS_TO_PASS) subdir_do
+.PHONY: uninstall-gstack
+uninstall-gstack:
+ transformed_name=`t='$(program_transform_name)'; \
+ echo $(GSTACK) | sed -e $$t` ; \
+ if test "x$$transformed_name" = x; then \
+ transformed_name=$(GSTACK) ; \
+ else \
+ true ; \
+ fi ; \
+ rm -f $(DESTDIR)$(bindir)/$$transformed_name$(EXEEXT) \
+ $(DESTDIR)$(man1dir)/$$transformed_name.1
+
# The C++ name parser can be built standalone for testing.
test-cp-name-parser.o: cp-name-parser.c
$(COMPILE) -DTEST_CPNAMES cp-name-parser.c
diff --git a/gdb/gstack.sh b/gdb/gstack.sh
new file mode 100644
--- /dev/null
+++ b/gdb/gstack.sh
@@ -0,0 +1,43 @@
+#!/bin/sh
+
+if test $# -ne 1; then
+ echo "Usage: `basename $0 .sh` <process-id>" 1>&2
+ exit 1
+fi
+
+if test ! -r /proc/$1; then
+ echo "Process $1 not found." 1>&2
+ exit 1
+fi
+
+# GDB doesn't allow "thread apply all bt" when the process isn't
+# threaded; need to peek at the process to determine if that or the
+# simpler "bt" should be used.
+
+backtrace="bt"
+if test -d /proc/$1/task ; then
+ # Newer kernel; has a task/ directory.
+ if test `/bin/ls /proc/$1/task | /usr/bin/wc -l` -gt 1 2>/dev/null ; then
+ backtrace="thread apply all bt"
+ fi
+elif test -f /proc/$1/maps ; then
+ # Older kernel; go by it loading libpthread.
+ if /bin/grep -e libpthread /proc/$1/maps > /dev/null 2>&1 ; then
+ backtrace="thread apply all bt"
+ fi
+fi
+
+GDB=${GDB:-gdb}
+
+# Run GDB, strip out unwanted noise.
+# --readnever is no longer used since .gdb_index is now in use.
+$GDB --quiet -nx $GDBARGS /proc/$1/exe $1 <<EOF 2>&1 |
+set width 0
+set height 0
+set pagination no
+$backtrace
+EOF
+/bin/sed -n \
+ -e 's/^\((gdb) \)*//' \
+ -e '/^#/p' \
+ -e '/^Thread/p'
diff --git a/gdb/testsuite/gdb.base/gstack.c b/gdb/testsuite/gdb.base/gstack.c
new file mode 100644
--- /dev/null
+++ b/gdb/testsuite/gdb.base/gstack.c
@@ -0,0 +1,43 @@
+/* This testcase is part of GDB, the GNU debugger.
+
+ Copyright 2005, 2007, 2008, 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 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/>. */
+
+#include <stdio.h>
+#include <unistd.h>
+#include <string.h>
+
+void
+func (void)
+{
+ const char msg[] = "looping\n";
+
+ /* Use the most simple notification not to get caught by attach on exiting
+ the function. */
+ write (1, msg, strlen (msg));
+
+ for (;;);
+}
+
+int
+main (void)
+{
+ alarm (60);
+ nice (100);
+
+ func ();
+
+ 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

View File

@ -0,0 +1,323 @@
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>
* gdb.base/attach-32.exp: New test for attaching in 32-bit
mode on 64-bit systems.
* gdb.base/attach-32.c: Ditto.
* gdb.base/attach-32b.c: Ditto.
2007-12-26 Jan Kratochvil <jan.kratochvil@redhat.com>
* 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
new file mode 100644
--- /dev/null
+++ b/gdb/testsuite/gdb.base/attach-32.c
@@ -0,0 +1,20 @@
+/* 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>
+
+int should_exit = 0;
+
+int main ()
+{
+ int local_i = 0;
+
+ while (! should_exit)
+ {
+ local_i++;
+ }
+ return 0;
+}
diff --git a/gdb/testsuite/gdb.base/attach-32.exp b/gdb/testsuite/gdb.base/attach-32.exp
new file mode 100644
--- /dev/null
+++ b/gdb/testsuite/gdb.base/attach-32.exp
@@ -0,0 +1,245 @@
+# Copyright 2005 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.
+#
+# This test was based on attach.exp and modified for 32/64 bit Linux systems. */
+
+# On HP-UX 11.0, this test is causing a process running the program
+# "attach" to be left around spinning. Until we figure out why, I am
+# commenting out the test to avoid polluting tiamat (our 11.0 nightly
+# test machine) with these processes. RT
+#
+# Setting the magic bit in the target app should work. I added a
+# "kill", and also a test for the R3 register warning. JB
+if { ![istarget "x86_64*-*linux*"]
+ && ![istarget "powerpc64*-*linux*"]} {
+ return 0
+}
+
+# are we on a target board
+if [is_remote target] then {
+ return 0
+}
+
+set testfile "attach-32"
+set srcfile ${testfile}.c
+set srcfile2 ${testfile}b.c
+set binfile [standard_output_file ${testfile}]
+set binfile2 [standard_output_file ${testfile}b]
+set escapedbinfile [string_to_regexp [standard_output_file ${testfile}]]
+
+#execute_anywhere "rm -f ${binfile} ${binfile2}"
+remote_exec build "rm -f ${binfile} ${binfile2}"
+# For debugging this test
+#
+#log_user 1
+
+# build the first test case
+#
+if { [gdb_compile "${srcdir}/${subdir}/${srcfile}" "${binfile}" executable [list debug "additional_flags=-m32"]] != "" } {
+ gdb_suppress_entire_file "Testcase compile failed, so all tests in this file will automatically fail."
+}
+
+# Build the in-system-call test
+
+if { [gdb_compile "${srcdir}/${subdir}/${srcfile2}" "${binfile2}" executable [list debug "additional_flags=-m32"]] != "" } {
+ gdb_suppress_entire_file "Testcase compile failed, so all tests in this file will automatically fail."
+}
+
+if [get_compiler_info ${binfile}] {
+ return -1
+}
+
+proc do_attach_tests {} {
+ global gdb_prompt
+ global binfile
+ global escapedbinfile
+ global srcfile
+ global testfile
+ global objdir
+ global subdir
+ global timeout
+ global testpid
+
+ # Verify that we can "see" the variable "should_exit" in the
+ # program, and that it is zero.
+
+ gdb_test "print should_exit" " = 0" "after attach-32, print should_exit"
+
+ # Verify that we can modify the variable "should_exit" in the
+ # program.
+
+ gdb_test "set should_exit=1" "" "after attach-32, set should_exit"
+
+ # Verify that the modification really happened.
+
+ send_gdb "tbreak 19\n"
+ gdb_expect {
+ -re "reakpoint .*at.*$srcfile, line 19.*$gdb_prompt $" {
+ pass "after attach-32, set tbreak postloop"
+ }
+ -re "$gdb_prompt $" {
+ fail "after attach-32, set tbreak postloop"
+ }
+ timeout {
+ fail "(timeout) after attach-32, set tbreak postloop"
+ }
+ }
+ send_gdb "continue\n"
+ gdb_expect {
+ -re "main.*at.*$srcfile:19.*$gdb_prompt $" {
+ pass "after attach-32, reach tbreak postloop"
+ }
+ -re "$gdb_prompt $" {
+ fail "after attach-32, reach tbreak postloop"
+ }
+ timeout {
+ fail "(timeout) after attach-32, reach tbreak postloop"
+ }
+ }
+
+ # Allow the test process to exit, to cleanup after ourselves.
+
+ gdb_test "continue" {\[Inferior .* exited normally\]} "after attach-32, exit"
+
+ # Make sure we don't leave a process around to confuse
+ # the next test run (and prevent the compile by keeping
+ # the text file busy), in case the "set should_exit" didn't
+ # work.
+
+ remote_exec build "kill -9 ${testpid}"
+
+ # Start the program running and then wait for a bit, to be sure
+ # that it can be attached to.
+
+ set testpid [eval exec $binfile &]
+ exec sleep 2
+ if { [istarget "*-*-cygwin*"] } {
+ # testpid is the Cygwin PID, GDB uses the Windows PID, which might be
+ # different due to the way fork/exec works.
+ set testpid [ exec ps -e | gawk "{ if (\$1 == $testpid) print \$4; }" ]
+ }
+
+ # Verify that we can attach to the process, and find its a.out
+ # when we're cd'd to some directory that doesn't contain the
+ # a.out. (We use the source path set by the "dir" command.)
+
+ gdb_test "dir ${objdir}/${subdir}" "Source directories searched: .*" \
+ "set source path"
+
+ gdb_test "cd /tmp" "Working directory /tmp." \
+ "cd away from process working directory"
+
+ # Explicitly flush out any knowledge of the previous attachment.
+
+ set test "before attach-32-3, flush symbols"
+ gdb_test_multiple "symbol" "$test" {
+ -re "Discard symbol table from.*y or n. $" {
+ gdb_test "y" "No symbol file now." \
+ "$test"
+ }
+ -re "No symbol file now.*$gdb_prompt $" {
+ pass "$test"
+ }
+ }
+
+ gdb_test "exec" "No executable file now." \
+ "before attach-32-3, flush exec"
+
+ gdb_test "attach $testpid" \
+ "Attaching to process $testpid.*Reading symbols from $escapedbinfile.*main.*at .*" \
+ "attach-32 when process' a.out not in cwd"
+
+ set test "after attach-32-3, exit"
+ gdb_test_multiple "kill" "$test" {
+ -re "Kill the program being debugged.*y or n. $" {
+ gdb_test "y" "" "$test"
+ }
+ }
+
+ # Another "don't leave a process around"
+ remote_exec build "kill -9 ${testpid}"
+}
+
+proc do_call_attach_tests {} {
+ global gdb_prompt
+ global binfile2
+ global testpid
+
+ # See if other registers are problems
+
+ set test "info other register"
+ gdb_test_multiple "i r r3" "$test" {
+ -re "warning: reading register.*$gdb_prompt $" {
+ fail "$test"
+ }
+ -re "r3.*$gdb_prompt $" {
+ pass "$test"
+ }
+ }
+
+ # Get rid of the process
+
+ gdb_test "p should_exit = 1"
+ gdb_test "c" {\[Inferior .* exited normally\]}
+
+ # Be paranoid
+
+ remote_exec build "kill -9 ${testpid}"
+}
+
+
+# Start with a fresh gdb
+
+gdb_exit
+set testpid [eval exec $binfile &]
+exec sleep 3
+if { [istarget "*-*-cygwin*"] } {
+ # testpid is the Cygwin PID, GDB uses the Windows PID, which might be
+ # different due to the way fork/exec works.
+ set testpid [ exec ps -e | gawk "{ if (\$1 == $testpid) print \$4; }" ]
+}
+
+set GDBFLAGS_orig $GDBFLAGS
+set GDBFLAGS "-iex \"set height 0\" --pid=$testpid"
+gdb_start
+set GDBFLAGS $GDBFLAGS_orig
+
+gdb_reinitialize_dir $srcdir/$subdir
+
+# This is a test of gdb's ability to attach to a running process.
+
+do_attach_tests
+
+# Test attaching when the target is inside a system call
+
+gdb_exit
+set testpid [eval exec $binfile2 &]
+exec sleep 3
+if { [istarget "*-*-cygwin*"] } {
+ # testpid is the Cygwin PID, GDB uses the Windows PID, which might be
+ # different due to the way fork/exec works.
+ set testpid [ exec ps -e | gawk "{ if (\$1 == $testpid) print \$4; }" ]
+}
+
+set GDBFLAGS_orig $GDBFLAGS
+set GDBFLAGS "-iex \"set height 0\" --pid=$testpid"
+gdb_start
+set GDBFLAGS $GDBFLAGS_orig
+
+gdb_reinitialize_dir $srcdir/$subdir
+do_call_attach_tests
+
+return 0
diff --git a/gdb/testsuite/gdb.base/attach-32b.c b/gdb/testsuite/gdb.base/attach-32b.c
new file mode 100644
--- /dev/null
+++ b/gdb/testsuite/gdb.base/attach-32b.c
@@ -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);
+}

View File

@ -0,0 +1,161 @@
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>
* gdb.cp/b146835.exp: New testcase.
* gdb.cp/b146835.cc: Ditto.
* gdb.cp/b146835b.cc: Ditto.
* gdb.cp/b146835.h: Ditto.
diff --git a/gdb/testsuite/gdb.cp/b146835.cc b/gdb/testsuite/gdb.cp/b146835.cc
new file mode 100644
--- /dev/null
+++ b/gdb/testsuite/gdb.cp/b146835.cc
@@ -0,0 +1,32 @@
+#include "b146835.h"
+#include <iostream>
+
+class F : public C {
+
+protected:
+
+ virtual void funcA (unsigned long a, B *b);
+ virtual void funcB (E *e);
+ virtual void funcC (unsigned long x, bool y);
+
+ char *s1, *s2;
+ bool b1;
+ int k;
+
+public:
+ void foo() {
+ std::cout << "foo" << std::endl;
+ }
+};
+
+
+void F::funcA (unsigned long a, B *b) {}
+void F::funcB (E *e) {}
+void F::funcC (unsigned long x, bool y) {}
+
+int main()
+{
+ F f;
+ f.foo();
+}
+
diff --git a/gdb/testsuite/gdb.cp/b146835.exp b/gdb/testsuite/gdb.cp/b146835.exp
new file mode 100644
--- /dev/null
+++ b/gdb/testsuite/gdb.cp/b146835.exp
@@ -0,0 +1,47 @@
+# This testcase is part of GDB, the GNU debugger.
+
+# Copyright 2005 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.
+
+# Check that GDB can properly print an inherited member variable
+# (Bugzilla 146835)
+
+set testfile "b146835"
+set srcfile ${testfile}.cc
+set srcfile2 ${testfile}b.cc
+set binfile [standard_output_file ${testfile}]
+if {[gdb_compile "${srcdir}/${subdir}/${srcfile} ${srcdir}/${subdir}/${srcfile2}" "${binfile}" executable {debug c++}] != "" } {
+ return -1
+}
+
+gdb_exit
+gdb_start
+gdb_reinitialize_dir $srcdir/$subdir
+gdb_load ${binfile}
+
+#
+# Run to `main' where we begin our tests.
+#
+
+if ![runto_main] then {
+ gdb_suppress_tests
+}
+
+gdb_test "break 'F::foo()'" ""
+gdb_continue_to_breakpoint "First line foo"
+
+# Verify that we can access the inherited member d
+gdb_test "p d" " = \\(D \\*\\) *0x0" "Verify inherited member d accessible"
diff --git a/gdb/testsuite/gdb.cp/b146835.h b/gdb/testsuite/gdb.cp/b146835.h
new file mode 100644
--- /dev/null
+++ b/gdb/testsuite/gdb.cp/b146835.h
@@ -0,0 +1,36 @@
+
+class A {
+
+protected:
+
+ virtual void funcA (unsigned long a, class B *b) = 0;
+ virtual void funcB (class E *e) = 0;
+ virtual void funcC (unsigned long x, bool y) = 0;
+
+ void funcD (class E *e, class D* d);
+ virtual void funcE (E *e, D *d);
+ virtual void funcF (unsigned long x, D *d);
+};
+
+
+class C : public A {
+
+protected:
+
+ int x;
+ class K *k;
+ class H *h;
+
+ D *d;
+
+ class W *w;
+ class N *n;
+ class L *l;
+ unsigned long *r;
+
+public:
+
+ C();
+ int z (char *s);
+ 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) {}

View File

@ -0,0 +1,247 @@
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.3-mapping-zero-inode-test.patch
;; Test GCORE for shmid 0 shared memory mappings.
;;=fedoratest: But it is broken anyway, sometimes the case being tested is not reproducible.
diff --git a/gdb/testsuite/gdb.base/gcore-shmid0.c b/gdb/testsuite/gdb.base/gcore-shmid0.c
new file mode 100644
--- /dev/null
+++ b/gdb/testsuite/gdb.base/gcore-shmid0.c
@@ -0,0 +1,128 @@
+/* Copyright 2007, 2009 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. */
+
+/*
+ * Test GDB's handling of gcore for mapping with a name but zero inode.
+ */
+
+#include <sys/ipc.h>
+#include <sys/shm.h>
+#include <stdio.h>
+#include <errno.h>
+#include <stdlib.h>
+#include <unistd.h>
+#include <assert.h>
+#include <time.h>
+
+/* The same test running in a parallel testsuite may steal us the zero SID,
+ even if we never get any EEXIST. Just try a while. */
+
+#define TIMEOUT_SEC 10
+
+static volatile int v;
+
+static void
+initialized (void)
+{
+ v++;
+}
+
+static void
+unresolved (void)
+{
+ v++;
+}
+
+int
+main (void)
+{
+ int sid;
+ unsigned int *addr = (void *) -1L;
+ int attempt, round = 0;
+ time_t ts_start, ts;
+
+ if (time (&ts_start) == (time_t) -1)
+ {
+ printf ("time (): %m\n");
+ exit (1);
+ }
+
+ /* The generated SID will cycle with an increment of 32768, attempt until it
+ * wraps to 0. */
+
+ for (attempt = 0; addr == (void *) -1L; attempt++)
+ {
+ /* kernel-2.6.25-8.fc9.x86_64 just never returns the value 0 by
+ shmget(2). shmget returns SID range 0..1<<31 in steps of 32768,
+ 0x1000 should be enough but wrap the range it to be sure. */
+
+ if (attempt > 0x21000)
+ {
+ if (time (&ts) == (time_t) -1)
+ {
+ printf ("time (): %m\n");
+ exit (1);
+ }
+
+ if (ts >= ts_start && ts < ts_start + TIMEOUT_SEC)
+ {
+ attempt = 0;
+ round++;
+ continue;
+ }
+
+ printf ("Problem is not reproducible on this kernel (attempt %d, "
+ "round %d)\n", attempt, round);
+ unresolved ();
+ exit (1);
+ }
+
+ sid = shmget ((key_t) rand (), 0x1000, IPC_CREAT | IPC_EXCL | 0777);
+ if (sid == -1)
+ {
+ if (errno == EEXIST)
+ continue;
+
+ printf ("shmget (%d, 0x1000, IPC_CREAT): errno %d\n", 0, errno);
+ exit (1);
+ }
+
+ /* Use SID only if it is 0, retry it otherwise. */
+
+ if (sid == 0)
+ {
+ addr = shmat (sid, NULL, SHM_RND);
+ if (addr == (void *) -1L)
+ {
+ printf ("shmat (%d, NULL, SHM_RND): errno %d\n", sid,
+ errno);
+ exit (1);
+ }
+ }
+ if (shmctl (sid, IPC_RMID, NULL) != 0)
+ {
+ printf ("shmctl (%d, IPC_RMID, NULL): errno %d\n", sid, errno);
+ exit (1);
+ }
+ }
+
+ initialized ();
+
+ 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
+ }
+}

View File

@ -0,0 +1,38 @@
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>
* gdb.gdb/selftest.exp: Add matching on specific Red Hat only version
string.
diff --git a/gdb/testsuite/gdb.gdb/selftest.exp b/gdb/testsuite/gdb.gdb/selftest.exp
--- a/gdb/testsuite/gdb.gdb/selftest.exp
+++ b/gdb/testsuite/gdb.gdb/selftest.exp
@@ -53,6 +53,9 @@ proc test_with_self { } {
-re ".\[0-9\]+ = +.+ +0x.*\[0-9.\]+.*$gdb_prompt $" {
pass "printed version with cast"
}
+ -re ".\[0-9\]+ = .(Fedora|Red Hat Enterprise Linux) \[\\(\\)0-9.a-z\\-\]+.*$gdb_prompt $" {
+ pass "printed version Fedora or Red Hat Enterprise Linux only"
+ }
}
# 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));
}

View File

@ -0,0 +1,247 @@
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.3-test-dtorfix-20050121.patch
;; 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 @@
+/* This testcase is part of GDB, the GNU debugger.
+
+ Copyright 2005 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. */
+
+class A
+{
+ public:
+ A();
+ ~A();
+ int k;
+ private:
+ int x;
+};
+
+class B: public A
+{
+ public:
+ B();
+ private:
+ int y;
+};
+
+/* C and D are for the $delete destructor. */
+
+class C
+{
+ public:
+ C();
+ virtual ~C();
+ private:
+ int x;
+};
+
+class D: public C
+{
+ public:
+ D();
+ private:
+ int y;
+};
+
+int main(int argc, char *argv[])
+{
+ A* a = new A;
+ B* b = new B;
+ D* d = new D;
+ delete a;
+ delete b;
+ delete d;
+ return 0;
+}
+
+A::A() /* Constructor A */
+{
+ x = 1; /* First line A */
+ k = 4; /* Second line A */
+}
+
+A::~A() /* Destructor A */
+{
+ x = 3; /* First line ~A */
+ k = 6; /* Second line ~A */
+}
+
+B::B()
+{
+ y = 2; /* First line B */
+ k = 5;
+}
+
+C::C() /* Constructor C */
+{
+ x = 1; /* First line C */
+}
+
+C::~C() /* Destructor C */
+{
+ x = 3; /* First line ~C */
+}
+
+D::D()
+{
+ y = 2; /* First line D */
+}
diff --git a/gdb/testsuite/gdb.cp/constructortest.exp b/gdb/testsuite/gdb.cp/constructortest.exp
new file mode 100644
--- /dev/null
+++ b/gdb/testsuite/gdb.cp/constructortest.exp
@@ -0,0 +1,130 @@
+# This testcase is part of GDB, the GNU debugger.
+
+# Copyright 2005, 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.
+
+# Check that GDB can break at multiple forms of constructors.
+
+set testfile "constructortest"
+set srcfile ${testfile}.cc
+set binfile [standard_output_file ${testfile}]
+# PIE is required for testing proper BREAKPOINT_RE_SET of the multiple-PC
+# breakpoints.
+if {[gdb_compile "${srcdir}/${subdir}/${srcfile}" "${binfile}" executable {debug c++ "additional_flags=-fpie -pie"}] != "" } {
+ return -1
+}
+
+gdb_exit
+gdb_start
+gdb_reinitialize_dir $srcdir/$subdir
+gdb_load ${binfile}
+
+#
+# Run to `main' where we begin our tests.
+#
+
+if ![runto_main] then {
+ gdb_suppress_tests
+}
+
+# Break on the various forms of the A::A constructor.
+# " (2 locations)" is displayed depending on G++ version.
+gdb_test "break A\:\:A" "Breakpoint 2 at .*" "breaking on A::A"
+
+# Verify that we break for the A constructor two times
+# Once for new A and once for new B
+gdb_continue_to_breakpoint "First line A"
+gdb_test "bt" "#0.*A.*#1.*main.*" "Verify in in-charge A::A"
+gdb_continue_to_breakpoint "First line A"
+gdb_test "bt" "#0.*A.*#1.*B.*#2.*main.*" "Verify in not-in-charge A::A"
+
+# Now do the same for destructors
+gdb_test "break 'A::~A()'" ""
+
+# Verify that we break for the A destructor two times
+# Once for delete a and once for delete b
+gdb_continue_to_breakpoint "First line ~A"
+gdb_test "bt" "#0.*~A.*#1.*main.*" "Verify in in-charge A::~A"
+gdb_continue_to_breakpoint "First line ~A"
+gdb_test "bt" "#0.*~A.*#1.*~B.*#2.*main.*" "Verify in not-in-charge A::~A"
+
+
+# Verify that we can break by line number in a constructor and find
+# both occurrences
+runto_main
+gdb_test "break 'A::A()'" "" "break in constructor A 2"
+gdb_continue_to_breakpoint "First line A"
+set second_line [gdb_get_line_number "Second line A"]
+# " (2 locations)" is displayed depending on G++ version.
+gdb_test "break $second_line" "Breakpoint .*, line $second_line\\..*" "break by line in constructor"
+gdb_continue_to_breakpoint "Second line A"
+gdb_test "bt" "#0.*A.*#1.*main.*" "Verify in in-charge A::A second line"
+gdb_continue_to_breakpoint "Second line A"
+gdb_test "bt" "#0.*A.*#1.*B.*#2.*main.*" "Verify in not-in-charge A::A second line"
+
+# Verify that we can break by line number in a destructor and find
+# both occurrences
+gdb_test "break 'A::~A()'" "" "break in constructor ~A 2"
+gdb_continue_to_breakpoint "First line ~A"
+set second_line_dtor [gdb_get_line_number "Second line ~A"]
+# " (2 locations)" is displayed depending on G++ version.
+gdb_test "break $second_line_dtor" "Breakpoint .*, line $second_line_dtor\\..*" "break by line in destructor"
+gdb_continue_to_breakpoint "Second line ~A"
+gdb_test "bt" "#0.*A.*#1.*main.*" "Verify in in-charge A::~A second line"
+# FIXME: Analyse this case better.
+gdb_continue_to_breakpoint "Second line ~A"
+gdb_test "bt" "#0.*A.*#1.*main.*" "Verify in A::~A second line #2"
+gdb_continue_to_breakpoint "Second line ~A"
+gdb_test "bt" "#0.*A.*#1.*B.*#2.*main.*" "Verify in not-in-charge A::~A second line"
+
+
+# Test now the $delete destructors.
+
+gdb_load ${binfile}
+runto_main
+
+set first_line_dtor [gdb_get_line_number "First line ~C"]
+set define_line_dtor [gdb_get_line_number "Destructor C"]
+# Break on the various forms of the C::~C destructor
+# " ([23] locations)" is displayed depending on G++ version.
+gdb_test "break C\:\:~C" "Breakpoint .*: C::~C\\. \\(2 locations\\)" "breaking on C::~C"
+gdb_continue_to_breakpoint "First line ~C"
+
+# Verify that we can break by line number in a destructor and find
+# the $delete occurence
+
+gdb_load ${binfile}
+delete_breakpoints
+
+# " (3 locations)" is displayed depending on G++ version.
+gdb_test "break $first_line_dtor" "Breakpoint .*, line $first_line_dtor\\..*" "break by line in destructor"
+
+# Run to `main' where we begin our tests.
+# Set the breakpoints first to test PIE multiple-PC BREAKPOINT_RE_SET.
+# RUNTO_MAIN or RUNTO MAIN are not usable here as it runs DELETE_BREAKPOINTS.
+
+if ![gdb_breakpoint main] {
+ gdb_suppress_tests
+}
+gdb_run_cmd
+set test "running to main"
+gdb_test_multiple "" $test {
+ -re "Breakpoint \[0-9\]*, main .*$gdb_prompt $" {
+ pass $test
+ }
+}
+
+gdb_continue_to_breakpoint "First line ~C"

View File

@ -0,0 +1,103 @@
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>
* gdb.base/move-dir.exp: New test.
* gdb.base/move-dir.c: 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
new file mode 100644
--- /dev/null
+++ b/gdb/testsuite/gdb.base/move-dir.c
@@ -0,0 +1,10 @@
+#include <stdio.h>
+#include <stdlib.h>
+#include "move-dir.h"
+
+int main() {
+ const char* hw = "hello world.";
+ printf ("%s\n", hw);;
+ other();
+}
+
diff --git a/gdb/testsuite/gdb.base/move-dir.exp b/gdb/testsuite/gdb.base/move-dir.exp
new file mode 100644
--- /dev/null
+++ b/gdb/testsuite/gdb.base/move-dir.exp
@@ -0,0 +1,57 @@
+# Copyright 2005
+# 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 "move-dir"
+set srcfile ${testfile}.c
+set incfile ${testfile}.h
+set binfile [standard_output_file ${testfile}]
+
+set testdir [standard_output_file incdir]
+
+remote_exec build "mkdir $testdir"
+remote_exec build "cp ${srcdir}/${subdir}/${srcfile} [standard_output_file ${srcfile}]"
+remote_exec build "cp ${srcdir}/${subdir}/${incfile} [standard_output_file ${incfile}]"
+
+set additional_flags "additional_flags=-I${subdir}/incdir"
+
+if { [gdb_compile [standard_output_file ${srcfile}] "${binfile}" executable [list debug $additional_flags]] != "" } {
+ gdb_suppress_entire_file "Testcase compile failed, so all tests in this file will automatically fail."
+}
+
+# Create and source the file that provides information about the compiler
+# used to compile the test case.
+
+if [get_compiler_info ${binfile}] {
+ return -1;
+}
+
+
+set oldtimeout $timeout
+set timeout [expr "$timeout + 60"]
+
+# Start with a fresh gdb.
+
+gdb_exit
+gdb_start
+gdb_test "cd ../.." "" ""
+gdb_load ${binfile}
+gdb_test "list main" ".*hw.*other.*" "found main"
+gdb_test "list other" ".*ostring.*" "found include file"
+
+
+set timeout $oldtimeout
+return 0
diff --git a/gdb/testsuite/gdb.base/move-dir.h b/gdb/testsuite/gdb.base/move-dir.h
new file mode 100644
--- /dev/null
+++ b/gdb/testsuite/gdb.base/move-dir.h
@@ -0,0 +1,7 @@
+#include <stdlib.h>
+
+void other() {
+ const char* ostring = "other";
+ printf ("%s\n", ostring);;
+}
+

File diff suppressed because it is too large Load Diff

View File

@ -0,0 +1,42 @@
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>
* gdb.gdb/selftest.exp: Make sure that the debug directory is
set up properly.
* gdb.gdb/complaints.exp: Ditto.
* gdb.gdb/xfullpath.exp: Ditto.
* gdb.gdb/observer.exp: Ditto.
diff --git a/gdb/testsuite/lib/selftest-support.exp b/gdb/testsuite/lib/selftest-support.exp
--- a/gdb/testsuite/lib/selftest-support.exp
+++ b/gdb/testsuite/lib/selftest-support.exp
@@ -152,18 +152,18 @@ proc do_self_tests {function body} {
}
# Remove any old copy lying around.
- remote_file host delete $xgdb
+ #remote_file host delete $xgdb
gdb_start
- set file [remote_download host $GDB_FULLPATH $xgdb]
+ #set file [remote_download host $GDB_FULLPATH $xgdb]
- set result [selftest_setup $file $function]
+ set result [selftest_setup $GDB_FULLPATH $function]
if {$result == 0} then {
set result [uplevel $body]
}
gdb_exit
- catch "remote_file host delete $file"
+ #catch "remote_file host delete $file"
if {$result < 0} then {
warning "Couldn't test self"

View File

@ -0,0 +1,254 @@
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>
* config/i386/nm-linux.h: Change dr register routines to
accept a ptid_t first argument. Change all calling macros
to default the inferior_ptid for the first argument.
(i386_linux_insert_watchpoint): New prototype.
(i386_linux_remove_watchpoint, i386_linux_insert_hw_breakpoint): Ditto.
(i386_linux_remove_hw_breakpoint): Ditto.
(target_insert_watchpoint, target_remove_watchpoint): Undef and
override.
(target_insert_hw_breakpoint, target_remove_hw_breakpoint): Ditto.
* config/i386/nm-linux64.h: Ditto except add amd64 versions of
the watchpoint/hw-breakpoint insert/remove routines.
* i386-nat.c: Include "inferior.h" to define inferior_ptid.
* i386-linux-nat.c: Change all dr get/set routines to accept
ptid_t as first argument and to use this argument to determine
the tid for PTRACE.
(i386_linux_set_debug_regs_for_thread): New function.
(i386_linux_sync_debug_registers_callback): Ditto.
(i386_linux_sync_debug_registers_across_threads): Ditto.
(i386_linux_insert_watchpoint, i386_linux_remove_watchpoint): Ditto.
(i386_linux_hw_breakpoint, i386_linux_remove_hw_breakpoint): Ditto.
(i386_linux_new_thread): Ditto.
(_initialize_i386_linux_nat): Ditto.
* amd64-linux-nat.c: Change all dr get/set routines to accept
ptid_t as first argument and to use this argument to determine
the tid for PTRACE.
(amd64_linux_set_debug_regs_for_thread): New function.
(amd64_linux_sync_debug_registers_callback): Ditto.
(amd64_linux_sync_debug_registers_across_threads): Ditto.
(amd64_linux_insert_watchpoint, amd64_linux_remove_watchpoint): Ditto.
(amd64_linux_hw_breakpoint, amd64_linux_remove_hw_breakpoint): Ditto.
(amd64_linux_new_thread): Ditto.
(_initialize_amd64_linux_nat): Register linux new thread observer.
* testsuite/gdb.threads/watchthreads-threaded.c: New test case.
* testsuite/gdb.threads/watchthreads-threaded.exp: Ditto.
[ With recent upstream GDB (6.8) reduced only to the testcase. ]
[ It was called watchthreads2.{exp,c} before but it conflicted with FSF GDB new
testcase of the same name. ]
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
new file mode 100644
--- /dev/null
+++ b/gdb/testsuite/gdb.threads/watchthreads-threaded.c
@@ -0,0 +1,66 @@
+/* This testcase is part of GDB, the GNU debugger.
+
+ Copyright 2002, 2003, 2004, 2005 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.
+
+ This file is copied from schedlock.c. */
+
+#include <stdio.h>
+#include <unistd.h>
+#include <stdlib.h>
+#include <pthread.h>
+
+void *thread_function(void *arg); /* Pointer to function executed by each thread */
+
+#define NUM 5
+
+unsigned int args[NUM+1];
+
+int main() {
+ int res;
+ pthread_t threads[NUM];
+ void *thread_result;
+ long i;
+
+ for (i = 0; i < NUM; i++)
+ {
+ args[i] = 1; /* Init value. */
+ res = pthread_create(&threads[i],
+ NULL,
+ thread_function,
+ (void *) i);
+ }
+
+ args[i] = 1;
+ thread_function ((void *) i);
+
+ exit(EXIT_SUCCESS);
+}
+
+void *thread_function(void *arg) {
+ int my_number = (long) arg;
+ int *myp = (int *) &args[my_number];
+
+ /* Don't run forever. Run just short of it :) */
+ while (*myp > 0)
+ {
+ (*myp) ++; usleep (1); /* Loop increment. */
+ }
+
+ pthread_exit(NULL);
+}
+
diff --git a/gdb/testsuite/gdb.threads/watchthreads-threaded.exp b/gdb/testsuite/gdb.threads/watchthreads-threaded.exp
new file mode 100644
--- /dev/null
+++ b/gdb/testsuite/gdb.threads/watchthreads-threaded.exp
@@ -0,0 +1,126 @@
+# This testcase is part of GDB, the GNU debugger.
+
+# Copyright 2005 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.
+
+# Check that GDB can support multiple watchpoints across threads.
+
+# This test verifies that a watchpoint is detected in the proper thread
+# so the test is only meaningful on a system with hardware watchpoints.
+if [target_info exists gdb,no_hardware_watchpoints] {
+ return 0;
+}
+
+set testfile "watchthreads-threaded"
+set srcfile ${testfile}.c
+set binfile [standard_output_file ${testfile}]
+if {[gdb_compile_pthreads "${srcdir}/${subdir}/${srcfile}" "${binfile}" executable [list debug "incdir=${objdir}"]] != "" } {
+ return -1
+}
+
+gdb_exit
+gdb_start
+gdb_reinitialize_dir $srcdir/$subdir
+gdb_load ${binfile}
+
+gdb_test "set can-use-hw-watchpoints 1" "" ""
+
+#
+# Run to `main' where we begin our tests.
+#
+
+if ![runto_main] then {
+ gdb_suppress_tests
+}
+
+set args_2 0
+set args_3 0
+
+gdb_breakpoint "thread_function"
+gdb_continue_to_breakpoint "thread_function"
+gdb_test "disable 2" ""
+
+gdb_test_multiple "p args\[2\]" "get initial args2" {
+ -re "\\\$\[0-9\]* = (.*)$gdb_prompt $" {
+ set init_args_2 $expect_out(1,string)
+ pass "get initial args2"
+ }
+}
+
+gdb_test_multiple "p args\[3\]" "get initial args3" {
+ -re "\\\$\[0-9\]* = (.*)$gdb_prompt $" {
+ set init_args_3 $expect_out(1,string)
+ pass "get initial args3"
+ }
+}
+
+set args_2 $init_args_2
+set args_3 $init_args_3
+
+# Watch values that will be modified by distinct threads.
+gdb_test "watch args\[2\]" "Hardware watchpoint 3: args\\\[2\\\]"
+gdb_test "watch args\[3\]" "Hardware watchpoint 4: args\\\[3\\\]"
+
+set init_line [expr [gdb_get_line_number "Init value"]+1]
+set inc_line [gdb_get_line_number "Loop increment"]
+
+# Loop and continue to allow both watchpoints to be triggered.
+for {set i 0} {$i < 30} {incr i} {
+ set test_flag 0
+ gdb_test_multiple "continue" "threaded watch loop" {
+ -re "Hardware watchpoint 3: args\\\[2\\\].*Old value = 0.*New value = 1.*main \\\(\\\) at .*watchthreads-threaded.c:$init_line.*$gdb_prompt $"
+ { set args_2 1; set test_flag 1 }
+ -re "Hardware watchpoint 4: args\\\[3\\\].*Old value = 0.*New value = 1.*main \\\(\\\) at .*watchthreads-threaded.c:$init_line.*$gdb_prompt $"
+ { set args_3 1; set test_flag 1 }
+ -re "Hardware watchpoint 3: args\\\[2\\\].*Old value = $args_2.*New value = [expr $args_2+1].*in thread_function \\\(arg=0x2\\\) at .*watchthreads-threaded.c:$inc_line.*$gdb_prompt $"
+ { set args_2 [expr $args_2+1]; set test_flag 1 }
+ -re "Hardware watchpoint 4: args\\\[3\\\].*Old value = $args_3.*New value = [expr $args_3+1].*in thread_function \\\(arg=0x3\\\) at .*watchthreads-threaded.c:$inc_line.*$gdb_prompt $"
+ { set args_3 [expr $args_3+1]; set test_flag 1 }
+ }
+ # If we fail above, don't bother continuing loop
+ if { $test_flag == 0 } {
+ set i 30;
+ }
+}
+
+# Print success message if loop succeeded.
+if { $test_flag == 1 } {
+ pass "threaded watch loop"
+}
+
+# Verify that we hit first watchpoint in child thread.
+set message "watchpoint on args\[2\] hit in thread"
+if { $args_2 > 1 } {
+ pass $message
+} else {
+ fail $message
+}
+
+# Verify that we hit second watchpoint in child thread.
+set message "watchpoint on args\[3\] hit in thread"
+if { $args_3 > 1 } {
+ pass $message
+} else {
+ fail $message
+}
+
+# Verify that all watchpoint hits are accounted for.
+set message "combination of threaded watchpoints = 30 + initial values"
+if { [expr $args_2+$args_3] == [expr [expr 30+$init_args_2]+$init_args_3] } {
+ pass $message
+} else {
+ fail $message
+}

938
gdb-6.5-BEA-testsuite.patch Normal file
View File

@ -0,0 +1,938 @@
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-BEA-testsuite.patch
;; Improved testsuite results by the testsuite provided by the courtesy of BEA.
;;=fedoratest: For upstream it should be rewritten as a dejagnu test, the test of no "??" was useful.
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 @@
+/*
+ * The point of this program is to crash in a multi-threaded app.
+ * There are seven threads, doing the following things:
+ * * Spinning
+ * * Spinning inside a signal handler
+ * * Spinning inside a signal handler executing on the altstack
+ * * In a syscall
+ * * In a syscall inside a signal handler
+ * * In a syscall inside a signal handler executing on the altstack
+ * * Finally, the main thread crashes in main, with no frills.
+ *
+ * These are the things threads in JRockit tend to be doing. If gdb
+ * can handle those things, both in core files and during live
+ * debugging, that will help (at least) JRockit development.
+ *
+ * Let the program create a core file, then load the core file into
+ * gdb. Inside gdb, you should be able to do something like this:
+ *
+ * (gdb) t a a bt
+ *
+ * Thread 7 (process 4352):
+ * #0 0x001ba7dc in __nanosleep_nocancel () from /lib/tls/libc.so.6
+ * #1 0x001ba5ff in sleep () from /lib/tls/libc.so.6
+ * #2 0x080488a2 in makeSyscall (ignored=0x0) at threadcrash.c:118
+ * #3 0x006aadec in start_thread () from /lib/tls/libpthread.so.0
+ * #4 0x001ed19a in clone () from /lib/tls/libc.so.6
+ *
+ * Thread 6 (process 4353):
+ * #0 0x001ba7dc in __nanosleep_nocancel () from /lib/tls/libc.so.6
+ * #1 0x001ba5ff in sleep () from /lib/tls/libc.so.6
+ * #2 0x0804898f in syscallingSighandler (signo=10, info=0xb6be76f0, context=0xb6be7770)
+ * at threadcrash.c:168
+ * #3 <signal handler called>
+ * #4 0x006adf5e in pthread_kill () from /lib/tls/libpthread.so.0
+ * #5 0x08048a51 in makeSyscallFromSighandler (ignored=0x0) at threadcrash.c:204
+ * #6 0x006aadec in start_thread () from /lib/tls/libpthread.so.0
+ * #7 0x001ed19a in clone () from /lib/tls/libc.so.6
+ *
+ * Thread 5 (process 4354):
+ * #0 0x001ba7dc in __nanosleep_nocancel () from /lib/tls/libc.so.6
+ * #1 0x001ba5ff in sleep () from /lib/tls/libc.so.6
+ * #2 0x08048936 in syscallingAltSighandler (signo=3, info=0x959cd70, context=0x959cdf0)
+ * at threadcrash.c:144
+ * #3 <signal handler called>
+ * #4 0x006adf5e in pthread_kill () from /lib/tls/libpthread.so.0
+ * #5 0x080489e2 in makeSyscallFromAltSighandler (ignored=0x0) at threadcrash.c:190
+ * #6 0x006aadec in start_thread () from /lib/tls/libpthread.so.0
+ * #7 0x001ed19a in clone () from /lib/tls/libc.so.6
+ *
+ * Thread 4 (process 4355):
+ * #0 spin (ignored=0x0) at threadcrash.c:242
+ * #1 0x006aadec in start_thread () from /lib/tls/libpthread.so.0
+ * #2 0x001ed19a in clone () from /lib/tls/libc.so.6
+ *
+ * Thread 3 (process 4356):
+ * #0 spinningSighandler (signo=12, info=0xb4de46f0, context=0xb4de4770) at threadcrash.c:180
+ * #1 <signal handler called>
+ * #2 0x006adf5e in pthread_kill () from /lib/tls/libpthread.so.0
+ * #3 0x08048b2f in spinFromSighandler (ignored=0x0) at threadcrash.c:232
+ * #4 0x006aadec in start_thread () from /lib/tls/libpthread.so.0
+ * #5 0x001ed19a in clone () from /lib/tls/libc.so.6
+ *
+ * Thread 2 (process 4357):
+ * #0 spinningAltSighandler (signo=14, info=0x959ee50, context=0x959eed0) at threadcrash.c:156
+ * #1 <signal handler called>
+ * #2 0x006adf5e in pthread_kill () from /lib/tls/libpthread.so.0
+ * #3 0x08048ac0 in spinFromAltSighandler (ignored=0x0) at threadcrash.c:218
+ * #4 0x006aadec in start_thread () from /lib/tls/libpthread.so.0
+ * #5 0x001ed19a in clone () from /lib/tls/libc.so.6
+ *
+ * Thread 1 (process 4351):
+ * #0 0x08048cf3 in main (argc=1, argv=0xbfff9d74) at threadcrash.c:273
+ * (gdb)
+ */
+
+#include <pthread.h>
+#include <signal.h>
+#include <assert.h>
+#include <unistd.h>
+#include <stdio.h>
+#include <stdlib.h>
+#include <string.h>
+
+#define SIGSYSCALL_ALT SIGQUIT
+#define SIGSYSCALL SIGUSR1
+#define SIGSPIN_ALT SIGALRM
+#define SIGSPIN SIGUSR2
+
+typedef void (*sigaction_t)(int, siginfo_t *, void *);
+
+static void installHandler(int signo, sigaction_t handler, int onAltstack) {
+ struct sigaction action;
+ sigset_t sigset;
+ int result;
+ stack_t altstack;
+ stack_t oldaltstack;
+
+ memset(&action, 0, sizeof(action));
+ memset(&altstack, 0, sizeof(altstack));
+ memset(&oldaltstack, 0, sizeof(oldaltstack));
+
+ if (onAltstack) {
+ altstack.ss_sp = malloc(SIGSTKSZ);
+ assert(altstack.ss_sp != NULL);
+ altstack.ss_size = SIGSTKSZ;
+ altstack.ss_flags = 0;
+ result = sigaltstack(&altstack, &oldaltstack);
+ assert(result == 0);
+ assert(oldaltstack.ss_flags == SS_DISABLE);
+ }
+
+ sigemptyset(&sigset);
+
+ action.sa_handler = NULL;
+ action.sa_sigaction = handler;
+ action.sa_mask = sigset;
+ action.sa_flags = SA_SIGINFO;
+ if (onAltstack) {
+ action.sa_flags |= SA_ONSTACK;
+ }
+
+ result = sigaction(signo, &action, NULL);
+ assert(result == 0);
+}
+
+static void installNormalHandler(int signo, sigaction_t handler) {
+ installHandler(signo, handler, 0);
+}
+
+static void installAlthandler(int signo, sigaction_t handler) {
+ installHandler(signo, handler, 1);
+}
+
+static void *makeSyscall(void *ignored) {
+ (void)ignored;
+
+ sleep(42);
+
+ fprintf(stderr, "%s: returning\n", __FUNCTION__);
+ return NULL;
+}
+
+/* Return true if we're currently executing on the altstack */
+static int onAltstack(void) {
+ stack_t stack;
+ int result;
+
+ result = sigaltstack(NULL, &stack);
+ assert(result == 0);
+
+ return stack.ss_flags & SS_ONSTACK;
+}
+
+static void syscallingAltSighandler(int signo, siginfo_t *info, void *context) {
+ (void)signo;
+ (void)info;
+ (void)context;
+
+ if (!onAltstack()) {
+ printf("%s() not running on altstack!\n", __FUNCTION__);
+ }
+
+ sleep(42);
+}
+
+static void spinningAltSighandler(int signo, siginfo_t *info, void *context) {
+ (void)signo;
+ (void)info;
+ (void)context;
+
+ if (!onAltstack()) {
+ printf("%s() not running on altstack!\n", __FUNCTION__);
+ }
+
+ while (1);
+}
+
+static void syscallingSighandler(int signo, siginfo_t *info, void *context) {
+ (void)signo;
+ (void)info;
+ (void)context;
+
+ if (onAltstack()) {
+ printf("%s() running on altstack!\n", __FUNCTION__);
+ }
+
+ sleep(42);
+}
+
+static void spinningSighandler(int signo, siginfo_t *info, void *context) {
+ (void)signo;
+ (void)info;
+ (void)context;
+
+ if (onAltstack()) {
+ printf("%s() running on altstack!\n", __FUNCTION__);
+ }
+
+ while (1);
+}
+
+static void *makeSyscallFromAltSighandler(void *ignored) {
+ (void)ignored;
+
+ int result;
+
+ installAlthandler(SIGSYSCALL_ALT, syscallingAltSighandler);
+
+ result = pthread_kill(pthread_self(), SIGSYSCALL_ALT);
+ assert(result == 0);
+
+ fprintf(stderr, "%s: returning\n", __FUNCTION__);
+ return NULL;
+}
+
+static void *makeSyscallFromSighandler(void *ignored) {
+ (void)ignored;
+
+ int result;
+
+ installNormalHandler(SIGSYSCALL, syscallingSighandler);
+
+ result = pthread_kill(pthread_self(), SIGSYSCALL);
+ assert(result == 0);
+
+ fprintf(stderr, "%s: returning\n", __FUNCTION__);
+ return NULL;
+}
+
+static void *spinFromAltSighandler(void *ignored) {
+ (void)ignored;
+
+ int result;
+
+ installAlthandler(SIGSPIN_ALT, spinningAltSighandler);
+
+ result = pthread_kill(pthread_self(), SIGSPIN_ALT);
+ assert(result == 0);
+
+ fprintf(stderr, "%s: returning\n", __FUNCTION__);
+ return NULL;
+}
+
+static void *spinFromSighandler(void *ignored) {
+ (void)ignored;
+
+ int result;
+
+ installNormalHandler(SIGSPIN, spinningSighandler);
+
+ result = pthread_kill(pthread_self(), SIGSPIN);
+ assert(result == 0);
+
+ fprintf(stderr, "%s: returning\n", __FUNCTION__);
+ return NULL;
+}
+
+static void *spin(void *ignored) {
+ (void)ignored;
+
+ while (1);
+
+ fprintf(stderr, "%s: returning\n", __FUNCTION__);
+ return NULL;
+}
+
+int main(int argc, char *argv[]) {
+ int result;
+ pthread_t thread;
+ volatile int bad;
+
+ result = pthread_create(&thread, NULL, makeSyscall, NULL);
+ assert(result == 0);
+ result = pthread_create(&thread, NULL, makeSyscallFromSighandler, NULL);
+ assert(result == 0);
+ result = pthread_create(&thread, NULL, makeSyscallFromAltSighandler, NULL);
+ assert(result == 0);
+ result = pthread_create(&thread, NULL, spin, NULL);
+ assert(result == 0);
+ result = pthread_create(&thread, NULL, spinFromSighandler, NULL);
+ assert(result == 0);
+ result = pthread_create(&thread, NULL, spinFromAltSighandler, NULL);
+ assert(result == 0);
+
+ // Give threads some time to get going
+ sleep(3);
+
+ // Crash
+ bad = *(int*)7;
+
+ /* Workaround: http://gcc.gnu.org/bugzilla/show_bug.cgi?id=29628
+ Simulate use to ensure `DW_AT_location' for them:
+ readelf -a --debug threadcrash|grep -A5 -w argc
+ --> DW_AT_location : 2 byte block: 71 0 (DW_OP_breg1: 0)
+ This case verified on: gcc-4.1.1-30.i386
+ Keep it late to ensure persistency in the registers. */
+ bad = (int) argc;
+ bad = (unsigned long) argv;
+
+ return 0;
+}
diff --git a/gdb/testsuite/gdb.threads/threadcrash.exp b/gdb/testsuite/gdb.threads/threadcrash.exp
new file mode 100644
--- /dev/null
+++ b/gdb/testsuite/gdb.threads/threadcrash.exp
@@ -0,0 +1,37 @@
+# threadcrash.exp - The point of this program is to crash in a multi-threaded app.
+
+
+set testfile threadcrash
+set srcfile ${testfile}.c
+set shellfile ${srcdir}/${subdir}/${testfile}.sh
+set binfile [standard_output_file ${testfile}]
+
+set GDB_abs ${GDB}
+if [regexp "^\[^/\]" ${GDB_abs}] {
+ set GDB_abs $env(PWD)/${GDB_abs}
+}
+
+if [istarget "*-*-linux"] then {
+ set target_cflags "-D_MIT_POSIX_THREADS"
+} else {
+ set target_cflags ""
+}
+
+if {[gdb_compile_pthreads "${srcdir}/${subdir}/${srcfile}" "${binfile}" executable {debug}] != "" } {
+ return -1
+}
+
+# ${shellfile} argument must not contain any directories.
+set fd [open "|bash ${shellfile} ${binfile} $GDB $INTERNAL_GDBFLAGS $GDBFLAGS [host_info gdb_opts]" r]
+while { [gets $fd line] >= 0 } {
+ if [regexp " PASS: (.*)$" $line trash message] {
+ pass $message
+ } elseif [regexp " FAIL: (.*)$" $line trash message] {
+ fail $message
+ }
+}
+catch {
+ close $fd
+}
+
+return 0
diff --git a/gdb/testsuite/gdb.threads/threadcrash.sh b/gdb/testsuite/gdb.threads/threadcrash.sh
new file mode 100644
--- /dev/null
+++ b/gdb/testsuite/gdb.threads/threadcrash.sh
@@ -0,0 +1,324 @@
+#! /bin/bash
+
+# NOTE: threadcrash.c *must* be built with debugging symbols
+#
+# The point of this shell script is to crash treadcrash.c, load the
+# resulting core file into gdb and verify that gdb can extract enough
+# information from the core file.
+#
+# The return code from this script is the number of failed tests.
+
+LOG=gdbresult.log
+
+if [ $# = 0 ] ; then
+ echo >&2 Syntax: $0 \<name of threadcrash binary\> [\<gdb binary\> \<args...\>]
+ exit 1
+fi
+RUNME="$1"
+shift
+GDB="${*:-gdb}"
+
+
+pf_prefix=""
+function pf_prefix() {
+ pf_prefix="$*"
+}
+
+set_test=""
+function set_test() {
+ if [ -n "$set_test" ] ; then
+ echo >&2 "DEJAGNU-BASH ERROR: set_test already set"
+ exit 1
+ fi
+ set_test="$*"
+ if [ -n "$pf_prefix" ] ; then
+ set_test="$pf_prefix: $set_test"
+ fi
+}
+
+# INTERNAL
+function record_test {
+ if [ -z "$set_test" ] ; then
+ echo >&2 "DEJAGNU-BASH ERROR: set_test not set"
+ exit 1
+ fi
+ # Provide the leading whitespace delimiter:
+ echo " $1: $set_test"
+ set_test=""
+}
+
+function pass() {
+ record_test PASS
+}
+function fail() {
+ record_test FAIL
+}
+
+
+# Verify that the gdb output doesn't contain $1.
+function mustNotHave() {
+ local BADWORD=$1
+ set_test gdb output contains "$BADWORD"
+ if grep -q "$BADWORD" $LOG ; then
+ fail
+ return 1
+ fi
+ pass
+ return 0
+}
+
+# Verify that the gdb output contains exactly $1 $2s.
+function mustHaveCorrectAmount() {
+ local WANTEDNUMBER=$1
+ local GOODWORD=$2
+ local ACTUALNUMBER=$(grep "$GOODWORD" $LOG | wc -l)
+ set_test gdb output contained $ACTUALNUMBER \""$GOODWORD"\", not $WANTEDNUMBER as expected
+ if [ $ACTUALNUMBER != $WANTEDNUMBER ] ; then
+ fail
+ return 1
+ fi
+ pass
+ return 0
+}
+
+# Verify that the gdb output contains seven threads
+function mustHaveSevenThreads() {
+ NTHREADS=$(egrep "^Thread [1-7] \(" $LOG | wc -l)
+ set_test gdb output contains $NTHREADS threads, not 7 as expected
+ if [ $NTHREADS != 7 ] ; then
+ fail
+ return 1
+ fi
+ pass
+ return 0
+}
+
+# Verify that the gdb output has all parameters on consecutive lines
+function mustHaveSequence() {
+ SEQUENCE="$*"
+ NPARTS=$#
+ grep "$1" -A$((NPARTS - 1)) $LOG > matches.log
+
+ while [ $# -gt 1 ] ; do
+ shift
+ ((NPARTS--))
+ grep "$1" -A$((NPARTS - 1)) matches.log > temp.log
+ mv temp.log matches.log
+ done
+ LASTPART=$1
+
+ set_test gdb output does not contain the sequence: $SEQUENCE
+ if ! grep -q "$LASTPART" matches.log ; then
+ fail
+ return 1
+ fi
+ pass
+ return 0
+}
+
+# Verify that $LOG contains all information we want
+function verifyLog() {
+ local FAILURES=0
+
+ mustNotHave '??' || ((FAILURES++))
+ mustHaveCorrectAmount 11 threadcrash.c: || ((FAILURES++))
+
+ mustHaveSevenThreads || ((FAILURES++))
+ mustHaveSequence sleep "makeSyscall (ignored=" || ((FAILURES++))
+
+ mustHaveSequence sleep "syscallingSighandler (signo=" "signal handler called" 0x || ((FAILURES++))
+ mustHaveSequence pthread_kill "makeSyscallFromSighandler (ignored=" || ((FAILURES++))
+
+ mustHaveSequence sleep "syscallingAltSighandler (signo=" "signal handler called" 0x || ((FAILURES++))
+ mustHaveSequence pthread_kill "makeSyscallFromAltSighandler (ignored=" || ((FAILURES++))
+
+ mustHaveSequence Thread "spin (ignored=" || ((FAILURES++))
+
+ mustHaveSequence "spinningSighandler (signo=" "signal handler called" 0x || ((FAILURES++))
+ mustHaveSequence pthread_kill "spinFromSighandler (ignored=" || ((FAILURES++))
+
+ mustHaveSequence "spinningAltSighandler (signo=" "signal handler called" 0x || ((FAILURES++))
+ mustHaveSequence pthread_kill "spinFromAltSighandler (ignored=" || ((FAILURES++))
+
+ mustHaveSequence Thread "main (argc=1, argv=" || ((FAILURES++))
+
+ return $FAILURES
+}
+
+# Put result of debugging a core file in $LOG
+function getLogFromCore() {
+ # Make sure we get a core file
+ set_test Make sure we get a core file
+ if ! ulimit -c unlimited ; then
+ fail
+ exit 1
+ fi
+ pass
+
+ # Run the crasher
+ ./$(basename "$RUNME")
+ EXITCODE=$?
+
+ # Verify that we actually crashed
+ set_test $RUNME should have been killed by a signal, got non-signal exit code $EXITCODE
+ if [ $EXITCODE -lt 128 ] ; then
+ fail
+ exit 1
+ fi
+ pass
+
+ # Verify that we got a core file
+ set_test $RUNME did not create a core file
+ if [ ! -r core* ] ; then
+ fail
+ exit 1
+ fi
+ pass
+
+ # Run gdb
+ cat > gdbscript.gdb <<EOF
+set width 0
+t a a bt 100
+quit
+EOF
+ cat gdbscript.gdb /dev/zero | $GDB -nx "./$(basename "$RUNME")" core* > $LOG
+ EXITCODE=$?
+
+ set_test gdb exited with error code
+ if [ $EXITCODE != 0 ] ; then
+ ((FAILURES++))
+ echo >&2 gdb exited with error code $EXITCODE
+ fail
+ fi
+ pass
+}
+
+# Put result of debugging a gcore file in $LOG
+function getLogFromGcore() {
+ # Create the core file
+ rm -f core*
+ cat > gdbscript.gdb <<EOF
+handle SIGQUIT pass noprint nostop
+handle SIGUSR1 pass noprint nostop
+handle SIGUSR2 pass noprint nostop
+handle SIGALRM pass noprint nostop
+run
+gcore
+quit
+EOF
+ cat gdbscript.gdb /dev/zero | $GDB -nx "./$(basename "$RUNME")" > /dev/null
+ EXITCODE=$?
+
+ set_test gdb exited with error code when creating gcore file
+ if [ $EXITCODE != 0 ] ; then
+ ((FAILURES++))
+ echo >&2 gdb exited with error code $EXITCODE when creating gcore file
+ fail
+ fi
+ pass
+
+ # Verify that we got a core file from gcore
+ set_test gdb gcore did not create a core file
+ if [ ! -r core* ] ; then
+ fail
+ exit 1
+ fi
+ pass
+
+ # Run gdb on the gcore file
+ cat > gdbscript.gdb <<EOF
+set width 0
+t a a bt 100
+quit
+EOF
+ cat gdbscript.gdb /dev/zero | $GDB -nx "./$(basename "$RUNME")" core* > $LOG
+ EXITCODE=$?
+
+ set_test gdb exited with error code when examining gcore file
+ if [ $EXITCODE != 0 ] ; then
+ ((FAILURES++))
+ echo >&2 gdb exited with error code $EXITCODE when examining gcore file
+ fail
+ fi
+ pass
+}
+
+# Put result of debugging a core file in $LOG
+function getLogFromLiveProcess() {
+ # Run gdb
+ cat > gdbscript.gdb <<EOF
+handle SIGQUIT pass noprint nostop
+handle SIGUSR1 pass noprint nostop
+handle SIGUSR2 pass noprint nostop
+handle SIGALRM pass noprint nostop
+set width 0
+run
+t a a bt 100
+quit
+EOF
+ cat gdbscript.gdb /dev/zero | $GDB -nx "./$(basename "$RUNME")" > $LOG
+ EXITCODE=$?
+
+ set_test gdb exited with error code
+ if [ $EXITCODE != 0 ] ; then
+ ((FAILURES++))
+ echo >&2 gdb exited with error code $EXITCODE
+ fail
+ fi
+ pass
+}
+
+####### Main program follows #####################
+
+# Make sure we don't clobber anybody else's (core) file(s)
+WORKDIR=/tmp/$PPID
+mkdir -p $WORKDIR
+cp "$RUNME" $WORKDIR
+cd $WORKDIR
+
+# Count problems
+FAILURES=0
+
+echo === Testing gdb vs core file...
+pf_prefix core file
+getLogFromCore
+verifyLog
+((FAILURES+=$?))
+pf_prefix
+echo === Core file tests done.
+
+echo
+
+echo === Testing gdb vs gcore file...
+pf_prefix gcore file
+getLogFromGcore
+verifyLog
+((FAILURES+=$?))
+pf_prefix
+echo === Gcore file tests done.
+
+echo
+
+echo === Testing gdb vs live process...
+pf_prefix live process
+getLogFromLiveProcess
+verifyLog
+((FAILURES+=$?))
+pf_prefix
+echo === Live process tests done.
+
+# Executive summary
+echo
+if [ $FAILURES == 0 ] ; then
+ echo All tests passed!
+else
+ echo $FAILURES tests failed!
+ echo
+ echo Make sure the threadcrash binary contains debugging information \(build with \"gcc -g\"\).
+fi
+
+# Clean up
+cd /
+rm -rf $WORKDIR
+
+exit $FAILURES
diff --git a/gdb/testsuite/gdb.threads/threadcrash.sh-orig b/gdb/testsuite/gdb.threads/threadcrash.sh-orig
new file mode 100644
--- /dev/null
+++ b/gdb/testsuite/gdb.threads/threadcrash.sh-orig
@@ -0,0 +1,248 @@
+#! /bin/bash
+
+# NOTE: threadcrash.c *must* be built with debugging symbols
+#
+# The point of this shell script is to crash treadcrash.c, load the
+# resulting core file into gdb and verify that gdb can extract enough
+# information from the core file.
+#
+# The return code from this script is the number of failed tests.
+
+LOG=gdbresult.log
+
+if [ $# != 1 ] ; then
+ echo > /dev/stderr Syntax: $0 \<name of threadcrash binary\>
+ exit 1
+fi
+RUNME="$1"
+
+# Verify that the gdb output doesn't contain $1.
+function mustNotHave() {
+ local BADWORD=$1
+ if grep -q "$BADWORD" $LOG ; then
+ echo >> /dev/stderr WARNING: gdb output contains "$BADWORD"
+ return 1
+ fi
+ return 0
+}
+
+# Verify that the gdb output contains exactly $1 $2s.
+function mustHaveCorrectAmount() {
+ local WANTEDNUMBER=$1
+ local GOODWORD=$2
+ local ACTUALNUMBER=$(grep "$GOODWORD" $LOG | wc -l)
+ if [ $ACTUALNUMBER != $WANTEDNUMBER ] ; then
+ echo >> /dev/stderr WARNING: gdb output contained $ACTUALNUMBER \""$GOODWORD"\", not $WANTEDNUMBER as expected
+ return 1
+ fi
+ return 0
+}
+
+# Verify that the gdb output contains seven threads
+function mustHaveSevenThreads() {
+ NTHREADS=$(egrep "^Thread [1-7] \(" $LOG | wc -l)
+ if [ $NTHREADS != 7 ] ; then
+ echo >> /dev/stderr WARNING: gdb output contains $NTHREADS threads, not 7 as expected
+ return 1
+ fi
+ return 0
+}
+
+# Verify that the gdb output has all parameters on consecutive lines
+function mustHaveSequence() {
+ SEQUENCE="$*"
+ NPARTS=$#
+ grep "$1" -A$((NPARTS - 1)) $LOG > matches.log
+
+ while [ $# -gt 1 ] ; do
+ shift
+ ((NPARTS--))
+ grep "$1" -A$((NPARTS - 1)) matches.log > temp.log
+ mv temp.log matches.log
+ done
+ LASTPART=$1
+
+ if ! grep -q "$LASTPART" matches.log ; then
+ echo >> /dev/stderr WARNING: gdb output does not contain the sequence: $SEQUENCE
+ return 1
+ fi
+ return 0
+}
+
+# Verify that $LOG contains all information we want
+function verifyLog() {
+ local FAILURES=0
+
+ mustNotHave '??' || ((FAILURES++))
+ mustHaveCorrectAmount 12 threadcrash.c: || ((FAILURES++))
+
+ mustHaveSevenThreads || ((FAILURES++))
+ mustHaveSequence sleep "makeSyscall (ignored=" || ((FAILURES++))
+
+ mustHaveSequence sleep "syscallingSighandler (signo=" "signal handler called" 0x || ((FAILURES++))
+ mustHaveSequence pthread_kill "makeSyscallFromSighandler (ignored=" || ((FAILURES++))
+
+ mustHaveSequence sleep "syscallingAltSighandler (signo=" "signal handler called" 0x || ((FAILURES++))
+ mustHaveSequence pthread_kill "makeSyscallFromAltSighandler (ignored=" || ((FAILURES++))
+
+ mustHaveSequence Thread "spin (ignored=" || ((FAILURES++))
+
+ mustHaveSequence "spinningSighandler (signo=" "signal handler called" 0x || ((FAILURES++))
+ mustHaveSequence pthread_kill "spinFromSighandler (ignored=" || ((FAILURES++))
+
+ mustHaveSequence "spinningAltSighandler (signo=" "signal handler called" 0x || ((FAILURES++))
+ mustHaveSequence pthread_kill "spinFromAltSighandler (ignored=" || ((FAILURES++))
+
+ mustHaveSequence Thread "main (argc=1, argv=" || ((FAILURES++))
+
+ return $FAILURES
+}
+
+# Put result of debugging a core file in $LOG
+function getLogFromCore() {
+ # Make sure we get a core file
+ ulimit -c unlimited || exit 1
+
+ # Run the crasher
+ ./$(basename "$RUNME")
+ EXITCODE=$?
+
+ # Verify that we actually crashed
+ if [ $EXITCODE -lt 128 ] ; then
+ echo >> /dev/stderr ERROR: $RUNME should have been killed by a signal, got non-signal exit code $EXITCODE
+ exit 1
+ fi
+
+ # Verify that we got a core file
+ if [ ! -r core* ] ; then
+ echo >> /dev/stderr ERROR: $RUNME did not create a core file
+ exit 1
+ fi
+
+ # Run gdb
+ cat > gdbscript.gdb <<EOF
+set width 0
+t a a bt 100
+quit
+EOF
+ cat gdbscript.gdb /dev/zero | gdb -nx "./$(basename "$RUNME")" core* > $LOG
+ EXITCODE=$?
+
+ if [ $EXITCODE != 0 ] ; then
+ ((FAILURES++))
+ echo >> /dev/stderr WARNING: gdb exited with error code $EXITCODE
+ fi
+}
+
+# Put result of debugging a gcore file in $LOG
+function getLogFromGcore() {
+ # Create the core file
+ rm -f core*
+ cat > gdbscript.gdb <<EOF
+handle SIGQUIT pass noprint nostop
+handle SIGUSR1 pass noprint nostop
+handle SIGUSR2 pass noprint nostop
+handle SIGALRM pass noprint nostop
+run
+gcore
+quit
+EOF
+ cat gdbscript.gdb /dev/zero | gdb -nx "./$(basename "$RUNME")" > /dev/null
+ EXITCODE=$?
+
+ if [ $EXITCODE != 0 ] ; then
+ ((FAILURES++))
+ echo >> /dev/stderr WARNING: gdb exited with error code $EXITCODE when creating gcore file
+ fi
+
+ # Verify that we got a core file from gcore
+ if [ ! -r core* ] ; then
+ echo >> /dev/stderr ERROR: gdb gcore did not create a core file
+ exit 1
+ fi
+
+ # Run gdb on the gcore file
+ cat > gdbscript.gdb <<EOF
+set width 0
+t a a bt 100
+quit
+EOF
+ cat gdbscript.gdb /dev/zero | gdb -nx "./$(basename "$RUNME")" core* > $LOG
+ EXITCODE=$?
+
+ if [ $EXITCODE != 0 ] ; then
+ ((FAILURES++))
+ echo >> /dev/stderr WARNING: gdb exited with error code $EXITCODE when examining gcore file
+ fi
+}
+
+# Put result of debugging a core file in $LOG
+function getLogFromLiveProcess() {
+ # Run gdb
+ cat > gdbscript.gdb <<EOF
+handle SIGQUIT pass noprint nostop
+handle SIGUSR1 pass noprint nostop
+handle SIGUSR2 pass noprint nostop
+handle SIGALRM pass noprint nostop
+set width 0
+run
+t a a bt 100
+quit
+EOF
+ cat gdbscript.gdb /dev/zero | gdb -nx "./$(basename "$RUNME")" > $LOG
+ EXITCODE=$?
+
+ if [ $EXITCODE != 0 ] ; then
+ ((FAILURES++))
+ echo >> /dev/stderr WARNING: gdb exited with error code $EXITCODE
+ fi
+}
+
+####### Main program follows #####################
+
+# Make sure we don't clobber anybody else's (core) file(s)
+WORKDIR=/tmp/$PPID
+mkdir -p $WORKDIR
+cp "$RUNME" $WORKDIR
+cd $WORKDIR
+
+# Count problems
+FAILURES=0
+
+echo === Testing gdb vs core file...
+getLogFromCore
+verifyLog
+((FAILURES+=$?))
+echo === Core file tests done.
+
+echo
+
+echo === Testing gdb vs gcore file...
+getLogFromGcore
+verifyLog
+((FAILURES+=$?))
+echo === Gcore file tests done.
+
+echo
+
+echo === Testing gdb vs live process...
+getLogFromLiveProcess
+verifyLog
+((FAILURES+=$?))
+echo === Live process tests done.
+
+# Executive summary
+echo
+if [ $FAILURES == 0 ] ; then
+ echo All tests passed!
+else
+ echo $FAILURES tests failed!
+ echo
+ echo Make sure the threadcrash binary contains debugging information \(build with \"gcc -g\"\).
+fi
+
+# Clean up
+cd /
+rm -rf $WORKDIR
+
+exit $FAILURES

View File

@ -0,0 +1,134 @@
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
It is duplicite to its upstream variant:
http://sourceware.org/ml/gdb-cvs/2007-01/msg00157.html
http://sourceware.org/ml/gdb-patches/2007-01/msg00434.html
2007-01-21 Jan Kratochvil <jan.kratochvil@redhat.com>
Daniel Jacobowitz <dan@codesourcery.com>
* gdb.base/included.c, gdb.base/included.exp,
gdb.base/included.h: New files.
------------------------------------------------------------------------------
2007-01-09 Jan Kratochvil <jan.kratochvil@redhat.com>
* gdb.dwarf2/dw2-included.exp, gdb.dwarf2/dw2-included.c,
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
new file mode 100644
--- /dev/null
+++ b/gdb/testsuite/gdb.dwarf2/dw2-included.c
@@ -0,0 +1,26 @@
+/* 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. */
+
+#include "dw2-included.h"
+
+int
+main()
+{
+ return 0;
+}
diff --git a/gdb/testsuite/gdb.dwarf2/dw2-included.exp b/gdb/testsuite/gdb.dwarf2/dw2-included.exp
new file mode 100644
--- /dev/null
+++ b/gdb/testsuite/gdb.dwarf2/dw2-included.exp
@@ -0,0 +1,47 @@
+# 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.
+
+# Minimal DWARF-2 unit test
+
+# This test can only be run on targets which support DWARF-2.
+# For now pick a sampling of likely targets.
+if {![istarget *-*-linux*]
+ && ![istarget *-*-gnu*]
+ && ![istarget *-*-elf*]
+ && ![istarget *-*-openbsd*]
+ && ![istarget arm-*-eabi*]
+ && ![istarget powerpc-*-eabi*]} {
+ return 0
+}
+
+set testfile "dw2-included"
+set srcfile ${testfile}.c
+set binfile [standard_output_file ${testfile}]
+
+if { [gdb_compile "${srcdir}/${subdir}/${srcfile}" "${binfile}" executable {debug}] != "" } {
+ return -1
+}
+
+gdb_exit
+gdb_start
+gdb_reinitialize_dir $srcdir/$subdir
+gdb_load ${binfile}
+
+gdb_test "set listsize 1" ""
+gdb_test "list integer" "int integer;\r"
+gdb_test "ptype integer" "type = int\r"
+# Path varies depending on the build location.
+gdb_test "info variables integer" "\r\nFile \[^\r\n\]*/gdb.dwarf2/dw2-included.h:\r\n${decimal}:.*int integer;\r"
diff --git a/gdb/testsuite/gdb.dwarf2/dw2-included.h b/gdb/testsuite/gdb.dwarf2/dw2-included.h
new file mode 100644
--- /dev/null
+++ b/gdb/testsuite/gdb.dwarf2/dw2-included.h
@@ -0,0 +1,20 @@
+/* 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. */
+
+int integer;

View File

@ -0,0 +1,264 @@
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
2008-02-24 Jan Kratochvil <jan.kratochvil@redhat.com>
Port to GDB-6.8pre.
currently for trivial nonthreaded helloworld with no debug info up to -ggdb2 you
will get:
(gdb) p errno
[some error]
* with -ggdb2 and less "errno" in fact does not exist anywhere as it was
compiled to "(*__errno_location ())" and the macro definition is not present.
Unfortunately gdb will find the TLS symbol and it will try to access it but
as the program has been compiled without -lpthread the TLS base register
(%gs on i386) is not setup and it will result in:
Cannot access memory at address 0x8
Attached suggestion patch how to deal with the most common "errno" symbol
for the most common under-ggdb3 compiled programs.
Original patch hooked into target_translate_tls_address. But its inferior
call invalidates `struct frame *' in the callers - RH BZ 690908.
https://bugzilla.redhat.com/show_bug.cgi?id=1166549
2007-11-03 Jan Kratochvil <jan.kratochvil@redhat.com>
* ./gdb/dwarf2read.c (read_partial_die, dwarf2_linkage_name): Prefer
DW_AT_MIPS_linkage_name over DW_AT_name now only for non-C.
glibc-debuginfo-2.7-2.x86_64: /usr/lib/debug/lib64/libc.so.6.debug:
<81a2> DW_AT_name : (indirect string, offset: 0x280e): __errno_location
<81a8> DW_AT_MIPS_linkage_name: (indirect string, offset: 0x2808): *__GI___errno_location
diff --git a/gdb/printcmd.c b/gdb/printcmd.c
--- a/gdb/printcmd.c
+++ b/gdb/printcmd.c
@@ -1210,6 +1210,10 @@ print_command_1 (const char *args, int voidprint)
if (exp != nullptr && *exp)
{
+ /* '*((int *(*) (void)) __errno_location) ()' is incompatible with
+ function descriptors. */
+ if (target_has_execution && strcmp (exp, "errno") == 0)
+ exp = "*(*(int *(*)(void)) __errno_location) ()";
expression_up expr = parse_expression (exp);
val = evaluate_expression (expr.get ());
}
diff --git a/gdb/testsuite/gdb.dwarf2/dw2-errno.c b/gdb/testsuite/gdb.dwarf2/dw2-errno.c
new file mode 100644
--- /dev/null
+++ b/gdb/testsuite/gdb.dwarf2/dw2-errno.c
@@ -0,0 +1,28 @@
+/* This testcase is part of GDB, the GNU debugger.
+
+ Copyright 2005, 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 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 */
+
+#include <errno.h>
+
+int main()
+{
+ errno = 42;
+
+ return 0; /* breakpoint */
+}
diff --git a/gdb/testsuite/gdb.dwarf2/dw2-errno.exp b/gdb/testsuite/gdb.dwarf2/dw2-errno.exp
new file mode 100644
--- /dev/null
+++ b/gdb/testsuite/gdb.dwarf2/dw2-errno.exp
@@ -0,0 +1,60 @@
+# 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 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 dw2-errno
+set srcfile ${testfile}.c
+set binfile [standard_output_file ${testfile}]
+
+proc prep {} {
+ global srcdir subdir binfile
+ gdb_exit
+ gdb_start
+ gdb_reinitialize_dir $srcdir/$subdir
+ gdb_load ${binfile}
+
+ runto_main
+
+ gdb_breakpoint [gdb_get_line_number "breakpoint"]
+ gdb_continue_to_breakpoint "breakpoint"
+}
+
+if { [gdb_compile "${srcdir}/${subdir}/${srcfile}" "${binfile}" executable "additional_flags=-g2"] != "" } {
+ untested "Couldn't compile test program"
+ return -1
+}
+prep
+gdb_test "print errno" ".* = 42" "errno with macros=N threads=N"
+
+if { [gdb_compile "${srcdir}/${subdir}/${srcfile}" "${binfile}" executable "additional_flags=-g3"] != "" } {
+ untested "Couldn't compile test program"
+ return -1
+}
+prep
+gdb_test "print errno" ".* = 42" "errno with macros=Y threads=N"
+
+if {[gdb_compile_pthreads "${srcdir}/${subdir}/${srcfile}" "${binfile}" executable "additional_flags=-g2"] != "" } {
+ return -1
+}
+prep
+gdb_test "print errno" ".* = 42" "errno with macros=N threads=Y"
+
+if {[gdb_compile_pthreads "${srcdir}/${subdir}/${srcfile}" "${binfile}" executable "additional_flags=-g3"] != "" } {
+ return -1
+}
+prep
+gdb_test "print errno" ".* = 42" "errno with macros=Y threads=Y"
+
+# TODO: Test the error on resolving ERRNO with only libc loaded.
+# Just how to find the current libc filename?
diff --git a/gdb/testsuite/gdb.dwarf2/dw2-errno2.c b/gdb/testsuite/gdb.dwarf2/dw2-errno2.c
new file mode 100644
--- /dev/null
+++ b/gdb/testsuite/gdb.dwarf2/dw2-errno2.c
@@ -0,0 +1,28 @@
+/* This testcase is part of GDB, the GNU debugger.
+
+ Copyright 2005, 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 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 */
+
+#include <errno.h>
+
+int main()
+{
+ errno = 42;
+
+ return 0; /* breakpoint */
+}
diff --git a/gdb/testsuite/gdb.dwarf2/dw2-errno2.exp b/gdb/testsuite/gdb.dwarf2/dw2-errno2.exp
new file mode 100644
--- /dev/null
+++ b/gdb/testsuite/gdb.dwarf2/dw2-errno2.exp
@@ -0,0 +1,71 @@
+# 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 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 dw2-errno2
+set srcfile ${testfile}.c
+set binfile [standard_output_file ${testfile}]
+
+proc prep { message {do_xfail 0} } { with_test_prefix $message {
+ global srcdir subdir binfile variant
+ gdb_exit
+ gdb_start
+ gdb_reinitialize_dir $srcdir/$subdir
+ gdb_load ${binfile}${variant}
+
+ runto_main
+
+ gdb_breakpoint [gdb_get_line_number "breakpoint"]
+ gdb_continue_to_breakpoint "breakpoint"
+
+ gdb_test "gcore ${binfile}${variant}.core" "\r\nSaved corefile .*" "gcore $variant"
+
+ gdb_test "print errno" ".* = 42"
+
+ gdb_test "kill" ".*" "kill" {Kill the program being debugged\? \(y or n\) } "y"
+ gdb_test "core-file ${binfile}${variant}.core" "\r\nCore was generated by .*" "core-file"
+ if $do_xfail {
+ setup_xfail "*-*-*"
+ }
+ gdb_test "print (int) errno" ".* = 42" "print errno for core"
+}}
+
+set variant g2thrN
+if { [gdb_compile "${srcdir}/${subdir}/${srcfile}" "${binfile}${variant}" executable "additional_flags=-g2"] != "" } {
+ untested "Couldn't compile test program"
+ return -1
+}
+prep "macros=N threads=N" 1
+
+set variant g3thrN
+if { [gdb_compile "${srcdir}/${subdir}/${srcfile}" "${binfile}${variant}" executable "additional_flags=-g3"] != "" } {
+ untested "Couldn't compile test program"
+ return -1
+}
+prep "macros=Y threads=N" 1
+
+set variant g2thrY
+if {[gdb_compile_pthreads "${srcdir}/${subdir}/${srcfile}" "${binfile}${variant}" executable "additional_flags=-g2"] != "" } {
+ return -1
+}
+prep "macros=N threads=Y"
+
+set variant g3thrY
+if {[gdb_compile_pthreads "${srcdir}/${subdir}/${srcfile}" "${binfile}${variant}" executable "additional_flags=-g3"] != "" } {
+ return -1
+}
+prep "macros=Y threads=Y" 1
+
+# TODO: Test the error on resolving ERRNO with only libc loaded.
+# Just how to find the current libc filename?

View File

@ -0,0 +1,102 @@
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
diff --git a/gdb/testsuite/gdb.base/step-over-trampoline.c b/gdb/testsuite/gdb.base/step-over-trampoline.c
new file mode 100644
--- /dev/null
+++ b/gdb/testsuite/gdb.base/step-over-trampoline.c
@@ -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;
+}
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 @@
+# 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.
+
+if $tracelevel then {
+ strace $tracelevel
+}
+
+set testfile step-over-trampoline
+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}
+
+# For C programs, "start" should stop in main().
+
+gdb_test "start" \
+ "main \\(\\) at .*$srcfile.*" \
+ "start"
+
+# main () at hello2.c:5
+# 5 puts("hello world\n");
+# (gdb) next
+# 0x100007e0 in call___do_global_ctors_aux ()
+
+gdb_test_multiple "next" "invalid `next' output" {
+ -re "\nhello world.*return 0;.*" {
+ pass "stepped over"
+ }
+ -re " in call___do_global_ctors_aux \\(\\).*" {
+ fail "stepped into trampoline"
+ }
+}

View File

@ -0,0 +1,27 @@
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
diff --git a/gdb/symtab.c b/gdb/symtab.c
--- a/gdb/symtab.c
+++ b/gdb/symtab.c
@@ -3169,6 +3169,13 @@ find_pc_sect_line (CORE_ADDR pc, struct obj_section *section, int notcurrent)
msymbol->linkage_name ()); */
;
/* fall through */
+ /* `msymbol' trampoline may be located before its .text symbol
+ but this text symbol may be the address we were looking for.
+ Avoid `find_pc_sect_line'<->`find_pc_line' infinite loop.
+ Red Hat Bug 218379. */
+ else if (BMSYMBOL_VALUE_ADDRESS (mfunsym) == pc)
+ warning ("In stub for %s (0x%s); interlocked, please submit the binary to http://bugzilla.redhat.com", msymbol.minsym->linkage_name (), paddress (target_gdbarch (), pc));
+ /* fall through */
else
{
/* Detect an obvious case of infinite recursion. If this

View File

@ -0,0 +1,88 @@
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-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 @@
+# 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. */
+
+# are we on a target board
+if [is_remote target] then {
+ return 0
+}
+
+# Start the program running and then wait for a bit, to be sure
+# that it can be attached to.
+
+gdb_exit
+gdb_start
+gdb_load sleep
+
+set gdb_pid [exp_pid -i [board_info host fileid]]
+set test "identified the child GDB"
+if {$gdb_pid != "" && $gdb_pid > 0} {
+ pass $test
+ verbose -log "Child GDB PID $gdb_pid"
+} else {
+ fail $test
+}
+
+set testpid [eval exec sleep 10 &]
+exec sleep 2
+
+set test "attach"
+gdb_test_multiple "attach $testpid" "$test" {
+ -re "Attaching to program.*`?.*'?, process $testpid..*$gdb_prompt $" {
+ pass "$test"
+ }
+ -re "Attaching to program.*`?.*\.exe'?, process $testpid.*\[Switching to thread $testpid\..*\].*$gdb_prompt $" {
+ # Response expected on Cygwin
+ pass "$test"
+ }
+}
+
+# Some time to let GDB spawn its testing child.
+exec sleep 2
+
+set found none
+foreach procpid [glob -directory /proc -type d {[0-9]*}] {
+ if {[catch {open $procpid/status} statusfi]} {
+ continue
+ }
+ set status [read $statusfi]
+ close $statusfi
+ if {1
+ && [regexp -line {^Name:\tgdb$} $status]
+ && [regexp -line {^PPid:\t1$} $status]
+ && [regexp -line "^TracerPid:\t$gdb_pid$" $status]} {
+ set found $procpid
+ verbose -log "Found linux_test_for_tracefork zombie PID $procpid"
+ }
+}
+set test "linux_test_for_tracefork leaves no zombie"
+if {$found eq {none}} {
+ pass $test
+} else {
+ fail $test
+}

View File

@ -0,0 +1,149 @@
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-gcore-buffer-limit-test.patch
;; 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 @@
+/* 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 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 <unistd.h>
+#include <stdlib.h>
+
+#define MEGS 64
+
+int main()
+{
+ void *mem;
+
+ mem = malloc (MEGS * 1024ULL * 1024ULL);
+
+ for (;;)
+ sleep (1);
+
+ return 0;
+}
diff --git a/gdb/testsuite/gdb.base/gcore-excessive-memory.exp b/gdb/testsuite/gdb.base/gcore-excessive-memory.exp
new file mode 100644
--- /dev/null
+++ b/gdb/testsuite/gdb.base/gcore-excessive-memory.exp
@@ -0,0 +1,94 @@
+# 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.
+
+set testfile gcore-excessive-memory
+set srcfile ${testfile}.c
+set shfile [standard_output_file ${testfile}-gdb.sh]
+set corefile [standard_output_file ${testfile}.core]
+set binfile [standard_output_file ${testfile}]
+if { [gdb_compile "${srcdir}/${subdir}/${srcfile}" "${binfile}" executable {debug}] != "" } {
+ untested "Couldn't compile test program"
+ return -1
+}
+
+set f [open "|getconf PAGESIZE" "r"]
+gets $f pagesize
+close $f
+
+set pid_of_bin [eval exec $binfile &]
+sleep 2
+
+# Get things started.
+
+gdb_exit
+gdb_start
+gdb_reinitialize_dir $srcdir/$subdir
+gdb_load ${binfile}
+
+set pid_of_gdb [exp_pid -i [board_info host fileid]]
+
+gdb_test "attach $pid_of_bin" "Attaching to .*" "attach"
+gdb_test "up 99" "in main .*" "verify we can get to main"
+
+proc memory_v_pages_get {} {
+ global pid_of_gdb pagesize
+ set fd [open "/proc/$pid_of_gdb/statm"]
+ gets $fd line
+ close $fd
+ # number of pages of virtual memory
+ scan $line "%d" drs
+ return $drs
+}
+
+set pages_found [memory_v_pages_get]
+
+# It must be definitely less than `MEGS' of `gcore-excessive-memory.c'.
+set mb_gcore_reserve 4
+verbose -log "pages_found = $pages_found, mb_gcore_reserve = $mb_gcore_reserve"
+set kb_found [expr $pages_found * $pagesize / 1024]
+set kb_permit [expr $kb_found + 1 * 1024 + $mb_gcore_reserve * 1024]
+verbose -log "kb_found = $kb_found, kb_permit = $kb_permit"
+
+# Create the ulimit wrapper.
+set f [open $shfile "w"]
+puts $f "#! /bin/sh"
+puts $f "ulimit -v $kb_permit"
+puts $f "exec $GDB \"\$@\""
+close $f
+remote_exec host "chmod +x $shfile"
+
+gdb_exit
+set GDBold $GDB
+set GDB "$shfile"
+gdb_start
+set GDB $GDBold
+
+gdb_reinitialize_dir $srcdir/$subdir
+gdb_load ${binfile}
+
+set pid_of_gdb [exp_pid -i [board_info host fileid]]
+
+gdb_test "attach $pid_of_bin" "Attaching to .*" "attach"
+gdb_test "up 99" "in main .*" "verify we can get to main"
+
+verbose -log "kb_found before gcore = [expr [memory_v_pages_get] * $pagesize / 1024]"
+
+gdb_test "gcore $corefile" "Saved corefile \[^\n\r\]*" "Save the core file"
+
+verbose -log "kb_found after gcore = [expr [memory_v_pages_get] * $pagesize / 1024]"
+
+# Cleanup.
+exec kill -9 $pid_of_bin

View File

@ -0,0 +1,130 @@
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-ia64-libunwind-leak-test.patch
;; 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 @@
+/* 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 <unistd.h>
+
+int main()
+{
+ for (;;)
+ alarm (0);
+ return 0;
+}
diff --git a/gdb/testsuite/gdb.base/unwind-leak.exp b/gdb/testsuite/gdb.base/unwind-leak.exp
new file mode 100644
--- /dev/null
+++ b/gdb/testsuite/gdb.base/unwind-leak.exp
@@ -0,0 +1,83 @@
+# 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 unwind-leak
+set srcfile ${testfile}.c
+set shfile [standard_output_file ${testfile}-gdb.sh]
+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}
+
+set pid [exp_pid -i [board_info host fileid]]
+
+# For C programs, "start" should stop in main().
+
+gdb_test "start" \
+ "main \\(\\) at .*$srcfile.*" \
+ "start"
+
+set loc [gdb_get_line_number "alarm"]
+gdb_breakpoint $loc
+
+proc memory_get {} {
+ global pid
+ set fd [open "/proc/$pid/statm"]
+ gets $fd line
+ close $fd
+ # number of pages of data/stack
+ scan $line "%*d%*d%*d%*d%*d%d" drs
+ return $drs
+}
+
+set cycles 100
+# For 100 cycles it was 1308: from = 363 KB, to = 1671 KB
+set permit_kb 100
+verbose -log "cycles = $cycles, permit_kb = $permit_kb"
+
+set fail 0
+set test "breakpoint stop/continue cycles"
+for {set i $cycles} {$i > 0} {set i [expr {$i - 1}]} {
+ gdb_test_multiple "continue" $test {
+ -re "Breakpoint 2, main .*alarm .*.*${gdb_prompt} $" {
+ }
+ -re "Segmentation fault" {
+ fail $test
+ set i 0
+ set fail 1
+ }
+ }
+ if ![info exists from] {
+ set from [memory_get]
+ }
+}
+set to [memory_get]
+if {!$fail} {
+ verbose -log "from = $from KB, to = $to KB"
+ if {$from > 0 && $to > 10 && $to < $from + $permit_kb} {
+ pass $test
+ } else {
+ fail $test
+ }
+}

View File

@ -0,0 +1,62 @@
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-last-address-space-byte-test.patch
;; Testcase for deadlocking on last address space byte; for corrupted backtraces.
;;=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 @@
+# 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.
+
+if $tracelevel then {
+ strace $tracelevel
+}
+
+# Get things started.
+
+gdb_exit
+gdb_start
+
+# i386 (32-bit) only: gdb with Red Hat largecore patch did lock up:
+# https://enterprise.redhat.com/issue-tracker/?module=issues&action=view&tid=103263
+# https://bugzilla.redhat.com/bugzilla/show_bug.cgi?id=210614
+
+# i386: Bug exists when the `target_xfer_memory' condition
+# `(memaddr + len < region->hi)' operates on 64-bit operands on
+# largecore-patched with 32-bit addresses and so it can get `false' with
+# arbitrary `len'.
+
+# x86_64: The bug is not present as the operands and calculations have the same
+# bit size. Would would still need to pass there the highest address
+# (`memaddr == 0xffffffffffffffff') but we would need to pass `len == 0'
+# to make the condition `(memaddr + len < region->hi)' false.
+# `len == 0' would get caught eariler.
+
+# Error in the success case is immediate.
+set timeoutold ${timeout}
+set timeout 10
+
+gdb_test "x/xb 0xffffffff" \
+ "Cannot access memory at address 0xffffffff" \
+ "Read the last address space byte"
+
+set timeout ${timeoutold}

View File

@ -0,0 +1,95 @@
From FEDORA_PATCHES Mon Sep 17 00:00:00 2001
From: Fedora GDB patches <invalid@email.com>
Date: Fri, 27 Oct 2017 21:07:50 +0200
Subject: gdb-6.5-missed-trap-on-step-test.patch
;; Test hiding unexpected breakpoints on intentional step commands.
;;=fedoratest
Fix has been committed to:
gdb-6.6-scheduler_locking-step-sw-watchpoints2.patch
diff --git a/gdb/testsuite/gdb.base/watchpoint-during-step.c b/gdb/testsuite/gdb.base/watchpoint-during-step.c
new file mode 100644
--- /dev/null
+++ b/gdb/testsuite/gdb.base/watchpoint-during-step.c
@@ -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 @@
+# 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 watchpoint-during-step
+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}
+
+runto_main
+
+gdb_breakpoint [gdb_get_line_number "var = 2"]
+gdb_continue_to_breakpoint "Find the first var set"
+
+gdb_test "step" ".*var = 3;" "Step to the next var set"
+
+gdb_test "watch var" "atchpoint .*: var" "Set the watchpoint"
+
+# Here is the target point. Be careful to not have breakpoint set on the line
+# 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"

View File

@ -0,0 +1,119 @@
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
diff --git a/gdb/testsuite/gdb.base/readline-overflow.exp b/gdb/testsuite/gdb.base/readline-overflow.exp
new file mode 100644
--- /dev/null
+++ b/gdb/testsuite/gdb.base/readline-overflow.exp
@@ -0,0 +1,104 @@
+# 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
+
+# This file was written by Jan Kratochvil <jan.kratochvil@redhat.com>
+
+# This file is part of the gdb testsuite.
+
+#
+# Tests for readline buffer overflow.
+#
+
+if $tracelevel {
+ strace $tracelevel
+}
+
+global env
+
+save_vars { env(INPUTRC) env(GDBHISTFILE) env(HISTSIZE) TERM timeout } {
+ # The arrow key test relies on the standard VT100 bindings, so
+ # make sure that an appropriate terminal is selected. The same
+ # bug doesn't show up if we use ^P / ^N instead.
+ setenv TERM vt100
+
+ # Don't let a .inputrc file or an existing setting of INPUTRC mess up
+ # the test results. Even if /dev/null doesn't exist on the particular
+ # platform, the readline library will use the default setting just by
+ # failing to open the file. OTOH, opening /dev/null successfully will
+ # also result in the default settings being used since nothing will be
+ # read from this file.
+ set env(INPUTRC) "/dev/null"
+
+ set timeout 600
+
+ set env(GDBHISTFILE) "${srcdir}/${subdir}/gdb_history"
+ set env(HISTSIZE) "10"
+
+ gdb_exit
+ gdb_start
+ gdb_reinitialize_dir $srcdir/$subdir
+
+
+ set width 11
+ gdb_test "set width $width" \
+ "" \
+ "Setting width to $width."
+ #gdb_test "set height 1" \
+ # "" \
+ # "Setting height to 1."
+ send_gdb "run X"
+ set i 0
+ # It crashes using `set width 7' on `set total 3560'.
+ # Sometimes it corrupts screen on `set width 7'.
+ # Bugreport used `set total 130001':
+ # https://bugzilla.redhat.com/bugzilla/show_bug.cgi?id=214196
+ # Check also `timeout' above.
+ set total 4200
+ gdb_expect {
+ -re X {
+ incr i
+ if {$i <= $total} {
+ send_gdb "X"
+ exp_continue
+ }
+ }
+ -re "\[ \b\r\n\]" {
+ exp_continue
+ }
+ eof {
+ fail "gdb sending total $total characters"
+ note "Failed after sending $i characters, reason: EOF"
+ gdb_clear_suppressed
+ }
+ timeout {
+ fail "gdb sending total $total characters"
+ note "Failed after sending $i characters (timeout $timeout), reason: TIMEOUT"
+ gdb_clear_suppressed
+ }
+ default {
+ fail "gdb sending total $total characters"
+ note "Failed after sending $i characters, reason: 0=\[$expect_out(0,string)\] buffer=\[$expect_out(buffer)\]"
+ gdb_clear_suppressed
+ }
+ }
+ send_gdb "\r"
+ gdb_test "" \
+ "No executable file specified..*" \
+ "All the characters transferred"
+}

View File

@ -0,0 +1,122 @@
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-section-num-fixup-test.patch
;; 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 @@
+/* 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 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 */
+
+int var;
diff --git a/gdb/testsuite/gdb.base/datalib-main.c b/gdb/testsuite/gdb.base/datalib-main.c
new file mode 100644
--- /dev/null
+++ b/gdb/testsuite/gdb.base/datalib-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 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 */
+
+int
+main (void)
+{
+ return 0;
+}
diff --git a/gdb/testsuite/gdb.base/datalib.exp b/gdb/testsuite/gdb.base/datalib.exp
new file mode 100644
--- /dev/null
+++ b/gdb/testsuite/gdb.base/datalib.exp
@@ -0,0 +1,51 @@
+# 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.
+
+set testfile datalib
+set srcfilemain ${testfile}-main.c
+set srcfilelib ${testfile}-lib.c
+set libfile [standard_output_file ${testfile}-lib.so]
+set binfile [standard_output_file ${testfile}-main]
+if { [gdb_compile "${srcdir}/${subdir}/${srcfilelib}" "${libfile}" executable [list debug {additional_flags=-shared -nostdlib}]] != "" } {
+ untested "Couldn't compile test program"
+ return -1
+}
+if { [gdb_compile "${srcdir}/${subdir}/${srcfilemain}" "${binfile} ${libfile}" 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}
+
+# We must use a separate library as the main executable is compiled to the
+# address 0 by default and it would get fixed up already at the end of
+# INIT_OBJFILE_SECT_INDICES. We also cannot PRELINK it as PRELINK is missing
+# on ia64. The library must be NOSTDLIB as otherwise some stub code would
+# create the `.text' section there. Also DEBUG option is useful as some of
+# the crashes occur in dwarf2read.c.
+
+# FAIL case:
+# ../../gdb/ia64-tdep.c:2838: internal-error: sect_index_text not initialized
+# A problem internal to GDB has been detected,
+
+gdb_test "start" \
+ "main \\(\\) at .*${srcfilemain}.*" \
+ "start"

View File

@ -0,0 +1,180 @@
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
export LD_LIBRARY_PATH=.
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?
The testsuite needs `gdb-6.3-bz146810-solib_absolute_prefix_is_empty.patch'.
The testsuite needs `gdb-6.5-tls-of-separate-debuginfo.patch'.
2006-09-01 Jan Kratochvil <jan.kratochvil@redhat.com>
* solib-svr4.c (svr4_fetch_objfile_link_map): Match even absolute
requested pathnames to the internal loaded relative pathnames.
2007-10-16 Jan Kratochvil <jan.kratochvil@redhat.com>
Port to GDB-6.7.
2008-02-27 Jan Kratochvil <jan.kratochvil@redhat.com>
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
new file mode 100644
--- /dev/null
+++ b/gdb/testsuite/gdb.threads/tls-sepdebug-main.c
@@ -0,0 +1,25 @@
+/* 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 */
+
+int main()
+{
+ return 0;
+}
diff --git a/gdb/testsuite/gdb.threads/tls-sepdebug-shared.c b/gdb/testsuite/gdb.threads/tls-sepdebug-shared.c
new file mode 100644
--- /dev/null
+++ b/gdb/testsuite/gdb.threads/tls-sepdebug-shared.c
@@ -0,0 +1,22 @@
+/* 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 */
+
+__thread int var = 42;
diff --git a/gdb/testsuite/gdb.threads/tls-sepdebug.exp b/gdb/testsuite/gdb.threads/tls-sepdebug.exp
new file mode 100644
--- /dev/null
+++ b/gdb/testsuite/gdb.threads/tls-sepdebug.exp
@@ -0,0 +1,87 @@
+# 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.
+
+if $tracelevel then {
+ strace $tracelevel
+}
+
+set testfile tls-sepdebug
+set srcmainfile ${testfile}-main.c
+set srcsharedfile ${testfile}-shared.c
+
+set binmainfile [standard_output_file ${testfile}-main]
+set binsharedbase ${testfile}-shared.so
+set binsharedfile [standard_output_file ${binsharedbase}]
+set binshareddebugfile [standard_output_file ${binsharedbase}.debug]
+
+# Use explicit -soname as otherwise the full path to the library would get
+# encoded into ${binmainfile} making LD_LIBRARY_PATH tests useless.
+
+# FIXME: gcc dependency (-Wl,-soname).
+
+if { [gdb_compile_shlib "${srcdir}/${subdir}/${srcsharedfile}" "${binsharedfile}" [list debug additional_flags=-Wl,-soname=${binsharedbase}]] != "" } {
+ untested "Couldn't compile test library"
+ return -1
+}
+
+# eu-strip(1) works fine but it is a part of `elfutils', not `binutils'.
+if 0 then {
+ remote_exec build "eu-strip -f ${binshareddebugfile} ${binsharedfile}"
+} else {
+ remote_exec build "objcopy --only-keep-debug ${binsharedfile} ${binshareddebugfile}"
+ remote_exec build "objcopy --strip-debug ${binsharedfile}"
+ remote_exec build "objcopy --add-gnu-debuglink=${binshareddebugfile} ${binsharedfile}"
+}
+
+# Do not use `shlib=' as it will automatically add also -rpath for gcc.
+
+if { [gdb_compile_pthreads "${srcdir}/${subdir}/${srcmainfile} ${binsharedfile}" "${binmainfile}" executable {debug}] != "" } {
+ untested "Couldn't compile test program"
+ return -1
+}
+
+# Get things started.
+
+# Test also the proper resolving of relative library names to absolute ones.
+# \$PWD is easy - it is the absolute way
+# ${subdir} would fail on "print var"
+
+set absdir [file dirname [standard_output_file ${binsharedbase}]]
+foreach ld_library_path [list $absdir [relative_filename [pwd] $absdir]] name { absolute relative } {
+
+ gdb_exit
+ gdb_start
+ ###gdb_reinitialize_dir $srcdir/$subdir
+
+ gdb_test "set env LD_LIBRARY_PATH=$ld_library_path" \
+ "" \
+ "set env LD_LIBRARY_PATH is $name"
+
+ gdb_load ${binmainfile}
+
+ # For C programs, "start" should stop in main().
+
+ gdb_test "start" \
+ "main \\(\\) at .*${srcmainfile}.*" \
+ "start"
+
+ # Check for: Cannot find shared library `/usr/lib/debug/lib/libc-2.4.90.so.debug' in dynamic linker's load module list
+ # as happens with TLS variables and `separate_debug_objfile_backlink'.
+
+ gdb_test "print var" \
+ "\\\$1 = \[0-9\].*" \
+ "print TLS variable from a shared library with $name-directory separate debug info file"
+}

View File

@ -0,0 +1,196 @@
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
[ Fixed up since the mail. ]
On Thu, 21 Jan 2010 18:17:15 +0100, Doug Evans wrote:
> Not an exhaustive list, but if we go down the path of converting "gdb
> corefile" to "gdb -c corefile", then we also need to think about "file
> corefile" being converted to "core corefile" [or "target core
> corefile", "core" is apparently deprecated in favor of "target core"]
> and "target exec corefile" -> "target core corefile". Presumably
> "file corefile" (and "target exec corefile") would discard the
> currently selected executable. But maybe not. Will that be confusing
> for users? I don't know.
While thinking about it overriding some GDB _commands_ was not my intention.
There is a general assumption if I have a shell COMMAND and some FILE I can do
$ COMMAND FILE
and COMMAND will appropriately load the FILE.
FSF GDB currently needs to specify also the executable file for core files
which already inhibits this intuitive expectation. OTOH with the build-id
locating patch which could allow such intuitive start notneeding the
executable file. Still it currently did not work due to the required "-c":
$ COMMAND -c COREFILE
Entering "file", "core-file" or "attach" commands is already explicit enough
so that it IMO should do what the command name says without any
autodetections. The second command line argument
(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.
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
bfd_check_format_matches) as the patch below is its natural extension.
Sorry for the delay,
Jan
2010-01-25 Jan Kratochvil <jan.kratochvil@redhat.com>
* exceptions.h (enum errors <IS_CORE_ERROR>): New.
* exec.c: Include exceptions.h.
(exec_file_attach <bfd_core>): Call throw_error (IS_CORE_ERROR, ...).
* main.c (exec_or_core_file_attach): New.
(captured_main <optind < argc>): Set also corearg.
(captured_main <strcmp (execarg, symarg) == 0>): New variable func.
Call exec_or_core_file_attach if COREARG matches EXECARG. Call
symbol_file_add_main only if CORE_BFD remained NULL.
Http://sourceware.org/ml/gdb-patches/2010-01/msg00517.html
2010-01-20 Doug Evans <dje@google.com>
* exec.c (exec_file_attach): Print a more useful error message if the
user did "gdb core".
diff --git a/gdb/exec.c b/gdb/exec.c
--- a/gdb/exec.c
+++ b/gdb/exec.c
@@ -18,6 +18,8 @@
along with this program. If not, see <http://www.gnu.org/licenses/>. */
#include "defs.h"
+#include "arch-utils.h"
+#include "exceptions.h"
#include "frame.h"
#include "inferior.h"
#include "target.h"
@@ -495,12 +497,27 @@ exec_file_attach (const char *filename, int from_tty)
if (!bfd_check_format_matches (exec_bfd, bfd_object, &matching))
{
+ int is_core;
+
+ /* If the user accidentally did "gdb core", print a useful
+ error message. Check it only after bfd_object has been checked as
+ a valid executable may get recognized for example also as
+ "trad-core". */
+ is_core = bfd_check_format (exec_bfd, bfd_core);
+
/* Make sure to close exec_bfd, or else "run" might try to use
it. */
exec_close ();
- error (_("\"%ps\": not in executable format: %s"),
- styled_string (file_name_style.style (), scratch_pathname),
- gdb_bfd_errmsg (bfd_get_error (), matching).c_str ());
+
+ if (is_core != 0)
+ throw_error (IS_CORE_ERROR,
+ _("\"%s\" is a core file.\n"
+ "Please specify an executable to debug."),
+ scratch_pathname);
+ else
+ error (_("\"%ps\": not in executable format: %s"),
+ styled_string (file_name_style.style (), scratch_pathname),
+ gdb_bfd_errmsg (bfd_get_error (), matching).c_str ());
}
if (build_section_table (exec_bfd, &sections, &sections_end))
diff --git a/gdb/main.c b/gdb/main.c
--- a/gdb/main.c
+++ b/gdb/main.c
@@ -524,6 +524,34 @@ struct cmdarg
char *string;
};
+/* Call exec_file_attach. If it detected FILENAME is a core file call
+ core_file_command. Print the original exec_file_attach error only if
+ core_file_command failed to find a matching executable. */
+
+static void
+exec_or_core_file_attach (const char *filename, int from_tty)
+{
+ gdb_assert (exec_bfd == NULL);
+
+ try
+ {
+ exec_file_attach (filename, from_tty);
+ }
+ catch (gdb_exception_error &e)
+ {
+ if (e.error == IS_CORE_ERROR)
+ {
+ core_file_command ((char *) filename, from_tty);
+
+ /* Iff the core file found its executable suppress the error message
+ from exec_file_attach. */
+ if (exec_bfd != NULL)
+ return;
+ }
+ throw_exception (std::move (e));
+ }
+}
+
static void
captured_main_1 (struct captured_main_args *context)
{
@@ -959,6 +987,8 @@ captured_main_1 (struct captured_main_args *context)
{
symarg = argv[optind];
execarg = argv[optind];
+ if (optind + 1 == argc && corearg == NULL)
+ corearg = argv[optind];
optind++;
}
@@ -1114,12 +1144,25 @@ captured_main_1 (struct captured_main_args *context)
&& symarg != NULL
&& strcmp (execarg, symarg) == 0)
{
+ catch_command_errors_const_ftype *func;
+
+ /* Call exec_or_core_file_attach only if the file was specified as
+ a command line argument (and not an a command line option). */
+ if (corearg != NULL && strcmp (corearg, execarg) == 0)
+ {
+ func = exec_or_core_file_attach;
+ corearg = NULL;
+ }
+ else
+ func = exec_file_attach;
+
/* The exec file and the symbol-file are the same. If we can't
open it, better only print one error message.
- catch_command_errors returns non-zero on success! */
- ret = catch_command_errors (exec_file_attach, execarg,
- !batch_flag);
- if (ret != 0)
+ catch_command_errors returns non-zero on success!
+ Do not load EXECARG as a symbol file if it has been already processed
+ as a core file. */
+ ret = catch_command_errors (func, execarg, !batch_flag);
+ if (ret != 0 && core_bfd == NULL)
ret = catch_command_errors (symbol_file_add_main_adapter,
symarg, !batch_flag);
}
diff --git a/gdbsupport/common-exceptions.h b/gdbsupport/common-exceptions.h
--- a/gdbsupport/common-exceptions.h
+++ b/gdbsupport/common-exceptions.h
@@ -106,6 +106,9 @@ enum errors {
"_ERROR" is appended to the name. */
MAX_COMPLETIONS_REACHED_ERROR,
+ /* Attempt to load a core file as executable. */
+ IS_CORE_ERROR,
+
/* Add more errors here. */
NR_ERRORS
};

View File

@ -0,0 +1,129 @@
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>:
This is the fix for RH BZ #981154
It is mainly a testcase addition, but a minor fix in the gdb/build-id.c
file was also needed.
gdb/build-id.c was added by:
commit dc294be54c96414035eed7d53dafdea0a6f31a72
Author: Tom Tromey <tromey@redhat.com>
Date: Tue Oct 8 19:56:15 2013 +0000
and had a little thinko there. The variable 'filename' needs to be set to
NULL after it is free'd, otherwise the code below thinks that it is still
valid and doesn't print the necessary warning ("Try: yum install ...").
diff --git a/gdb/testsuite/gdb.base/rhbz981154-misleading-yum-install-warning.exp b/gdb/testsuite/gdb.base/rhbz981154-misleading-yum-install-warning.exp
new file mode 100644
--- /dev/null
+++ b/gdb/testsuite/gdb.base/rhbz981154-misleading-yum-install-warning.exp
@@ -0,0 +1,97 @@
+# Copyright (C) 2014 Free Software Foundation, Inc.
+
+# This program is free software; you can redistribute it and/or modify
+# it under the terms of the GNU General Public License as published by
+# the Free Software Foundation; either version 3 of the License, or
+# (at your option) any later version.
+#
+# This program is distributed in the hope that it will be useful,
+# but WITHOUT ANY WARRANTY; without even the implied warranty of
+# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
+# GNU General Public License for more details.
+#
+# You should have received a copy of the GNU General Public License
+# along with this program. If not, see <http://www.gnu.org/licenses/>.
+
+standard_testfile "normal.c"
+
+if { [prepare_for_testing ${testfile}.exp ${testfile} ${srcfile}] } {
+ return -1
+}
+
+# Get the build-id of the file
+set build_id_debug_file [build_id_debug_filename_get $binfile]
+regsub -all ".debug$" $build_id_debug_file "" build_id_without_debug
+
+# Run to main
+if { ![runto_main] } {
+ return -1
+}
+
+# We first need to generate a corefile
+set escapedfilename [string_to_regexp [standard_output_file gcore.test]]
+set core_supported 0
+gdb_test_multiple "gcore [standard_output_file gcore.test]" \
+ "save a corefile" \
+{
+ -re "Saved corefile ${escapedfilename}\[\r\n\]+$gdb_prompt $" {
+ pass "save a corefile"
+ global core_supported
+ set core_supported 1
+ }
+ -re "Can't create a corefile\[\r\n\]+$gdb_prompt $" {
+ unsupported "save a corefile"
+ global core_supported
+ set core_supported 0
+ }
+}
+
+if {!$core_supported} {
+ return -1
+}
+
+# Move the binfile to a temporary name
+remote_exec build "mv $binfile ${binfile}.old"
+
+# Reinitialize GDB and see if we get a yum/dnf warning
+gdb_exit
+gdb_start
+gdb_reinitialize_dir $srcdir/$subdir
+
+with_test_prefix "first run:" {
+ gdb_test "set build-id-verbose 1" "" \
+ "set build-id-verbose"
+
+ gdb_test "set debug-file-directory [file dirname [standard_output_file gcore.test]]" "" \
+ "set debug-file-directory"
+
+ gdb_test "core-file [standard_output_file gcore.test]" \
+ "Missing separate debuginfo for the main executable file\r\nTry: (yum|dnf) --enablerepo='\\*debug\\*' install [standard_output_file $build_id_without_debug]\r\n.*" \
+ "test first yum/dnf warning"
+}
+
+# Now we define and create our .build-id
+file mkdir [file dirname [standard_output_file ${build_id_without_debug}]]
+# Cannot use "file link" (from TCL) because it requires the target file to
+# exist.
+remote_exec build "ln -s $binfile [standard_output_file ${build_id_without_debug}]"
+
+# Reinitialize GDB to get the second yum/dnf warning
+gdb_exit
+gdb_start
+gdb_reinitialize_dir $srcdir/$subdir
+
+with_test_prefix "second run:" {
+ gdb_test "set build-id-verbose 1" "" \
+ "set build-id-verbose"
+
+ gdb_test "set debug-file-directory [file dirname [standard_output_file gcore.test]]" "" \
+ "set debug-file-directory"
+
+ gdb_test "core-file [standard_output_file gcore.test]" \
+ "Missing separate debuginfo for the main executable file\r\nTry: (yum|dnf) --enablerepo='\\*debug\\*' install $binfile\r\n.*" \
+ "test second yum/dnf warning"
+}
+
+# Leaving the link there will cause breakage in the next run.
+remote_exec build "rm -f [standard_output_file ${build_id_without_debug}]"

View File

@ -0,0 +1,42 @@
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-librpm-workaround.patch
;; Workaround librpm BZ 643031 due to its unexpected exit() calls (BZ 642879).
;;=push+jan
diff --git a/gdb/build-id.c b/gdb/build-id.c
--- a/gdb/build-id.c
+++ b/gdb/build-id.c
@@ -708,6 +708,19 @@ build_id_to_filename (const struct bfd_build_id *build_id, char **link_return)
#include <dlfcn.h>
#endif
+/* Workarodun https://bugzilla.redhat.com/show_bug.cgi?id=643031
+ librpm must not exit() an application on SIGINT
+
+ Enable or disable a signal handler. SIGNUM: signal to enable (or disable
+ if negative). HANDLER: sa_sigaction handler (or NULL to use
+ rpmsqHandler()). Returns: no. of refs, -1 on error. */
+extern int rpmsqEnable (int signum, /* rpmsqAction_t handler */ void *handler);
+int
+rpmsqEnable (int signum, /* rpmsqAction_t handler */ void *handler)
+{
+ return 0;
+}
+
/* This MISSING_RPM_HASH tracker is used to collect all the missing rpm files
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;
};

View File

@ -0,0 +1,128 @@
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
https://bugzilla.redhat.com/show_bug.cgi?id=953585
diff --git a/gdb/build-id.c b/gdb/build-id.c
--- a/gdb/build-id.c
+++ b/gdb/build-id.c
@@ -742,7 +742,11 @@ static int missing_rpm_list_entries;
/* Returns the count of newly added rpms. */
static int
+#ifndef GDB_INDEX_VERIFY_VENDOR
missing_rpm_enlist (const char *filename)
+#else
+missing_rpm_enlist_1 (const char *filename, int verify_vendor)
+#endif
{
static int rpm_init_done = 0;
rpmts ts;
@@ -849,7 +853,11 @@ missing_rpm_enlist (const char *filename)
mi = rpmtsInitIterator_p (ts, RPMTAG_BASENAMES, filename, 0);
if (mi != NULL)
{
+#ifndef GDB_INDEX_VERIFY_VENDOR
for (;;)
+#else
+ if (!verify_vendor) for (;;)
+#endif
{
Header h;
char *debuginfo, **slot, *s, *s2;
@@ -967,6 +975,37 @@ missing_rpm_enlist (const char *filename)
xfree (debuginfo);
count++;
}
+#ifdef GDB_INDEX_VERIFY_VENDOR
+ else /* verify_vendor */
+ {
+ int vendor_pass = 0, vendor_fail = 0;
+
+ for (;;)
+ {
+ Header h;
+ errmsg_t err;
+ char *vendor;
+
+ h = rpmdbNextIterator_p (mi);
+ if (h == NULL)
+ break;
+
+ vendor = headerFormat_p (h, "%{vendor}", &err);
+ if (!vendor)
+ {
+ warning (_("Error querying the rpm file `%s': %s"), filename,
+ err);
+ continue;
+ }
+ if (strcmp (vendor, "Red Hat, Inc.") == 0)
+ vendor_pass = 1;
+ else
+ vendor_fail = 1;
+ xfree (vendor);
+ }
+ count = vendor_pass != 0 && vendor_fail == 0;
+ }
+#endif
rpmdbFreeIterator_p (mi);
}
@@ -976,6 +1015,20 @@ missing_rpm_enlist (const char *filename)
return count;
}
+#ifdef GDB_INDEX_VERIFY_VENDOR
+missing_rpm_enlist (const char *filename)
+{
+ return missing_rpm_enlist_1 (filename, 0);
+}
+
+extern int rpm_verify_vendor (const char *filename);
+int
+rpm_verify_vendor (const char *filename)
+{
+ return missing_rpm_enlist_1 (filename, 1);
+}
+#endif
+
static bool
missing_rpm_list_compar (const char *ap, const char *bp)
{
diff --git a/gdb/dwarf2/read.c b/gdb/dwarf2/read.c
--- a/gdb/dwarf2/read.c
+++ b/gdb/dwarf2/read.c
@@ -3025,6 +3025,16 @@ read_gdb_index_from_buffer (const char *filename,
"set use-deprecated-index-sections on". */
if (version < 6 && !deprecated_ok)
{
+#ifdef GDB_INDEX_VERIFY_VENDOR
+ extern int rpm_verify_vendor (const char *filename);
+
+ /* Red Hat Developer Toolset exception. */
+ if (rpm_verify_vendor (filename))
+ {}
+ else
+ {
+
+#endif
static int warning_printed = 0;
if (!warning_printed)
{
@@ -3036,6 +3046,10 @@ to use the section anyway."),
warning_printed = 1;
}
return 0;
+#ifdef GDB_INDEX_VERIFY_VENDOR
+
+ }
+#endif
}
/* Version 7 indices generated by gold refer to the CU for a symbol instead
of the TU (for symbols coming from TUs),

File diff suppressed because it is too large Load Diff

View File

@ -0,0 +1,237 @@
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
https://bugzilla.redhat.com/show_bug.cgi?id=1339862
diff --git a/gdb/solib-svr4.c b/gdb/solib-svr4.c
--- a/gdb/solib-svr4.c
+++ b/gdb/solib-svr4.c
@@ -1340,14 +1340,27 @@ svr4_read_so_list (svr4_info *info, CORE_ADDR lm, CORE_ADDR prev_lm,
}
{
- struct bfd_build_id *build_id;
+ struct bfd_build_id *build_id = NULL;
strncpy (newobj->so_original_name, buffer.get (), SO_NAME_MAX_PATH_SIZE - 1);
newobj->so_original_name[SO_NAME_MAX_PATH_SIZE - 1] = '\0';
/* May get overwritten below. */
strcpy (newobj->so_name, newobj->so_original_name);
- build_id = build_id_addr_get (((lm_info_svr4 *) newobj->lm_info)->l_ld);
+ /* In the case the main executable was found according to its build-id
+ (from a core file) prevent loading a different build of a library
+ with accidentally the same SO_NAME.
+
+ It suppresses bogus backtraces (and prints "??" there instead) if
+ the on-disk files no longer match the running program version.
+
+ If the main executable was not loaded according to its build-id do
+ not do any build-id checking of the libraries. There may be missing
+ build-ids dumped in the core file and we would map all the libraries
+ to the only existing file loaded that time - the executable. */
+ if (symfile_objfile != NULL
+ && (symfile_objfile->flags & OBJF_BUILD_ID_CORE_LOADED) != 0)
+ build_id = build_id_addr_get (li->l_ld);
if (build_id != NULL)
{
char *name, *build_id_filename;
@@ -1362,23 +1375,7 @@ svr4_read_so_list (svr4_info *info, CORE_ADDR lm, CORE_ADDR prev_lm,
xfree (name);
}
else
- {
- debug_print_missing (newobj->so_name, build_id_filename);
-
- /* In the case the main executable was found according to
- its build-id (from a core file) prevent loading
- a different build of a library with accidentally the
- same SO_NAME.
-
- It suppresses bogus backtraces (and prints "??" there
- instead) if the on-disk files no longer match the
- running program version. */
-
- if (symfile_objfile != NULL
- && (symfile_objfile->flags
- & OBJF_BUILD_ID_CORE_LOADED) != 0)
- newobj->so_name[0] = 0;
- }
+ debug_print_missing (newobj->so_name, build_id_filename);
xfree (build_id_filename);
xfree (build_id);
diff --git a/gdb/testsuite/gdb.base/gcore-buildid-exec-but-not-solib-lib.c b/gdb/testsuite/gdb.base/gcore-buildid-exec-but-not-solib-lib.c
new file mode 100644
--- /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 @@
+# 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/>.
+
+if {[skip_shlib_tests]} {
+ return 0
+}
+
+set testfile "gcore-buildid-exec-but-not-solib"
+set srcmainfile ${testfile}-main.c
+set srclibfile ${testfile}-lib.c
+set libfile [standard_output_file ${testfile}-lib.so]
+set objfile [standard_output_file ${testfile}-main.o]
+set executable ${testfile}-main
+set binfile [standard_output_file ${executable}]
+set gcorefile [standard_output_file ${executable}.gcore]
+set outdir [file dirname $binfile]
+
+if { [gdb_compile_shlib ${srcdir}/${subdir}/${srclibfile} ${libfile} "debug additional_flags=-Wl,--build-id"] != ""
+ || [gdb_compile ${srcdir}/${subdir}/${srcmainfile} ${objfile} object {debug}] != "" } {
+ unsupported "-Wl,--build-id compilation failed"
+ return -1
+}
+set opts [list debug shlib=${libfile} "additional_flags=-Wl,--build-id"]
+if { [gdb_compile ${objfile} ${binfile} executable $opts] != "" } {
+ unsupported "-Wl,--build-id compilation failed"
+ return -1
+}
+
+clean_restart $executable
+gdb_load_shlib $libfile
+
+# Does this gdb support gcore?
+set test "help gcore"
+gdb_test_multiple $test $test {
+ -re "Undefined command: .gcore.*\r\n$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 .*\r\n$gdb_prompt $" {
+ pass $test
+ }
+}
+
+if { ![runto lib] } then {
+ return -1
+}
+
+set escapedfilename [string_to_regexp ${gcorefile}]
+
+set test "save a corefile"
+gdb_test_multiple "gcore ${gcorefile}" $test {
+ -re "Saved corefile ${escapedfilename}\r\n$gdb_prompt $" {
+ pass $test
+ }
+ -re "Can't create a corefile\r\n$gdb_prompt $" {
+ unsupported $test
+ return -1
+ }
+}
+
+# Now restart gdb and load the corefile.
+
+clean_restart $executable
+gdb_load_shlib $libfile
+
+set buildid [build_id_debug_filename_get $libfile]
+
+regsub {\.debug$} $buildid {} buildid
+
+set debugdir [standard_output_file ${testfile}-debugdir]
+file delete -force -- $debugdir
+
+file mkdir $debugdir/[file dirname $libfile]
+file copy $libfile $debugdir/${libfile}
+
+file mkdir $debugdir/[file dirname $buildid]
+file copy $libfile $debugdir/${buildid}
+
+remote_exec build "ln -s /lib ${debugdir}/"
+remote_exec build "ln -s /lib64 ${debugdir}/"
+# /usr is not needed, all the libs are in /lib64: libm.so.6 libc.so.6 ld-linux-x86-64.so.2
+
+gdb_test "set solib-absolute-prefix $debugdir"
+
+gdb_test_no_output "set debug-file-directory $debugdir" "set debug-file-directory"
+
+gdb_test "core ${gcorefile}" "Core was generated by .*" "re-load generated corefile"
+
+gdb_test "frame" "#0 \[^\r\n\]* lib .*" "library got loaded"
+
+gdb_test "bt"
+gdb_test "info shared"

1415
gdb-6.6-buildid-locate.patch Normal file

File diff suppressed because it is too large Load Diff

View File

@ -0,0 +1,188 @@
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>
* gdb_gcore.sh: Redirect GDB from `</dev/null'.
2007-04-22 Jan Kratochvil <jan.kratochvil@redhat.com>
* 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
--- /dev/null
+++ b/gdb/testsuite/gdb.base/gcorebg.c
@@ -0,0 +1,49 @@
+#include <stdio.h>
+#include <sys/types.h>
+#include <unistd.h>
+#include <stdlib.h>
+#include <signal.h>
+#include <string.h>
+#include <assert.h>
+
+int main (int argc, char **argv)
+{
+ pid_t pid = 0;
+ pid_t ppid;
+ char buf[1024*2 + 500];
+ int gotint;
+
+ if (argc != 4)
+ {
+ fprintf (stderr, "Syntax: %s {standard|detached} <gcore command> <core output file>\n",
+ argv[0]);
+ exit (1);
+ }
+
+ pid = fork ();
+
+ switch (pid)
+ {
+ case 0:
+ if (strcmp (argv[1], "detached") == 0)
+ setpgrp ();
+ ppid = getppid ();
+ gotint = snprintf (buf, sizeof (buf), "sh %s -o %s %d", argv[2], argv[3], (int) ppid);
+ assert (gotint < sizeof (buf));
+ system (buf);
+ fprintf (stderr, "Killing parent PID %d\n", ppid);
+ kill (ppid, SIGTERM);
+ break;
+
+ case -1:
+ perror ("fork err\n");
+ exit (1);
+ break;
+
+ default:
+ fprintf (stderr,"Sleeping as PID %d\n", getpid ());
+ sleep (60);
+ }
+
+ return 0;
+}
diff --git a/gdb/testsuite/gdb.base/gcorebg.exp b/gdb/testsuite/gdb.base/gcorebg.exp
new file mode 100644
--- /dev/null
+++ b/gdb/testsuite/gdb.base/gcorebg.exp
@@ -0,0 +1,113 @@
+# 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
+
+# This file was written by Jan Kratochvil <jan.kratochvil@redhat.com>.
+# This is a test for `gdb_gcore.sh' functionality.
+# It also tests a regression with `gdb_gcore.sh' being run without its
+# accessible terminal.
+
+if ![info exists GCORE] {
+ set GCORE "[standard_output_file ../../../../gcore]"
+}
+verbose "using GCORE = $GCORE" 2
+
+set testfile "gcorebg"
+set srcfile ${testfile}.c
+set binfile [standard_output_file ${testfile}]
+set corefile [standard_output_file ${testfile}.test]
+
+if { [gdb_compile "${srcdir}/${subdir}/${srcfile}" "${binfile}" executable {debug}] != "" } {
+ untested gcorebg.exp
+ return -1
+}
+
+# Cleanup.
+
+proc core_clean {} {
+ global corefile
+
+ foreach file [glob -nocomplain [join [list $corefile *] ""]] {
+ verbose "Delete file $file" 1
+ remote_file target delete $file
+ }
+}
+core_clean
+remote_file target delete "./gdb"
+
+# Generate the core file.
+
+# Provide `./gdb' for `gdb_gcore.sh' running it as a bare `gdb' command.
+# Setup also `$PATH' appropriately.
+# If GDB was not found let `gdb_gcore.sh' to find the system GDB by `$PATH'.
+if {$GDB != "gdb"} {
+ file link ./gdb $GDB
+}
+global env
+set oldpath $env(PATH)
+set env(PATH) [join [list . $env(PATH)] ":"]
+verbose "PATH = $env(PATH)" 2
+
+# Test file body.
+# $detached == "standard" || $detached == "detached"
+
+proc test_body { detached } {
+ global binfile
+ global GCORE
+ global corefile
+
+ set res [remote_spawn target "$binfile $detached $GCORE $corefile"]
+ if { $res < 0 || $res == "" } {
+ fail "Spawning $detached gcore"
+ return 1
+ }
+ pass "Spawning $detached gcore"
+ remote_expect target 20 {
+ timeout {
+ fail "Spawned $detached gcore finished (timeout)"
+ remote_exec target "kill -9 -[exp_pid -i $res]"
+ return 1
+ }
+ "Saved corefile .*\r\nKilling parent PID " {
+ pass "Spawned $detached gcore finished"
+ remote_wait target 20
+ }
+ }
+
+ if {1 == [llength [glob -nocomplain [join [list $corefile *] ""]]]} {
+ pass "Core file generated by $detached gcore"
+ } else {
+ fail "Core file generated by $detached gcore"
+ }
+ core_clean
+}
+
+# First a general `gdb_gcore.sh' spawn with its controlling terminal available.
+
+test_body standard
+
+# And now `gdb_gcore.sh' spawn without its controlling terminal available.
+# It is spawned through `gcorebg.c' using setpgrp ().
+
+test_body detached
+
+
+# Cleanup.
+
+set env(PATH) $oldpath
+remote_file target delete "./gdb"

View File

@ -0,0 +1,94 @@
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
The original testcase
https://bugzilla.redhat.com/bugzilla/show_bug.cgi?id=230000#c1
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
--- /dev/null
+++ b/gdb/testsuite/gdb.arch/powerpc-power6.exp
@@ -0,0 +1,54 @@
+# 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.
+
+# Test PowerPC Power6 instructions disassembly.
+
+if {![istarget "powerpc*-*-*"]} then {
+ verbose "Skipping PowerPC Power6 instructions disassembly."
+ return
+}
+
+set testfile "powerpc-power6"
+set srcfile ${testfile}.s
+set objfile [standard_output_file ${testfile}.o]
+
+if { [gdb_compile "${srcdir}/${subdir}/${srcfile}" "${objfile}" object {debug}] != "" } {
+ untested "PowerPC prologue tests"
+ return -1
+}
+
+
+gdb_exit
+gdb_start
+gdb_reinitialize_dir $srcdir/$subdir
+gdb_load ${objfile}
+
+# Disassemble the function.
+
+gdb_test "disass func" ":\tblr\r\n.*" "Basic disassembly"
+
+gdb_test "disass func" ":\tdcbzl *r8,r9\r\n.*" "Power5 disassembly dcbzl"
+gdb_test "disass func" ":\tfrsqrtes *f10,f11\r\n.*" "Power5 disassembly frsqrtes"
+gdb_test "disass func" ":\tdadd *f1,f2,f1\r\n.*" "Power6 disassembly dadd"
+gdb_test "disass func" ":\tdaddq *f0,f2,f0\r\n.*" "Power6 disassembly daddq"
+gdb_test "disass func" ":\tdsub *f1,f2,f1\r\n.*" "Power6 disassembly dsub"
+gdb_test "disass func" ":\tdsubq *f0,f2,f0\r\n.*" "Power6 disassembly dsubq"
+gdb_test "disass func" ":\tdmul *f1,f2,f1\r\n.*" "Power6 disassembly dmul"
+gdb_test "disass func" ":\tdmulq *f0,f2,f0\r\n.*" "Power6 disassembly dmulq"
+gdb_test "disass func" ":\tddiv *f1,f2,f1\r\n.*" "Power6 disassembly ddiv"
+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" ":\tdcmpuq *cr1,f2,f0\r\n.*" "Power6 disassembly dcmpuq"
diff --git a/gdb/testsuite/gdb.arch/powerpc-power6.s b/gdb/testsuite/gdb.arch/powerpc-power6.s
new file mode 100644
--- /dev/null
+++ b/gdb/testsuite/gdb.arch/powerpc-power6.s
@@ -0,0 +1,16 @@
+ .text
+ .globl func
+func:
+ blr
+ .long 0x7c284fec /* dcbzl r8,r9 */
+ .long 0xed405834 /* frsqrtes f10,f11 */
+ .long 0xec220804 /* dadd f1,f2,f1 */
+ .long 0xfc020004 /* daddq f0,f2,f0 */
+ .long 0xec220c04 /* dsub f1,f2,f1 */
+ .long 0xfc020404 /* dsubq f0,f2,f0 */
+ .long 0xec220844 /* dmul f1,f2,f1 */
+ .long 0xfc020044 /* dmulq f0,f2,f0 */
+ .long 0xec220c44 /* ddiv f1,f2,f1 */
+ .long 0xfc020444 /* ddivq f0,f2,f0 */
+ .long 0xec820d04 /* dcmpu cr1,f2,f1 */
+ .long 0xfc820504 /* dcmpuq cr1,f2,f0 */

View File

@ -0,0 +1,278 @@
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>
* gdb.threads/atomic-seq-threaded.c,
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
new file mode 100644
--- /dev/null
+++ b/gdb/testsuite/gdb.threads/atomic-seq-threaded.c
@@ -0,0 +1,171 @@
+/* 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., 51 Franklin Street, Fifth Floor, Boston,
+ MA 02110-1301, USA. */
+
+/* Test stepping over RISC atomic sequences.
+ This variant testcases the code for stepping another thread while skipping
+ over the atomic sequence in the former thread
+ (STEPPING_PAST_SINGLESTEP_BREAKPOINT).
+ Code comes from gcc/testsuite/gcc.dg/sync-2.c */
+
+/* { dg-options "-march=i486" { target { { i?86-*-* x86_64-*-* } && ilp32 } } } */
+/* { dg-options "-mcpu=v9" { target sparc*-*-* } } */
+
+/* Test functionality of the intrinsics for 'short' and 'char'. */
+
+#include <stdlib.h>
+#include <string.h>
+#include <pthread.h>
+#include <assert.h>
+#include <unistd.h>
+
+#define LOOPS 2
+
+static int unused;
+
+static char AI[18];
+static char init_qi[18] = { 3,5,7,9,0,0,0,0,-1,0,0,0,0,0,-1,0,0,0 };
+static char test_qi[18] = { 3,5,7,9,1,4,22,-12,7,8,9,7,1,-12,7,8,9,7 };
+
+static void
+do_qi (void)
+{
+ if (__sync_fetch_and_add(AI+4, 1) != 0)
+ abort ();
+ if (__sync_fetch_and_add(AI+5, 4) != 0)
+ abort ();
+ if (__sync_fetch_and_add(AI+6, 22) != 0)
+ abort ();
+ if (__sync_fetch_and_sub(AI+7, 12) != 0)
+ abort ();
+ if (__sync_fetch_and_and(AI+8, 7) != (char)-1)
+ abort ();
+ if (__sync_fetch_and_or(AI+9, 8) != 0)
+ abort ();
+ if (__sync_fetch_and_xor(AI+10, 9) != 0)
+ abort ();
+ if (__sync_fetch_and_nand(AI+11, 7) != 0)
+ abort ();
+
+ if (__sync_add_and_fetch(AI+12, 1) != 1)
+ abort ();
+ if (__sync_sub_and_fetch(AI+13, 12) != (char)-12)
+ abort ();
+ if (__sync_and_and_fetch(AI+14, 7) != 7)
+ abort ();
+ if (__sync_or_and_fetch(AI+15, 8) != 8)
+ abort ();
+ if (__sync_xor_and_fetch(AI+16, 9) != 9)
+ abort ();
+ if (__sync_nand_and_fetch(AI+17, 7) != 7)
+ abort ();
+}
+
+static short AL[18];
+static short init_hi[18] = { 3,5,7,9,0,0,0,0,-1,0,0,0,0,0,-1,0,0,0 };
+static short test_hi[18] = { 3,5,7,9,1,4,22,-12,7,8,9,7,1,-12,7,8,9,7 };
+
+static void
+do_hi (void)
+{
+ if (__sync_fetch_and_add(AL+4, 1) != 0)
+ abort ();
+ if (__sync_fetch_and_add(AL+5, 4) != 0)
+ abort ();
+ if (__sync_fetch_and_add(AL+6, 22) != 0)
+ abort ();
+ if (__sync_fetch_and_sub(AL+7, 12) != 0)
+ abort ();
+ if (__sync_fetch_and_and(AL+8, 7) != -1)
+ abort ();
+ if (__sync_fetch_and_or(AL+9, 8) != 0)
+ abort ();
+ if (__sync_fetch_and_xor(AL+10, 9) != 0)
+ abort ();
+ if (__sync_fetch_and_nand(AL+11, 7) != 0)
+ abort ();
+
+ if (__sync_add_and_fetch(AL+12, 1) != 1)
+ abort ();
+ if (__sync_sub_and_fetch(AL+13, 12) != -12)
+ abort ();
+ if (__sync_and_and_fetch(AL+14, 7) != 7)
+ abort ();
+ if (__sync_or_and_fetch(AL+15, 8) != 8)
+ abort ();
+ if (__sync_xor_and_fetch(AL+16, 9) != 9)
+ abort ();
+ if (__sync_nand_and_fetch(AL+17, 7) != 7)
+ abort ();
+}
+
+static void *
+start1 (void *arg)
+{
+ unsigned loop;
+ sleep(1);
+
+ for (loop = 0; loop < LOOPS; loop++)
+ {
+ memcpy(AI, init_qi, sizeof(init_qi));
+
+ do_qi ();
+
+ if (memcmp (AI, test_qi, sizeof(test_qi)))
+ abort ();
+ }
+
+ return arg; /* _delete1_ */
+}
+
+static void *
+start2 (void *arg)
+{
+ unsigned loop;
+
+ for (loop = 0; loop < LOOPS; loop++)
+ {
+ memcpy(AL, init_hi, sizeof(init_hi));
+
+ do_hi ();
+
+ if (memcmp (AL, test_hi, sizeof(test_hi)))
+ abort ();
+ }
+
+ return arg; /* _delete2_ */
+}
+
+int
+main (int argc, char **argv)
+{
+ pthread_t thread;
+ int i;
+
+ i = pthread_create (&thread, NULL, start1, NULL); /* _create_ */
+ assert (i == 0); /* _create_after_ */
+
+ sleep (1);
+
+ start2 (NULL);
+
+ i = pthread_join (thread, NULL); /* _delete_ */
+ assert (i == 0);
+
+ return 0; /* _exit_ */
+}
diff --git a/gdb/testsuite/gdb.threads/atomic-seq-threaded.exp b/gdb/testsuite/gdb.threads/atomic-seq-threaded.exp
new file mode 100644
--- /dev/null
+++ b/gdb/testsuite/gdb.threads/atomic-seq-threaded.exp
@@ -0,0 +1,84 @@
+# atomic-seq-threaded.exp -- Test case for stepping over RISC atomic code seqs.
+# This variant testcases the code for stepping another thread while skipping
+# over the atomic sequence in the former thread
+# (STEPPING_PAST_SINGLESTEP_BREAKPOINT).
+# Copyright (C) 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
+
+set testfile atomic-seq-threaded
+set srcfile ${testfile}.c
+set binfile [standard_output_file ${testfile}]
+
+foreach opts {{} {compiler=gcc4} {FAIL}} {
+ if {$opts eq "FAIL"} {
+ return -1
+ }
+ if {[gdb_compile_pthreads "${srcdir}/${subdir}/${srcfile}" "${binfile}" executable [list debug $opts]] eq "" } {
+ break
+ }
+}
+
+gdb_exit
+gdb_start
+gdb_reinitialize_dir $srcdir/$subdir
+
+gdb_load ${binfile}
+if ![runto_main] then {
+ fail "Can't run to main"
+ return 0
+}
+
+# pthread_create () will not pass even on x86_64 with software watchpoint.
+# Pass after pthread_create () without any watchpoint active.
+set line [gdb_get_line_number "_create_after_"]
+gdb_test "tbreak $line" \
+ "reakpoint (\[0-9\]+) at .*$srcfile, line $line\..*" \
+ "set breakpoint after pthread_create ()"
+gdb_test "c" \
+ ".*/\\* _create_after_ \\*/.*" \
+ "run till after pthread_create ()"
+
+# Without a watchpoint being software no single-stepping would be used.
+set test "Start (software) watchpoint"
+gdb_test_multiple "watch unused" $test {
+ -re "Watchpoint \[0-9\]+: unused.*$gdb_prompt $" {
+ pass $test
+ }
+ -re "Hardware watchpoint \[0-9\]+: unused.*$gdb_prompt $" {
+ # We do not test the goal but still the whole testcase should pass.
+ unsupported $test
+ }
+}
+
+# More thorough testing of the scheduling logic.
+gdb_test "set scheduler-locking step" ""
+
+# Critical code path is stepped through at this point.
+set line [gdb_get_line_number "_exit_"]
+gdb_test "tbreak $line" \
+ "reakpoint \[0-9\]+ at .*$srcfile, line $line\..*" \
+ "set breakpoint at _exit_"
+gdb_test "c" \
+ ".*/\\* _exit_ \\*/.*" \
+ "run till _exit_"
+
+# Just a nonproblematic program exit.
+gdb_test "c" \
+ ".*Program exited normally\\..*" \
+ "run till program exit"

View File

@ -0,0 +1,32 @@
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-testsuite-timeouts.patch
;; 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}
+gdb_test "set breakpoint pending off" "" "Avoid lockup on nonexisting functions"
+
# The commands we test here produce many lines of output; disable "press
# <return> to continue" prompts.
gdb_test_no_output "set height 0"
diff --git a/gdb/testsuite/gdb.base/annota3.exp b/gdb/testsuite/gdb.base/annota3.exp
--- a/gdb/testsuite/gdb.base/annota3.exp
+++ b/gdb/testsuite/gdb.base/annota3.exp
@@ -38,6 +38,8 @@ if { [gdb_compile "${srcdir}/${subdir}/${srcfile}" "${binfile}" executable {deb
clean_restart ${binfile}
+gdb_test "set breakpoint pending off" "" "Avoid lockup on nonexisting functions"
+
# The commands we test here produce many lines of output; disable "press
# <return> to continue" prompts.
gdb_test_no_output "set height 0"

130
gdb-6.7-charsign-test.patch Normal file
View File

@ -0,0 +1,130 @@
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
2007-01-25 Jan Kratochvil <jan.kratochvil@redhat.com>
* gdb.base/charsign.exp, gdb.base/charsign.c: New files.
[ stripped ]
2007-10-19 Jan Kratochvil <jan.kratochvil@redhat.com>
Port to GDB-6.7 - only the testcase left, patch has been reverted,
char-vectors restricted.
diff --git a/gdb/testsuite/gdb.base/charsign.c b/gdb/testsuite/gdb.base/charsign.c
new file mode 100644
--- /dev/null
+++ b/gdb/testsuite/gdb.base/charsign.c
@@ -0,0 +1,37 @@
+/* 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 */
+
+int main()
+{
+ return 0;
+}
+
+char n[]="A";
+signed char s[]="A";
+unsigned char u[]="A";
+
+typedef char char_n;
+typedef signed char char_s;
+typedef unsigned char char_u;
+
+char_n n_typed[]="A";
+char_s s_typed[]="A";
+char_u u_typed[]="A";
diff --git a/gdb/testsuite/gdb.base/charsign.exp b/gdb/testsuite/gdb.base/charsign.exp
new file mode 100644
--- /dev/null
+++ b/gdb/testsuite/gdb.base/charsign.exp
@@ -0,0 +1,63 @@
+# 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 charsign
+set srcfile ${testfile}.c
+set binfile [standard_output_file ${testfile}]
+
+proc do_test { cflags } {
+ global srcdir
+ global binfile
+ global subdir
+ global srcfile
+ global gdb_prompt
+
+ if { [gdb_compile "${srcdir}/${subdir}/${srcfile}" "${binfile}" executable [list debug additional_flags=$cflags]] != "" } {
+ untested "Couldn't compile test program"
+ return -1
+ }
+
+ # Get things started.
+
+ gdb_exit
+ gdb_start
+ gdb_reinitialize_dir $srcdir/$subdir
+ gdb_load ${binfile}
+
+ # For C programs, "start" should stop in main().
+
+ gdb_test "p n" \
+ "= \"A\""
+ gdb_test "p s" \
+ "= \\{65 'A', 0 '\\\\0'\\}"
+ gdb_test "p u" \
+ "= \\{65 'A', 0 '\\\\0'\\}"
+ gdb_test "p n_typed" \
+ "= \"A\""
+ gdb_test "p s_typed" \
+ "= \\{65 'A', 0 '\\\\0'\\}"
+ gdb_test "p u_typed" \
+ "= \\{65 'A', 0 '\\\\0'\\}"
+}
+
+# The string identification works despite the compiler flags below due to
+# gdbtypes.c:
+# if (name && strcmp (name, "char") == 0)
+# TYPE_FLAGS (type) |= TYPE_FLAG_NOSIGN;
+
+do_test {}
+do_test {-fsigned-char}
+do_test {-funsigned-char}

View File

@ -0,0 +1,108 @@
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>
* gdb.arch/ppc-clobbered-registers-O2.exp: `powerpc64' changed to
`powerpc*'.
Testcase for:
http://sourceware.org/ml/gdb-patches/2007-09/msg00228.html
2007-10-21 Luis Machado <luisgpm@br.ibm.com>
* rs6000-tdep.c (ppc_dwarf2_frame_init_reg): New function.
* (rs6000_gdbarch_init): Install ppc_dwarf2_frame_init_reg as
default dwarf2_frame_set_init_reg function.
diff --git a/gdb/testsuite/gdb.arch/ppc-clobbered-registers-O2.c b/gdb/testsuite/gdb.arch/ppc-clobbered-registers-O2.c
new file mode 100644
--- /dev/null
+++ b/gdb/testsuite/gdb.arch/ppc-clobbered-registers-O2.c
@@ -0,0 +1,21 @@
+
+unsigned * __attribute__((noinline))
+start_sequence (unsigned * x, unsigned * y)
+{
+ return (unsigned *)0xdeadbeef;
+};
+
+unsigned __attribute__((noinline))
+gen_movsd (unsigned * operand0, unsigned * operand1)
+{
+ return *start_sequence(operand0, operand1);
+}
+
+int main(void)
+{
+ unsigned x, y;
+
+ x = 13;
+ y = 14;
+ 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
new file mode 100644
--- /dev/null
+++ b/gdb/testsuite/gdb.arch/ppc-clobbered-registers-O2.exp
@@ -0,0 +1,54 @@
+# 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.
+#
+# This file is part of the gdb testsuite.
+
+# Test displaying call clobbered registers in optimized binaries for ppc.
+# GDB should not show incorrect values.
+
+if ![istarget "powerpc*-*"] then {
+ verbose "Skipping powerpc* call clobbered registers testing."
+ return
+}
+
+set testfile "ppc-clobbered-registers-O2"
+set srcfile ${testfile}.c
+set binfile [standard_output_file ${testfile}]
+set compile_flags "debug additional_flags=-O2"
+
+if { [gdb_compile "${srcdir}/${subdir}/${srcfile}" "${binfile}" executable ${compile_flags}] != "" } {
+ unsupported "Testcase compile failed."
+ return -1
+}
+
+gdb_exit
+gdb_start
+gdb_reinitialize_dir $srcdir/$subdir
+gdb_load ${binfile}
+
+if ![runto_main] then {
+ perror "Couldn't run to breakpoint"
+ continue
+}
+
+gdb_test "b start_sequence" ".*Breakpoint 2 at.*line 6.*" \
+ "Insert breakpoint at problematic function"
+
+gdb_test continue ".*Breakpoint 2.*in start_sequence.*" \
+ "Run until problematic function"
+
+gdb_test backtrace ".*operand0=<value optimized out>.*operand1=<value optimized out>.*" \
+ "Check value of call clobbered registers"

View File

@ -0,0 +1,104 @@
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.exp:
2007-12-08 Jan Kratochvil <jan.kratochvil@redhat.com>
* gdb.base/fileio.c (ROOTSUBDIR): New macro.
(main): CHDIR into ROOTSUBDIR. CHOWN ROOTSUBDIR and CHDIR into
ROOTSUBDIR if we are being run as root.
* gdb.base/fileio.exp: Change the startup and finish cleanup.
Change the test file reference to be into the `fileio.dir' directory.
sources/gdb/testsuite/gdb.base/dump.exp:
Found on RHEL-5.s390x.
gdb-6.8.50.20090209/gdb/testsuite/gdb.base/auxv.exp:
random FAIL: gdb.base/auxv.exp: matching auxv data from live and gcore
gdb-6.8.50.20090209/gdb/testsuite/gdb.base/annota1.exp:
frames-invalid can happen asynchronously.
diff --git a/gdb/testsuite/gdb.base/fileio.c b/gdb/testsuite/gdb.base/fileio.c
--- a/gdb/testsuite/gdb.base/fileio.c
+++ b/gdb/testsuite/gdb.base/fileio.c
@@ -559,6 +559,28 @@ strerrno (int err)
int
main ()
{
+ /* These tests
+ Open for write but no write permission returns EACCES
+ Unlinking a file in a directory w/o write access returns EACCES
+ fail if we are being run as root - drop the privileges here. */
+
+ if (geteuid () == 0)
+ {
+ uid_t uid = 99;
+
+ if (chown (OUTDIR, uid, uid) != 0)
+ {
+ printf ("chown %d.%d %s: %s\n", (int) uid, (int) uid,
+ OUTDIR, strerror (errno));
+ exit (1);
+ }
+ if (setuid (uid) || geteuid () == 0)
+ {
+ printf ("setuid %d: %s\n", (int) uid, strerror (errno));
+ exit (1);
+ }
+ }
+
/* Don't change the order of the calls. They partly depend on each other */
test_open ();
test_write ();
diff --git a/gdb/testsuite/gdb.base/fileio.exp b/gdb/testsuite/gdb.base/fileio.exp
--- a/gdb/testsuite/gdb.base/fileio.exp
+++ b/gdb/testsuite/gdb.base/fileio.exp
@@ -24,9 +24,9 @@ if [target_info exists gdb,nofileio] {
standard_testfile
if {[is_remote host]} {
- set outdir .
+ set outdir "fileio.dir"
} else {
- set outdir [standard_output_file {}]
+ set outdir [standard_output_file "fileio.dir"]
}
if { [gdb_compile "${srcdir}/${subdir}/${srcfile}" "${binfile}" \
@@ -47,7 +47,8 @@ set dir2 [standard_output_file dir2.fileio.test]
if {[file exists $dir2] && ![file writable $dir2]} {
system "chmod +w $dir2"
}
-system "rm -rf [standard_output_file *.fileio.test]"
+system "rm -rf [standard_output_file fileio.dir]"
+system "mkdir -m777 [standard_output_file fileio.dir]"
set oldtimeout $timeout
set timeout [expr "$timeout + 60"]
@@ -89,7 +90,7 @@ gdb_test continue \
gdb_test "continue" ".*" ""
-catch "system \"chmod -f -w [standard_output_file nowrt.fileio.test]\""
+catch "system \"chmod -f -w [standard_output_file fileio.dir/nowrt.fileio.test]\""
gdb_test continue \
"Continuing\\..*open 5:.*EACCES$stop_msg" \
@@ -276,9 +277,7 @@ gdb_test continue \
gdb_exit
# Make dir2 writable again so rm -rf of a build tree Just Works.
-if {[file exists $dir2] && ![file writable $dir2]} {
- system "chmod +w $dir2"
-}
+system "chmod -R +w $outdir"
set timeout $oldtimeout
return 0

View File

@ -0,0 +1,181 @@
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).
diff --git a/gdb/testsuite/gdb.threads/threaded-exec.c b/gdb/testsuite/gdb.threads/threaded-exec.c
--- a/gdb/testsuite/gdb.threads/threaded-exec.c
+++ b/gdb/testsuite/gdb.threads/threaded-exec.c
@@ -18,21 +18,95 @@
Boston, MA 02111-1307, USA. */
#include <stddef.h>
-#include <pthread.h>
#include <assert.h>
#include <stdlib.h>
#include <unistd.h>
+#include <stdio.h>
+#ifdef THREADS
+
+# include <pthread.h>
static void *
threader (void *arg)
{
- return NULL;
+ return NULL;
}
+#endif
+
int
-main (void)
+main (int argc, char **argv)
{
+ char *exec_nothreads, *exec_threads, *cmd;
+ int phase;
+ char phase_s[8];
+
+ setbuf (stdout, NULL);
+
+ if (argc != 4)
+ {
+ fprintf (stderr, "%s <non-threaded> <threaded> <phase>\n", argv[0]);
+ return 1;
+ }
+
+#ifdef THREADS
+ puts ("THREADS: Y");
+#else
+ puts ("THREADS: N");
+#endif
+ exec_nothreads = argv[1];
+ printf ("exec_nothreads: %s\n", exec_nothreads);
+ exec_threads = argv[2];
+ printf ("exec_threads: %s\n", exec_threads);
+ phase = atoi (argv[3]);
+ printf ("phase: %d\n", phase);
+
+ /* Phases: threading
+ 0: N -> N
+ 1: N -> Y
+ 2: Y -> Y
+ 3: Y -> N
+ 4: N -> exit */
+
+ cmd = NULL;
+
+#ifndef THREADS
+ switch (phase)
+ {
+ case 0:
+ cmd = exec_nothreads;
+ break;
+ case 1:
+ cmd = exec_threads;
+ break;
+ case 2:
+ fprintf (stderr, "%s: We should have threads for phase %d!\n", argv[0],
+ phase);
+ return 1;
+ case 3:
+ fprintf (stderr, "%s: We should have threads for phase %d!\n", argv[0],
+ phase);
+ return 1;
+ case 4:
+ return 0;
+ default:
+ assert (0);
+ }
+#else /* THREADS */
+ switch (phase)
+ {
+ case 0:
+ fprintf (stderr, "%s: We should not have threads for phase %d!\n",
+ argv[0], phase);
+ return 1;
+ case 1:
+ fprintf (stderr, "%s: We should not have threads for phase %d!\n",
+ argv[0], phase);
+ return 1;
+ case 2:
+ cmd = exec_threads;
+ {
pthread_t t1;
int i;
@@ -40,7 +114,34 @@ main (void)
assert (i == 0);
i = pthread_join (t1, NULL);
assert (i == 0);
+ }
+ break;
+ case 3:
+ cmd = exec_nothreads;
+ {
+ pthread_t t1;
+ int i;
+
+ i = pthread_create (&t1, NULL, threader, (void *) NULL);
+ assert (i == 0);
+ i = pthread_join (t1, NULL);
+ assert (i == 0);
+ }
+ break;
+ case 4:
+ fprintf (stderr, "%s: We should not have threads for phase %d!\n",
+ argv[0], phase);
+ return 1;
+ default:
+ assert (0);
+ }
+#endif /* THREADS */
+
+ assert (cmd != NULL);
+
+ phase++;
+ snprintf (phase_s, sizeof phase_s, "%d", phase);
- execl ("/bin/true", "/bin/true", NULL);
- abort ();
+ execl (cmd, cmd, exec_nothreads, exec_threads, phase_s, NULL);
+ assert (0);
}
diff --git a/gdb/testsuite/gdb.threads/threaded-exec.exp b/gdb/testsuite/gdb.threads/threaded-exec.exp
--- a/gdb/testsuite/gdb.threads/threaded-exec.exp
+++ b/gdb/testsuite/gdb.threads/threaded-exec.exp
@@ -20,9 +20,14 @@
set testfile threaded-exec
set srcfile ${testfile}.c
-set binfile [standard_output_file ${testfile}]
+set binfile_nothreads [standard_output_file ${testfile}N]
+set binfile_threads [standard_output_file ${testfile}Y]
-if {[gdb_compile_pthreads "${srcdir}/${subdir}/${srcfile}" "${binfile}" executable []] != "" } {
+if {[gdb_compile "${srcdir}/${subdir}/${srcfile}" "${binfile_nothreads}" executable {additional_flags=-UTHREADS}] != "" } {
+ return -1
+}
+
+if {[gdb_compile_pthreads "${srcdir}/${subdir}/${srcfile}" "${binfile_threads}" executable {additional_flags=-DTHREADS}] != "" } {
return -1
}
@@ -30,9 +35,9 @@ gdb_exit
gdb_start
gdb_reinitialize_dir $srcdir/$subdir
-gdb_load ${binfile}
+gdb_load ${binfile_nothreads}
-gdb_run_cmd
+gdb_run_cmd ${binfile_nothreads} ${binfile_threads} 0
gdb_test_multiple {} "Program exited" {
-re "\r\n\\\[Inferior .* exited normally\\\]\r\n$gdb_prompt $" {

View File

@ -0,0 +1,481 @@
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).
diff --git a/gdb/testsuite/gdb.dwarf2/dw2-loclist-prelinked-func.S b/gdb/testsuite/gdb.dwarf2/dw2-loclist-prelinked-func.S
new file mode 100644
--- /dev/null
+++ b/gdb/testsuite/gdb.dwarf2/dw2-loclist-prelinked-func.S
@@ -0,0 +1,328 @@
+/* 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/>. */
+
+/*
+#include <stdlib.h>
+
+void
+func (void)
+{
+ int i;
+
+ abort ();
+}
+*/
+ .file "dw2-loclist-prelinked.c"
+ .section .debug_abbrev,"",@progbits
+.Ldebug_abbrev0:
+ .section .debug_info,"",@progbits
+.Ldebug_info0:
+ .section .debug_line,"",@progbits
+.Ldebug_line0:
+ .text
+.Ltext0:
+.globl func
+ .type func, @function
+func:
+.LFB2:
+ .file 1 "dw2-loclist-prelinked.c"
+ .loc 1 5 0
+ pushl %ebp
+.LCFI0:
+ movl %esp, %ebp
+.LCFI1:
+ subl $24, %esp
+.LCFI2:
+ .loc 1 8 0
+ call abort
+.LFE2:
+ .size func, .-func
+ .section .debug_frame,"",@progbits
+.Lframe0:
+ .long .LECIE0-.LSCIE0
+.LSCIE0:
+ .long 0xffffffff
+ .byte 0x1
+ .string ""
+ .uleb128 0x1
+ .sleb128 -4
+ .byte 0x8
+ .byte 0xc
+ .uleb128 0x4
+ .uleb128 0x4
+ .byte 0x88
+ .uleb128 0x1
+ .align 4
+.LECIE0:
+.LSFDE0:
+ .long .LEFDE0-.LASFDE0
+.LASFDE0:
+ .long .Lframe0
+ .long .LFB2
+ .long .LFE2-.LFB2
+ .byte 0x4
+ .long .LCFI0-.LFB2
+ .byte 0xe
+ .uleb128 0x8
+ .byte 0x85
+ .uleb128 0x2
+ .byte 0x4
+ .long .LCFI1-.LCFI0
+ .byte 0xd
+ .uleb128 0x5
+ .align 4
+.LEFDE0:
+ .text
+.Letext0:
+ .section .debug_loc,"",@progbits
+.Ldebug_loc0:
+.LLST0:
+ .long .LFB2-.Ltext0
+ .long .LCFI0-.Ltext0
+ .value 0x2
+ .byte 0x74
+ .sleb128 4
+ .long .LCFI0-.Ltext0
+ .long .LCFI1-.Ltext0
+ .value 0x2
+ .byte 0x74
+ .sleb128 8
+ .long .LCFI1-.Ltext0
+ .long .LFE2-.Ltext0
+ .value 0x2
+ .byte 0x75
+ .sleb128 8
+ .long 0x0
+ .long 0x0
+ .section .debug_info
+ .long 0x94
+ .value 0x2
+ .long .Ldebug_abbrev0
+ .byte 0x4
+ .uleb128 0x1
+ .long .LASF10
+ .byte 0x1
+ .long .LASF11
+ .long .LASF12
+ .long .Ltext0
+ .long .Letext0
+ .long .Ldebug_line0
+ .uleb128 0x2
+ .byte 0x4
+ .byte 0x7
+ .long .LASF0
+ .uleb128 0x3
+ .byte 0x4
+ .byte 0x5
+ .string "int"
+ .uleb128 0x2
+ .byte 0x4
+ .byte 0x5
+ .long .LASF1
+ .uleb128 0x2
+ .byte 0x1
+ .byte 0x8
+ .long .LASF2
+ .uleb128 0x2
+ .byte 0x2
+ .byte 0x7
+ .long .LASF3
+ .uleb128 0x2
+ .byte 0x4
+ .byte 0x7
+ .long .LASF4
+ .uleb128 0x2
+ .byte 0x1
+ .byte 0x6
+ .long .LASF5
+ .uleb128 0x2
+ .byte 0x2
+ .byte 0x5
+ .long .LASF6
+ .uleb128 0x2
+ .byte 0x8
+ .byte 0x5
+ .long .LASF7
+ .uleb128 0x2
+ .byte 0x8
+ .byte 0x7
+ .long .LASF8
+ .uleb128 0x4
+ .byte 0x4
+ .byte 0x7
+ .uleb128 0x2
+ .byte 0x1
+ .byte 0x6
+ .long .LASF9
+ .uleb128 0x5
+ .byte 0x1
+ .long .LASF13
+ .byte 0x1
+ .byte 0x5
+ .byte 0x1
+ .long .LFB2
+ .long .LFE2
+ .long .LLST0
+ .uleb128 0x6
+ .string "i"
+ .byte 0x1
+ .byte 0x6
+ .long 0x2c
+ .byte 0x2
+ .byte 0x91
+ .sleb128 -12
+ .byte 0x0
+ .byte 0x0
+ .section .debug_abbrev
+ .uleb128 0x1
+ .uleb128 0x11
+ .byte 0x1
+ .uleb128 0x25
+ .uleb128 0xe
+ .uleb128 0x13
+ .uleb128 0xb
+ .uleb128 0x3
+ .uleb128 0xe
+ .uleb128 0x1b
+ .uleb128 0xe
+ .uleb128 0x11
+ .uleb128 0x1
+ .uleb128 0x12
+ .uleb128 0x1
+ .uleb128 0x10
+ .uleb128 0x6
+ .byte 0x0
+ .byte 0x0
+ .uleb128 0x2
+ .uleb128 0x24
+ .byte 0x0
+ .uleb128 0xb
+ .uleb128 0xb
+ .uleb128 0x3e
+ .uleb128 0xb
+ .uleb128 0x3
+ .uleb128 0xe
+ .byte 0x0
+ .byte 0x0
+ .uleb128 0x3
+ .uleb128 0x24
+ .byte 0x0
+ .uleb128 0xb
+ .uleb128 0xb
+ .uleb128 0x3e
+ .uleb128 0xb
+ .uleb128 0x3
+ .uleb128 0x8
+ .byte 0x0
+ .byte 0x0
+ .uleb128 0x4
+ .uleb128 0x24
+ .byte 0x0
+ .uleb128 0xb
+ .uleb128 0xb
+ .uleb128 0x3e
+ .uleb128 0xb
+ .byte 0x0
+ .byte 0x0
+ .uleb128 0x5
+ .uleb128 0x2e
+ .byte 0x1
+ .uleb128 0x3f
+ .uleb128 0xc
+ .uleb128 0x3
+ .uleb128 0xe
+ .uleb128 0x3a
+ .uleb128 0xb
+ .uleb128 0x3b
+ .uleb128 0xb
+ .uleb128 0x27
+ .uleb128 0xc
+ .uleb128 0x11
+ .uleb128 0x1
+ .uleb128 0x12
+ .uleb128 0x1
+ .uleb128 0x40
+ .uleb128 0x6
+ .byte 0x0
+ .byte 0x0
+ .uleb128 0x6
+ .uleb128 0x34
+ .byte 0x0
+ .uleb128 0x3
+ .uleb128 0x8
+ .uleb128 0x3a
+ .uleb128 0xb
+ .uleb128 0x3b
+ .uleb128 0xb
+ .uleb128 0x49
+ .uleb128 0x13
+ .uleb128 0x2
+ .uleb128 0xa
+ .byte 0x0
+ .byte 0x0
+ .byte 0x0
+ .section .debug_pubnames,"",@progbits
+ .long 0x17
+ .value 0x2
+ .long .Ldebug_info0
+ .long 0x98
+ .long 0x75
+ .string "func"
+ .long 0x0
+ .section .debug_aranges,"",@progbits
+ .long 0x1c
+ .value 0x2
+ .long .Ldebug_info0
+ .byte 0x4
+ .byte 0x0
+ .value 0x0
+ .value 0x0
+ .long .Ltext0
+ .long .Letext0-.Ltext0
+ .long 0x0
+ .long 0x0
+ .section .debug_str,"MS",@progbits,1
+.LASF7:
+ .string "long long int"
+.LASF0:
+ .string "unsigned int"
+.LASF11:
+ .string "dw2-loclist-prelinked.c"
+.LASF12:
+ .string "gdb-6.8/gdb/testsuite/gdb.dwarf2"
+.LASF4:
+ .string "long unsigned int"
+.LASF8:
+ .string "long long unsigned int"
+.LASF2:
+ .string "unsigned char"
+.LASF9:
+ .string "char"
+.LASF1:
+ .string "long int"
+.LASF3:
+ .string "short unsigned int"
+.LASF5:
+ .string "signed char"
+.LASF10:
+ .string "GNU C 4.3.2 20081007 (Red Hat 4.3.2-6)"
+.LASF13:
+ .string "func"
+.LASF6:
+ .string "short int"
+ .ident "GCC: (GNU) 4.3.2 20081007 (Red Hat 4.3.2-6)"
+ .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()"

View File

@ -0,0 +1,78 @@
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
being sent during a testcase terminating its child GDB.
Some of the threads may not be properly PTRACE_DETACHed which hurts if they
should have been detached with SIGSTOP (as they are accidentally left running
on the debugger termination).
diff --git a/gdb/defs.h b/gdb/defs.h
--- a/gdb/defs.h
+++ b/gdb/defs.h
@@ -177,6 +177,10 @@ extern void default_quit_handler (void);
/* Flag that function quit should call quit_force. */
extern volatile int sync_quit_force_run;
+#ifdef NEED_DETACH_SIGSTOP
+extern int quit_flag_cleanup;
+#endif
+
extern void quit (void);
/* Helper for the QUIT macro. */
diff --git a/gdb/extension.c b/gdb/extension.c
--- a/gdb/extension.c
+++ b/gdb/extension.c
@@ -769,6 +769,11 @@ check_quit_flag (void)
{
int result = 0;
+#ifdef NEED_DETACH_SIGSTOP
+ if (quit_flag_cleanup)
+ return 0;
+#endif
+
for (const struct extension_language_defn *extlang : extension_languages)
{
if (extlang->ops != nullptr
diff --git a/gdb/top.c b/gdb/top.c
--- a/gdb/top.c
+++ b/gdb/top.c
@@ -1770,7 +1770,13 @@ quit_force (int *exit_arg, int from_tty)
else if (return_child_result)
exit_code = return_child_result_value;
+#ifndef NEED_DETACH_SIGSTOP
/* We want to handle any quit errors and exit regardless. */
+#else
+ /* We want to handle any quit errors and exit regardless but we should never
+ get user-interrupted to properly detach the inferior. */
+ quit_flag_cleanup = 1;
+#endif
/* Get out of tfind mode, and kill or detach all inferiors. */
try
diff --git a/gdb/utils.c b/gdb/utils.c
--- a/gdb/utils.c
+++ b/gdb/utils.c
@@ -103,6 +103,13 @@ static std::chrono::steady_clock::duration prompt_for_continue_wait_time;
static bool debug_timestamp = false;
+#ifdef NEED_DETACH_SIGSTOP
+/* Nonzero means we are already processing the quitting cleanups and we should
+ no longer get aborted. */
+
+int quit_flag_cleanup;
+#endif
+
/* True means that strings with character values >0x7F should be printed
as octal escapes. False means just print the value (e.g. it's an
international character, and the terminal or window can cope.) */

View File

@ -0,0 +1,88 @@
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:
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
new file mode 100644
--- /dev/null
+++ b/gdb/testsuite/gdb.cp/cxxexec.cc
@@ -0,0 +1,25 @@
+/* This test script is part of GDB, the GNU debugger.
+
+ Copyright 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/>. */
+
+#include <unistd.h>
+
+int
+main()
+{
+ execlp ("true", "true", NULL);
+ return 1;
+}
diff --git a/gdb/testsuite/gdb.cp/cxxexec.exp b/gdb/testsuite/gdb.cp/cxxexec.exp
new file mode 100644
--- /dev/null
+++ b/gdb/testsuite/gdb.cp/cxxexec.exp
@@ -0,0 +1,42 @@
+# Copyright 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/>.
+
+if { [skip_cplus_tests] } { continue }
+
+set testfile cxxexec
+if { [prepare_for_testing ${testfile}.exp ${testfile} ${testfile}.cc {c++ debug}] } {
+ return -1
+}
+
+runto_main
+
+# We could stop after `continue' again at `main'.
+delete_breakpoints
+
+set test "p _Unwind_DebugHook"
+gdb_test_multiple $test $test {
+ -re " = .* 0x\[0-9a-f\].*\r\n$gdb_prompt $" {
+ pass $test
+ }
+ -re "\r\nNo symbol .*\r\n$gdb_prompt $" {
+ xfail $test
+ untested ${testfile}.exp
+ return -1
+ }
+}
+
+# Run to end. The buggy GDB failed instead with:
+# Cannot access memory at address ADDR.
+gdb_continue_to_end "" "continue" 1

View File

@ -0,0 +1,89 @@
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-pie-addons-keep-disabled.patch
;;=push+jan: Breakpoints disabling matching should not be based on address.
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, section_offsets &delta)
+{
+ struct bp_location *bl, **blp_tmp;
+ int changed = 0;
+
+ gdb_assert (objfile->separate_debug_objfile_backlink == NULL);
+
+ ALL_BP_LOCATIONS (bl, blp_tmp)
+ {
+ struct obj_section *osect;
+
+ /* BL->SECTION can be correctly NULL for breakpoints with multiple
+ locations expanded through symtab. */
+
+ ALL_OBJFILE_OSECTIONS (objfile, osect)
+ {
+ CORE_ADDR relocated_address;
+ CORE_ADDR delta_offset;
+
+ delta_offset = delta[osect->the_bfd_section->index];
+ if (delta_offset == 0)
+ continue;
+ relocated_address = bl->address + delta_offset;
+
+ if (obj_section_addr (osect) <= relocated_address
+ && relocated_address < obj_section_endaddr (osect))
+ {
+ if (bl->inserted)
+ remove_breakpoint (bl);
+
+ bl->address += delta_offset;
+ bl->requested_address += delta_offset;
+
+ changed = 1;
+ }
+ }
+ }
+
+ if (changed)
+ std::sort (bp_locations, bp_locations + bp_locations_count,
+ bp_location_is_less_than);
+}
+
void _initialize_breakpoint ();
void
_initialize_breakpoint ()
diff --git a/gdb/breakpoint.h b/gdb/breakpoint.h
--- a/gdb/breakpoint.h
+++ b/gdb/breakpoint.h
@@ -1691,6 +1691,9 @@ extern const char *ep_parse_optional_if_clause (const char **arg);
UIOUT iff debugging multiple threads. */
extern void maybe_print_thread_hit_breakpoint (struct ui_out *uiout);
+extern void breakpoints_relocate (struct objfile *objfile,
+ section_offsets &delta);
+
/* Print the specified breakpoint. */
extern void print_breakpoint (breakpoint *bp);
diff --git a/gdb/objfiles.c b/gdb/objfiles.c
--- a/gdb/objfiles.c
+++ b/gdb/objfiles.c
@@ -742,6 +742,11 @@ objfile_relocate1 (struct objfile *objfile,
obj_section_addr (s));
}
+ /* Final call of breakpoint_re_set can keep breakpoint locations disabled if
+ their addresses match. */
+ if (objfile->separate_debug_objfile_backlink == NULL)
+ breakpoints_relocate (objfile, delta);
+
/* Data changed. */
return 1;
}

View File

@ -0,0 +1,39 @@
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-pie-addons.patch
;;=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_ENUMVAL, /**< enumval */
+ /* This address is unrelocated by the objfile's ANOFFSET. */
FIELD_LOC_KIND_PHYSADDR, /**< physaddr */
FIELD_LOC_KIND_PHYSNAME, /**< physname */
FIELD_LOC_KIND_DWARF_BLOCK /**< dwarf_block */
@@ -699,6 +700,7 @@ union field_location
field. Otherwise, physname is the mangled label of the
static field. */
+ /* This address is unrelocated by the objfile's ANOFFSET. */
CORE_ADDR physaddr;
const char *physname;
diff --git a/gdb/value.c b/gdb/value.c
--- a/gdb/value.c
+++ b/gdb/value.c
@@ -2850,7 +2850,8 @@ value_static_field (struct type *type, int fieldno)
{
case FIELD_LOC_KIND_PHYSADDR:
retval = value_at_lazy (type->field (fieldno).type (),
- 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))]));
break;
case FIELD_LOC_KIND_PHYSNAME:
{

3737
gdb-archer-vla-tests.patch Normal file

File diff suppressed because it is too large Load Diff

187
gdb-archer.patch Normal file
View File

@ -0,0 +1,187 @@
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/ArcherBranchManagement
GIT snapshot:
commit 718a1618b2f691a7f407213bb50f100ac59f91c3
tromey/python
diff --git a/gdb/data-directory/Makefile.in b/gdb/data-directory/Makefile.in
--- a/gdb/data-directory/Makefile.in
+++ b/gdb/data-directory/Makefile.in
@@ -80,6 +80,7 @@ PYTHON_FILE_LIST = \
gdb/unwinder.py \
gdb/xmethod.py \
gdb/command/__init__.py \
+ gdb/command/ignore_errors.py \
gdb/command/explore.py \
gdb/command/backtrace.py \
gdb/command/frame_filters.py \
@@ -92,6 +93,7 @@ PYTHON_FILE_LIST = \
gdb/function/as_string.py \
gdb/function/caller_is.py \
gdb/function/strfns.py \
+ gdb/function/in_scope.py \
gdb/printer/__init__.py \
gdb/printer/bound_registers.py
diff --git a/gdb/gdb-gdb.gdb.in b/gdb/gdb-gdb.gdb.in
--- a/gdb/gdb-gdb.gdb.in
+++ b/gdb/gdb-gdb.gdb.in
@@ -1,5 +1,15 @@
echo Setting up the environment for debugging gdb.\n
+# Set up the Python library and "require" command.
+python
+from os.path import abspath
+gdb.datadir = abspath ('@srcdir@/python/lib')
+gdb.pythonlibdir = gdb.datadir
+gdb.__path__ = [gdb.datadir + '/gdb']
+sys.path.insert(0, gdb.datadir)
+end
+source @srcdir@/python/lib/gdb/__init__.py
+
if !$gdb_init_done
set variable $gdb_init_done = 1
diff --git a/gdb/python/lib/gdb/command/ignore_errors.py b/gdb/python/lib/gdb/command/ignore_errors.py
new file mode 100644
--- /dev/null
+++ b/gdb/python/lib/gdb/command/ignore_errors.py
@@ -0,0 +1,37 @@
+# Ignore errors in user commands.
+
+# Copyright (C) 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/>.
+
+import gdb
+
+class IgnoreErrorsCommand (gdb.Command):
+ """Execute a single command, ignoring all errors.
+Only one-line commands are supported.
+This is primarily useful in scripts."""
+
+ def __init__ (self):
+ super (IgnoreErrorsCommand, self).__init__ ("ignore-errors",
+ gdb.COMMAND_OBSCURE,
+ # FIXME...
+ gdb.COMPLETE_COMMAND)
+
+ def invoke (self, arg, from_tty):
+ try:
+ gdb.execute (arg, from_tty)
+ except:
+ pass
+
+IgnoreErrorsCommand ()
diff --git a/gdb/python/lib/gdb/function/in_scope.py b/gdb/python/lib/gdb/function/in_scope.py
new file mode 100644
--- /dev/null
+++ b/gdb/python/lib/gdb/function/in_scope.py
@@ -0,0 +1,47 @@
+# In-scope function.
+
+# Copyright (C) 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/>.
+
+import gdb
+
+class InScope (gdb.Function):
+ """Return True if all the given variables or macros are in scope.
+Takes one argument for each variable name to be checked."""
+
+ def __init__ (self):
+ super (InScope, self).__init__ ("in_scope")
+
+ def invoke (self, *vars):
+ if len (vars) == 0:
+ raise (TypeError, "in_scope takes at least one argument")
+
+ # gdb.Value isn't hashable so it can't be put in a map.
+ # Convert to string first.
+ wanted = set (map (lambda x: x.string (), vars))
+ found = set ()
+ block = gdb.selected_frame ().block ()
+ while block:
+ for sym in block:
+ if (sym.is_argument or sym.is_constant
+ or sym.is_function or sym.is_variable):
+ if sym.name in wanted:
+ found.add (sym.name)
+
+ block = block.superblock
+
+ return wanted == found
+
+InScope ()
diff --git a/gdb/testsuite/gdb.python/py-frame.exp b/gdb/testsuite/gdb.python/py-frame.exp
--- a/gdb/testsuite/gdb.python/py-frame.exp
+++ b/gdb/testsuite/gdb.python/py-frame.exp
@@ -95,6 +95,8 @@ gdb_test "python print ('result = %s' % f0.read_var ('a'))" " = 1" "test Frame.r
gdb_test "python print ('result = %s' % (gdb.selected_frame () == f1))" " = True" "test gdb.selected_frame"
+gdb_test "python print ('result = %s' % (f0.block ()))" "<gdb.Block object at 0x\[\[:xdigit:\]\]+>" "test Frame.block"
+
# Can read SP register.
gdb_test "python print ('result = %s' % (gdb.selected_frame ().read_register ('sp') == gdb.parse_and_eval ('\$sp')))" \
" = True" \
diff --git a/gdb/testsuite/gdb.python/py-value.exp b/gdb/testsuite/gdb.python/py-value.exp
--- a/gdb/testsuite/gdb.python/py-value.exp
+++ b/gdb/testsuite/gdb.python/py-value.exp
@@ -419,6 +419,15 @@ proc test_value_after_death {} {
"print value's type"
}
+# Regression test for a cast failure. The bug was that if we cast a
+# value to its own type, gdb could crash. This happened because we
+# could end up double-freeing a struct value.
+proc test_cast_regression {} {
+ gdb_test "python v = gdb.Value(5)" "" "create value for cast test"
+ gdb_test "python v = v.cast(v.type)" "" "cast value for cast test"
+ gdb_test "python print(v)" "5" "print value for cast test"
+}
+
# Regression test for invalid subscript operations. The bug was that
# the type of the value was not being checked before allowing a
# subscript operation to proceed.
@@ -606,6 +615,7 @@ test_value_in_inferior
test_value_from_buffer
test_inferior_function_call
test_value_after_death
+test_cast_regression
# Test either C or C++ values.

View File

@ -0,0 +1,356 @@
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
Hi,
and here is the last bit for new SELinux 'deny_ptrace':
https://bugzilla.redhat.com/show_bug.cgi?id=786878
As even PTRACE_TRACEME fails in such case it needs to install hook for even
that event.
Thanks,
Jan
gdb/
2012-03-06 Jan Kratochvil <jan.kratochvil@redhat.com>
* common/linux-ptrace.c [HAVE_SELINUX_SELINUX_H]: include
selinux/selinux.h.
(linux_ptrace_attach_warnings): Call linux_ptrace_create_warnings.
(linux_ptrace_create_warnings): New.
* common/linux-ptrace.h (linux_ptrace_create_warnings): New declaration.
* config.in: Regenerate.
* configure: Regenerate.
* configure.ac: Check selinux/selinux.h and the selinux library.
* inf-ptrace.c (inf_ptrace_me): Check the ptrace result.
* linux-nat.c (linux_nat_create_inferior): New variable ex. Wrap
to_create_inferior into TRY_CATCH, call linux_ptrace_create_warnings.
gdb/gdbserver/
* config.in: Regenerate.
* configure: Regenerate.
* configure.ac: Check selinux/selinux.h and the selinux library.
* linux-low.c (linux_traceme): New function.
(linux_create_inferior, linux_tracefork_child): Call it instead of
direct ptrace.
diff --git a/gdb/config.in b/gdb/config.in
--- a/gdb/config.in
+++ b/gdb/config.in
@@ -253,6 +253,9 @@
/* Define if librpm library is being used. */
#undef HAVE_LIBRPM
+/* Define to 1 if you have the `selinux' library (-lselinux). */
+#undef HAVE_LIBSELINUX
+
/* Define to 1 if you have the <libunwind-ia64.h> header file. */
#undef HAVE_LIBUNWIND_IA64_H
@@ -388,6 +391,9 @@
/* Define to 1 if you have the `scm_new_smob' function. */
#undef HAVE_SCM_NEW_SMOB
+/* Define to 1 if you have the <selinux/selinux.h> header file. */
+#undef HAVE_SELINUX_SELINUX_H
+
/* Define to 1 if you have the `setlocale' function. */
#undef HAVE_SETLOCALE
diff --git a/gdb/configure b/gdb/configure
--- a/gdb/configure
+++ b/gdb/configure
@@ -16861,6 +16861,64 @@ cat >>confdefs.h <<_ACEOF
_ACEOF
+for ac_header in selinux/selinux.h
+do :
+ ac_fn_c_check_header_mongrel "$LINENO" "selinux/selinux.h" "ac_cv_header_selinux_selinux_h" "$ac_includes_default"
+if test "x$ac_cv_header_selinux_selinux_h" = x""yes; then :
+ cat >>confdefs.h <<_ACEOF
+#define HAVE_SELINUX_SELINUX_H 1
+_ACEOF
+
+fi
+
+done
+
+{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for security_get_boolean_active in -lselinux" >&5
+$as_echo_n "checking for security_get_boolean_active in -lselinux... " >&6; }
+if test "${ac_cv_lib_selinux_security_get_boolean_active+set}" = set; then :
+ $as_echo_n "(cached) " >&6
+else
+ ac_check_lib_save_LIBS=$LIBS
+LIBS="-lselinux $LIBS"
+cat confdefs.h - <<_ACEOF >conftest.$ac_ext
+/* end confdefs.h. */
+
+/* Override any GCC internal prototype to avoid an error.
+ Use char because int might match the return type of a GCC
+ builtin and then its argument prototype would still apply. */
+#ifdef __cplusplus
+extern "C"
+#endif
+char security_get_boolean_active ();
+int
+main ()
+{
+return security_get_boolean_active ();
+ ;
+ return 0;
+}
+_ACEOF
+if ac_fn_c_try_link "$LINENO"; then :
+ ac_cv_lib_selinux_security_get_boolean_active=yes
+else
+ ac_cv_lib_selinux_security_get_boolean_active=no
+fi
+rm -f core conftest.err conftest.$ac_objext \
+ conftest$ac_exeext conftest.$ac_ext
+LIBS=$ac_check_lib_save_LIBS
+fi
+{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_lib_selinux_security_get_boolean_active" >&5
+$as_echo "$ac_cv_lib_selinux_security_get_boolean_active" >&6; }
+if test "x$ac_cv_lib_selinux_security_get_boolean_active" = x""yes; then :
+ cat >>confdefs.h <<_ACEOF
+#define HAVE_LIBSELINUX 1
+_ACEOF
+
+ LIBS="-lselinux $LIBS"
+
+fi
+
+
# Support for --with-sysroot is a copy of GDB_AC_WITH_DIR,
# except that the argument to --with-sysroot is optional.
diff --git a/gdb/configure.ac b/gdb/configure.ac
--- a/gdb/configure.ac
+++ b/gdb/configure.ac
@@ -1900,6 +1900,10 @@ case $host_os in
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,
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). */
+#undef HAVE_LIBSELINUX
+
/* Define if the target supports branch tracing. */
#undef HAVE_LINUX_BTRACE
@@ -249,6 +252,9 @@
/* Define to 1 if you have the `sbrk' function. */
#undef HAVE_SBRK
+/* Define to 1 if you have the <selinux/selinux.h> header file. */
+#undef HAVE_SELINUX_SELINUX_H
+
/* Define to 1 if you have the `setns' function. */
#undef HAVE_SETNS
diff --git a/gdbserver/configure b/gdbserver/configure
--- a/gdbserver/configure
+++ b/gdbserver/configure
@@ -10683,6 +10683,64 @@ if $want_ipa ; then
fi
fi
+for ac_header in selinux/selinux.h
+do :
+ ac_fn_c_check_header_mongrel "$LINENO" "selinux/selinux.h" "ac_cv_header_selinux_selinux_h" "$ac_includes_default"
+if test "x$ac_cv_header_selinux_selinux_h" = x""yes; then :
+ cat >>confdefs.h <<_ACEOF
+#define HAVE_SELINUX_SELINUX_H 1
+_ACEOF
+
+fi
+
+done
+
+{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for security_get_boolean_active in -lselinux" >&5
+$as_echo_n "checking for security_get_boolean_active in -lselinux... " >&6; }
+if test "${ac_cv_lib_selinux_security_get_boolean_active+set}" = set; then :
+ $as_echo_n "(cached) " >&6
+else
+ ac_check_lib_save_LIBS=$LIBS
+LIBS="-lselinux $LIBS"
+cat confdefs.h - <<_ACEOF >conftest.$ac_ext
+/* end confdefs.h. */
+
+/* Override any GCC internal prototype to avoid an error.
+ Use char because int might match the return type of a GCC
+ builtin and then its argument prototype would still apply. */
+#ifdef __cplusplus
+extern "C"
+#endif
+char security_get_boolean_active ();
+int
+main ()
+{
+return security_get_boolean_active ();
+ ;
+ return 0;
+}
+_ACEOF
+if ac_fn_c_try_link "$LINENO"; then :
+ ac_cv_lib_selinux_security_get_boolean_active=yes
+else
+ ac_cv_lib_selinux_security_get_boolean_active=no
+fi
+rm -f core conftest.err conftest.$ac_objext \
+ conftest$ac_exeext conftest.$ac_ext
+LIBS=$ac_check_lib_save_LIBS
+fi
+{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_lib_selinux_security_get_boolean_active" >&5
+$as_echo "$ac_cv_lib_selinux_security_get_boolean_active" >&6; }
+if test "x$ac_cv_lib_selinux_security_get_boolean_active" = x""yes; then :
+ cat >>confdefs.h <<_ACEOF
+#define HAVE_LIBSELINUX 1
+_ACEOF
+
+ LIBS="-lselinux $LIBS"
+
+fi
+
+
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");

196
gdb-bfd-aliasing.patch Normal file
View File

@ -0,0 +1,196 @@
http://sourceware.org/ml/binutils/2016-03/msg00119.html
Subject: [patch] aout+coff: Fix strict-aliasing rules error
--IJpNTDwzlM2Ie8A6
Content-Type: text/plain; charset=us-ascii
Content-Disposition: inline
Hi,
https://bugzilla.redhat.com/show_bug.cgi?id=1315191 by Dan Horak
gcc (GCC) 6.0.0 20160308 (experimental)
gcc-6.0.0-0.15.fc24
gcc-6.0.0-0.15.fc25
It did compile with:
gcc-6.0.0-0.14.fc24
aoutx.h:2504:7: error: dereferencing type-punned pointer will break strict-aliasing rules [-Werror=strict-aliasing]
int type_code = aout_symbol (symbol)->type & 0xff;
^~~
coffcode.h:1817:3: error: dereferencing type-punned pointer will break strict-aliasing rules [-Werror=strict-aliasing]
coffsymbol (section->symbol)->native = native;
^~~~~~~~~~
Full log attached.
This fix is probably wrong as it drops the type safety. But ({ statements as
expressions }) are probably not allowed in GDB.
Jan
--IJpNTDwzlM2Ie8A6
Content-Type: text/plain; charset=us-ascii
Content-Disposition: inline; filename=1
bfd/
2016-03-08 Jan Kratochvil <jan.kratochvil@redhat.com>
Fix strict-aliasing rules compilation error.
* libaout.h (aout_symbol): Remove type safe indirection.
* libcoff-in.h (coffsymbol): Likewise.
* libcoff.h: Regenerate.
diff --git a/bfd/libaout.h b/bfd/libaout.h
index 8b70a9f..b60c40c 100644
--- a/bfd/libaout.h
+++ b/bfd/libaout.h
@@ -448,9 +448,7 @@ struct aout_data_struct
#define obj_aout_sym_hashes(bfd) (adata (bfd).sym_hashes)
#define obj_aout_dynamic_info(bfd) (adata (bfd).dynamic_info)
-/* We take the address of the first element of an asymbol to ensure that the
- macro is only ever applied to an asymbol. */
-#define aout_symbol(asymbol) ((aout_symbol_type *)(&(asymbol)->the_bfd))
+#define aout_symbol(asymbol) ((aout_symbol_type *) (asymbol))
/* Information we keep for each a.out section. This is currently only
used by the a.out backend linker. */
diff --git a/bfd/libcoff-in.h b/bfd/libcoff-in.h
index 80f999d..fa1e9ac 100644
--- a/bfd/libcoff-in.h
+++ b/bfd/libcoff-in.h
@@ -188,9 +188,7 @@ struct xcoff_tdata
#define xcoff_data(abfd) ((abfd)->tdata.xcoff_obj_data)
-/* We take the address of the first element of an asymbol to ensure that the
- macro is only ever applied to an asymbol. */
-#define coffsymbol(asymbol) ((coff_symbol_type *)(&((asymbol)->the_bfd)))
+#define coffsymbol(asymbol) ((coff_symbol_type *) (asymbol))
/* Tdata for sections in XCOFF files. This is used by the linker. */
diff --git a/bfd/libcoff.h b/bfd/libcoff.h
index bbed3e0..8ce525b 100644
--- a/bfd/libcoff.h
+++ b/bfd/libcoff.h
@@ -192,9 +192,7 @@ struct xcoff_tdata
#define xcoff_data(abfd) ((abfd)->tdata.xcoff_obj_data)
-/* We take the address of the first element of an asymbol to ensure that the
- macro is only ever applied to an asymbol. */
-#define coffsymbol(asymbol) ((coff_symbol_type *)(&((asymbol)->the_bfd)))
+#define coffsymbol(asymbol) ((coff_symbol_type *) (asymbol))
/* Tdata for sections in XCOFF files. This is used by the linker. */
--IJpNTDwzlM2Ie8A6
Content-Type: text/plain; charset=iso-2022-jp
Content-Disposition: inline; filename=2
libtool: compile: gcc -DHAVE_CONFIG_H -I. -I. -I. -I./../include -DHAVE_x86_64_elf64_vec -DHAVE_i386_elf32_vec -DHAVE_iamcu_elf32_vec -DHAVE_x86_64_elf32_vec -DHAVE_i386_aout_linux_vec -DHAVE_i386_pei_vec -DHAVE_x86_64_pei_vec -DHAVE_l1om_elf64_vec -DHAVE_k1om_elf64_vec -DHAVE_elf64_le_vec -DHAVE_elf64_be_vec -DHAVE_elf32_le_vec -DHAVE_elf32_be_vec -DHAVE_plugin_vec -DBINDIR=\"/usr/local/bin\" -W -Wall -Wstrict-prototypes -Wmissing-prototypes -Wshadow -Werror -I./../zlib -g -O2 -MT aout32.lo -MD -MP -MF .deps/aout32.Tpo -c aout32.c -o aout32.o
In file included from aout32.c:24:0:
aoutx.h: In function $B!F(Baout_32_write_syms$B!G(B:
aoutx.h:1871:4: error: dereferencing type-punned pointer will break strict-aliasing rules [-Werror=strict-aliasing]
H_PUT_16 (abfd, aout_symbol (g)->desc, nsp.e_desc);
^~~~~~~~
aoutx.h:1872:4: error: dereferencing type-punned pointer will break strict-aliasing rules [-Werror=strict-aliasing]
H_PUT_8 (abfd, aout_symbol (g)->other, nsp.e_other);
^~~~~~~
aoutx.h:1873:4: error: dereferencing type-punned pointer will break strict-aliasing rules [-Werror=strict-aliasing]
H_PUT_8 (abfd, aout_symbol (g)->type, nsp.e_type);
^~~~~~~
aoutx.h: In function $B!F(Baout_32_get_symbol_info$B!G(B:
aoutx.h:2504:7: error: dereferencing type-punned pointer will break strict-aliasing rules [-Werror=strict-aliasing]
int type_code = aout_symbol (symbol)->type & 0xff;
^~~
aoutx.h:2515:7: error: dereferencing type-punned pointer will break strict-aliasing rules [-Werror=strict-aliasing]
ret->stab_other = (unsigned) (aout_symbol (symbol)->other & 0xff);
^~~
aoutx.h:2516:7: error: dereferencing type-punned pointer will break strict-aliasing rules [-Werror=strict-aliasing]
ret->stab_desc = (unsigned) (aout_symbol (symbol)->desc & 0xffff);
^~~
aoutx.h: In function $B!F(Baout_32_print_symbol$B!G(B:
aoutx.h:2537:9: error: dereferencing type-punned pointer will break strict-aliasing rules [-Werror=strict-aliasing]
(unsigned) (aout_symbol (symbol)->desc & 0xffff),
^
aoutx.h:2538:9: error: dereferencing type-punned pointer will break strict-aliasing rules [-Werror=strict-aliasing]
(unsigned) (aout_symbol (symbol)->other & 0xff),
^
aoutx.h:2539:9: error: dereferencing type-punned pointer will break strict-aliasing rules [-Werror=strict-aliasing]
(unsigned) (aout_symbol (symbol)->type));
^
aoutx.h:2549:4: error: dereferencing type-punned pointer will break strict-aliasing rules [-Werror=strict-aliasing]
(unsigned) (aout_symbol (symbol)->desc & 0xffff),
^
aoutx.h:2550:4: error: dereferencing type-punned pointer will break strict-aliasing rules [-Werror=strict-aliasing]
(unsigned) (aout_symbol (symbol)->other & 0xff),
^
aoutx.h:2551:4: error: dereferencing type-punned pointer will break strict-aliasing rules [-Werror=strict-aliasing]
(unsigned) (aout_symbol (symbol)->type & 0xff));
^
cc1: all warnings being treated as errors
libtool: compile: gcc -DHAVE_CONFIG_H -I. -I. -I. -I./../include -DHAVE_x86_64_elf64_vec -DHAVE_i386_elf32_vec -DHAVE_iamcu_elf32_vec -DHAVE_x86_64_elf32_vec -DHAVE_i386_aout_linux_vec -DHAVE_i386_pei_vec -DHAVE_x86_64_pei_vec -DHAVE_l1om_elf64_vec -DHAVE_k1om_elf64_vec -DHAVE_elf64_le_vec -DHAVE_elf64_be_vec -DHAVE_elf32_le_vec -DHAVE_elf32_be_vec -DHAVE_plugin_vec -DBINDIR=\"/usr/local/bin\" -W -Wall -Wstrict-prototypes -Wmissing-prototypes -Wshadow -Werror -I./../zlib -g -O2 -MT pei-i386.lo -MD -MP -MF .deps/pei-i386.Tpo -c pei-i386.c -o pei-i386.o
In file included from coff-i386.c:614:0,
from pei-i386.c:45:
coffcode.h: In function $B!F(Bcoff_new_section_hook$B!G(B:
coffcode.h:1817:3: error: dereferencing type-punned pointer will break strict-aliasing rules [-Werror=strict-aliasing]
coffsymbol (section->symbol)->native = native;
^~~~~~~~~~
cc1: all warnings being treated as errors
libtool: compile: gcc -DHAVE_CONFIG_H -I. -I. -I. -I./../include -DHAVE_x86_64_elf64_vec -DHAVE_i386_elf32_vec -DHAVE_iamcu_elf32_vec -DHAVE_x86_64_elf32_vec -DHAVE_i386_aout_linux_vec -DHAVE_i386_pei_vec -DHAVE_x86_64_pei_vec -DHAVE_l1om_elf64_vec -DHAVE_k1om_elf64_vec -DHAVE_elf64_le_vec -DHAVE_elf64_be_vec -DHAVE_elf32_le_vec -DHAVE_elf32_be_vec -DHAVE_plugin_vec -DBINDIR=\"/usr/local/bin\" -W -Wall -Wstrict-prototypes -Wmissing-prototypes -Wshadow -Werror -I./../zlib -g -O2 -MT coffgen.lo -MD -MP -MF .deps/coffgen.Tpo -c coffgen.c -o coffgen.o
coffgen.c: In function $B!F(Bcoff_get_lineno$B!G(B:
coffgen.c:1510:3: error: dereferencing type-punned pointer will break strict-aliasing rules [-Werror=strict-aliasing]
return coffsymbol (symbol)->lineno;
^~~~~~
coffgen.c: In function $B!F(Bcoff_get_symbol_info$B!G(B:
coffgen.c:2034:3: error: dereferencing type-punned pointer will break strict-aliasing rules [-Werror=strict-aliasing]
if (coffsymbol (symbol)->native != NULL
^~
coffgen.c:2035:7: error: dereferencing type-punned pointer will break strict-aliasing rules [-Werror=strict-aliasing]
&& coffsymbol (symbol)->native->fix_value
^~
coffgen.c:2036:7: error: dereferencing type-punned pointer will break strict-aliasing rules [-Werror=strict-aliasing]
&& coffsymbol (symbol)->native->is_sym)
^~
coffgen.c:2037:5: error: dereferencing type-punned pointer will break strict-aliasing rules [-Werror=strict-aliasing]
ret->value = coffsymbol (symbol)->native->u.syment.n_value -
^~~
coffgen.c: In function $B!F(Bcoff_print_symbol$B!G(B:
coffgen.c:2059:9: error: dereferencing type-punned pointer will break strict-aliasing rules [-Werror=strict-aliasing]
coffsymbol (symbol)->native ? "n" : "g",
^~~~~~~~~~
coffgen.c:2060:9: error: dereferencing type-punned pointer will break strict-aliasing rules [-Werror=strict-aliasing]
coffsymbol (symbol)->lineno ? "l" : " ");
^~~~~~~~~~
coffgen.c:2064:7: error: dereferencing type-punned pointer will break strict-aliasing rules [-Werror=strict-aliasing]
if (coffsymbol (symbol)->native)
^~
coffgen.c:2068:4: error: dereferencing type-punned pointer will break strict-aliasing rules [-Werror=strict-aliasing]
combined_entry_type *combined = coffsymbol (symbol)->native;
^~~~~~~~~~~~~~~~~~~
coffgen.c:2070:11: error: dereferencing type-punned pointer will break strict-aliasing rules [-Werror=strict-aliasing]
struct lineno_cache_entry *l = coffsymbol (symbol)->lineno;
^~~~~~~~~~~~~~~~~~
coffgen.c:2191:6: error: dereferencing type-punned pointer will break strict-aliasing rules [-Werror=strict-aliasing]
coffsymbol (symbol)->native ? "n" : "g",
^~~~~~~~~~
coffgen.c:2192:6: error: dereferencing type-punned pointer will break strict-aliasing rules [-Werror=strict-aliasing]
coffsymbol (symbol)->lineno ? "l" : " ",
^~~~~~~~~~
cc1: all warnings being treated as errors
libtool: compile: gcc -DHAVE_CONFIG_H -I. -I. -I. -I./../include -DHAVE_x86_64_elf64_vec -DHAVE_i386_elf32_vec -DHAVE_iamcu_elf32_vec -DHAVE_x86_64_elf32_vec -DHAVE_i386_aout_linux_vec -DHAVE_i386_pei_vec -DHAVE_x86_64_pei_vec -DHAVE_l1om_elf64_vec -DHAVE_k1om_elf64_vec -DHAVE_elf64_le_vec -DHAVE_elf64_be_vec -DHAVE_elf32_le_vec -DHAVE_elf32_be_vec -DHAVE_plugin_vec -DBINDIR=\"/usr/local/bin\" -W -Wall -Wstrict-prototypes -Wmissing-prototypes -Wshadow -Werror -I./../zlib -g -O2 -MT pei-x86_64.lo -MD -MP -MF .deps/pei-x86_64.Tpo -c pei-x86_64.c -o pei-x86_64.o
In file included from coff-x86_64.c:741:0,
from pei-x86_64.c:763:
coffcode.h: In function $B!F(Bcoff_new_section_hook$B!G(B:
coffcode.h:1817:3: error: dereferencing type-punned pointer will break strict-aliasing rules [-Werror=strict-aliasing]
coffsymbol (section->symbol)->native = native;
^~~~~~~~~~
cc1: all warnings being treated as errors
--IJpNTDwzlM2Ie8A6--

45
gdb-btrobust.patch Normal file
View File

@ -0,0 +1,45 @@
From FEDORA_PATCHES Mon Sep 17 00:00:00 2001
From: Fedora GDB patches <invalid@email.com>
Date: Fri, 27 Oct 2017 21:07:50 +0200
Subject: gdb-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
printed, but a default backtrace will occur in this case.
--
diff --git a/gdb/python/py-framefilter.c b/gdb/python/py-framefilter.c
--- a/gdb/python/py-framefilter.c
+++ b/gdb/python/py-framefilter.c
@@ -1204,6 +1204,7 @@ gdbpy_apply_frame_filter (const struct extension_language_defn *extlang,
htab_eq_pointer,
NULL));
+ int count_printed = 0;
while (true)
{
gdbpy_ref<> item (PyIter_Next (iterable.get ()));
@@ -1212,8 +1213,8 @@ gdbpy_apply_frame_filter (const struct extension_language_defn *extlang,
{
if (PyErr_Occurred ())
{
- gdbpy_print_stack_or_quit ();
- return EXT_LANG_BT_ERROR;
+ gdbpy_print_stack ();
+ return count_printed > 0 ? EXT_LANG_BT_ERROR : EXT_LANG_BT_NO_FILTERS;
}
break;
}
@@ -1245,7 +1246,8 @@ gdbpy_apply_frame_filter (const struct extension_language_defn *extlang,
/* Do not exit on error printing a single frame. Print the
error and continue with other frames. */
if (success == EXT_LANG_BT_ERROR)
- gdbpy_print_stack_or_quit ();
+ gdbpy_print_stack ();
+ count_printed++;
}
return success;

View File

@ -0,0 +1,178 @@
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
Hi,
in some cases with deleted main executable GDB will want to kill the inferior.
$ cp /bin/sleep /tmp/sleep;/tmp/sleep 1h&p=$!
$ rm /tmp/sleep
$ gdb /tmp/sleep $p
GNU gdb (GDB) 7.10.50.20151016-cvs
/tmp/sleep: No such file or directory.
Attaching to process 9694
/tmp/sleep (deleted): No such file or directory.
A program is being debugged already. Kill it? (y or n) _
The first attachment of "/tmp/sleep" commandline argument errors at:
267 if (scratch_chan < 0)
268 perror_with_name (filename);
1051 if (catch_command_errors_const (exec_file_attach, execarg,
1052 !batch_flag))
Then GDB tries to attach to the process $p:
1082 if (catch_command_errors (attach_command, pid_or_core_arg,
1083 !batch_flag) == 0)
This succeeds and since this moment GDB has a valid inferior. But despite that
the lines
1082 if (catch_command_errors (attach_command, pid_or_core_arg,
1083 !batch_flag) == 0)
still fail because consequently attach_command() fails to find the associated
executable file:
267 if (scratch_chan < 0)
268 perror_with_name (filename);
1082 if (catch_command_errors (attach_command, pid_or_core_arg,
1083 !batch_flag) == 0)
and therefore GDB executes the following:
(gdb) bt
2179 if (have_inferiors ())
2180 {
2181 if (!from_tty
2182 || !have_live_inferiors ()
2183 || query (_("A program is being debugged already. Kill it? ")))
2184 iterate_over_inferiors (dispose_inferior, NULL);
2185 else
2186 error (_("Program not killed."));
2187 }
1084 catch_command_errors (core_file_command, pid_or_core_arg,
1085 !batch_flag);
No regressions on {x86_64,x86_64-m32,i686}-fedora24pre-linux-gnu.
Thanks,
Jan
gdb/ChangeLog
2015-10-16 Jan Kratochvil <jan.kratochvil@redhat.com>
* main.c (captured_main): Run core_file_command for pid_or_core_arg
only if not have_inferiors ().
gdb/testsuite/ChangeLog
2015-10-16 Jan Kratochvil <jan.kratochvil@redhat.com>
* gdb.base/attach-kills.c: New.
* gdb.base/attach-kills.exp: New.
diff --git a/gdb/main.c b/gdb/main.c
--- a/gdb/main.c
+++ b/gdb/main.c
@@ -1199,7 +1199,10 @@ captured_main_1 (struct captured_main_args *context)
{
ret = catch_command_errors (attach_command, pid_or_core_arg,
!batch_flag);
- if (ret == 0)
+ if (ret == 0
+ /* attach_command could succeed partially and core_file_command
+ would try to kill it. */
+ && !have_inferiors ())
ret = catch_command_errors (core_file_command,
pid_or_core_arg,
!batch_flag);
diff --git a/gdb/testsuite/gdb.base/attach-kills.c b/gdb/testsuite/gdb.base/attach-kills.c
new file mode 100644
--- /dev/null
+++ b/gdb/testsuite/gdb.base/attach-kills.c
@@ -0,0 +1,25 @@
+/* This testcase is part of GDB, the GNU debugger.
+
+ Copyright 2015 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/>. */
+
+#include <unistd.h>
+
+int
+main (void)
+{
+ sleep (600);
+ return 0;
+}
diff --git a/gdb/testsuite/gdb.base/attach-kills.exp b/gdb/testsuite/gdb.base/attach-kills.exp
new file mode 100644
--- /dev/null
+++ b/gdb/testsuite/gdb.base/attach-kills.exp
@@ -0,0 +1,49 @@
+# Copyright (C) 2015 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/>.
+
+if { ![can_spawn_for_attach] } {
+ return 0
+}
+
+standard_testfile
+
+if { [build_executable ${testfile}.exp $testfile] == -1 } {
+ return -1
+}
+
+# Start the program running and then wait for a bit, to be sure
+# that it can be attached to.
+
+set test_spawn_id [spawn_wait_for_attach $binfile]
+set testpid [spawn_id_get_pid $test_spawn_id]
+
+remote_exec target "cp -pf -- $binfile $binfile-copy"
+remote_exec target "rm -f -- $binfile"
+
+set test "start gdb"
+set res [gdb_spawn_with_cmdline_opts \
+ "-iex \"set height 0\" -iex \"set width 0\" /DoEsNoTeXySt $testpid"]
+if { $res != 0} {
+ fail "$test (spawn)"
+ kill_wait_spawned_process $test_spawn_id
+ return -1
+}
+gdb_test_multiple "" $test {
+ -re "\r\nAttaching to .*\r\n$gdb_prompt $" {
+ pass $test
+ }
+}
+
+kill_wait_spawned_process $test_spawn_id

View File

@ -0,0 +1,130 @@
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
I find it a bug in DWARF and gdb behaves correctly according to it. From the
current DWARF's point of view the is a function call which you skip by "next".
If you hide any /usr/lib/debug such as using:
gdb -nx -ex 'set debug-file-directory /qwe' -ex 'file ./tpcommon_gfortran44'
and use "step" command instead of "next" there it will work.
(You need to hide debuginfo from libgomp as you would step into libgomp sources
to maintain the threads for execution.)
There should be some DWARF extension for it, currently tried to detect
substring ".omp_fn." as this function is called "MAIN__.omp_fn.0" and do not
consider such sub-function as a skippable by "next".
Another problem is that with "set scheduler-locking" being "off" (default
upstream) or "step" (default in F/RHEL) the simultaneous execution of the
threads is inconvenient. Setting it to "on" will lockup the debugging as the
threads need to get synchronized at some point. This is a more general
debugging problem of GOMP outside of the scope of this Bug.
diff --git a/gdb/infrun.c b/gdb/infrun.c
--- a/gdb/infrun.c
+++ b/gdb/infrun.c
@@ -6788,6 +6788,16 @@ process_event_stop_test (struct execution_control_state *ecs)
if (ecs->event_thread->control.step_over_calls == STEP_OVER_ALL)
{
+ struct symbol *stop_fn = find_pc_function (stop_pc);
+ struct minimal_symbol *stopf = lookup_minimal_symbol_by_pc (stop_pc).minsym;
+
+ if ((stop_fn == NULL
+ || strstr (stop_fn->linkage_name (), ".omp_fn.") == NULL)
+ /* gcc-4.7.2-9.fc19.x86_64 uses a new format. */
+ && (stopf == NULL
+ || strstr (stopf->linkage_name (), "._omp_fn.") == NULL))
+{ /* ".omp_fn." */
+
/* We're doing a "next".
Normal (forward) execution: set a breakpoint at the
@@ -6821,6 +6831,7 @@ process_event_stop_test (struct execution_control_state *ecs)
keep_going (ecs);
return;
+} /* ".omp_fn." */
}
/* If we are in a function call trampoline (a stub between the
diff --git a/gdb/testsuite/gdb.fortran/omp-step.exp b/gdb/testsuite/gdb.fortran/omp-step.exp
new file mode 100644
--- /dev/null
+++ b/gdb/testsuite/gdb.fortran/omp-step.exp
@@ -0,0 +1,31 @@
+# Copyright 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 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 "omp-step"
+set srcfile ${testfile}.f90
+if { [prepare_for_testing $testfile.exp $testfile $srcfile {debug f90 additional_flags=-fopenmp}] } {
+ return -1
+}
+
+if ![runto [gdb_get_line_number "start-here"]] {
+ perror "Couldn't run to start-here"
+ return 0
+}
+
+gdb_test "next" {!\$omp parallel} "step closer"
+gdb_test "next" {a\(omp_get_thread_num\(\) \+ 1\) = 1} "step into omp"
+
+gdb_breakpoint [gdb_get_line_number "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
new file mode 100644
--- /dev/null
+++ b/gdb/testsuite/gdb.fortran/omp-step.f90
@@ -0,0 +1,32 @@
+! Copyright 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 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/>.
+
+ use omp_lib
+ integer nthreads, i, a(1000)
+ nthreads = omp_get_num_threads()
+ if (nthreads .gt. 1000) call abort
+
+ do i = 1, nthreads
+ a(i) = 0
+ end do
+ print *, "start-here"
+!$omp parallel
+ a(omp_get_thread_num() + 1) = 1
+!$omp end parallel
+ do i = 1, nthreads
+ if (a(i) .ne. 1) call abort
+ end do
+ print *, "success"
+ end

View File

@ -0,0 +1,254 @@
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-bz601887-dwarf4-rh-test.patch
;; 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 @@
+/* This testcase is part of GDB, the GNU debugger.
+
+ Copyright 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/>. */
+
+ .file "rh-dwarf4-x86_64.c"
+ .section .debug_abbrev,"",@progbits
+.Ldebug_abbrev0:
+ .section .debug_info,"",@progbits
+.Ldebug_info0:
+ .section .debug_line,"",@progbits
+.Ldebug_line0:
+ .text
+.Ltext0:
+.globl main
+ .type main, @function
+main:
+.LFB0:
+ .file 1 "gdb.dwarf2/rh-dwarf4-x86_64.c"
+ # gdb.dwarf2/rh-dwarf4-x86_64.c:20
+ .loc 1 20 0
+ .cfi_startproc
+ # basic block 2
+ pushq %rbp
+ .cfi_def_cfa_offset 16
+ movq %rsp, %rbp
+ .cfi_offset 6, -16
+ .cfi_def_cfa_register 6
+ # gdb.dwarf2/rh-dwarf4-x86_64.c:21
+ .loc 1 21 0
+ movl $0, %eax
+ # gdb.dwarf2/rh-dwarf4-x86_64.c:22
+ .loc 1 22 0
+ leave
+ .cfi_def_cfa 7, 8
+ ret
+ .cfi_endproc
+.LFE0:
+ .size main, .-main
+.Letext0:
+ .section .debug_info
+ .long 0x4e # Length of Compilation Unit Info
+ .value 0x4 # DWARF version number
+ .long .Ldebug_abbrev0 # Offset Into Abbrev. Section
+ .byte 0x8 # Pointer Size (in bytes)
+ .uleb128 0x1 # (DIE (0xb) DW_TAG_compile_unit)
+ .long .LASF0 # DW_AT_producer: "GNU C 4.4.4 20100503 (Red Hat 4.4.4-2)"
+ .byte 0x1 # DW_AT_language
+ .long .LASF1 # DW_AT_name: "gdb.dwarf2/rh-dwarf4-x86_64.c"
+ .long .LASF2 # DW_AT_comp_dir
+ .quad .Ltext0 # DW_AT_low_pc
+ .quad .Letext0 # DW_AT_high_pc
+ .long .Ldebug_line0 # DW_AT_stmt_list
+ .uleb128 0x2 # (DIE (0x2d) DW_TAG_subprogram)
+ # DW_AT_external
+ .long .LASF3 # DW_AT_name: "main"
+ .byte 0x1 # DW_AT_decl_file (gdb.dwarf2/rh-dwarf4-x86_64.c)
+ .byte 0x13 # DW_AT_decl_line
+ # DW_AT_prototyped
+ .long 0x4a # DW_AT_type
+ .quad .LFB0 # DW_AT_low_pc
+ .quad .LFE0 # DW_AT_high_pc
+ .uleb128 0x1 # DW_AT_frame_base
+ .byte 0x9c # DW_OP_call_frame_cfa
+ .uleb128 0x3 # (DIE (0x4a) DW_TAG_base_type)
+ .byte 0x4 # DW_AT_byte_size
+ .byte 0x5 # DW_AT_encoding
+ .ascii "int\0" # DW_AT_name
+ .byte 0x0 # end of children of DIE 0xb
+ .section .debug_abbrev
+ .uleb128 0x1 # (abbrev code)
+ .uleb128 0x11 # (TAG: DW_TAG_compile_unit)
+ .byte 0x1 # DW_children_yes
+ .uleb128 0x25 # (DW_AT_producer)
+ .uleb128 0xe # (DW_FORM_strp)
+ .uleb128 0x13 # (DW_AT_language)
+ .uleb128 0xb # (DW_FORM_data1)
+ .uleb128 0x3 # (DW_AT_name)
+ .uleb128 0xe # (DW_FORM_strp)
+ .uleb128 0x1b # (DW_AT_comp_dir)
+ .uleb128 0xe # (DW_FORM_strp)
+ .uleb128 0x11 # (DW_AT_low_pc)
+ .uleb128 0x1 # (DW_FORM_addr)
+ .uleb128 0x12 # (DW_AT_high_pc)
+ .uleb128 0x1 # (DW_FORM_addr)
+ .uleb128 0x10 # (DW_AT_stmt_list)
+ .uleb128 0x17 # (DW_FORM_sec_offset)
+ .byte 0x0
+ .byte 0x0
+ .uleb128 0x2 # (abbrev code)
+ .uleb128 0x2e # (TAG: DW_TAG_subprogram)
+ .byte 0x0 # DW_children_no
+ .uleb128 0x3f # (DW_AT_external)
+ .uleb128 0x19 # (DW_FORM_flag_present)
+ .uleb128 0x3 # (DW_AT_name)
+ .uleb128 0xe # (DW_FORM_strp)
+ .uleb128 0x3a # (DW_AT_decl_file)
+ .uleb128 0xb # (DW_FORM_data1)
+ .uleb128 0x3b # (DW_AT_decl_line)
+ .uleb128 0xb # (DW_FORM_data1)
+ .uleb128 0x27 # (DW_AT_prototyped)
+ .uleb128 0x19 # (DW_FORM_flag_present)
+ .uleb128 0x49 # (DW_AT_type)
+ .uleb128 0x13 # (DW_FORM_ref4)
+ .uleb128 0x11 # (DW_AT_low_pc)
+ .uleb128 0x1 # (DW_FORM_addr)
+ .uleb128 0x12 # (DW_AT_high_pc)
+ .uleb128 0x1 # (DW_FORM_addr)
+ .uleb128 0x40 # (DW_AT_frame_base)
+ .uleb128 0x18 # (DW_FORM_exprloc)
+ .byte 0x0
+ .byte 0x0
+ .uleb128 0x3 # (abbrev code)
+ .uleb128 0x24 # (TAG: DW_TAG_base_type)
+ .byte 0x0 # DW_children_no
+ .uleb128 0xb # (DW_AT_byte_size)
+ .uleb128 0xb # (DW_FORM_data1)
+ .uleb128 0x3e # (DW_AT_encoding)
+ .uleb128 0xb # (DW_FORM_data1)
+ .uleb128 0x3 # (DW_AT_name)
+ .uleb128 0x8 # (DW_FORM_string)
+ .byte 0x0
+ .byte 0x0
+ .byte 0x0
+ .section .debug_pubnames,"",@progbits
+ .long 0x17 # Length of Public Names Info
+ .value 0x2 # DWARF Version
+ .long .Ldebug_info0 # Offset of Compilation Unit Info
+ .long 0x52 # Compilation Unit Length
+ .long 0x2d # DIE offset
+ .ascii "main\0" # external name
+ .long 0x0
+ .section .debug_aranges,"",@progbits
+ .long 0x2c # Length of Address Ranges Info
+ .value 0x2 # DWARF Version
+ .long .Ldebug_info0 # Offset of Compilation Unit Info
+ .byte 0x8 # Size of Address
+ .byte 0x0 # Size of Segment Descriptor
+ .value 0x0 # Pad to 16 byte boundary
+ .value 0x0
+ .quad .Ltext0 # Address
+ .quad .Letext0-.Ltext0 # Length
+ .quad 0x0
+ .quad 0x0
+ .section .debug_str,"MS",@progbits,1
+.LASF2:
+ .string "."
+.LASF0:
+ .string "GNU C 4.4.4 20100503 (Red Hat 4.4.4-2)"
+.LASF1:
+ .string "gdb.dwarf2/rh-dwarf4-x86_64.c"
+.LASF3:
+ .string "main"
+ .ident "GCC: (GNU) 4.4.4 20100503 (Red Hat 4.4.4-2)"
+ .section .note.GNU-stack,"",@progbits
diff --git a/gdb/testsuite/gdb.dwarf2/rh-dwarf4-x86_64.c b/gdb/testsuite/gdb.dwarf2/rh-dwarf4-x86_64.c
new file mode 100644
--- /dev/null
+++ b/gdb/testsuite/gdb.dwarf2/rh-dwarf4-x86_64.c
@@ -0,0 +1,22 @@
+/* This testcase is part of GDB, the GNU debugger.
+
+ Copyright 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/>. */
+
+int
+main (void)
+{
+ return 0;
+}
diff --git a/gdb/testsuite/gdb.dwarf2/rh-dwarf4-x86_64.exp b/gdb/testsuite/gdb.dwarf2/rh-dwarf4-x86_64.exp
new file mode 100644
--- /dev/null
+++ b/gdb/testsuite/gdb.dwarf2/rh-dwarf4-x86_64.exp
@@ -0,0 +1,42 @@
+# Copyright 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/>.
+
+# This test can only be run on targets which support DWARF-2 and use gas.
+# For now pick a sampling of likely targets.
+if {![istarget *-*-linux*]
+ && ![istarget *-*-gnu*]
+ && ![istarget *-*-elf*]
+ && ![istarget *-*-openbsd*]
+ && ![istarget arm-*-eabi*]
+ && ![istarget powerpc-*-eabi*]} {
+ return 0
+}
+
+if {![istarget x86_64-*]} {
+ return 0
+}
+
+set testfile "rh-dwarf4-x86_64"
+set srcfile ${testfile}.S
+set executable ${testfile}.x
+set binfile [standard_output_file ${executable}]
+
+if { [gdb_compile "${srcdir}/${subdir}/${srcfile}" "${binfile}" object {}] != "" } {
+ return -1
+}
+
+clean_restart $executable
+
+gdb_test "ptype main" {type = int \(void\)}

View File

@ -0,0 +1,41 @@
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).
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
+++ b/gdb/testsuite/gdb.python/rh634108-solib_address.exp
@@ -0,0 +1,24 @@
+# Copyright (C) 2008, 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/>.
+
+# https://bugzilla.redhat.com/show_bug.cgi?id=634108
+
+gdb_exit
+gdb_start
+
+# Skip all tests if Python scripting is not enabled.
+if { [skip_python_tests] } { continue }
+
+gdb_test "python print gdb.solib_name(-1)" "None" "gdb.solib_name exists"

View File

@ -0,0 +1,26 @@
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
+++ b/gdb/testsuite/gdb.base/macscp.exp
@@ -25,6 +25,14 @@ if { [test_compiler_info "gcc-*"] || [test_compiler_info "clang-*"] } {
lappend options additional_flags=-g3
}
+# Workaround ccache making lineno non-zero for command-line definitions.
+if {[find_gcc] == "gcc" && [file executable "/usr/bin/gcc"]} {
+ set result [catch "exec which gcc" output]
+ if {$result == 0 && [string first "/ccache/" $output] > -1} {
+ lappend options "compiler=/usr/bin/gcc"
+ }
+}
+
# Generate the intermediate object file. This is required by Darwin to
# have access to the .debug_macinfo section.
if {[gdb_compile "${srcdir}/${subdir}/macscp1.c" "${objfile}" \

56
gdb-config.patch Normal file
View File

@ -0,0 +1,56 @@
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

View File

@ -0,0 +1,30 @@
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-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;
if (packet_support (PACKET_qXfer_exec_file) != PACKET_ENABLE)
- return NULL;
+ {
+ warning (_("Remote gdbserver does not support determining executable "
+ "automatically.\n"
+"RHEL <=6.8 and <=7.2 versions of gdbserver do not support such automatic executable detection.\n"
+"The following versions of gdbserver support it:\n"
+"- Upstream version of gdbserver (unsupported) 7.10 or later\n"
+"- Red Hat Developer Toolset (DTS) version of gdbserver from DTS 4.0 or later (only on x86_64)\n"
+"- RHEL-7.3 versions of gdbserver (on any architecture)"
+));
+ return NULL;
+ }
inferior *inf = find_inferior_pid (this, pid);
if (inf == NULL)

View File

@ -0,0 +1,58 @@
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
Subject: [patch] Fix GNU/Linux core open: Can't read pathname for load map: Input/output error.
[ New patch variant. ]
commit 7d760051ffb8a23cdc51342d4e6243fbc462f73f
Author: Ulrich Weigand <uweigand@de.ibm.com>
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
--- a/gdb/testsuite/gdb.base/solib-symbol.exp
+++ b/gdb/testsuite/gdb.base/solib-symbol.exp
@@ -29,6 +29,7 @@ set testfile "solib-symbol-main"
set srcfile ${srcdir}/${subdir}/${testfile}.c
set binfile [standard_output_file ${testfile}]
set bin_flags [list debug shlib=${binfile_lib}]
+set executable ${testfile}
if [get_compiler_info] {
return -1
@@ -71,8 +72,26 @@ gdb_test "br foo2" \
"Breakpoint.*: foo2. .2 locations..*" \
"foo2 in mdlib"
-gdb_exit
+# Test GDB warns for shared libraris which have not been found.
-return 0
+gdb_test "info sharedlibrary" "/${libname}.*"
+clean_restart ${executable}
+gdb_breakpoint "main"
+gdb_run_cmd
+set test "no warning for missing libraries"
+gdb_test_multiple "" $test {
+ -re "warning: Could not load shared library symbols for \[0-9\]+ libraries,.*\r\n$gdb_prompt $" {
+ fail $test
+ }
+ -re "Breakpoint \[0-9\]+, main .*\r\n$gdb_prompt $" {
+ pass $test
+ }
+}
+clean_restart ${executable}
+gdb_test_no_output "set solib-absolute-prefix /doESnotEXIST"
+gdb_breakpoint "main"
+gdb_run_cmd
+gdb_test "" "warning: Could not load shared library symbols for \[0-9\]+ libraries,.*\r\nBreakpoint \[0-9\]+, main .*" \
+ "warning for missing libraries"

View File

@ -0,0 +1,315 @@
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
diff --git a/gdb/data-directory/Makefile.in b/gdb/data-directory/Makefile.in
--- a/gdb/data-directory/Makefile.in
+++ b/gdb/data-directory/Makefile.in
@@ -71,6 +71,8 @@ PYTHON_FILE_LIST = \
gdb/__init__.py \
gdb/FrameDecorator.py \
gdb/FrameIterator.py \
+ gdb/FrameWrapper.py \
+ gdb/backtrace.py \
gdb/frames.py \
gdb/printing.py \
gdb/prompt.py \
@@ -79,6 +81,7 @@ PYTHON_FILE_LIST = \
gdb/xmethod.py \
gdb/command/__init__.py \
gdb/command/explore.py \
+ gdb/command/backtrace.py \
gdb/command/frame_filters.py \
gdb/command/pretty_printers.py \
gdb/command/prompt.py \
diff --git a/gdb/python/lib/gdb/FrameWrapper.py b/gdb/python/lib/gdb/FrameWrapper.py
new file mode 100644
--- /dev/null
+++ b/gdb/python/lib/gdb/FrameWrapper.py
@@ -0,0 +1,122 @@
+# Wrapper API for frames.
+
+# Copyright (C) 2008, 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 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
+
+# FIXME: arguably all this should be on Frame somehow.
+class FrameWrapper:
+ def __init__ (self, frame):
+ self.frame = frame;
+
+ def write_symbol (self, stream, sym, block):
+ if len (sym.linkage_name):
+ nsym, is_field_of_this = gdb.lookup_symbol (sym.linkage_name, block)
+ if nsym.addr_class != gdb.SYMBOL_LOC_REGISTER:
+ sym = nsym
+
+ stream.write (sym.print_name + "=")
+ try:
+ val = self.read_var (sym)
+ if val != None:
+ val = str (val)
+ # FIXME: would be nice to have a more precise exception here.
+ except RuntimeError as text:
+ val = text
+ if val == None:
+ stream.write ("???")
+ else:
+ stream.write (str (val))
+
+ def print_frame_locals (self, stream, func):
+
+ try:
+ block = self.frame.block()
+ except RuntimeError:
+ block = None
+
+ while block != None:
+ if block.is_global or block.is_static:
+ break
+
+ for sym in block:
+ if sym.is_argument:
+ continue;
+
+ self.write_symbol (stream, sym, block)
+ stream.write ('\n')
+
+ def print_frame_args (self, stream, func):
+
+ try:
+ block = self.frame.block()
+ except RuntimeError:
+ block = None
+
+ while block != None:
+ if block.function != None:
+ break
+ block = block.superblock
+
+ first = True
+ for sym in block:
+ if not sym.is_argument:
+ continue;
+
+ if not first:
+ stream.write (", ")
+
+ self.write_symbol (stream, sym, block)
+ first = False
+
+ # FIXME: this should probably just be a method on gdb.Frame.
+ # But then we need stream wrappers.
+ def describe (self, stream, full):
+ if self.type () == gdb.DUMMY_FRAME:
+ stream.write (" <function called from gdb>\n")
+ elif self.type () == gdb.SIGTRAMP_FRAME:
+ stream.write (" <signal handler called>\n")
+ else:
+ sal = self.find_sal ()
+ pc = self.pc ()
+ name = self.name ()
+ if not name:
+ name = "??"
+ if pc != sal.pc or not sal.symtab:
+ stream.write (" 0x%08x in" % pc)
+ stream.write (" " + name + " (")
+
+ func = self.function ()
+ self.print_frame_args (stream, func)
+
+ stream.write (")")
+
+ if sal.symtab and sal.symtab.filename:
+ stream.write (" at " + sal.symtab.filename)
+ stream.write (":" + str (sal.line))
+
+ if not self.name () or (not sal.symtab or not sal.symtab.filename):
+ lib = gdb.solib_name (pc)
+ if lib:
+ stream.write (" from " + lib)
+
+ stream.write ("\n")
+
+ if full:
+ self.print_frame_locals (stream, func)
+
+ def __getattr__ (self, name):
+ return getattr (self.frame, name)
diff --git a/gdb/python/lib/gdb/backtrace.py b/gdb/python/lib/gdb/backtrace.py
new file mode 100644
--- /dev/null
+++ b/gdb/python/lib/gdb/backtrace.py
@@ -0,0 +1,42 @@
+# Filtering backtrace.
+
+# Copyright (C) 2008, 2011 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
+import itertools
+
+# Our only exports.
+__all__ = ['push_frame_filter', 'create_frame_filter']
+
+old_frame_filter = None
+
+def push_frame_filter (constructor):
+ """Register a new backtrace filter class with the 'backtrace' command.
+The filter will be passed an iterator as an argument. The iterator
+will return gdb.Frame-like objects. The filter should in turn act as
+an iterator returning such objects."""
+ global old_frame_filter
+ if old_frame_filter == None:
+ old_frame_filter = constructor
+ else:
+ old_frame_filter = lambda iterator, filter = frame_filter: constructor (filter(iterator))
+
+def create_frame_filter (iter):
+ global old_frame_filter
+ if old_frame_filter is None:
+ return iter
+ return old_frame_filter (iter)
+
diff --git a/gdb/python/lib/gdb/command/backtrace.py b/gdb/python/lib/gdb/command/backtrace.py
new file mode 100644
--- /dev/null
+++ b/gdb/python/lib/gdb/command/backtrace.py
@@ -0,0 +1,106 @@
+# New backtrace command.
+
+# Copyright (C) 2008, 2009, 2011 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
+import gdb.backtrace
+import itertools
+from gdb.FrameIterator import FrameIterator
+from gdb.FrameWrapper import FrameWrapper
+import sys
+
+class ReverseBacktraceParameter (gdb.Parameter):
+ """The new-backtrace command can show backtraces in 'reverse' order.
+This means that the innermost frame will be printed last.
+Note that reverse backtraces are more expensive to compute."""
+
+ set_doc = "Enable or disable reverse backtraces."
+ show_doc = "Show whether backtraces will be printed in reverse order."
+
+ def __init__(self):
+ gdb.Parameter.__init__ (self, "reverse-backtrace",
+ gdb.COMMAND_STACK, gdb.PARAM_BOOLEAN)
+ # Default to compatibility with gdb.
+ self.value = False
+
+class FilteringBacktrace (gdb.Command):
+ """Print backtrace of all stack frames, or innermost COUNT frames.
+With a negative argument, print outermost -COUNT frames.
+Use of the 'full' qualifier also prints the values of the local variables.
+Use of the 'raw' qualifier avoids any filtering by loadable modules.
+"""
+
+ def __init__ (self):
+ # FIXME: this is not working quite well enough to replace
+ # "backtrace" yet.
+ gdb.Command.__init__ (self, "new-backtrace", gdb.COMMAND_STACK)
+ self.reverse = ReverseBacktraceParameter()
+
+ def reverse_iter (self, iter):
+ result = []
+ for item in iter:
+ result.append (item)
+ result.reverse()
+ return result
+
+ def final_n (self, iter, x):
+ result = []
+ for item in iter:
+ result.append (item)
+ return result[x:]
+
+ def invoke (self, arg, from_tty):
+ i = 0
+ count = 0
+ filter = True
+ full = False
+
+ for word in arg.split (" "):
+ if word == '':
+ continue
+ elif word == 'raw':
+ filter = False
+ elif word == 'full':
+ full = True
+ else:
+ count = int (word)
+
+ # FIXME: provide option to start at selected frame
+ # However, should still number as if starting from newest
+ newest_frame = gdb.newest_frame()
+ iter = itertools.imap (FrameWrapper,
+ FrameIterator (newest_frame))
+ if filter:
+ iter = gdb.backtrace.create_frame_filter (iter)
+
+ # Now wrap in an iterator that numbers the frames.
+ iter = itertools.izip (itertools.count (0), iter)
+
+ # Reverse if the user wanted that.
+ if self.reverse.value:
+ iter = self.reverse_iter (iter)
+
+ # Extract sub-range user wants.
+ if count < 0:
+ iter = self.final_n (iter, count)
+ elif count > 0:
+ iter = itertools.islice (iter, 0, count)
+
+ for pair in iter:
+ sys.stdout.write ("#%-2d" % pair[0])
+ pair[1].describe (sys.stdout, full)
+
+FilteringBacktrace()

View File

@ -0,0 +1,194 @@
http://sourceware.org/ml/gdb-patches/2014-07/msg00530.html
Subject: [read_frame_arg patch] Handle partially optimized out values similarly to unavailable values (Re: [patchv2] Fix crash on optimized-out entry data values)
--V88s5gaDVPzZ0KCq
Content-Type: text/plain; charset=us-ascii
Content-Disposition: inline
On Thu, 17 Jul 2014 14:23:06 +0200, Pedro Alves wrote:
> On 07/16/2014 10:58 PM, Jan Kratochvil wrote:
> > This patch is apparently not suitable for gdb-7.8 which is I guess often
> > crashing on -O2 -g entry values so there could be some rather minimal crash
> > avoiding patch instead.
>
> Yeah.
>
> So this was originally "caused" (more exposed) by 4f14910f:
>
> gdb/ChangeLog
> 2013-11-26 Andrew Burgess <aburgess@broadcom.com>
>
> * value.c (allocate_optimized_out_value): Mark value as non-lazy.
>
> I tried a few approaches in value_available_contents_eq
> today, and ended up thinking that the simplest should be to
> just revert that patch until we have the fuller fix in place.
OK, that seems as the best solution for 7.8 to me.
> While doing just that fixes the crash, it surprisingly causes
> one of your new tests to FAIL:
>
> (gdb) frame
> #0 bar (ref=ref@entry=@0x7fffffffd184: 10) at gdb.arch/amd64-entry-value-paramref.cc:23
> 23 vv++; /* break-here */
> (gdb) FAIL: gdb.arch/amd64-entry-value-paramref.exp: frame
There is a bug in that entry value code of mine, fix attached.
The testcase then PASSes with the reverted optimization by Andrew Burgess.
For the attached fix - if you nitpick the missing conditional case:
value_optimized_out (val_deref) && value_optimized_out (entryval_deref)
It is not detected there but that IMO does not matter much as
* It is for 7.8 only, for trunk it will get compared correctly thanks to the
new implementation of value_available_contents_eq()
called value_contents_eq().
* If the conditional
if (val != val_deref
&& !value_optimized_out (val_deref)
&& !value_optimized_out (entryval_deref)
&& value_available_contents_eq (val_deref, 0,
entryval_deref, 0,
TYPE_LENGTH (type_deref)))
val_equal = 1;
fails it may just print
bar (ref=@0x7fffffffd904: <optimized out>, ref@entry=@0x7fffffffd904: <optimized out>)
(or some variant with some partially optimized-out/unavailable parts)
instead of the more correct
bar (ref=ref@entry=@0x7fffffffd904: <optimized out>)
which is not much a bug.
The attached fix no longe makes sense after the new implementation
of value_available_contents_eq() called value_contents_eq() gets applied as it
handles all the optimized-out/unavailable values on its own, therefore the
attached patch is really only for 7.8.
> Turns out it's the code disabled in value_of_dwarf_reg_entry:
>
> target_val = dwarf_entry_parameter_to_value (parameter,
> TYPE_LENGTH (target_type),
> target_type, caller_frame,
> caller_per_cu);
>
> /* value_as_address dereferences TYPE_CODE_REF. */
> addr = extract_typed_address (value_contents (outer_val), checked_type);
>
> /* The target entry value has artificial address of the entry value
> reference. */
> VALUE_LVAL (target_val) = lval_memory;
> set_value_address (target_val, addr);
>
> It looks quite wrong to me to just change a value's lval like that.
>
> I ran the testsuite with that code disabled (like in the patch below),
> and that caused no regressions. I can't say I really understand the
> intention here though. What would we be missing if we removed that code?
I cannot reproduce any wrong case having the code above #if 0-ed.
I just do not find it correct to have it disabled. But at the same time I do
like much / I do not find correct the code myself. It is a bit problematic to
have struct value describing a memory content which is no longer present
there.
What happens there:
------------------------------------------------------------------------------
volatile int vv;
static __attribute__((noinline)) int
bar (int &ref) {
ref = 20;
vv++; /* break-here */
return ref;
}
int main (void) {
int var = 10;
return bar (var);
}
------------------------------------------------------------------------------
<4><c7>: Abbrev Number: 13 (DW_TAG_GNU_call_site_parameter)
<c8> DW_AT_location : 1 byte block: 55 (DW_OP_reg5 (rdi))
<ca> DW_AT_GNU_call_site_value: 2 byte block: 91 74 (DW_OP_fbreg: -12)
<cd> DW_AT_GNU_call_site_data_value: 1 byte block: 3a (DW_OP_lit10)
------------------------------------------------------------------------------
gdb -ex 'b value_addr' -ex r --args ../gdb ./1 -ex 'watch vv' -ex r -ex 'p &ref@entry'
->
6 return ref;
bar (ref=@0x7fffffffd944: 20, ref@entry=@0x7fffffffd944: 10) at 1.C:25
------------------------------------------------------------------------------
At /* break-here */ struct value variable 'ref' is TYPE_CODE_REF.
With FSF GDB HEAD:
(gdb) x/gx arg1.contents
0x6004000a4ad0: 0x00007fffffffd944
(gdb) p ((struct value *)arg1.location.computed.closure).lval
$1 = lval_memory
(gdb) p/x ((struct value *)arg1.location.computed.closure).location.address
$3 = 0x7fffffffd944
With your #if0-ed code:
(gdb) x/gx arg1.contents
0x6004000a4ad0: 0x00007fffffffd944
(gdb) p ((struct value *)arg1.location.computed.closure).lval
$8 = not_lval
(gdb) p/x ((struct value *)arg1.location.computed.closure).location.address
$9 = 0x0
I do not see how to access
((struct value *)arg1.location.computed.closure).location.address
from GDB CLI. Trying
(gdb) p &ref@entry
will invoke value_addr()'s:
if (TYPE_CODE (type) == TYPE_CODE_REF)
/* Copy the value, but change the type from (T&) to (T*). We
keep the same location information, which is efficient, and
allows &(&X) to get the location containing the reference. */
and therefore the address gets fetched already from
arg1.contents
and not from
((struct value *)arg1.location.computed.closure).location.address
.
And for any other type than TYPE_CODE_REF this code you #if 0-ed does not get
executed at all. This DW_AT_GNU_call_site_data_value DWARF was meant
primarily for Fortran but with -O0 entry values do not get produced
and with -Og and higher Fortran always optimizes out the passing by reference.
If you do not like the #if 0 code there I am OK with removing it as I do not
know how to make it's use reproducible for user anyway. In the worst case
- if there really is some way how to exploit it - one should just get
Attempt to take address of value not located in memory.
instead of some wrong value and it may be easy to fix then.
Thanks for the analysis,
Jan
--V88s5gaDVPzZ0KCq
Content-Type: text/plain; charset=us-ascii
Content-Disposition: inline; filename=1
gdb/
2014-07-20 Jan Kratochvil <jan.kratochvil@redhat.com>
* stack.c (read_frame_arg): Verify value_optimized_out before calling
value_available_contents_eq.
diff --git a/gdb/stack.c b/gdb/stack.c
index 0d6d8e7..4db5df5 100644
--- a/gdb/stack.c
+++ b/gdb/stack.c
@@ -413,6 +413,8 @@ read_frame_arg (struct symbol *sym, struct frame_info *frame,
/* If the reference addresses match but dereferenced
content does not match print them. */
if (val != val_deref
+ && !value_optimized_out (val_deref)
+ && !value_optimized_out (entryval_deref)
&& value_available_contents_eq (val_deref, 0,
entryval_deref, 0,
TYPE_LENGTH (type_deref)))
--V88s5gaDVPzZ0KCq--

View File

@ -0,0 +1,44 @@
revert:
commit 4f14910fa1331398cc695011a6af43a89252b4b1
Author: Andrew Burgess <aburgess@broadcom.com>
Date: Tue Nov 26 16:21:53 2013 +0000
Mark entirely optimized out value as non-lazy.
If a value is entirely optimized out, then there's nothing for
value_fetch_lazy to fetch. Sequences like:
if (value_lazy (retval))
value_fetch_lazy (retval);
End up allocating the value contents buffer, wasting memory, for no
use.
gdb/ChangeLog
2013-11-26 Andrew Burgess <aburgess@broadcom.com>
* value.c (allocate_optimized_out_value): Mark value as non-lazy.
### a/gdb/ChangeLog
### b/gdb/ChangeLog
## -1,3 +1,7 @@
+2013-11-26 Andrew Burgess <aburgess@broadcom.com>
+
+ * value.c (allocate_optimized_out_value): Mark value as non-lazy.
+
2013-11-26 Tom Tromey <tromey@redhat.com>
* dwarf2-frame.c (dwarf2_frame_cache): Revert patch from
diff --git a/gdb/value.c b/gdb/value.c
index 29abe5f..f073d71 100644
--- a/gdb/value.c
+++ b/gdb/value.c
@@ -906,7 +906,7 @@ allocate_optimized_out_value (struct type *type)
struct value *retval = allocate_value_lazy (type);
set_value_optimized_out (retval, 1);
- set_value_lazy (retval, 0);
+
return retval;
}

File diff suppressed because it is too large Load Diff

View File

@ -0,0 +1,71 @@
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.
https://bugzilla.redhat.com/show_bug.cgi?id=1270534
diff --git a/gdb/configure b/gdb/configure
--- a/gdb/configure
+++ b/gdb/configure
@@ -9649,6 +9649,7 @@ if test x"$prefer_curses" = xyes; then
# search /usr/local/include, if ncurses is installed in /usr/local. A
# default installation of ncurses on alpha*-dec-osf* will lead to such
# a situation.
+ # Fedora: Force libncursesw over libncurses to match the includes.
{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for library containing waddstr" >&5
$as_echo_n "checking for library containing waddstr... " >&6; }
if ${ac_cv_search_waddstr+:} false; then :
@@ -9673,7 +9674,7 @@ return waddstr ();
return 0;
}
_ACEOF
-for ac_lib in '' ncursesw ncurses cursesX curses; do
+for ac_lib in '' ncursesw; do
if test -z "$ac_lib"; then
ac_res="none required"
else
@@ -9747,6 +9748,7 @@ case $host_os in
esac
# These are the libraries checked by Readline.
+# Fedora: Force libncursesw over libncurses to match the includes.
{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for library containing tgetent" >&5
$as_echo_n "checking for library containing tgetent... " >&6; }
if ${ac_cv_search_tgetent+:} false; then :
@@ -9771,7 +9773,7 @@ return tgetent ();
return 0;
}
_ACEOF
-for ac_lib in '' termcap tinfow tinfo curses ncursesw ncurses; do
+for ac_lib in '' ncursesw; do
if test -z "$ac_lib"; then
ac_res="none required"
else
diff --git a/gdb/configure.ac b/gdb/configure.ac
--- a/gdb/configure.ac
+++ b/gdb/configure.ac
@@ -712,7 +712,8 @@ if test x"$prefer_curses" = xyes; then
# search /usr/local/include, if ncurses is installed in /usr/local. A
# default installation of ncurses on alpha*-dec-osf* will lead to such
# a situation.
- AC_SEARCH_LIBS(waddstr, [ncursesw ncurses cursesX curses])
+ # Fedora: Force libncursesw over libncurses to match the includes.
+ AC_SEARCH_LIBS(waddstr, [ncursesw])
if test "$ac_cv_search_waddstr" != no; then
curses_found=yes
@@ -754,7 +755,8 @@ case $host_os in
esac
# These are the libraries checked by Readline.
-AC_SEARCH_LIBS(tgetent, [termcap tinfow tinfo curses ncursesw ncurses])
+# Fedora: Force libncursesw over libncurses to match the includes.
+AC_SEARCH_LIBS(tgetent, [ncursesw])
if test "$ac_cv_search_tgetent" = no; then
CONFIG_OBS="$CONFIG_OBS stub-termcap.o"

View File

@ -0,0 +1,104 @@
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
Hi,
for Fortran it fixes displaying normal strings also in frames/backtraces:
(gdb) frame
->
The patch is simple and I do not see why it should not be this way.
For C/C++ TYPE_CODE_STRING is not used. I am not aware of Pascal but that
language is currently not really much supported in GDB anyway.
This was a part of my archer/jankratochvil/vla branch but it is not a part of
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.
Thanks,
Jan
diff --git a/gdb/testsuite/gdb.fortran/fortran-frame-string.exp b/gdb/testsuite/gdb.fortran/fortran-frame-string.exp
new file mode 100644
--- /dev/null
+++ b/gdb/testsuite/gdb.fortran/fortran-frame-string.exp
@@ -0,0 +1,36 @@
+# Copyright 2014 Free Software Foundation, Inc.
+
+# This program is free software; you can redistribute it and/or modify
+# it under the terms of the GNU General Public License as published by
+# the Free Software Foundation; either version 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.
+
+standard_testfile .f90
+if { [prepare_for_testing ${testfile}.exp ${testfile} ${srcfile} {debug f90}] } {
+ return -1
+}
+
+if ![runto MAIN__] then {
+ perror "couldn't run to breakpoint MAIN__"
+ continue
+}
+
+gdb_breakpoint [gdb_get_line_number "s = s"]
+gdb_continue_to_breakpoint "s = s"
+
+gdb_test "ptype s" {type = character\*3}
+gdb_test "p s" " = 'foo'"
+
+# Fix rejected upstream:
+# https://sourceware.org/ml/gdb-patches/2014-07/msg00768.html
+setup_kfail "rejected" *-*-*
+gdb_test "frame" { \(s='foo', .*}
diff --git a/gdb/testsuite/gdb.fortran/fortran-frame-string.f90 b/gdb/testsuite/gdb.fortran/fortran-frame-string.f90
new file mode 100644
--- /dev/null
+++ b/gdb/testsuite/gdb.fortran/fortran-frame-string.f90
@@ -0,0 +1,28 @@
+! Copyright 2014 Free Software Foundation, Inc.
+!
+! This program is free software; you can redistribute it and/or modify
+! it under the terms of the GNU General Public License as published by
+! the Free Software Foundation; either version 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.
+!
+! Ihis file is the Fortran source file for dynamic.exp.
+! Original file written by Jakub Jelinek <jakub@redhat.com>.
+! Modified for the GDB testcase by Jan Kratochvil <jan.kratochvil@redhat.com>.
+
+ subroutine f(s)
+ character*3 s
+ s = s
+ end
+
+ program main
+ call f ('foo')
+ end

View File

@ -0,0 +1,128 @@
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-glibc-strstr-workaround.patch
;; Workaround PR libc/14166 for inferior calls of strstr.
;;=fedoratest: Compatibility with RHELs (unchecked which ones).
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
--- /dev/null
+++ b/gdb/testsuite/gdb.base/gnu-ifunc-strstr-workaround.exp
@@ -0,0 +1,115 @@
+# 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/>.
+
+# Workaround for:
+# invalid IFUNC DW_AT_linkage_name: memmove strstr time
+# http://sourceware.org/bugzilla/show_bug.cgi?id=14166
+
+if {[skip_shlib_tests]} {
+ return 0
+}
+
+set testfile "gnu-ifunc-strstr-workaround"
+set executable ${testfile}
+set srcfile start.c
+set binfile [standard_output_file ${executable}]
+
+if [prepare_for_testing ${testfile}.exp $executable $srcfile] {
+ return -1
+}
+
+if ![runto_main] {
+ return 0
+}
+
+set test "ptype atoi"
+gdb_test_multiple $test $test {
+ -re "type = int \\(const char \\*\\)\r\n$gdb_prompt $" {
+ pass $test
+ }
+ -re "type = int \\(\\)\r\n$gdb_prompt $" {
+ untested "$test (no DWARF)"
+ return 0
+ }
+}
+
+set addr ""
+set test "print strstr"
+gdb_test_multiple $test $test {
+ -re " = {<text gnu-indirect-function variable, no debug info>} (0x\[0-9a-f\]+) <strstr>\r\n$gdb_prompt $" {
+ set addr $expect_out(1,string)
+ pass $test
+ }
+ -re " = {<text gnu-indirect-function variable, no debug info>} (0x\[0-9a-f\]+) <__strstr>\r\n$gdb_prompt $" {
+ set addr $expect_out(1,string)
+ pass "$test (GDB workaround)"
+ }
+ -re " = {<text gnu-indirect-function variable, no debug info>} (0x\[0-9a-f\]+) <__libc_strstr>\r\n$gdb_prompt $" {
+ set addr $expect_out(1,string)
+ pass "$test (fixed glibc)"
+ }
+ -re " = {<text gnu-indirect-function variable, no debug info>} (0x\[0-9a-f\]+) <__libc_strstr_ifunc>\r\n$gdb_prompt $" {
+ set addr $expect_out(1,string)
+ pass "$test (fixed glibc)"
+ }
+ -re " = {char \\*\\(const char \\*, const char \\*\\)} 0x\[0-9a-f\]+ <strstr>\r\n$gdb_prompt $" {
+ untested "$test (gnu-ifunc not in use by glibc)"
+ return 0
+ }
+}
+
+set test "info sym"
+gdb_test_multiple "info sym $addr" $test {
+ -re "strstr in section \\.text of /lib\[^/\]*/libc.so.6\r\n$gdb_prompt $" {
+ pass $test
+ }
+ -re " = {char \\*\\(const char \\*, const char \\*\\)} 0x\[0-9a-f\]+ <strstr>\r\n$gdb_prompt $" {
+ # unexpected
+ xfail "$test (not in libc.so.6)"
+ return 0
+ }
+}
+
+set test "info addr strstr"
+gdb_test_multiple $test $test {
+ -re "Symbol \"strstr\" is a function at address $addr\\.\r\n$gdb_prompt $" {
+ fail "$test (DWARF for strstr)"
+ }
+ -re "Symbol \"strstr\" is at $addr in a file compiled without debugging\\.\r\n$gdb_prompt $" {
+ pass "$test"
+ }
+}
+
+set test "print strstr second time"
+gdb_test_multiple "print strstr" $test {
+ -re " = {<text gnu-indirect-function variable, no debug info>} $addr <strstr>\r\n$gdb_prompt $" {
+ pass $test
+ }
+ -re " = {<text gnu-indirect-function variable, no debug info>} $addr <__strstr>\r\n$gdb_prompt $" {
+ pass "$test (GDB workaround)"
+ }
+ -re " = {<text gnu-indirect-function variable, no debug info>} $addr <__libc_strstr>\r\n$gdb_prompt $" {
+ pass "$test (fixed glibc)"
+ }
+ -re " = {<text gnu-indirect-function variable, no debug info>} $addr <__libc_strstr_ifunc>\r\n$gdb_prompt $" {
+ pass "$test (fixed glibc)"
+ }
+ -re " = {void \\*\\(void\\)} 0x\[0-9a-f\]+ <strstr>\r\n$gdb_prompt $" {
+ fail $test
+ }
+}
+
+gdb_test {print strstr("abc","b")} { = 0x[0-9a-f]+ "bc"}
+gdb_test {print strstr("def","e")} { = 0x[0-9a-f]+ "ef"}

View File

@ -0,0 +1,219 @@
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
--6TrnltStXW4iwmi0
Content-Type: text/plain; charset=us-ascii
Content-Disposition: inline
Hi,
PR 16581:
GDB crash on inherit_abstract_dies infinite recursion
https://sourceware.org/bugzilla/show_bug.cgi?id=16581
fixed crash from an infinite recursion. But in rare cases the new code can
now gdb_assert() due to weird DWARF file.
I do not yet fully understand why the DWARF is as it is but just GDB should
never crash due to invalid DWARF anyway. The "invalid" DWARF I see only in
Fedora GCC build, not in FSF GCC build, more info at:
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
Thanks,
Jan
--6TrnltStXW4iwmi0
Content-Type: text/plain; charset=us-ascii
Content-Disposition: inline; filename="complaint.patch"
gdb/
2014-02-24 Jan Kratochvil <jan.kratochvil@redhat.com>
* dwarf2read.c (process_die): Change gdb_assert to complaint.
diff --git a/gdb/dwarf2/read.c b/gdb/dwarf2/read.c
--- a/gdb/dwarf2/read.c
+++ b/gdb/dwarf2/read.c
@@ -10162,6 +10162,13 @@ class process_die_scope
static void
process_die (struct die_info *die, struct dwarf2_cu *cu)
{
+ if (die->in_process)
+ {
+ complaint (_("DIE at 0x%s attempted to be processed twice"),
+ sect_offset_str (die->sect_off));
+ return;
+ }
+
process_die_scope scope (die, cu);
switch (die->tag)
diff --git a/gdb/linux-nat.c b/gdb/linux-nat.c
--- a/gdb/linux-nat.c
+++ b/gdb/linux-nat.c
@@ -190,6 +190,12 @@ struct linux_nat_target *linux_target;
/* Does the current host support PTRACE_GETREGSET? */
enum tribool have_ptrace_getregset = TRIBOOL_UNKNOWN;
+#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" {

48
gdb-gstack.man Normal file
View File

@ -0,0 +1,48 @@
.\"
.\" gstack manual page.
.\" Copyright (c) 1999 Ross Thompson
.\" Copyright (c) 2001, 2002, 2004, 2008 Red Hat, Inc.
.\"
.\" Original author: Ross Thompson <ross@whatsis.com>
.\"
.\" 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, 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; see the file COPYING. If not, write to
.\" the Free Software Foundation, 59 Temple Place - Suite 330,
.\" Boston, MA 02111-1307, USA.
.\"
.TH GSTACK 1 "Feb 15 2008" "Red Hat Linux" "Linux Programmer's Manual"
.SH NAME
gstack \- print a stack trace of a running process
.SH SYNOPSIS
.B gstack
pid
.SH DESCRIPTION
\f3gstack\f1 attaches to the active process named by the \f3pid\f1 on
the command line, and prints out an execution stack trace. If ELF
symbols exist in the binary (usually the case unless you have run
strip(1)), then symbolic addresses are printed as well.
If the process is part of a thread group, then \f3gstack\f1 will print
out a stack trace for each of the threads in the group.
.SH SEE ALSO
nm(1), ptrace(2), gdb(1)
.SH AUTHORS
Ross Thompson <ross@whatsis.com>
Red Hat, Inc. <http://bugzilla.redhat.com/bugzilla>

View File

@ -0,0 +1,46 @@
From FEDORA_PATCHES Mon Sep 17 00:00:00 2001
From: Fedora GDB patches <invalid@email.com>
Date: Fri, 27 Oct 2017 21:07:50 +0200
Subject: gdb-jit-reader-multilib.patch
;; Fix jit-reader.h for multi-lib.
;;=push+jan
diff --git a/gdb/configure b/gdb/configure
--- a/gdb/configure
+++ b/gdb/configure
@@ -9968,10 +9968,12 @@ _ACEOF
-if test "x${ac_cv_sizeof_unsigned_long}" = "x8"; then
- TARGET_PTR="unsigned long"
-elif test "x${ac_cv_sizeof_unsigned_long_long}" = "x8"; then
+# Try to keep TARGET_PTR the same across archs so that jit-reader.h file
+# content is the same for multilib distributions.
+if test "x${ac_cv_sizeof_unsigned_long_long}" = "x8"; then
TARGET_PTR="unsigned long long"
+elif test "x${ac_cv_sizeof_unsigned_long}" = "x8"; then
+ TARGET_PTR="unsigned long"
elif test "x${ac_cv_sizeof_unsigned___int128}" = "x16"; then
TARGET_PTR="unsigned __int128"
else
diff --git a/gdb/configure.ac b/gdb/configure.ac
--- a/gdb/configure.ac
+++ b/gdb/configure.ac
@@ -803,10 +803,12 @@ AC_CHECK_SIZEOF(unsigned long long)
AC_CHECK_SIZEOF(unsigned long)
AC_CHECK_SIZEOF(unsigned __int128)
-if test "x${ac_cv_sizeof_unsigned_long}" = "x8"; then
- TARGET_PTR="unsigned long"
-elif test "x${ac_cv_sizeof_unsigned_long_long}" = "x8"; then
+# Try to keep TARGET_PTR the same across archs so that jit-reader.h file
+# content is the same for multilib distributions.
+if test "x${ac_cv_sizeof_unsigned_long_long}" = "x8"; then
TARGET_PTR="unsigned long long"
+elif test "x${ac_cv_sizeof_unsigned_long}" = "x8"; then
+ TARGET_PTR="unsigned long"
elif test "x${ac_cv_sizeof_unsigned___int128}" = "x16"; then
TARGET_PTR="unsigned __int128"
else

View File

@ -0,0 +1,37 @@
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
--- a/gdb/contrib/gdb-add-index.sh
+++ b/gdb/contrib/gdb-add-index.sh
@@ -22,6 +22,20 @@ GDB=${GDB:=gdb}
OBJCOPY=${OBJCOPY:=objcopy}
READELF=${READELF:=readelf}
+GDB2=/usr/libexec/gdb
+if test -x $GDB2 && ! which $GDB &>/dev/null; then
+ GDB=$GDB2
+fi
+
+# We default to using /usr/bin/gdb.minimal if it's present. See
+# https://bugzilla.redhat.com/show_bug.cgi?id=1695015 and
+# https://fedoraproject.org/wiki/Changes/Minimal_GDB_in_buildroot for
+# explanations.
+GDB3=/usr/bin/gdb.minimal
+if test -x $GDB3; then
+ GDB=$GDB3
+fi
+
myname="${0##*/}"
dwarf5=""

View File

@ -0,0 +1,165 @@
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:
https://bugzilla.redhat.com/show_bug.cgi?id=466222
(for the first / customer recommended fix)
and the upstream fix:
http://sourceware.org/ml/gdb-patches/2006-11/msg00253.html
[rfc] Do not make up line information
http://sourceware.org/ml/gdb-cvs/2006-11/msg00127.html
diff --git a/gdb/testsuite/gdb.base/lineno-makeup-func.c b/gdb/testsuite/gdb.base/lineno-makeup-func.c
new file mode 100644
--- /dev/null
+++ b/gdb/testsuite/gdb.base/lineno-makeup-func.c
@@ -0,0 +1,21 @@
+/* This testcase is part of GDB, the GNU debugger.
+
+ Copyright 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 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
+func (void)
+{
+}
diff --git a/gdb/testsuite/gdb.base/lineno-makeup.c b/gdb/testsuite/gdb.base/lineno-makeup.c
new file mode 100644
--- /dev/null
+++ b/gdb/testsuite/gdb.base/lineno-makeup.c
@@ -0,0 +1,35 @@
+/* This testcase is part of GDB, the GNU debugger.
+
+ Copyright 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 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/>. */
+
+/* DW_AT_low_pc-DW_AT_high_pc should cover the function without line number
+ information (.debug_line) so we cannot use an external object file.
+
+ It must not be just a label as it would alias on the next function even for
+ correct GDB. Therefore some stub data must be placed there.
+
+ We need to provide a real stub function body as at least s390
+ (s390_analyze_prologue) would skip the whole body till reaching `main'. */
+
+extern void func (void);
+asm ("func: .incbin \"" BINFILENAME "\"");
+
+int
+main (void)
+{
+ func ();
+ return 0;
+}
diff --git a/gdb/testsuite/gdb.base/lineno-makeup.exp b/gdb/testsuite/gdb.base/lineno-makeup.exp
new file mode 100644
--- /dev/null
+++ b/gdb/testsuite/gdb.base/lineno-makeup.exp
@@ -0,0 +1,78 @@
+# Copyright 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 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 "lineno-makeup"
+set srcfuncfile ${testfile}-func.c
+set srcfile ${testfile}.c
+set objfuncfile [standard_output_file ${testfile}-func.o]
+set binfuncfile [standard_output_file ${testfile}-func.bin]
+set binfile [standard_output_file ${testfile}]
+
+if { [gdb_compile "${srcdir}/${subdir}/${srcfuncfile}" "${objfuncfile}" object {}] != "" } {
+ gdb_suppress_entire_file "Testcase compile failed, so all tests in this file will automatically fail."
+}
+
+set objcopy [catch "exec objcopy -O binary --only-section .text ${objfuncfile} ${binfuncfile}" output]
+verbose -log "objcopy=$objcopy: $output"
+if { $objcopy != 0 } {
+ gdb_suppress_entire_file "Testcase compile failed, so all tests in this file will automatically fail."
+}
+set binfuncfilesize [file size $binfuncfile]
+verbose -log "file size $binfuncfile = $binfuncfilesize"
+
+if { [gdb_compile "${srcdir}/${subdir}/${srcfile}" "${binfile}" executable [list debug additional_flags=-DBINFILENAME=\"$binfuncfile\"]] != "" } {
+ gdb_suppress_entire_file "Testcase compile failed, so all tests in this file will automatically fail."
+}
+
+gdb_exit
+gdb_start
+gdb_reinitialize_dir $srcdir/$subdir
+gdb_load ${binfile}
+
+set b_addr ""
+set test "break func"
+gdb_test_multiple $test $test {
+ -re "Breakpoint \[0-9\]+ at (0x\[0-9a-f\]+)\r\n$gdb_prompt $" {
+ set b_addr $expect_out(1,string)
+ pass $test
+ }
+ -re "Breakpoint \[0-9\]+ at (0x\[0-9a-f\]+): .*\r\n$gdb_prompt $" {
+ set b_addr $expect_out(1,string)
+ fail $test
+ }
+}
+verbose -log "b_addr=<$b_addr>"
+
+set p_addr ""
+set test "print func"
+gdb_test_multiple $test $test {
+ -re "\\$\[0-9\]+ = {<text variable, no debug info>} (0x\[0-9a-f\]+) <func>\r\n$gdb_prompt $" {
+ set p_addr $expect_out(1,string)
+ pass $test
+ }
+}
+verbose -log "p_addr=<$p_addr>"
+
+set test "break address belongs to func"
+if {$b_addr == $p_addr} {
+ pass "$test (exact match)"
+} else {
+ set skip [expr $b_addr - $p_addr]
+ if {$skip > 0 && $skip < $binfuncfilesize} {
+ pass "$test (prologue skip by $skip bytes)"
+ } else {
+ fail $test
+ }
+}

224
gdb-linux_perf-bundle.patch Normal file
View File

@ -0,0 +1,224 @@
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-linux_perf-bundle.patch
;; [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>
#endif
+#ifdef PERF_ATTR_SIZE_VER5_BUNDLE
+#ifndef HAVE_LINUX_PERF_EVENT_H
+# error "PERF_ATTR_SIZE_VER5_BUNDLE && !HAVE_LINUX_PERF_EVENT_H"
+#endif
+#ifndef PERF_ATTR_SIZE_VER5
+#define PERF_ATTR_SIZE_VER5
+#define perf_event_mmap_page perf_event_mmap_page_bundle
+// kernel-headers-3.10.0-493.el7.x86_64/usr/include/linux/perf_event.h
+/*
+ * Structure of the page that can be mapped via mmap
+ */
+struct perf_event_mmap_page {
+ __u32 version; /* version number of this structure */
+ __u32 compat_version; /* lowest version this is compat with */
+
+ /*
+ * Bits needed to read the hw events in user-space.
+ *
+ * u32 seq, time_mult, time_shift, index, width;
+ * u64 count, enabled, running;
+ * u64 cyc, time_offset;
+ * s64 pmc = 0;
+ *
+ * do {
+ * seq = pc->lock;
+ * barrier()
+ *
+ * enabled = pc->time_enabled;
+ * running = pc->time_running;
+ *
+ * if (pc->cap_usr_time && enabled != running) {
+ * cyc = rdtsc();
+ * time_offset = pc->time_offset;
+ * time_mult = pc->time_mult;
+ * time_shift = pc->time_shift;
+ * }
+ *
+ * index = pc->index;
+ * count = pc->offset;
+ * if (pc->cap_user_rdpmc && index) {
+ * width = pc->pmc_width;
+ * pmc = rdpmc(index - 1);
+ * }
+ *
+ * barrier();
+ * } while (pc->lock != seq);
+ *
+ * NOTE: for obvious reason this only works on self-monitoring
+ * processes.
+ */
+ __u32 lock; /* seqlock for synchronization */
+ __u32 index; /* hardware event identifier */
+ __s64 offset; /* add to hardware event value */
+ __u64 time_enabled; /* time event active */
+ __u64 time_running; /* time event on cpu */
+ union {
+ __u64 capabilities;
+ struct {
+ __u64 cap_bit0 : 1, /* Always 0, deprecated, see commit 860f085b74e9 */
+ cap_bit0_is_deprecated : 1, /* Always 1, signals that bit 0 is zero */
+
+ cap_user_rdpmc : 1, /* The RDPMC instruction can be used to read counts */
+ cap_user_time : 1, /* The time_* fields are used */
+ cap_user_time_zero : 1, /* The time_zero field is used */
+ cap_____res : 59;
+ };
+ };
+
+ /*
+ * If cap_user_rdpmc this field provides the bit-width of the value
+ * read using the rdpmc() or equivalent instruction. This can be used
+ * to sign extend the result like:
+ *
+ * pmc <<= 64 - width;
+ * pmc >>= 64 - width; // signed shift right
+ * count += pmc;
+ */
+ __u16 pmc_width;
+
+ /*
+ * If cap_usr_time the below fields can be used to compute the time
+ * delta since time_enabled (in ns) using rdtsc or similar.
+ *
+ * u64 quot, rem;
+ * u64 delta;
+ *
+ * quot = (cyc >> time_shift);
+ * rem = cyc & (((u64)1 << time_shift) - 1);
+ * delta = time_offset + quot * time_mult +
+ * ((rem * time_mult) >> time_shift);
+ *
+ * Where time_offset,time_mult,time_shift and cyc are read in the
+ * seqcount loop described above. This delta can then be added to
+ * enabled and possible running (if index), improving the scaling:
+ *
+ * enabled += delta;
+ * if (index)
+ * running += delta;
+ *
+ * quot = count / running;
+ * rem = count % running;
+ * count = quot * enabled + (rem * enabled) / running;
+ */
+ __u16 time_shift;
+ __u32 time_mult;
+ __u64 time_offset;
+ /*
+ * If cap_usr_time_zero, the hardware clock (e.g. TSC) can be calculated
+ * from sample timestamps.
+ *
+ * time = timestamp - time_zero;
+ * quot = time / time_mult;
+ * rem = time % time_mult;
+ * cyc = (quot << time_shift) + (rem << time_shift) / time_mult;
+ *
+ * And vice versa:
+ *
+ * quot = cyc >> time_shift;
+ * rem = cyc & (((u64)1 << time_shift) - 1);
+ * timestamp = time_zero + quot * time_mult +
+ * ((rem * time_mult) >> time_shift);
+ */
+ __u64 time_zero;
+ __u32 size; /* Header size up to __reserved[] fields. */
+
+ /*
+ * Hole for extension of the self monitor capabilities
+ */
+
+ __u8 __reserved[118*8+4]; /* align to 1k. */
+
+ /*
+ * Control data for the mmap() data buffer.
+ *
+ * User-space reading the @data_head value should issue an smp_rmb(),
+ * after reading this value.
+ *
+ * When the mapping is PROT_WRITE the @data_tail value should be
+ * written by userspace to reflect the last read data, after issueing
+ * an smp_mb() to separate the data read from the ->data_tail store.
+ * In this case the kernel will not over-write unread data.
+ *
+ * See perf_output_put_handle() for the data ordering.
+ *
+ * data_{offset,size} indicate the location and size of the perf record
+ * buffer within the mmapped area.
+ */
+ __u64 data_head; /* head in the data section */
+ __u64 data_tail; /* user-space written tail */
+ __u64 data_offset; /* where the buffer starts */
+ __u64 data_size; /* data buffer size */
+
+ /*
+ * AUX area is defined by aux_{offset,size} fields that should be set
+ * by the userspace, so that
+ *
+ * aux_offset >= data_offset + data_size
+ *
+ * prior to mmap()ing it. Size of the mmap()ed area should be aux_size.
+ *
+ * Ring buffer pointers aux_{head,tail} have the same semantics as
+ * data_{head,tail} and same ordering rules apply.
+ */
+ __u64 aux_head;
+ __u64 aux_tail;
+ __u64 aux_offset;
+ __u64 aux_size;
+};
+#endif // PERF_ATTR_SIZE_VER5
+#endif // PERF_ATTR_SIZE_VER5_BUNDLE
+
struct target_ops;
#if HAVE_LINUX_PERF_EVENT_H
diff --git a/gdbsupport/common.m4 b/gdbsupport/common.m4
--- a/gdbsupport/common.m4
+++ b/gdbsupport/common.m4
@@ -145,7 +145,7 @@ AC_DEFUN([GDB_AC_COMMON], [
AC_PREPROC_IFELSE([AC_LANG_SOURCE([[
#include <linux/perf_event.h>
#ifndef PERF_ATTR_SIZE_VER5
- # error
+ // error // PERF_ATTR_SIZE_VER5_BUNDLE is not available here - Fedora+RHEL
#endif
]])], [perf_event=yes], [perf_event=no])
if test "$perf_event" != yes; then

View File

@ -0,0 +1,25 @@
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
http://sources.redhat.com/bugzilla/show_bug.cgi?id=11593
Bug in FSF GDB exploited by the ptrace-on-utrace interaction.
diff --git a/gdb/breakpoint.c b/gdb/breakpoint.c
--- a/gdb/breakpoint.c
+++ b/gdb/breakpoint.c
@@ -11948,6 +11948,8 @@ update_global_location_list (enum ugll_insert_mode insert_mode)
= 3 * (thread_count (proc_target) + 1);
else
old_loc->events_till_retirement = 1;
+ /* Red Hat Bug 590623. */
+ old_loc->events_till_retirement *= 10;
old_loc->owner = NULL;
moribund_locations.push_back (old_loc);

View File

@ -0,0 +1,62 @@
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-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 @@
+# 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/>.
+
+if { ![istarget "x86_64-*-*"] && ![istarget "i?86-*-*"] } then {
+ verbose "Skipping amd64 clflushopt test."
+ return
+}
+
+if [prepare_for_testing amd64-clflushopt.exp amd64-clflushopt amd64-clflushopt.S [list debug "additional_flags=-nostdlib"]] {
+ return -1
+}
+
+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"

752
gdb-orphanripper.c Normal file
View File

@ -0,0 +1,752 @@
/*
* Copyright 2006-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.
*
* Reap any leftover children possibly holding file descriptors.
* Children are identified by the stale file descriptor or PGID / SID.
* Both can be missed but only the stale file descriptors are important for us.
* PGID / SID may be set by the children on their own.
* If we fine a candidate we kill it will all its process tree (grandchildren).
* The child process is run with `2>&1' redirection (due to forkpty(3)).
* 2007-07-10 Jan Kratochvil <jan.kratochvil@redhat.com>
*/
/* For getpgid(2). */
#define _GNU_SOURCE 1
#include <stdio.h>
#include <stdlib.h>
#include <sys/types.h>
#include <sys/wait.h>
#include <dirent.h>
#include <unistd.h>
#include <errno.h>
#include <ctype.h>
#include <string.h>
#include <limits.h>
#include <fcntl.h>
#include <assert.h>
#include <pty.h>
#include <poll.h>
#include <sys/stat.h>
#define LENGTH(x) (sizeof (x) / sizeof (*(x)))
static const char *progname;
static volatile pid_t child;
static void signal_chld (int signo)
{
}
static volatile int signal_alrm_hit = 0;
static void signal_alrm (int signo)
{
signal_alrm_hit = 1;
}
static char childptyname[LINE_MAX];
static void print_child_error (const char *reason, char **argv)
{
char **sp;
fprintf (stderr, "%s: %d %s:", progname, (int) child, reason);
for (sp = argv; *sp != NULL; sp++)
{
fputc (' ', stderr);
fputs (*sp, stderr);
}
fputc ('\n', stderr);
}
static int read_out (int amaster)
{
char buf[LINE_MAX];
ssize_t buf_got;
buf_got = read (amaster, buf, sizeof buf);
if (buf_got == 0)
return 0;
/* Weird but at least after POLLHUP we get EIO instead of just EOF. */
if (buf_got == -1 && errno == EIO)
return 0;
if (buf_got == -1 && errno == EAGAIN)
return 0;
if (buf_got < 0)
{
perror ("read (amaster)");
exit (EXIT_FAILURE);
}
if (write (STDOUT_FILENO, buf, buf_got) != buf_got)
{
perror ("write(2)");
exit (EXIT_FAILURE);
}
return 1;
}
/* kill (child, 0) == 0 sometimes even when CHILD's state is already "Z". */
static int child_exited (void)
{
char buf[200];
int fd, i, retval;
ssize_t got;
char state[3];
snprintf (buf, sizeof (buf), "/proc/%ld/stat", (long) child);
fd = open (buf, O_RDONLY);
if (fd == -1)
{
perror ("open (/proc/CHILD/stat)");
exit (EXIT_FAILURE);
}
got = read (fd, buf, sizeof(buf));
if (got <= 0)
{
perror ("read (/proc/CHILD/stat)");
exit (EXIT_FAILURE);
}
if (close (fd) != 0)
{
perror ("close (/proc/CHILD/stat)");
exit (EXIT_FAILURE);
}
/* RHEL-5 does not support %ms. */
i = sscanf (buf, "%*d%*s%2s", state);
if (i != 1)
{
perror ("sscanf (/proc/CHILD/stat)");
exit (EXIT_FAILURE);
}
retval = strcmp (state, "Z") == 0;
return retval;
}
static int spawn (char **argv, int timeout)
{
pid_t child_got;
int status, amaster, i, rc;
struct sigaction act;
sigset_t set;
struct termios termios;
unsigned alarm_orig;
/* We do not use signal(2) to be sure we do not have SA_RESTART. */
memset (&act, 0, sizeof (act));
act.sa_handler = signal_chld;
i = sigemptyset (&act.sa_mask);
assert (i == 0);
act.sa_flags = 0; /* !SA_RESTART */
i = sigaction (SIGCHLD, &act, NULL);
assert (i == 0);
i = sigemptyset (&set);
assert (i == 0);
i = sigaddset (&set, SIGCHLD);
assert (i == 0);
i = sigprocmask (SIG_SETMASK, &set, NULL);
assert (i == 0);
/* With TERMP passed as NULL we get "\n" -> "\r\n". */
termios.c_iflag = IGNBRK | IGNPAR;
termios.c_oflag = 0;
termios.c_cflag = CS8 | CREAD | CLOCAL | HUPCL | B9600;
termios.c_lflag = IEXTEN | NOFLSH;
memset (termios.c_cc, _POSIX_VDISABLE, sizeof (termios.c_cc));
termios.c_cc[VTIME] = 0;
termios.c_cc[VMIN ] = 1;
cfmakeraw (&termios);
#ifdef FLUSHO
/* Workaround a readline deadlock bug in _get_tty_settings(). */
termios.c_lflag &= ~FLUSHO;
#endif
child = forkpty (&amaster, childptyname, &termios, NULL);
switch (child)
{
case -1:
perror ("forkpty(3)");
exit (EXIT_FAILURE);
case 0:
/* Do not replace STDIN as inferiors query its termios. */
#if 0
i = close (STDIN_FILENO);
assert (i == 0);
i = open ("/dev/null", O_RDONLY);
assert (i == STDIN_FILENO);
#endif
i = sigemptyset (&set);
assert (i == 0);
i = sigprocmask (SIG_SETMASK, &set, NULL);
assert (i == 0);
/* Do not setpgrp(2) in the parent process as the process-group
is shared for the whole sh(1) pipeline we could be a part
of. The process-group is set according to PID of the first
command in the pipeline.
We would rip even vi(1) in the case of:
./orphanripper sh -c 'sleep 1&' | vi -
*/
/* Do not setpgrp(2) as our pty would not be ours and we would
get `SIGSTOP' later, particularly after spawning gdb(1).
setsid(3) was already executed by forkpty(3) and it would fail if
executed again. */
if (getpid() != getpgrp ())
{
perror ("getpgrp(2)");
exit (EXIT_FAILURE);
}
execvp (argv[0], argv);
perror ("execvp(2)");
exit (EXIT_FAILURE);
default:
break;
}
i = fcntl (amaster, F_SETFL, O_RDWR | O_NONBLOCK);
if (i != 0)
{
perror ("fcntl (amaster, F_SETFL, O_NONBLOCK)");
exit (EXIT_FAILURE);
}
/* We do not use signal(2) to be sure we do not have SA_RESTART. */
act.sa_handler = signal_alrm;
i = sigaction (SIGALRM, &act, NULL);
assert (i == 0);
alarm_orig = alarm (timeout);
assert (alarm_orig == 0);
i = sigemptyset (&set);
assert (i == 0);
while (!signal_alrm_hit)
{
struct pollfd pollfd;
pollfd.fd = amaster;
pollfd.events = POLLIN;
i = ppoll (&pollfd, 1, NULL, &set);
if (i == -1 && errno == EINTR)
{
if (child_exited ())
break;
/* Non-CHILD child may have exited. */
continue;
}
assert (i == 1);
/* Data available? Process it first. */
if (pollfd.revents & POLLIN)
{
if (!read_out (amaster))
{
fprintf (stderr, "%s: Unexpected EOF\n", progname);
exit (EXIT_FAILURE);
}
}
if (pollfd.revents & POLLHUP)
break;
if ((pollfd.revents &= ~POLLIN) != 0)
{
fprintf (stderr, "%s: ppoll(2): revents 0x%x\n", progname,
(unsigned) pollfd.revents);
exit (EXIT_FAILURE);
}
/* Child exited? */
if (child_exited ())
break;
}
if (signal_alrm_hit)
{
i = kill (child, SIGKILL);
assert (i == 0);
}
else
alarm (0);
/* WNOHANG still could fail. */
child_got = waitpid (child, &status, 0);
if (child != child_got)
{
fprintf (stderr, "waitpid (%d) = %d: %m\n", (int) child, (int) child_got);
exit (EXIT_FAILURE);
}
if (signal_alrm_hit)
{
char *buf;
if (asprintf (&buf, "Timed out after %d seconds", timeout) != -1)
{
print_child_error (buf, argv);
free (buf);
}
rc = 128 + SIGALRM;
}
else if (WIFEXITED (status))
rc = WEXITSTATUS (status);
else if (WIFSIGNALED (status))
{
print_child_error (strsignal (WTERMSIG (status)), argv);
rc = 128 + WTERMSIG (status);
}
else if (WIFSTOPPED (status))
{
fprintf (stderr, "waitpid (%d): WIFSTOPPED - WSTOPSIG is %d\n",
(int) child, WSTOPSIG (status));
exit (EXIT_FAILURE);
}
else
{
fprintf (stderr, "waitpid (%d): !WIFEXITED (%d)\n", (int) child, status);
exit (EXIT_FAILURE);
}
/* Not used in fact. */
i = sigprocmask (SIG_SETMASK, &set, NULL);
assert (i == 0);
/* Do not unset O_NONBLOCK as a stale child (the whole purpose of this
program) having open its output pty would block us in read_out. */
#if 0
i = fcntl (amaster, F_SETFL, O_RDONLY /* !O_NONBLOCK */);
if (i != 0)
{
perror ("fcntl (amaster, F_SETFL, O_RDONLY /* !O_NONBLOCK */)");
exit (EXIT_FAILURE);
}
#endif
while (read_out (amaster));
/* Do not close the master FD as the child would have `/dev/pts/23 (deleted)'
entries which are not expected (and expecting ` (deleted)' would be
a race. */
#if 0
i = close (amaster);
if (i != 0)
{
perror ("close (forkpty ()'s amaster)");
exit (EXIT_FAILURE);
}
#endif
return rc;
}
/* Detected commandline may look weird due to a race:
Original command:
./orphanripper sh -c 'sleep 1&' &
Correct output:
[1] 29610
./orphanripper: Killed -9 orphan PID 29612 (PGID 29611): sleep 1
Raced output (sh(1) child still did not update its argv[]):
[1] 29613
./orphanripper: Killed -9 orphan PID 29615 (PGID 29614): sh -c sleep 1&
We could delay a bit before ripping the children. */
static const char *read_cmdline (pid_t pid)
{
char cmdline_fname[32];
static char cmdline[LINE_MAX];
int fd;
ssize_t got;
char *s;
if (snprintf (cmdline_fname, sizeof cmdline_fname, "/proc/%d/cmdline",
(int) pid) < 0)
return NULL;
fd = open (cmdline_fname, O_RDONLY);
if (fd == -1)
{
/* It may have already exited - ENOENT. */
#if 0
fprintf (stderr, "%s: open (\"%s\"): %m\n", progname, cmdline_fname);
#endif
return NULL;
}
got = read (fd, cmdline, sizeof (cmdline) - 1);
if (got == -1)
fprintf (stderr, "%s: read (\"%s\"): %m\n", progname,
cmdline_fname);
if (close (fd) != 0)
fprintf (stderr, "%s: close (\"%s\"): %m\n", progname,
cmdline_fname);
if (got < 0)
return NULL;
/* Convert '\0' argument delimiters to spaces. */
for (s = cmdline; s < cmdline + got; s++)
if (!*s)
*s = ' ';
/* Trim the trailing spaces (typically single '\0'->' '). */
while (s > cmdline && isspace (s[-1]))
s--;
*s = 0;
return cmdline;
}
static int dir_scan (const char *dirname,
int (*callback) (struct dirent *dirent, const char *pathname))
{
DIR *dir;
struct dirent *dirent;
int rc = 0;
dir = opendir (dirname);
if (dir == NULL)
{
if (errno == EACCES || errno == ENOENT)
return rc;
fprintf (stderr, "%s: opendir (\"%s\"): %m\n", progname, dirname);
exit (EXIT_FAILURE);
}
while ((errno = 0, dirent = readdir (dir)))
{
char pathname[LINE_MAX];
int pathname_len;
pathname_len = snprintf (pathname, sizeof pathname, "%s/%s",
dirname, dirent->d_name);
if (pathname_len <= 0 || pathname_len >= (int) sizeof pathname)
{
fprintf (stderr, "entry file name too long: `%s' / `%s'\n",
dirname, dirent->d_name);
continue;
}
/* RHEL-4.5 on s390x never fills in D_TYPE. */
if (dirent->d_type == DT_UNKNOWN)
{
struct stat statbuf;
int i;
/* We are not interested in the /proc/PID/fd/ links targets. */
i = lstat (pathname, &statbuf);
if (i == -1)
{
if (errno == EACCES || errno == ENOENT)
continue;
fprintf (stderr, "%s: stat (\"%s\"): %m\n", progname, pathname);
exit (EXIT_FAILURE);
}
if (S_ISDIR (statbuf.st_mode))
dirent->d_type = DT_DIR;
if (S_ISLNK (statbuf.st_mode))
dirent->d_type = DT_LNK;
/* No other D_TYPE types used in this code. */
}
rc = (*callback) (dirent, pathname);
if (rc != 0)
{
errno = 0;
break;
}
}
if (errno != 0)
{
fprintf (stderr, "%s: readdir (\"%s\"): %m\n", progname, dirname);
exit (EXIT_FAILURE);
}
if (closedir (dir) != 0)
{
fprintf (stderr, "%s: closedir (\"%s\"): %m\n", progname, dirname);
exit (EXIT_FAILURE);
}
return rc;
}
static int fd_fs_scan (pid_t pid, int (*func) (pid_t pid, const char *link))
{
char dirname[64];
if (snprintf (dirname, sizeof dirname, "/proc/%d/fd", (int) pid) < 0)
{
perror ("snprintf(3)");
exit (EXIT_FAILURE);
}
int callback (struct dirent *dirent, const char *pathname)
{
char buf[LINE_MAX];
ssize_t buf_len;
if ((dirent->d_type != DT_DIR && dirent->d_type != DT_LNK)
|| (dirent->d_type == DT_DIR && strcmp (dirent->d_name, ".") != 0
&& strcmp (dirent->d_name, "..") != 0)
|| (dirent->d_type == DT_LNK && strspn (dirent->d_name, "0123456789")
!= strlen (dirent->d_name)))
{
fprintf (stderr, "Unexpected entry \"%s\" (d_type %u)"
" on readdir (\"%s\"): %m\n",
dirent->d_name, (unsigned) dirent->d_type, dirname);
return 0;
}
if (dirent->d_type == DT_DIR)
return 0;
buf_len = readlink (pathname, buf, sizeof buf - 1);
if (buf_len <= 0 || buf_len >= (ssize_t) sizeof buf - 1)
{
if (errno != ENOENT && errno != EACCES)
fprintf (stderr, "Error reading link \"%s\": %m\n", pathname);
return 0;
}
buf[buf_len] = 0;
return (*func) (pid, buf);
}
return dir_scan (dirname, callback);
}
static void pid_fs_scan (void (*func) (pid_t pid, void *data), void *data)
{
int callback (struct dirent *dirent, const char *pathname)
{
if (dirent->d_type != DT_DIR
|| strspn (dirent->d_name, "0123456789") != strlen (dirent->d_name))
return 0;
(*func) (atoi (dirent->d_name), data);
return 0;
}
dir_scan ("/proc", callback);
}
static int rip_check_ptyname (pid_t pid, const char *link)
{
assert (pid != getpid ());
return strcmp (link, childptyname) == 0;
}
struct pid
{
struct pid *next;
pid_t pid;
};
static struct pid *pid_list;
static int pid_found (pid_t pid)
{
struct pid *entry;
for (entry = pid_list; entry != NULL; entry = entry->next)
if (entry->pid == pid)
return 1;
return 0;
}
/* Single pass is not enough, a (multithreaded) process was seen to survive.
Repeated killing of the same process is not enough, zombies can be killed.
*/
static int cleanup_acted;
static void pid_record (pid_t pid)
{
struct pid *entry;
if (pid_found (pid))
return;
cleanup_acted = 1;
entry = malloc (sizeof (*entry));
if (entry == NULL)
{
fprintf (stderr, "%s: malloc: %m\n", progname);
exit (EXIT_FAILURE);
}
entry->pid = pid;
entry->next = pid_list;
pid_list = entry;
}
static void pid_forall (void (*func) (pid_t pid))
{
struct pid *entry;
for (entry = pid_list; entry != NULL; entry = entry->next)
(*func) (entry->pid);
}
/* Returns 0 on failure. */
static pid_t pid_get_parent (pid_t pid)
{
char fname[64];
FILE *f;
char line[LINE_MAX];
pid_t retval = 0;
if (snprintf (fname, sizeof fname, "/proc/%d/status", (int) pid) < 0)
{
perror ("snprintf(3)");
exit (EXIT_FAILURE);
}
f = fopen (fname, "r");
if (f == NULL)
{
return 0;
}
while (errno = 0, fgets (line, sizeof line, f) == line)
{
if (strncmp (line, "PPid:\t", sizeof "PPid:\t" - 1) != 0)
continue;
retval = atoi (line + sizeof "PPid:\t" - 1);
errno = 0;
break;
}
if (errno != 0)
{
fprintf (stderr, "%s: fgets (\"%s\"): %m\n", progname, fname);
exit (EXIT_FAILURE);
}
if (fclose (f) != 0)
{
fprintf (stderr, "%s: fclose (\"%s\"): %m\n", progname, fname);
exit (EXIT_FAILURE);
}
return retval;
}
static void killtree (pid_t pid);
static void killtree_pid_fs_scan (pid_t pid, void *data)
{
pid_t parent_pid = *(pid_t *) data;
/* Do not optimize it as we could miss some newly spawned processes.
Always traverse all the leaves. */
#if 0
/* Optimization. */
if (pid_found (pid))
return;
#endif
if (pid_get_parent (pid) != parent_pid)
return;
killtree (pid);
}
static void killtree (pid_t pid)
{
pid_record (pid);
pid_fs_scan (killtree_pid_fs_scan, &pid);
}
static void rip_pid_fs_scan (pid_t pid, void *data)
{
pid_t pgid;
/* Shouldn't happen. */
if (pid == getpid ())
return;
/* Check both PGID and the stale file descriptors. */
pgid = getpgid (pid);
if (pgid == child
|| fd_fs_scan (pid, rip_check_ptyname) != 0)
killtree (pid);
}
static void killproc (pid_t pid)
{
const char *cmdline;
cmdline = read_cmdline (pid);
/* Avoid printing the message for already gone processes. */
if (kill (pid, 0) != 0 && errno == ESRCH)
return;
if (cmdline == NULL)
cmdline = "<error>";
fprintf (stderr, "%s: Killed -9 orphan PID %d: %s\n", progname, (int) pid, cmdline);
if (kill (pid, SIGKILL) == 0)
cleanup_acted = 1;
else if (errno != ESRCH)
fprintf (stderr, "%s: kill (%d, SIGKILL): %m\n", progname, (int) pid);
/* RHEL-3 kernels cannot SIGKILL a `T (stopped)' process. */
kill (pid, SIGCONT);
/* Do not waitpid(2) as it cannot be our direct descendant and it gets
cleaned up by init(8). */
#if 0
pid_t pid_got;
pid_got = waitpid (pid, NULL, 0);
if (pid != pid_got)
{
fprintf (stderr, "%s: waitpid (%d) != %d: %m\n", progname,
(int) pid, (int) pid_got);
return;
}
#endif
}
static void rip (void)
{
cleanup_acted = 0;
do
{
if (cleanup_acted)
usleep (1000000 / 10);
cleanup_acted = 0;
pid_fs_scan (rip_pid_fs_scan, NULL);
pid_forall (killproc);
}
while (cleanup_acted);
}
int main (int argc, char **argv)
{
int timeout = 0;
int rc;
progname = *argv++;
argc--;
if (argc < 1 || strcmp (*argv, "-h") == 0
|| strcmp (*argv, "--help") == 0)
{
puts ("Syntax: orphanripper [-t <seconds>] <execvp(3) commandline>");
exit (EXIT_FAILURE);
}
if ((*argv)[0] == '-' && (*argv)[1] == 't')
{
char *timeout_s = NULL;
if ((*argv)[2] == 0)
timeout_s = *++argv;
else if (isdigit ((*argv)[2]))
timeout_s = (*argv) + 2;
if (timeout_s != NULL)
{
long l;
char *endptr;
argv++;
l = strtol (timeout_s, &endptr, 0);
timeout = l;
if ((endptr != NULL && *endptr != 0) || timeout < 0 || timeout != l)
{
fprintf (stderr, "%s: Invalid timeout value: %s\n", progname,
timeout_s);
exit (EXIT_FAILURE);
}
}
}
rc = spawn (argv, timeout);
rip ();
return rc;
}

View File

@ -0,0 +1,234 @@
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
diff --git a/gdb/testsuite/gdb.cp/pr11734-1.cc b/gdb/testsuite/gdb.cp/pr11734-1.cc
new file mode 100644
--- /dev/null
+++ b/gdb/testsuite/gdb.cp/pr11734-1.cc
@@ -0,0 +1,30 @@
+/* This testcase is part of GDB, the GNU debugger.
+
+ Copyright 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/>.
+
+ Please email any bugs, comments, and/or additions to this file to:
+ bug-gdb@gnu.org */
+
+#include "pr11734.h"
+
+int
+main ()
+{
+ pr11734 *p = new pr11734;
+ p->foo ();
+ return 0;
+}
+
diff --git a/gdb/testsuite/gdb.cp/pr11734-2.cc b/gdb/testsuite/gdb.cp/pr11734-2.cc
new file mode 100644
--- /dev/null
+++ b/gdb/testsuite/gdb.cp/pr11734-2.cc
@@ -0,0 +1,27 @@
+/* This testcase is part of GDB, the GNU debugger.
+
+ Copyright 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/>.
+
+ Please email any bugs, comments, and/or additions to this file to:
+ bug-gdb@gnu.org */
+
+#include "pr11734.h"
+
+void
+pr11734::foo(void)
+{
+}
+
diff --git a/gdb/testsuite/gdb.cp/pr11734-3.cc b/gdb/testsuite/gdb.cp/pr11734-3.cc
new file mode 100644
--- /dev/null
+++ b/gdb/testsuite/gdb.cp/pr11734-3.cc
@@ -0,0 +1,27 @@
+/* This testcase is part of GDB, the GNU debugger.
+
+ Copyright 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/>.
+
+ Please email any bugs, comments, and/or additions to this file to:
+ bug-gdb@gnu.org */
+
+#include "pr11734.h"
+
+void
+pr11734::foo (int a)
+{
+}
+
diff --git a/gdb/testsuite/gdb.cp/pr11734-4.cc b/gdb/testsuite/gdb.cp/pr11734-4.cc
new file mode 100644
--- /dev/null
+++ b/gdb/testsuite/gdb.cp/pr11734-4.cc
@@ -0,0 +1,27 @@
+/* This testcase is part of GDB, the GNU debugger.
+
+ Copyright 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/>.
+
+ Please email any bugs, comments, and/or additions to this file to:
+ bug-gdb@gnu.org */
+
+#include "pr11734.h"
+
+void
+pr11734::foo (char *a)
+{
+}
+
diff --git a/gdb/testsuite/gdb.cp/pr11734.exp b/gdb/testsuite/gdb.cp/pr11734.exp
new file mode 100644
--- /dev/null
+++ b/gdb/testsuite/gdb.cp/pr11734.exp
@@ -0,0 +1,55 @@
+# Copyright 2010 Free Software Foundation, Inc.
+#
+# Contributed by Red Hat, originally written by Keith Seitz.
+#
+# 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.
+
+if { [skip_cplus_tests] } { continue }
+
+set testfile "pr11734"
+set class $testfile
+
+set srcfiles {}
+for {set i 1} {$i < 5} {incr i} {
+ lappend srcfiles $testfile-$i.cc
+}
+
+prepare_for_testing pr11734 $testfile $srcfiles {c++ debug}
+
+if {![runto_main]} {
+ perror "couldn't run to breakpoint"
+ continue
+}
+
+# An array holding the overload types for the method pr11734::foo. The
+# first element is the overloaded method parameter. The second element
+# is the expected source file number, e.g. "pr11734-?.cc".
+array set tests {
+ "char*" 4
+ "int" 3
+ "" 2
+}
+
+# Test each overload instance twice: once quoted, once unquoted
+foreach ovld [array names tests] {
+ set method "${class}::foo\($ovld\)"
+ set result "Breakpoint (\[0-9\]).*file .*/$class-$tests($ovld).*"
+ gdb_test "break $method" $result
+ gdb_test "break '$method'" $result
+}
+
+gdb_exit
+return 0
diff --git a/gdb/testsuite/gdb.cp/pr11734.h b/gdb/testsuite/gdb.cp/pr11734.h
new file mode 100644
--- /dev/null
+++ b/gdb/testsuite/gdb.cp/pr11734.h
@@ -0,0 +1,28 @@
+/* This testcase is part of GDB, the GNU debugger.
+
+ Copyright 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/>.
+
+ Please email any bugs, comments, and/or additions to this file to:
+ bug-gdb@gnu.org */
+
+class pr11734
+{
+ public:
+ void foo ();
+ void foo (int);
+ void foo (char *);
+};
+

View File

@ -0,0 +1,103 @@
From FEDORA_PATCHES Mon Sep 17 00:00:00 2001
From: Fedora GDB patches <invalid@email.com>
Date: Fri, 27 Oct 2017 21:07:50 +0200
Subject: gdb-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
diff --git a/gdb/testsuite/gdb.cp/pr12273.cc b/gdb/testsuite/gdb.cp/pr12273.cc
new file mode 100644
--- /dev/null
+++ b/gdb/testsuite/gdb.cp/pr12273.cc
@@ -0,0 +1,37 @@
+/* This test case is part of GDB, the GNU debugger.
+
+ Copyright 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/>. */
+
+template <typename T>
+class GDB
+{
+ public:
+ static int simple (void) { return 0; }
+ static int harder (T a) { return 1; }
+ template <typename X>
+ static X even_harder (T a) { return static_cast<X> (a); }
+ int operator == (GDB const& other)
+ { return 1; }
+};
+
+int main(int argc, char **argv)
+{
+ GDB<int> a, b;
+ if (a == b)
+ return GDB<char>::harder('a') + GDB<int>::harder(3)
+ + GDB<char>::even_harder<int> ('a');
+ return GDB<int>::simple ();
+}
diff --git a/gdb/testsuite/gdb.cp/pr12273.exp b/gdb/testsuite/gdb.cp/pr12273.exp
new file mode 100644
--- /dev/null
+++ b/gdb/testsuite/gdb.cp/pr12273.exp
@@ -0,0 +1,46 @@
+# Copyright 2010 Free Software Foundation, Inc.
+#
+# Contributed by Red Hat, originally written by Keith Seitz.
+#
+# 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.
+
+if {[skip_cplus_tests]} { continue }
+
+set testfile "pr12273"
+# Do NOT compile with debug flag.
+prepare_for_testing pr12273 $testfile $testfile.cc {c++}
+
+gdb_test_no_output "set language c++"
+
+# A list of minimal symbol names to check.
+# Note that GDB<char>::even_harder<int>(char) is quoted and includes
+# the return type. This is necessary because this is the demangled name
+# of the minimal symbol.
+set min_syms [list \
+ "GDB<int>::operator ==" \
+ "GDB<int>::operator==(GDB<int> const&)" \
+ "GDB<char>::harder(char)" \
+ "GDB<int>::harder(int)" \
+ {"int GDB<char>::even_harder<int>(char)"} \
+ "GDB<int>::simple()"]
+
+foreach sym $min_syms {
+ if {[gdb_breakpoint $sym]} {
+ pass "setting breakpoint at $sym"
+ }
+}
+
+gdb_exit

303
gdb-ppc-power7-test.patch Normal file
View File

@ -0,0 +1,303 @@
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
+++ b/gdb/testsuite/gdb.arch/powerpc-power7rh.exp
@@ -0,0 +1,178 @@
+# Copyright 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 PowerPC Power7 instructions disassembly.
+
+if {![istarget "powerpc*-*-*"]} then {
+ verbose "Skipping PowerPC Power7 instructions disassembly."
+ return
+}
+
+set testfile "powerpc-power7rh"
+set srcfile ${testfile}.s
+set objfile [standard_output_file ${testfile}.o]
+
+if { [gdb_compile "${srcdir}/${subdir}/${srcfile}" "${objfile}" object {debug}] != "" } {
+ untested "PowerPC Power7 instructions disassembly"
+ return -1
+}
+
+
+gdb_exit
+gdb_start
+gdb_reinitialize_dir $srcdir/$subdir
+gdb_load ${objfile}
+
+
+# Disassemble the function.
+
+set test "disass func"
+gdb_test_multiple $test $test {
+ -re "\r\nDump of assembler code for function func:(\r\n.*\r\n)End of assembler dump.\r\n$gdb_prompt $" {
+ set func $expect_out(1,string)
+ pass $test
+ }
+}
+
+proc instr_to_patt {offset instr} {
+ # 0x0000000000000018 <func+24>: stxvd2x vs43,r4,r5
+ return ".*\r\n\[ \t\]*[string map {0x 0x0*} $offset] <(func)?\\+?\[0-9\]*>:\[ \t\]*[string map [list { } "\[ \t\]+" . {\.}] $instr]\[ \t\]*\r\n.*"
+}
+
+# KFAIL strings would not exist if -Many would print the same as -Mpower7.
+# That means the power7 form should be the preferred one.
+# http://sourceware.org/ml/gdb-patches/2009-03/threads.html#00020
+
+proc func_check {offset instr {kfail ""}} {
+ global func
+
+ set test "Found $offset: $instr"
+ if [regexp -nocase -line [instr_to_patt $offset $instr] $func] {
+ pass $test
+ } elseif {$kfail != "" && [regexp -nocase -line [instr_to_patt $offset $kfail] $func]} {
+ kfail gdb/NNNN $test
+ } else {
+ fail $test
+ }
+}
+
+func_check 0x0 "lxvd2x vs3,r4,r5"
+# [PATCH] Remove support for POWER7 VSX load/store with update instructions
+# http://sourceware.org/ml/binutils/2009-09/msg00680.html
+# http://sourceware.org/ml/binutils-cvs/2009-09/msg00331.html
+func_check 0x4 "lxvb16x vs3,r4,r5"
+func_check 0x8 "lxvd2x vs43,r4,r5"
+func_check 0xc "lxvb16x vs43,r4,r5"
+func_check 0x10 "stxvd2x vs3,r4,r5"
+func_check 0x14 "stxvb16x vs3,r4,r5"
+func_check 0x18 "stxvd2x vs43,r4,r5"
+func_check 0x1c "stxvb16x vs43,r4,r5"
+func_check 0x20 "xxmrghd vs3,vs4,vs5"
+func_check 0x24 "xxmrghd vs43,vs44,vs45"
+func_check 0x28 "xxmrgld vs3,vs4,vs5"
+func_check 0x2c "xxmrgld vs43,vs44,vs45"
+func_check 0x30 "xxmrghd vs3,vs4,vs5"
+func_check 0x34 "xxmrghd vs43,vs44,vs45"
+func_check 0x38 "xxmrgld vs3,vs4,vs5"
+func_check 0x3c "xxmrgld vs43,vs44,vs45"
+func_check 0x40 "xxpermdi vs3,vs4,vs5,1"
+func_check 0x44 "xxpermdi vs43,vs44,vs45,1"
+func_check 0x48 "xxpermdi vs3,vs4,vs5,2"
+func_check 0x4c "xxpermdi vs43,vs44,vs45,2"
+func_check 0x50 "xvmovdp vs3,vs4"
+func_check 0x54 "xvmovdp vs43,vs44"
+func_check 0x58 "xvmovdp vs3,vs4"
+func_check 0x5c "xvmovdp vs43,vs44"
+func_check 0x60 "xvcpsgndp vs3,vs4,vs5"
+func_check 0x64 "xvcpsgndp vs43,vs44,vs45"
+func_check 0x68 "wait"
+func_check 0x6c "wait"
+func_check 0x70 "waitrsv"
+func_check 0x74 "waitrsv"
+func_check 0x78 "waitimpl"
+func_check 0x7c "waitimpl"
+func_check 0x80 "doze"
+func_check 0x84 "nap"
+func_check 0x88 "sleep"
+func_check 0x8c "rvwinkle"
+func_check 0x90 "prtyw r3,r4"
+func_check 0x94 "prtyd r13,r14"
+func_check 0x98 "mfcfar r10" "mfspr r10,28"
+func_check 0x9c "mtcfar r11" "mtspr 28,r11"
+func_check 0xa0 "cmpb r3,r4,r5"
+func_check 0xa4 "lwzcix r10,r11,r12"
+func_check 0xa8 "dadd f16,f17,f18"
+func_check 0xac "daddq f20,f22,f24"
+func_check 0xb0 "dss 3"
+func_check 0xb4 "dssall"
+func_check 0xb8 "dst r5,r4,1"
+func_check 0xbc "dstt r8,r7,0"
+func_check 0xc0 "dstst r5,r6,3"
+func_check 0xc4 "dststt r4,r5,2"
+func_check 0xc8 "divwe r10,r11,r12"
+func_check 0xcc "divwe. r11,r12,r13"
+func_check 0xd0 "divweo r12,r13,r14"
+func_check 0xd4 "divweo. r13,r14,r15"
+func_check 0xd8 "divweu r10,r11,r12"
+func_check 0xdc "divweu. r11,r12,r13"
+func_check 0xe0 "divweuo r12,r13,r14"
+func_check 0xe4 "divweuo. r13,r14,r15"
+func_check 0xe8 "bpermd r7,r17,r27"
+func_check 0xec "popcntw r10,r20"
+func_check 0xf0 "popcntd r10,r20"
+func_check 0xf4 "ldbrx r20,r21,r22"
+func_check 0xf8 "stdbrx r20,r21,r22"
+func_check 0xfc "lfiwzx f10,0,r10"
+func_check 0x100 "lfiwzx f10,r9,r10"
+func_check 0x104 "fcfids f4,f5"
+func_check 0x108 "fcfids. f4,f5"
+func_check 0x10c "fcfidus f4,f5"
+func_check 0x110 "fcfidus. f4,f5"
+func_check 0x114 "fctiwu f4,f5"
+func_check 0x118 "fctiwu. f4,f5"
+func_check 0x11c "fctiwuz f4,f5"
+func_check 0x120 "fctiwuz. f4,f5"
+func_check 0x124 "fctidu f4,f5"
+func_check 0x128 "fctidu. f4,f5"
+func_check 0x12c "fctiduz f4,f5"
+func_check 0x130 "fctiduz. f4,f5"
+func_check 0x134 "fcfidu f4,f5"
+func_check 0x138 "fcfidu. f4,f5"
+func_check 0x13c "ftdiv cr0,f10,f11"
+func_check 0x140 "ftdiv cr7,f10,f11"
+func_check 0x144 "ftsqrt cr0,f10"
+func_check 0x148 "ftsqrt cr7,f10"
+func_check 0x14c "dcbtt r8,r9" "dcbt 16,r8,r9"
+func_check 0x150 "dcbtstt r8,r9" "dcbtst 16,r8,r9"
+func_check 0x154 "dcffix f10,f12"
+func_check 0x158 "dcffix. f20,f22"
+func_check 0x15c "lbarx r10,r11,r12"
+func_check 0x160 "lbarx r10,r11,r12"
+func_check 0x164 "lbarx r10,r11,r12,1"
+func_check 0x168 "lharx r20,r21,r22"
+func_check 0x16c "lharx r20,r21,r22"
+func_check 0x170 "lharx r20,r21,r22,1"
+func_check 0x174 "stbcx. r10,r11,r12"
+func_check 0x178 "sthcx. r10,r11,r12"
+func_check 0x17c "fre f14,f15"
+func_check 0x180 "fre. f14,f15"
+func_check 0x184 "fres f14,f15"
+func_check 0x188 "fres. f14,f15"
+func_check 0x18c "frsqrte f14,f15"
+func_check 0x190 "frsqrte. f14,f15"
+func_check 0x194 "frsqrtes f14,f15"
+func_check 0x198 "frsqrtes. f14,f15"
+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
+++ b/gdb/testsuite/gdb.arch/powerpc-power7rh.s
@@ -0,0 +1,107 @@
+ .text
+ .globl func
+func:
+ .long 0x7c642e98 /* 0: lxvd2x vs3,r4,r5 */
+ .long 0x7c642ed8 /* 4: lxvd2ux vs3,r4,r5 */
+ .long 0x7d642e99 /* 8: lxvd2x vs43,r4,r5 */
+ .long 0x7d642ed9 /* c: lxvd2ux vs43,r4,r5 */
+ .long 0x7c642f98 /* 10: stxvd2x vs3,r4,r5 */
+ .long 0x7c642fd8 /* 14: stxvd2ux vs3,r4,r5 */
+ .long 0x7d642f99 /* 18: stxvd2x vs43,r4,r5 */
+ .long 0x7d642fd9 /* 1c: stxvd2ux vs43,r4,r5 */
+ .long 0xf0642850 /* 20: xxmrghd vs3,vs4,vs5 */
+ .long 0xf16c6857 /* 24: xxmrghd vs43,vs44,vs45 */
+ .long 0xf0642b50 /* 28: xxmrgld vs3,vs4,vs5 */
+ .long 0xf16c6b57 /* 2c: xxmrgld vs43,vs44,vs45 */
+ .long 0xf0642850 /* 30: xxmrghd vs3,vs4,vs5 */
+ .long 0xf16c6857 /* 34: xxmrghd vs43,vs44,vs45 */
+ .long 0xf0642b50 /* 38: xxmrgld vs3,vs4,vs5 */
+ .long 0xf16c6b57 /* 3c: xxmrgld vs43,vs44,vs45 */
+ .long 0xf0642950 /* 40: xxpermdi vs3,vs4,vs5,1 */
+ .long 0xf16c6957 /* 44: xxpermdi vs43,vs44,vs45,1 */
+ .long 0xf0642a50 /* 48: xxpermdi vs3,vs4,vs5,2 */
+ .long 0xf16c6a57 /* 4c: xxpermdi vs43,vs44,vs45,2 */
+ .long 0xf0642780 /* 50: xvmovdp vs3,vs4 */
+ .long 0xf16c6787 /* 54: xvmovdp vs43,vs44 */
+ .long 0xf0642780 /* 58: xvmovdp vs3,vs4 */
+ .long 0xf16c6787 /* 5c: xvmovdp vs43,vs44 */
+ .long 0xf0642f80 /* 60: xvcpsgndp vs3,vs4,vs5 */
+ .long 0xf16c6f87 /* 64: xvcpsgndp vs43,vs44,vs45 */
+ .long 0x7c00007c /* 68: wait */
+ .long 0x7c00007c /* 6c: wait */
+ .long 0x7c20007c /* 70: waitrsv */
+ .long 0x7c20007c /* 74: waitrsv */
+ .long 0x7c40007c /* 78: waitimpl */
+ .long 0x7c40007c /* 7c: waitimpl */
+ .long 0x4c000324 /* 80: doze */
+ .long 0x4c000364 /* 84: nap */
+ .long 0x4c0003a4 /* 88: sleep */
+ .long 0x4c0003e4 /* 8c: rvwinkle */
+ .long 0x7c830134 /* 90: prtyw r3,r4 */
+ .long 0x7dcd0174 /* 94: prtyd r13,r14 */
+ .long 0x7d5c02a6 /* 98: mfcfar r10 */
+ .long 0x7d7c03a6 /* 9c: mtcfar r11 */
+ .long 0x7c832bf8 /* a0: cmpb r3,r4,r5 */
+ .long 0x7d4b662a /* a4: lwzcix r10,r11,r12 */
+ .long 0xee119004 /* a8: dadd f16,f17,f18 */
+ .long 0xfe96c004 /* ac: daddq f20,f22,f24 */
+ .long 0x7c60066c /* b0: dss 3 */
+ .long 0x7e00066c /* b4: dssall */
+ .long 0x7c2522ac /* b8: dst r5,r4,1 */
+ .long 0x7e083aac /* bc: dstt r8,r7,0 */
+ .long 0x7c6532ec /* c0: dstst r5,r6,3 */
+ .long 0x7e442aec /* c4: dststt r4,r5,2 */
+ .long 0x7d4b6356 /* c8: divwe r10,r11,r12 */
+ .long 0x7d6c6b57 /* cc: divwe. r11,r12,r13 */
+ .long 0x7d8d7756 /* d0: divweo r12,r13,r14 */
+ .long 0x7dae7f57 /* d4: divweo. r13,r14,r15 */
+ .long 0x7d4b6316 /* d8: divweu r10,r11,r12 */
+ .long 0x7d6c6b17 /* dc: divweu. r11,r12,r13 */
+ .long 0x7d8d7716 /* e0: divweuo r12,r13,r14 */
+ .long 0x7dae7f17 /* e4: divweuo. r13,r14,r15 */
+ .long 0x7e27d9f8 /* e8: bpermd r7,r17,r27 */
+ .long 0x7e8a02f4 /* ec: popcntw r10,r20 */
+ .long 0x7e8a03f4 /* f0: popcntd r10,r20 */
+ .long 0x7e95b428 /* f4: ldbrx r20,r21,r22 */
+ .long 0x7e95b528 /* f8: stdbrx r20,r21,r22 */
+ .long 0x7d4056ee /* fc: lfiwzx f10,0,r10 */
+ .long 0x7d4956ee /* 100: lfiwzx f10,r9,r10 */
+ .long 0xec802e9c /* 104: fcfids f4,f5 */
+ .long 0xec802e9d /* 108: fcfids. f4,f5 */
+ .long 0xec802f9c /* 10c: fcfidus f4,f5 */
+ .long 0xec802f9d /* 110: fcfidus. f4,f5 */
+ .long 0xfc80291c /* 114: fctiwu f4,f5 */
+ .long 0xfc80291d /* 118: fctiwu. f4,f5 */
+ .long 0xfc80291e /* 11c: fctiwuz f4,f5 */
+ .long 0xfc80291f /* 120: fctiwuz. f4,f5 */
+ .long 0xfc802f5c /* 124: fctidu f4,f5 */
+ .long 0xfc802f5d /* 128: fctidu. f4,f5 */
+ .long 0xfc802f5e /* 12c: fctiduz f4,f5 */
+ .long 0xfc802f5f /* 130: fctiduz. f4,f5 */
+ .long 0xfc802f9c /* 134: fcfidu f4,f5 */
+ .long 0xfc802f9d /* 138: fcfidu. f4,f5 */
+ .long 0xfc0a5900 /* 13c: ftdiv cr0,f10,f11 */
+ .long 0xff8a5900 /* 140: ftdiv cr7,f10,f11 */
+ .long 0xfc005140 /* 144: ftsqrt cr0,f10 */
+ .long 0xff805140 /* 148: ftsqrt cr7,f10 */
+ .long 0x7e084a2c /* 14c: dcbtt r8,r9 */
+ .long 0x7e0849ec /* 150: dcbtstt r8,r9 */
+ .long 0xed406644 /* 154: dcffix f10,f12 */
+ .long 0xee80b645 /* 158: dcffix. f20,f22 */
+ .long 0x7d4b6068 /* 15c: lbarx r10,r11,r12 */
+ .long 0x7d4b6068 /* 160: lbarx r10,r11,r12 */
+ .long 0x7d4b6069 /* 164: lbarx r10,r11,r12,1 */
+ .long 0x7e95b0e8 /* 168: lharx r20,r21,r22 */
+ .long 0x7e95b0e8 /* 16c: lharx r20,r21,r22 */
+ .long 0x7e95b0e9 /* 170: lharx r20,r21,r22,1 */
+ .long 0x7d4b656d /* 174: stbcx. r10,r11,r12 */
+ .long 0x7d4b65ad /* 178: sthcx. r10,r11,r12 */
+ .long 0xfdc07830 /* 17c: fre f14,f15 */
+ .long 0xfdc07831 /* 180: fre. f14,f15 */
+ .long 0xedc07830 /* 184: fres f14,f15 */
+ .long 0xedc07831 /* 188: fres. f14,f15 */
+ .long 0xfdc07834 /* 18c: frsqrte f14,f15 */
+ .long 0xfdc07835 /* 190: frsqrte. f14,f15 */
+ .long 0xedc07834 /* 194: frsqrtes f14,f15 */
+ .long 0xedc07835 /* 198: frsqrtes. f14,f15 */
+ .long 0x7c43271e /* 19c: isel r2,r3,r4,28 */

View File

@ -0,0 +1,83 @@
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-rhbz-818343-set-solib-absolute-prefix-testcase.patch
;; Testcase for `Setting solib-absolute-prefix breaks vDSO' (BZ 818343).
;;=fedoratest
diff --git a/gdb/testsuite/gdb.base/set-solib-absolute-prefix.c b/gdb/testsuite/gdb.base/set-solib-absolute-prefix.c
new file mode 100644
--- /dev/null
+++ b/gdb/testsuite/gdb.base/set-solib-absolute-prefix.c
@@ -0,0 +1,26 @@
+/* Copyright (C) 2012 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/>. */
+
+#include <stdio.h>
+#include <stdlib.h>
+
+int
+main (int argc, char *argv[])
+{
+ printf ("Hello, World.\n");
+ abort ();
+}
diff --git a/gdb/testsuite/gdb.base/set-solib-absolute-prefix.exp b/gdb/testsuite/gdb.base/set-solib-absolute-prefix.exp
new file mode 100644
--- /dev/null
+++ b/gdb/testsuite/gdb.base/set-solib-absolute-prefix.exp
@@ -0,0 +1,39 @@
+# Copyright 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 "set-solib-absolute-prefix"
+set srcfile ${testfile}.c
+
+# It is necessary to verify if the binary is 32-bit, so that the system
+# call `__kernel_vsyscall' originates from vDSO.
+
+if { ![is_ilp32_target] } {
+ return -1
+}
+
+if { [prepare_for_testing $testfile.exp $testfile $srcfile] } {
+ return -1
+}
+
+if { ![runto_main] } {
+ return -1
+}
+
+gdb_test "continue" "Program received signal SIGABRT, Aborted.*" \
+ "continue until abort"
+gdb_test "set solib-absolute-prefix /BOGUS_DIRECT" \
+ ".*warning: Unable to find dynamic linker breakpoint function.*" \
+ "set solib-absolute-prefix"
+gdb_test "bt" "__kernel_vsyscall.*" "backtrace with __kernel_vsyscall"

View File

@ -0,0 +1,170 @@
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-rhbz1007614-memleak-infpy_read_memory-test.patch
;; Fix 'memory leak in infpy_read_memory()' (RH BZ 1007614)
;;=fedoratest
Original message by Tom Tromey:
<https://sourceware.org/ml/gdb-patches/2012-03/msg00955.html>
Message-ID: <871uoc1va3.fsf@fleche.redhat.com>
Comment from Sergio Durigan Junior:
In order to correctly test this patch, I wrote a testcase based on Jan
Kratochvil's <gdb/testsuite/gdb.base/gcore-excessive-memory.exp>. The
testcase, which can be seen below, tests GDB in order to see if the
amount of memory being leaked is minimal, as requested in the bugzilla.
It is hard to define what "minimum" is, so I ran the testcase on all
supported RHEL architectures and came up with an average.
commit cc0265cdda9dc7e8665e8bfcf5b4477489daf27c
Author: Tom Tromey <tromey@redhat.com>
Date: Wed Mar 28 17:38:08 2012 +0000
* python/py-inferior.c (infpy_read_memory): Remove cleanups and
explicitly free 'buffer' on exit paths. Decref 'membuf_object'
before returning.
diff --git a/gdb/testsuite/gdb.python/py-gdb-rhbz1007614-memleak-infpy_read_memory.c b/gdb/testsuite/gdb.python/py-gdb-rhbz1007614-memleak-infpy_read_memory.c
new file mode 100644
--- /dev/null
+++ b/gdb/testsuite/gdb.python/py-gdb-rhbz1007614-memleak-infpy_read_memory.c
@@ -0,0 +1,27 @@
+/* This testcase is part of GDB, the GNU debugger.
+
+ Copyright 2014 Free Software Foundation, Inc.
+
+ This program is free software; you can redistribute it and/or modify
+ it under the terms of the GNU General Public License as published by
+ the Free Software Foundation; either version 3 of the License, or
+ (at your option) any later version.
+
+ This program is distributed in the hope that it will be useful,
+ but WITHOUT ANY WARRANTY; without even the implied warranty of
+ MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
+ GNU General Public License for more details.
+
+ You should have received a copy of the GNU General Public License
+ along with this program. If not, see <http://www.gnu.org/licenses/>. */
+
+static struct x
+ {
+ char unsigned u[4096];
+ } x, *px = &x;
+
+int
+main (int argc, char *argv[])
+{
+ return 0;
+}
diff --git a/gdb/testsuite/gdb.python/py-gdb-rhbz1007614-memleak-infpy_read_memory.exp b/gdb/testsuite/gdb.python/py-gdb-rhbz1007614-memleak-infpy_read_memory.exp
new file mode 100644
--- /dev/null
+++ b/gdb/testsuite/gdb.python/py-gdb-rhbz1007614-memleak-infpy_read_memory.exp
@@ -0,0 +1,68 @@
+# Copyright 2014 Free Software Foundation, Inc.
+
+# This program is free software; you can redistribute it and/or modify
+# it under the terms of the GNU General Public License as published by
+# the Free Software Foundation; either version 3 of the License, or
+# (at your option) any later version.
+#
+# This program is distributed in the hope that it will be useful,
+# but WITHOUT ANY WARRANTY; without even the implied warranty of
+# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
+# GNU General Public License for more details.
+#
+# You should have received a copy of the GNU General Public License
+# along with this program. If not, see <http://www.gnu.org/licenses/>.
+
+set testfile py-gdb-rhbz1007614-memleak-infpy_read_memory
+set srcfile ${testfile}.c
+set binfile [standard_output_file ${testfile}]
+
+if { [prepare_for_testing ${testfile}.exp ${testfile} ${srcfile}] } {
+ return -1
+}
+
+if { [skip_python_tests] } { continue }
+
+set pid_of_gdb [exp_pid -i [board_info host fileid]]
+
+proc memory_v_pages_get {} {
+ global pid_of_gdb
+ set fd [open "/proc/$pid_of_gdb/statm"]
+ gets $fd line
+ close $fd
+ # number of pages of virtual memory
+ scan $line "%d" drs
+ return $drs
+}
+
+if { ![runto_main] } {
+ untested $testfile.exp
+ return -1
+}
+
+set remote_python_file [remote_download host ${srcdir}/${subdir}/${testfile}.py]
+
+gdb_test "source ${remote_python_file}" ""
+
+gdb_test "hello-world" ""
+
+set kbytes_before [memory_v_pages_get]
+verbose -log "kbytes_before = $kbytes_before"
+
+gdb_test "hello-world" ""
+
+set kbytes_after [memory_v_pages_get]
+verbose -log "kbytes_after = $kbytes_after"
+
+set kbytes_diff [expr $kbytes_after - $kbytes_before]
+verbose -log "kbytes_diff = $kbytes_diff"
+
+# The value "1000" was calculated by running a few GDB sessions with this
+# testcase, and seeing how much (in average) the memory consumption
+# increased after the "hello-world" command issued above. The average
+# was around 500 bytes, so I chose 1000 as a high estimate.
+if { $kbytes_diff > 1000 } {
+ fail "there is a memory leak on GDB (RHBZ 1007614)"
+} else {
+ pass "there is not a memory leak on GDB (RHBZ 1007614)"
+}
diff --git a/gdb/testsuite/gdb.python/py-gdb-rhbz1007614-memleak-infpy_read_memory.py b/gdb/testsuite/gdb.python/py-gdb-rhbz1007614-memleak-infpy_read_memory.py
new file mode 100644
--- /dev/null
+++ b/gdb/testsuite/gdb.python/py-gdb-rhbz1007614-memleak-infpy_read_memory.py
@@ -0,0 +1,30 @@
+# Copyright (C) 2014 Free Software Foundation, Inc.
+
+# This program is free software; you can redistribute it and/or modify
+# it under the terms of the GNU General Public License as published by
+# the Free Software Foundation; either version 3 of the License, or
+# (at your option) any later version.
+#
+# This program is distributed in the hope that it will be useful,
+# but WITHOUT ANY WARRANTY; without even the implied warranty of
+# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
+# GNU General Public License for more details.
+#
+# You should have received a copy of the GNU General Public License
+# along with this program. If not, see <http://www.gnu.org/licenses/>.
+
+class HelloWorld (gdb.Command):
+ """Greet the whole world."""
+
+ def __init__ (self):
+ super (HelloWorld, self).__init__ ("hello-world",
+ gdb.COMMAND_OBSCURE)
+
+ def invoke (self, arg, from_tty):
+ px = gdb.parse_and_eval("px")
+ core = gdb.inferiors()[0]
+ for i in range(256 * 1024):
+ chunk = core.read_memory(px, 4096)
+ print "Hello, World!"
+
+HelloWorld ()

View File

@ -0,0 +1,235 @@
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-rhbz1084404-ppc64-s390x-wrong-prologue-skip-O2-g-3of3.patch
;; Fix '[ppc64] and [s390x] wrong prologue skip on -O2 -g code' (Jan
;; Kratochvil, RH BZ 1084404).
;;=fedoratest
These testcases have been created by compiling glibc-2.17-78 on
RHEL-7.1 s390x/ppc64 boxes, and then taking the "select.o" file
present at $builddir/misc/select.o.
diff --git a/gdb/testsuite/gdb.arch/ppc64-prologue-skip.exp b/gdb/testsuite/gdb.arch/ppc64-prologue-skip.exp
new file mode 100644
--- /dev/null
+++ b/gdb/testsuite/gdb.arch/ppc64-prologue-skip.exp
@@ -0,0 +1,34 @@
+# Copyright 2015 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/>.
+
+if { ![istarget powerpc64-*linux-*] || ![is_lp64_target] } {
+ verbose "Skipping ppc64-prologue-skip.exp"
+ return
+}
+
+set testfile "ppc64-prologue-skip"
+set uufile "${srcdir}/${subdir}/${testfile}.o.uu"
+set ofile "${srcdir}/${subdir}/${testfile}.o"
+
+if { [catch "system \"uudecode -o ${ofile} ${uufile}\"" ] != 0 } {
+ untested "failed uudecode"
+ return -1
+}
+
+gdb_exit
+gdb_start
+gdb_load $ofile
+
+gdb_test "break ___newselect_nocancel" "Breakpoint $decimal at 0xc: file ../sysdeps/unix/syscall-template.S, line 81." "breakpoint on ___newselect_nocancel"
diff --git a/gdb/testsuite/gdb.arch/ppc64-prologue-skip.o.uu b/gdb/testsuite/gdb.arch/ppc64-prologue-skip.o.uu
new file mode 100644
--- /dev/null
+++ b/gdb/testsuite/gdb.arch/ppc64-prologue-skip.o.uu
@@ -0,0 +1,70 @@
+begin 644 ppc64-skip-prologue.o.uu
+M?T5,1@("`0`````````````!`!4````!````````````````````````````
+M``-(``````!```````!``!0`$8%-B-`L"@``0,(`-#@``(Y$```"3.,`('P(
+M`J;X`0`0^"'_D4@```%@````Z`$`@#@A`'!\"`.F3H``(/@A_X%]*`*F^2$`
+MD/CA`-#XP0#(^*$`P/B!`+CX80"P2````6````#X80!PZ.$`T.C!`,CHH0#`
+MZ($`N.AA`+`X``".1````GP``";X80!X^`$`B.AA`'!(```!8````.DA`)#H
+M`0"(Z&$`>'TH`Z9\#_$@."$`@$SC`"!+__]@```````,($``````````O``(
+M7U]S96QE8W0```````````````````````````!6``(````Y!`'[#@T``0$!
+M`0````$```$N+B]S>7-D97!S+W5N:7@``'-Y<V-A;&PM=&5M<&QA=&4N4P`!
+M``````D"```````````#T``!`BT3`@D``0$```"/``(`````"`$`````````
+M`````````````````"XN+W-Y<V1E<',O=6YI>"]S>7-C86QL+71E;7!L871E
+M+E,`+W)O;W0O9VQI8F,O9VQI8F,M,BXQ-RTW."YE;#<N<W)C+V=L:6)C+3(N
+M,3<M8S<U.&$V.#8O;6ES8P!'3E4@05,@,BXR,RXU,BXP+C$`@`$!$0`0!A$!
+M$@$#"!L()0@3!0`````````````````L``(`````"```````````````````
+M````````V``````````````````````````0``````%Z4@`$>$$!&PP!````
+M`#`````8`````````+P`20YP$4%^1`X`009!0@Z``4(107Y2$49_20X`!D$&
+M1@``````+G-Y;71A8@`N<W1R=&%B`"YS:'-T<G1A8@`N<F5L82YT97AT`"YD
+M871A`"YB<W,`+G)E;&$N;W!D`"YN;W1E+D=.52US=&%C:P`N<F5L82YD96)U
+M9U]L:6YE`"YR96QA+F1E8G5G7VEN9F\`+F1E8G5G7V%B8G)E=@`N<F5L82YD
+M96)U9U]A<F%N9V5S`"YR96QA+F5H7V9R86UE````````````````````````
+M````````````````````````````````````````````````````````````
+M`````````"`````!``````````8```````````````````!``````````-@`
+M```````````````````$```````````````;````!```````````````````
+M```````````*>`````````!(````$@````$`````````"``````````8````
+M)@````$``````````P```````````````````1@`````````````````````
+M``````````$``````````````"P````(``````````,`````````````````
+M``$8```````````````````````````````!```````````````V`````0``
+M```````#```````````````````!&``````````0````````````````````
+M"```````````````,0````0`````````````````````````````"L``````
+M````,````!(````%``````````@`````````&````#L````!````````````
+M``````````````````$H```````````````````````````````!````````
+M``````!0`````0`````````````````````````````!*`````````!:````
+M`````````````````0``````````````2P````0`````````````````````
+M````````"O``````````&````!(````(``````````@`````````&````&$`
+M```!``````````````````````````````&"`````````),`````````````
+M```````!``````````````!<````!``````````````````````````````+
+M"`````````!@````$@````H`````````"``````````8````;0````$`````
+M`````````````````````````A4`````````%`````````````````````$`
+M`````````````(`````!``````````````````````````````(P````````
+M`#`````````````````````0``````````````![````!```````````````
+M```````````````+:``````````P````$@````T`````````"``````````8
+M````E`````$``````````@```````````````````F``````````2```````
+M``````````````@``````````````(\````$````````````````````````
+M``````N8`````````!@````2````#P`````````(`````````!@````1````
+M`P`````````````````````````````"J`````````">````````````````
+M`````0```````````````0````(`````````````````````````````"$@`
+M```````!L````!,````+``````````@`````````&`````D````#````````
+M``````````````````````GX`````````'H````````````````````!````
+M`````````````````````````````````````````````P```0``````````
+M`````````````````P```P```````````````````````````P``!```````
+M`````````````````````P``!0```````````````````````````P``"@``
+M`````````````````````````P``#````````````````````````````P``
+M"````````````````````````````P``#0``````````````````````````
+M`P``#P```````````````````````````P``!P``````````````````````
+M```!$@``!0```````````````````-@````*$@```0`````````,````````
+M`#`````@$``````````````````````````````P$```````````````````
+M``````````!*$`````````````````````````````!E(@``!0``````````
+M`````````-@```!S(@``!0```````````````````-@`7U]S96QE8W0`7U]?
+M;F5W<V5L96-T7VYO8V%N8V5L`%]?<WES8V%L;%]E<G)O<@!?7VQI8F-?96YA
+M8FQE7V%S>6YC8V%N8V5L`%]?;&EB8U]D:7-A8FQE7V%S>6YC8V%N8V5L`%]?
+M;&EB8U]S96QE8W0`<V5L96-T```````````````````D````#0````H`````
+M``````````````!<````#@````H```````````````````"4````#P````H`
+M`````````````````````````0```"8````````````````````(````````
+M`#,```````````````````!&`````0```"8````````````````````&````
+M!@````$````````````````````,````!P````$````````````````````0
+M`````0```"8````````````````````8`````0```"8`````````V```````
+M```&````!0````$````````````````````0`````0```"8`````````````
+6```````<`````0```!H`````````````
+`
+end
diff --git a/gdb/testsuite/gdb.arch/s390x-prologue-skip.exp b/gdb/testsuite/gdb.arch/s390x-prologue-skip.exp
new file mode 100644
--- /dev/null
+++ b/gdb/testsuite/gdb.arch/s390x-prologue-skip.exp
@@ -0,0 +1,34 @@
+# Copyright 2015 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/>.
+
+if { ![istarget s390x-*linux-*] || ![is_lp64_target] } {
+ verbose "Skipping s390x-prologue-skip.exp"
+ return
+}
+
+set testfile "s390x-prologue-skip"
+set uufile "${srcdir}/${subdir}/${testfile}.o.uu"
+set ofile "${srcdir}/${subdir}/${testfile}.o"
+
+if { [catch "system \"uudecode -o ${ofile} ${uufile}\"" ] != 0 } {
+ untested "failed uudecode"
+ return -1
+}
+
+gdb_exit
+gdb_start
+gdb_load $ofile
+
+gdb_test "break select" "Breakpoint $decimal at 0x48: file ../sysdeps/unix/syscall-template.S, line 81." "breakpoint on select"
diff --git a/gdb/testsuite/gdb.arch/s390x-prologue-skip.o.uu b/gdb/testsuite/gdb.arch/s390x-prologue-skip.o.uu
new file mode 100644
--- /dev/null
+++ b/gdb/testsuite/gdb.arch/s390x-prologue-skip.o.uu
@@ -0,0 +1,64 @@
+begin 644 s390x-prologue-skip.o.uu
+M?T5,1@("`0`````````````!`!8````!````````````````````````````
+M``+```````!```````!``!(`#^LE\!``).O?\&@`)+D$`.^G^_]@X^#P```D
+MP.4`````N00``NLE\+``!`J.N00`TKD$`"#`Y0````"Y!``MZ]_Q"``$I_0`
+M"L`0`````+\/$`"G=/_7"HZG2?`!N2$`),"T``````?^````5@`"````.0$!
+M^PX-``$!`0$````!```!+BXO<WES9&5P<R]U;FEX``!S>7-C86QL+71E;7!L
+M871E+E,``0`````)`@```````````]```0)F$P("``$!````CP`"``````@!
+M```````````````````````````N+B]S>7-D97!S+W5N:7@O<WES8V%L;"UT
+M96UP;&%T92Y3`"]R;V]T+V=L:6)C+V=L:6)C+3(N,3<M-S@N96PW+G-R8R]G
+M;&EB8RTR+C$W+6,W-3AA-C@V+VUI<V,`1TY5($%3(#(N,C,N-3(N,"XQ`(`!
+M`1$`$`81`1(!`P@;""4($P4`````````````````+``"``````@`````````
+M`````````````````&@`````````````````````````%``````!>E(``7@.
+M`1L,#Z`!````````&````!P`````````1`!,CP6.!HT'2`[``@```!`````X
+M`````````"```````"YS>6UT86(`+G-T<G1A8@`N<VAS=')T86(`+G)E;&$N
+M=&5X=``N9&%T80`N8G-S`"YN;W1E+D=.52US=&%C:P`N<F5L82YD96)U9U]L
+M:6YE`"YR96QA+F1E8G5G7VEN9F\`+F1E8G5G7V%B8G)E=@`N<F5L82YD96)U
+M9U]A<F%N9V5S`"YR96QA+F5H7V9R86UE````````````````````````````
+M````````````````````````````````````````````````````````````
+M````````(`````$`````````!@```````````````````$``````````:```
+M``````````````````0``````````````!L````$````````````````````
+M``````````F``````````&`````0`````0`````````(`````````!@````F
+M`````0`````````#````````````````````J```````````````````````
+M````````!```````````````+`````@``````````P``````````````````
+M`*@```````````````````````````````0``````````````#$````!````
+M``````````````````````````"H```````````````````````````````!
+M``````````````!&`````0``````````````````````````````J```````
+M``!:`````````````````````0``````````````00````0`````````````
+M````````````````">``````````&````!`````&``````````@`````````
+M&````%<````!``````````````````````````````$"`````````),`````
+M```````````````!``````````````!2````!```````````````````````
+M```````)^`````````!@````$`````@`````````"``````````8````8P``
+M``$``````````````````````````````94`````````%```````````````
+M``````$``````````````'8````!``````````````````````````````&P
+M`````````#`````````````````````0``````````````!Q````!```````
+M```````````````````````*6``````````P````$`````L`````````"```
+M```````8````B@````$``````````@```````````````````>``````````
+M2`````````````````````@``````````````(4````$````````````````
+M``````````````J(`````````#`````0````#0`````````(`````````!@`
+M```1`````P`````````````````````````````"*`````````"4````````
+M`````````````0```````````````0````(`````````````````````````
+M````!T`````````!L````!$````*``````````@`````````&`````D````#
+M``````````````````````````````CP`````````(X`````````````````
+M```!`````````````````````````````````````````````````P```0``
+M`````````````````````````P```P```````````````````````````P``
+M!````````````````````````````P``"```````````````````````````
+M`P``"@```````````````````````````P``!@``````````````````````
+M`````P``"P```````````````````````````P``#0``````````````````
+M`````````P``!0`````````````````````````!$```````````````````
+M```````````;$``````````````````````````````V$@```0````````!(
+M`````````"`````_$`````````````````````````````!7$@```0``````
+M``!6`````````!````!I$`````````````````````````````!Y(@```0``
+M``````!(`````````"````"'(@```0````````!(`````````"``7U]L:6)C
+M7V5N86)L95]A<WEN8V-A;F-E;`!?7VQI8F-?9&ES86)L95]A<WEN8V-A;F-E
+M;`!?7W-E;&5C=`!?7VQI8F-?;75L=&EP;&5?=&AR96%D<P!?7W-E;&5C=%]N
+M;V-A;F-E;`!?7W-Y<V-A;&Q?97)R;W(`7U]L:6)C7W-E;&5C=`!S96QE8W0`
+M````````````'`````H````3``````````(`````````-@````L````3````
+M``````(`````````2@````T````3``````````(`````````8@````\````3
+M``````````(`````````1@````$````6````````````````````!@````4`
+M```$````````````````````#`````8````$````````````````````$```
+M``$````6````````````````````&`````$````6`````````&@`````````
+M!@````0````$````````````````````$`````$````6````````````````
+L````(`````$````%````````````````````/`````$````%`````````$@`
+`
+end

View File

@ -0,0 +1,123 @@
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-rhbz1149205-catch-syscall-after-fork-test.patch
;; Fix '`catch syscall' doesn't work for parent after `fork' is called'
;; (Philippe Waroquiers, RH BZ 1149205).
;;=fedoratest
URL: <https://sourceware.org/ml/gdb-patches/2013-05/msg00364.html>
Message-ID: <1368136582.30058.7.camel@soleil>
From: Philippe Waroquiers <philippe dot waroquiers at skynet dot be>
To: gdb-patches at sourceware dot org
Subject: RFA: fix gdb_assert caused by 'catch signal ...' and fork
Date: Thu, 09 May 2013 23:56:22 +0200
The attached patch fixes a gdb_assert caused by the combination of catch
signal and fork:
break-catch-sig.c:152: internal-error: signal_catchpoint_remove_location: Assertion `signal_catch_counts[iter] > 0' failed.
The problem is that the signal_catch_counts is decremented by detach_breakpoints.
The fix consists in not detaching breakpoint locations of type bp_loc_other.
The patch introduces a new test.
Comments by Sergio Durigan Junior:
I addded a specific testcase for this patch, which tests exactly the
issue that the customer is facing. This patch does not solve the
whole problem of catching a syscall and forking (for more details,
see <https://sourceware.org/bugzilla/show_bug.cgi?id=13457>,
specifically comment #3), but it solves the issue reported by the
customer.
I also removed the original testcase of this patch, because it
relied on "catch signal", which is a command that is not implemented
in this version of GDB.
commit bd9673a4ded96ea5c108601501c8e59003ea1be6
Author: Philippe Waroquiers <philippe@sourceware.org>
Date: Tue May 21 18:47:05 2013 +0000
Fix internal error caused by interaction between catch signal and fork
diff --git a/gdb/testsuite/gdb.base/gdb-rhbz1149205-catch-syscall-fork.c b/gdb/testsuite/gdb.base/gdb-rhbz1149205-catch-syscall-fork.c
new file mode 100644
--- /dev/null
+++ b/gdb/testsuite/gdb.base/gdb-rhbz1149205-catch-syscall-fork.c
@@ -0,0 +1,11 @@
+#include <stdio.h>
+#include <unistd.h>
+
+int
+main (int argc, char **argv)
+{
+ if (fork () == 0)
+ sleep (1);
+ chdir (".");
+ return 0;
+}
diff --git a/gdb/testsuite/gdb.base/gdb-rhbz1149205-catch-syscall-fork.exp b/gdb/testsuite/gdb.base/gdb-rhbz1149205-catch-syscall-fork.exp
new file mode 100644
--- /dev/null
+++ b/gdb/testsuite/gdb.base/gdb-rhbz1149205-catch-syscall-fork.exp
@@ -0,0 +1,58 @@
+# Copyright 2015 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/>.
+
+if { [is_remote target] || ![isnative] } then {
+ continue
+}
+
+set testfile "gdb-rhbz1149205-catch-syscall-fork"
+set srcfile ${testfile}.c
+set binfile [standard_output_file ${testfile}]
+
+# Until "catch syscall" is implemented on other targets...
+if {![istarget "hppa*-hp-hpux*"] && ![istarget "*-linux*"]} then {
+ continue
+}
+
+# This shall be updated whenever 'catch syscall' is implemented
+# on some architecture.
+#if { ![istarget "i\[34567\]86-*-linux*"]
+if { ![istarget "x86_64-*-linux*"] && ![istarget "i\[34567\]86-*-linux*"]
+ && ![istarget "powerpc-*-linux*"] && ![istarget "powerpc64-*-linux*"]
+ && ![istarget "sparc-*-linux*"] && ![istarget "sparc64-*-linux*"] } {
+ continue
+}
+
+if { [gdb_compile "${srcdir}/${subdir}/${srcfile}" "${binfile}" executable {debug}] != "" } {
+ untested ${testfile}.exp
+ return -1
+}
+
+gdb_exit
+gdb_start
+gdb_reinitialize_dir $srcdir/$subdir
+gdb_load $binfile
+
+if { ![runto_main] } {
+ return -1
+}
+
+gdb_test "catch syscall chdir" \
+ "Catchpoint $decimal \\\(syscall (.)?chdir(.)? \\\[$decimal\\\]\\\)" \
+ "catch syscall chdir"
+
+gdb_test "continue" \
+ "Continuing\.\r\n.*\r\nCatchpoint $decimal \\\(call to syscall .?chdir.?.*" \
+ "continue from catch syscall after fork"

View File

@ -0,0 +1,350 @@
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-rhbz1156192-recursive-dlopen-test.patch
;; Testcase for '[SAP] Recursive dlopen causes SAP HANA installer to
;; crash.' (RH BZ 1156192).
;;=fedoratest
diff --git a/gdb/testsuite/gdb.base/gdb-rhbz1156192-recursive-dlopen-libbar.c b/gdb/testsuite/gdb.base/gdb-rhbz1156192-recursive-dlopen-libbar.c
new file mode 100644
--- /dev/null
+++ b/gdb/testsuite/gdb.base/gdb-rhbz1156192-recursive-dlopen-libbar.c
@@ -0,0 +1,30 @@
+/* Testcase for recursive dlopen calls.
+
+ Copyright (C) 2014 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/>. */
+
+/* This test was copied from glibc's testcase called
+ <dlfcn/tst-rec-dlopen.c> and related files. */
+
+#include <stdio.h>
+#include <stdlib.h>
+
+void
+bar (void)
+{
+ printf ("Called bar.\n");
+}
diff --git a/gdb/testsuite/gdb.base/gdb-rhbz1156192-recursive-dlopen-libfoo.c b/gdb/testsuite/gdb.base/gdb-rhbz1156192-recursive-dlopen-libfoo.c
new file mode 100644
--- /dev/null
+++ b/gdb/testsuite/gdb.base/gdb-rhbz1156192-recursive-dlopen-libfoo.c
@@ -0,0 +1,30 @@
+/* Testcase for recursive dlopen calls.
+
+ Copyright (C) 2014 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/>. */
+
+/* This test was copied from glibc's testcase called
+ <dlfcn/tst-rec-dlopen.c> and related files. */
+
+#include <stdio.h>
+#include <stdlib.h>
+
+void
+foo (void)
+{
+ printf ("Called foo.\n");
+}
diff --git a/gdb/testsuite/gdb.base/gdb-rhbz1156192-recursive-dlopen.c b/gdb/testsuite/gdb.base/gdb-rhbz1156192-recursive-dlopen.c
new file mode 100644
--- /dev/null
+++ b/gdb/testsuite/gdb.base/gdb-rhbz1156192-recursive-dlopen.c
@@ -0,0 +1,124 @@
+/* Testcase for recursive dlopen calls.
+
+ Copyright (C) 2014 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/>. */
+
+/* This test was copied from glibc's testcase called
+ <dlfcn/tst-rec-dlopen.c> and related files. */
+
+#include <stdio.h>
+#include <stdlib.h>
+#include <malloc.h>
+#include <dlfcn.h>
+
+#define DSO "gdb-rhbz1156192-recursive-dlopen-libfoo.so"
+#define FUNC "foo"
+
+#define DSO1 "gdb-rhbz1156192-recursive-dlopen-libbar.so"
+#define FUNC1 "bar"
+
+/* Prototype for my hook. */
+void *custom_malloc_hook (size_t, const void *);
+
+/* Pointer to old malloc hooks. */
+void *(*old_malloc_hook) (size_t, const void *);
+
+/* Call function func_name in DSO dso_name via dlopen. */
+void
+call_func (const char *dso_name, const char *func_name)
+{
+ int ret;
+ void *dso;
+ void (*func) (void);
+ char *err;
+
+ /* Open the DSO. */
+ dso = dlopen (dso_name, RTLD_NOW|RTLD_GLOBAL);
+ if (dso == NULL)
+ {
+ err = dlerror ();
+ fprintf (stderr, "%s\n", err);
+ exit (1);
+ }
+ /* Clear any errors. */
+ dlerror ();
+
+ /* Lookup func. */
+ *(void **) (&func) = dlsym (dso, func_name);
+ if (func == NULL)
+ {
+ err = dlerror ();
+ if (err != NULL)
+ {
+ fprintf (stderr, "%s\n", err);
+ exit (1);
+ }
+ }
+ /* Call func twice. */
+ (*func) ();
+
+ /* Close the library and look for errors too. */
+ ret = dlclose (dso);
+ if (ret != 0)
+ {
+ err = dlerror ();
+ fprintf (stderr, "%s\n", err);
+ exit (1);
+ }
+
+}
+
+/* Empty hook that does nothing. */
+void *
+custom_malloc_hook (size_t size, const void *caller)
+{
+ void *result;
+ /* Restore old hooks. */
+ __malloc_hook = old_malloc_hook;
+ /* First call a function in another library via dlopen. */
+ call_func (DSO1, FUNC1);
+ /* Called recursively. */
+ result = malloc (size);
+ /* Restore new hooks. */
+ __malloc_hook = custom_malloc_hook;
+ return result;
+}
+
+int
+main (void)
+{
+
+ /* Save old hook. */
+ old_malloc_hook = __malloc_hook;
+ /* Install new hook. */
+ __malloc_hook = custom_malloc_hook;
+
+ /* Attempt to dlopen a shared library. This dlopen will
+ trigger an access to the ld.so.cache, and that in turn
+ will require a malloc to duplicate data in the cache.
+ The malloc will call our malloc hook which calls dlopen
+ recursively, and upon return of this dlopen the non-ref
+ counted ld.so.cache mapping will be unmapped. We will
+ return to the original dlopen and crash trying to access
+ dlopened data. */
+ call_func (DSO, FUNC);
+
+ /* Restore old hook. */
+ __malloc_hook = old_malloc_hook;
+
+ return 0;
+}
diff --git a/gdb/testsuite/gdb.base/gdb-rhbz1156192-recursive-dlopen.exp b/gdb/testsuite/gdb.base/gdb-rhbz1156192-recursive-dlopen.exp
new file mode 100644
--- /dev/null
+++ b/gdb/testsuite/gdb.base/gdb-rhbz1156192-recursive-dlopen.exp
@@ -0,0 +1,137 @@
+# Copyright 2014 Free Software Foundation, Inc.
+#
+# This program is free software; you can redistribute it and/or modify
+# it under the terms of the GNU General Public License as published by
+# the Free Software Foundation; either version 3 of the License, or
+# (at your option) any later version.
+#
+# This program is distributed in the hope that it will be useful,
+# but WITHOUT ANY WARRANTY; without even the implied warranty of
+# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
+# GNU General Public License for more details.
+#
+# You should have received a copy of the GNU General Public License
+# along with this program. If not, see <http://www.gnu.org/licenses/>.
+
+if { [skip_shlib_tests] } {
+ return 0
+}
+
+# Library foo
+set libname1 "gdb-rhbz1156192-recursive-dlopen-libfoo"
+set srcfile_lib1 ${srcdir}/${subdir}/${libname1}.c
+set binfile_lib1 [standard_output_file ${libname1}.so]
+# Library bar
+set libname2 "gdb-rhbz1156192-recursive-dlopen-libbar"
+set srcfile_lib2 ${srcdir}/${subdir}/${libname2}.c
+set binfile_lib2 [standard_output_file ${libname2}.so]
+
+set testfile "gdb-rhbz1156192-recursive-dlopen"
+set srcfile ${testfile}.c
+set executable ${testfile}
+set binfile [standard_output_file ${executable}]
+
+if { [gdb_compile_shlib ${srcfile_lib1} ${binfile_lib1} \
+ { debug "additional_flags=-fPIC" }] != "" } {
+ untested "Could not compile ${binfile_lib1}"
+ return -1
+}
+
+if { [gdb_compile_shlib ${srcfile_lib2} ${binfile_lib2} \
+ { debug "additional_flags=-fPIC" }] != "" } {
+ untested "Could not compile ${binfile_lib2}"
+ return -1
+}
+
+if { [prepare_for_testing ${testfile}.exp ${executable} ${srcfile} \
+ [ list debug shlib_load "additional_flags=-Wno-deprecated-declarations" ]] } {
+ untested "Could not compile ${executable}"
+ return -1
+}
+
+proc do_test { has_libfoo has_libbar } {
+ global hex binfile_lib2 binfile_lib1 gdb_prompt
+ set libbar_match "[string_to_regexp $binfile_lib2]"
+ set libfoo_match "[string_to_regexp $binfile_lib1]"
+
+ gdb_test_multiple "info shared" "info shared" {
+ -re ".*$libfoo_match\r\n.*$libbar_match\(\r\n.*Shared library is missing\)?.*\r\n${gdb_prompt} $" {
+ if { $has_libfoo && $has_libbar } {
+ pass "matched libfoo and libbar"
+ } else {
+ fail "matched libfoo and libbar (has_libfoo = $has_libfoo, has_libbar = $has_libbar)"
+ }
+ }
+ -re ".*$libfoo_match\(\r\n.*Shared library is missing\)?.*\r\n${gdb_prompt} $" {
+ if { $has_libfoo && !$has_libbar } {
+ pass "matched libfoo"
+ } else {
+ fail "matched libfoo (has_libfoo = $has_libfoo, has_libbar = $has_libbar)"
+ }
+ }
+ -re ".*$libbar_match\(\r\n.*Shared library is missing\)?.*\r\n${gdb_prompt} $" {
+ if { $has_libbar && !$has_libfoo } {
+ pass "matched libbar"
+ } else {
+ fail "matched libbar (has_libfoo = $has_libfoo, has_libbar = $has_libbar)"
+ }
+ }
+ "\r\n${gdb_prompt} $" {
+ if { !$has_libfoo && !$has_libbar } {
+ pass "did not match libfoo nor libbar"
+ } else {
+ fail "did not match libfoo nor libbar (has_libfoo = $has_libfoo, has_libbar = $has_libbar)"
+ }
+ }
+ }
+}
+
+proc test_stop_on_solib_events { } {
+ set pass 0
+ # This variable holds the information about whether libfoo and
+ # libbar (respectively) are expected in the "info shared" output.
+ set solib_event_order { { 0 0 } { 0 0 } { 0 0 } { 0 1 } \
+ { 0 1 } { 0 0 } { 0 0 } { 0 1 } \
+ { 0 1 } { 0 0 } { 0 0 } { 0 1 } \
+ { 0 1 } { 0 0 } { 0 0 1 } { 1 1 } \
+ { 1 1 } { 1 0 } { 1 0 } { 1 1 } \
+ { 1 1 } { 1 0 1 } { 1 0 } { 1 0 } }
+
+ with_test_prefix "stop-on-solib-events" {
+ gdb_test_no_output "set stop-on-solib-events 1" "setting stop-on-solib-events"
+
+ gdb_run_cmd
+ foreach l $solib_event_order {
+ incr pass
+ with_test_prefix "pass #$pass" {
+ set should_be_corrupted [expr 0+0[lindex $l 2]]
+ do_test [lindex $l 0] [lindex $l 1]
+ set test "continue"
+ global gdb_prompt
+ gdb_test_multiple $test $test {
+ -re "\r\nwarning: Corrupted shared library list:.*\r\nStopped due to shared library event.*\r\n$gdb_prompt $" {
+ set corrupted 1
+ pass $test
+ }
+ -re "\r\nStopped due to shared library event.*\r\n$gdb_prompt $" {
+ set corrupted 0
+ pass $test
+ }
+ }
+ set test "corrupted=$corrupted but should_be_corrupted=$should_be_corrupted"
+ if {$corrupted == $should_be_corrupted} {
+ pass $test
+ } else {
+ fail $test
+ }
+ }
+ }
+ # In the last pass we do not expect to see libfoo or libbar.
+ incr pass
+ with_test_prefix "pass #$pass" {
+ do_test 0 0
+ }
+ }
+}
+
+test_stop_on_solib_events

View File

@ -0,0 +1,135 @@
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-rhbz1186476-internal-error-unqualified-name-re-set-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
Comments from Sergio Durigan Junior:
The "proper" fix for this whole problem would be to backport the
"ambiguous linespec" patch series. However, it is really not
recommended to do that for RHEL GDB, because the patch series is too
big and could introduce unwanted regressions. Instead, what we
chose to do was to replace the gdb_assert call by a warning (which
allows the user to continue the debugging session), and tell the
user that, although more than one location was found for his/her
breakpoint, only one will be used.
diff --git a/gdb/testsuite/gdb.cp/gdb-rhbz1186476-internal-error-unqualified-name-re-set-main.cc b/gdb/testsuite/gdb.cp/gdb-rhbz1186476-internal-error-unqualified-name-re-set-main.cc
new file mode 100644
--- /dev/null
+++ b/gdb/testsuite/gdb.cp/gdb-rhbz1186476-internal-error-unqualified-name-re-set-main.cc
@@ -0,0 +1,22 @@
+/* This testcase is part of GDB, the GNU debugger.
+
+ Copyright 2015 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/>. */
+
+int
+main (int argc, char *argv[])
+{
+ return 0;
+}
diff --git a/gdb/testsuite/gdb.cp/gdb-rhbz1186476-internal-error-unqualified-name-re-set.cc b/gdb/testsuite/gdb.cp/gdb-rhbz1186476-internal-error-unqualified-name-re-set.cc
new file mode 100644
--- /dev/null
+++ b/gdb/testsuite/gdb.cp/gdb-rhbz1186476-internal-error-unqualified-name-re-set.cc
@@ -0,0 +1,26 @@
+/* This testcase is part of GDB, the GNU debugger.
+
+ Copyright 2015 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/>. */
+
+class C
+ {
+ public:
+ C () {}
+ C (int x) {}
+ };
+
+C a;
+C b (1);
diff --git a/gdb/testsuite/gdb.cp/gdb-rhbz1186476-internal-error-unqualified-name-re-set.exp b/gdb/testsuite/gdb.cp/gdb-rhbz1186476-internal-error-unqualified-name-re-set.exp
new file mode 100644
--- /dev/null
+++ b/gdb/testsuite/gdb.cp/gdb-rhbz1186476-internal-error-unqualified-name-re-set.exp
@@ -0,0 +1,51 @@
+# Copyright 2015 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/>.
+
+if { [skip_cplus_tests] } { continue }
+if { [skip_shlib_tests] } { continue }
+if { [is_remote target] } { continue }
+if { [target_info exists use_gdb_stub] } { continue }
+
+set testfile gdb-rhbz1186476-internal-error-unqualified-name-re-set-main
+set srcfile $testfile.cc
+set executable $testfile
+set binfile [standard_output_file $executable]
+
+set libtestfile gdb-rhbz1186476-internal-error-unqualified-name-re-set
+set libsrcfile $libtestfile.cc
+set sofile [standard_output_file lib$libtestfile.so]
+
+# Create and source the file that provides information about the compiler
+# used to compile the test case.
+if [get_compiler_info "c++"] {
+ return -1
+}
+
+if { [gdb_compile_shlib $srcdir/$subdir/$libsrcfile $sofile {debug c++ "additional_flags=-fPIC"}] != ""
+ || [gdb_compile $srcdir/$subdir/$srcfile $binfile executable [list additional_flags=-Wl,-rpath,[file dirname ${sofile}] "c++" shlib=${sofile} ]] != ""} {
+ untested $libtestfile.exp
+ return -1
+}
+
+clean_restart $executable
+
+gdb_test_no_output "set breakpoint pending on"
+# gdb_breakpoint would print a failure because of some warning messages
+gdb_test "break C::C" "Breakpoint $decimal \\(C::C\\) pending."
+
+#gdb_test "run" "warning: Found more than one location for breakpoint #$decimal; only the first location will be used.(\r\n)+Breakpoint $decimal, C::C.*"
+gdb_test "run"
+
+gdb_test "info break" " in C::C\\(\\) at .* in C::C\\(int\\) at .*"

View File

@ -0,0 +1,104 @@
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-rhbz1261564-aarch64-hw-watchpoint-test.patch
;; [aarch64] Fix hardware watchpoints (RH BZ 1261564).
;;=fedoratest
diff --git a/gdb/testsuite/gdb.base/rhbz1261564-aarch64-watchpoint.c b/gdb/testsuite/gdb.base/rhbz1261564-aarch64-watchpoint.c
new file mode 100644
--- /dev/null
+++ b/gdb/testsuite/gdb.base/rhbz1261564-aarch64-watchpoint.c
@@ -0,0 +1,33 @@
+/* This testcase is part of GDB, the GNU debugger.
+
+ 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/>. */
+
+__attribute__((aligned(16))) struct
+{
+ int var0, var4, var8;
+} aligned;
+
+int
+main (void)
+{
+ aligned.var0 = 1;
+ aligned.var4 = 2;
+ aligned.var8 = 3;
+
+ aligned.var4 = aligned.var0;
+
+ return 0;
+}
diff --git a/gdb/testsuite/gdb.base/rhbz1261564-aarch64-watchpoint.exp b/gdb/testsuite/gdb.base/rhbz1261564-aarch64-watchpoint.exp
new file mode 100644
--- /dev/null
+++ b/gdb/testsuite/gdb.base/rhbz1261564-aarch64-watchpoint.exp
@@ -0,0 +1,53 @@
+# Copyright (C) 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/>.
+
+if { [prepare_for_testing rhbz1261564-aarch64-watchpoint.exp "rhbz1261564-aarch64-watchpoint"] } {
+ return -1
+}
+
+if { ! [ runto main ] } then { return 0 }
+
+set test "rwatch aligned.var4"
+if [istarget "s390*-*-*"] {
+ gdb_test $test {Target does not support this type of hardware watchpoint\.}
+ untested "s390* does not support hw read watchpoint"
+ return
+}
+gdb_test $test "Hardware read watchpoint \[0-9\]+: aligned.var4"
+
+proc checkvar { address } {
+ global gdb_prompt
+
+ set test "p &aligned.var$address"
+ gdb_test_multiple $test $test {
+ -re " = \\(int \\*\\) 0x\[0-9a-f\]+$address <aligned(\\+\[0-9\]+)?>\r\n$gdb_prompt $" {
+ pass $test
+ }
+ -re "\r\n$gdb_prompt $" {
+ untested "$test (unexpected ELF layout)"
+ return 0
+ }
+ }
+ return 1
+}
+if ![checkvar "0"] { return }
+if ![checkvar "4"] { return }
+if ![checkvar "8"] { return }
+
+# Assumes: PPC_PTRACE_GETHWDBGINFO::data_bp_alignment == 8
+# 'lwz' does read only 4 bytes but the hw watchpoint is 8 bytes wide.
+setup_xfail "powerpc*-*-*"
+
+gdb_continue_to_end

View File

@ -0,0 +1,176 @@
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-rhbz1325795-framefilters-test.patch
;; New test for Python "Cannot locate object file for block" (for RH BZ 1325795).
;;=fedoratest
diff --git a/gdb/testsuite/gdb.python/py-framefilter-thread.c b/gdb/testsuite/gdb.python/py-framefilter-thread.c
new file mode 100644
--- /dev/null
+++ b/gdb/testsuite/gdb.python/py-framefilter-thread.c
@@ -0,0 +1,39 @@
+/* This testcase is part of GDB, the GNU debugger.
+
+ 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/>. */
+
+#include <pthread.h>
+#include <assert.h>
+
+static void *
+start (void *arg)
+{
+ return arg; /* Backtrace end breakpoint */
+}
+
+int
+main (void)
+{
+ pthread_t thread1;
+ int i;
+
+ i = pthread_create (&thread1, NULL, start, NULL);
+ assert (i == 0);
+ i = pthread_join (thread1, NULL);
+ assert (i == 0);
+
+ return 0;
+}
diff --git a/gdb/testsuite/gdb.python/py-framefilter-thread.exp b/gdb/testsuite/gdb.python/py-framefilter-thread.exp
new file mode 100644
--- /dev/null
+++ b/gdb/testsuite/gdb.python/py-framefilter-thread.exp
@@ -0,0 +1,54 @@
+# Copyright (C) 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/>.
+
+load_lib gdb-python.exp
+
+standard_testfile
+
+if {[prepare_for_testing $testfile.exp $testfile $srcfile {debug pthreads}]} {
+ return -1
+}
+
+# Skip all tests if Python scripting is not enabled.
+if { [skip_python_tests] } { continue }
+
+if ![runto_main] then {
+ return
+}
+gdb_test_no_output "set python print-stack full" \
+ "Set python print-stack to full"
+
+# Load global frame-filters
+set remote_python_file [remote_download host ${srcdir}/${subdir}/${testfile}.py]
+gdb_test_no_output "python exec (open ('${remote_python_file}').read ())" \
+ "Load python file"
+
+gdb_breakpoint [gdb_get_line_number "Backtrace end breakpoint"]
+gdb_continue_to_breakpoint "Backtrace end breakpoint"
+
+# #2 0x00007ffff75f228d in clone () at ../sysdeps/unix/sysv/linux/x86_64/clone.S:113^M
+gdb_test "bt no-filters" " in (\\.?_*clone|thread_start) \[^\r\n\]*" "bt no-filters"
+
+# #2 0x00007ffff75f228d in 941595343737041 () at ../sysdeps/unix/sysv/linux/x86_64/clone.S:113^M
+# vs.
+# #2 0x00007ffff75f228d in 941595343737041Traceback (most recent call last):
+# File "/home/jkratoch/redhat/rhel/gdb/rhel-7.3/gdb-7.6.1/gdb/testsuite/../data-directory/python/gdb/FrameDecorator.py", line 145, in frame_args
+# return self._base.frame_args()
+# File "/home/jkratoch/redhat/rhel/gdb/rhel-7.3/gdb-7.6.1/gdb/testsuite/../data-directory/python/gdb/FrameDecorator.py", line 152, in frame_args
+# return args.fetch_frame_args()
+# File "/home/jkratoch/redhat/rhel/gdb/rhel-7.3/gdb-7.6.1/gdb/testsuite/../data-directory/python/gdb/FrameDecorator.py", line 276, in fetch_frame_args
+# block = self.frame.block()
+# RuntimeError: Cannot locate object file for block.
+gdb_test "bt" " in \[0-9\]+ \[^\r\n\]*" "bt with filters"
diff --git a/gdb/testsuite/gdb.python/py-framefilter-thread.py b/gdb/testsuite/gdb.python/py-framefilter-thread.py
new file mode 100644
--- /dev/null
+++ b/gdb/testsuite/gdb.python/py-framefilter-thread.py
@@ -0,0 +1,60 @@
+# Copyright (C) 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. It tests Python-based
+# frame-filters.
+
+# This test is specifically crafted for RH BZ 1197665.
+
+import gdb
+import itertools
+from gdb.FrameDecorator import FrameDecorator
+import copy
+
+class Reverse_Function (FrameDecorator):
+
+ def __init__(self, fobj):
+ super(Reverse_Function, self).__init__(fobj)
+ self.fobj = fobj
+
+ def function (self):
+ # This function call should not fail.
+ gdb.target_charset ()
+
+ fname = str (self.fobj.function())
+ if (fname == None or fname == ""):
+ return None
+ else:
+ fname = fname[::-1]
+ return fname
+
+class FrameFilter ():
+
+ def __init__ (self):
+ self.name = "Reverse"
+ self.priority = 100
+ self.enabled = True
+ gdb.frame_filters [self.name] = self
+
+ def filter (self, frame_iter):
+ # Python 3.x moved the itertools.imap functionality to map(),
+ # so check if it is available.
+ if hasattr(itertools, "imap"):
+ frame_iter = itertools.imap (Reverse_Function, frame_iter)
+ else:
+ frame_iter = map (Reverse_Function, frame_iter)
+ return frame_iter
+
+FrameFilter()

View File

@ -0,0 +1,81 @@
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-rhbz1350436-type-printers-error.patch
;; Test 'info type-printers' Python error (RH BZ 1350436).
;;=fedoratest
Typo in Python support breaks info type-printers command
https://bugzilla.redhat.com/show_bug.cgi?id=1350436
[testsuite patch] PR python/17136: 'info type-printers' causes an exception when there are per-objfile printers
https://sourceware.org/ml/gdb-patches/2016-06/msg00455.html
diff --git a/gdb/testsuite/gdb.python/py-typeprint.cc b/gdb/testsuite/gdb.python/py-typeprint.cc
--- a/gdb/testsuite/gdb.python/py-typeprint.cc
+++ b/gdb/testsuite/gdb.python/py-typeprint.cc
@@ -31,6 +31,12 @@ templ<basic_string> s;
basic_string bs;
+class Other
+{
+};
+
+Other ovar;
+
int main()
{
return 0;
diff --git a/gdb/testsuite/gdb.python/py-typeprint.exp b/gdb/testsuite/gdb.python/py-typeprint.exp
--- a/gdb/testsuite/gdb.python/py-typeprint.exp
+++ b/gdb/testsuite/gdb.python/py-typeprint.exp
@@ -50,3 +50,7 @@ gdb_test_no_output "enable type-printer string"
gdb_test "whatis bs" "string" "whatis with enabled printer"
gdb_test "whatis s" "templ<string>"
+
+gdb_test "info type-printers" "Type printers for \[^\r\n\]*/py-typeprint:\r\n *other\r\n.*" \
+ "info type-printers for other"
+gdb_test "whatis ovar" "type = Another"
diff --git a/gdb/testsuite/gdb.python/py-typeprint.py b/gdb/testsuite/gdb.python/py-typeprint.py
--- a/gdb/testsuite/gdb.python/py-typeprint.py
+++ b/gdb/testsuite/gdb.python/py-typeprint.py
@@ -15,7 +15,7 @@
import gdb
-class Recognizer(object):
+class StringRecognizer(object):
def __init__(self):
self.enabled = True
@@ -30,6 +30,26 @@ class StringTypePrinter(object):
self.enabled = True
def instantiate(self):
- return Recognizer()
+ return StringRecognizer()
gdb.type_printers.append(StringTypePrinter())
+
+class OtherRecognizer(object):
+ def __init__(self):
+ self.enabled = True
+
+ def recognize(self, type_obj):
+ if type_obj.tag == 'Other':
+ return 'Another'
+ return None
+
+class OtherTypePrinter(object):
+ def __init__(self):
+ self.name = 'other'
+ self.enabled = True
+
+ def instantiate(self):
+ return OtherRecognizer()
+
+import gdb.types
+gdb.types.register_type_printer(gdb.objfiles()[0], OtherTypePrinter())

View File

@ -0,0 +1,454 @@
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-rhbz1398387-tab-crash-test.patch
;; New testcase for: Fix <tab>-completion crash (Gary Benson, RH BZ 1398387).
;;=fedoratest
diff --git a/gdb/testsuite/gdb.base/tab-crash.bz2.uu b/gdb/testsuite/gdb.base/tab-crash.bz2.uu
new file mode 100644
--- /dev/null
+++ b/gdb/testsuite/gdb.base/tab-crash.bz2.uu
@@ -0,0 +1,393 @@
+begin 644 /tmp/libgcc_s-6.3.1-20161221.so.1-objcopyR.debug.bz2
+M0EIH.3%!6293622@"44`>Q=_____________________________________
+M________X#\<>SD#OM[7/HAP:R]\H#D"=!/";NP7!]OOJG>U[N;WW'KVV?9I
+M[[,[X.\/;%2U``[[NUM7P^T[U617V#12M]6M7W;M7CZU<=!]/8WL[LI=AZZ>
+MJ5XW;QP]W<NQW8Q539B5-[UA8``:HSG=SF*R#=AT#0`'+3D>]DVHY@]/6RS=
+M8[:2][W/<YN3<[=[S=37NY[=X&IH@)H"8$T```3$U-@)@F)B,(TT:-#$T9``
+M`3`!H-`*G^BGB,$--4]E,R-"9JGL4V)J;*>F01Z:GIID,IC$GHU-HR$:@T0F
+M@$PC($P"`$PF)D9-&IZFCT-4\$TRI^330-$TR>32>FFF@F!H0GJ>TD_*9!E,
+MR3Q3/11M-,%#T-3:-3T9(P-3T3TT@;1ZD>C1E,AM0:`@@303"`(Q*>FGHU)Z
+MGDFR8FFJ'L5/1C313R3U/*?JF]&35-J!Y3U/TI^1$\IZGFBGJ>HVF4>H])ZA
+MZC)ZFT)H>IH]0>H!H&RC0,F0T9E!HT-`TT`)-1(A$R&J?J3T80]313\F0GHC
+MU3:90\H]$]3:C93U-!LH\IIZ$]0R>:D>329J--`/4_5'I-`TT9#3U!ZC0>H#
+M0])H!H9!Z@#30VH#30-/4T'J`]09%$!4\)A3R,-1'J`S2#0--,$:/$C9-3TG
+MH:FR9-(T>D\4],HT'I`/4`>HVFIIZFR:FR:)Y,3*/3*;"FT:(VIYJC:FF)Z:
+MCTFAIZCTAH:#U!F*")1`0!`"9#4Q-,FT(R33R-4VFE/U&TU-3RGZ1FJ>&H]2
+M;U38GJ-J3TQ0Q'DU-'J?JF]2&30-'J:>H,FC1HWJ@#RFC0!Z#2-/4T&&4T-/
+M2:&(>D'J,5#"1JH5B["KJTH:1R2I95!0TXN8+PQ'&*+8%8JVQCC/1G1D0A-S
+M<I944!D8K(C"*`I!((H+`S?O/"O^MIFA>91MLJJLK];M*G>^]MGIW=W7E>KL
+M)MXKMO7VV\M77ANM3H=6LGI)+AR&CF'#<66)4&4S6:;*26:S5DUQGS$+>97<
+M!3.,U$LQELITU,X3Y5[GW>0?IM4(5>Z!^AE04E8=:H(X[7T$U.`@QRT\Z]_"
+M7?`4-8Q_UDP"AQ@$1,B`G(D*S"^7Z%ABZ-%T<L]#FC8#-<VF6>6MS+#&8M+G
+M)M>_Y9ME3-K"RMO>,UK^9/4HYU5!3:6'45^1-AA23JG7FH&=KT9ZK-!6>?\-
+M;_HD;$V3C,[X\-20B*R?`.(:CK$3A&J2!XYI6TW[U*HI*560[F!42LB.:FO9
+MT2S-`KC"H/^S^JJFC(54?*/HIBKH,!73^2++62,G98Y/*,\,%R,Y08$R@$&L
+MC#"P#E53*YTZS&>L\]4*"<8&2^]*I?02,46;3.V(P+2P`3$>F+HNTY/(%Z<`
+MM.P&I]6,N<YQ5QZL0]B&[?*?757VV"$MA$PU!CM3C:=M[)14&\?,W,8G`:_Z
+M:"!X2U%Y27M:ALSP\;:NN/-<%#.J9]653UK^E@@[&^NWC27B&%J9M[R6M)90
+M1]AC4PE2-+_V#SBBFMO=0D\:GY]-F<'UYQ"RKVHV>ED[M1J4`O?!J@8`&>?1
+M%!8/]>.7UF-'?ZO,O??);\\L:3X7JN-O^ZWAPV:'ONI*N$I2REEE+$\Q47N6
+M)NB0W\O.LZ)TMD[9VG1NS+?94@_.$$=!P2#U2(8;*%.99OOW:1@#`W]ZV:OR
+M1IW<Y\T_[@G!L<&-V&1="[W(M!N9R^OOH?0``<D1CT)A(*L^:&H=+.^+:/]'
+M04%%.SW-\#;`53:0[GC?<_OK4%3=]'?\H^U4`^9^I>EL,R4\*2Y2^>SP[^QB
+M_,U-)GY3;9KT/P=<O3?SAWG$AXK@0I)`(AD(`)"("Z>Q.GX.7G"Q:>QK&9"$
+M[#-J-&>2W>*T.XDRFC(,4I`"ED(D0(($(R0#&6;D6H(.:&R(R,:JBHZ!54G<
+M11T9V@K&&$`@8+T3IN#,:<5@P(RTBD1%(JP%55$2*#^!4E,%ER22`*-**JU6
+MJZII6%N>*+(`*J_?LDI@")%A1D1`@0D?O:UXU=+B+/%.C.3P3935G@9N(=B(
+M39SA1$,K(<1`/."P@;M&4XI&*(9N(H[,#92F)PFDD,V:<P:&CI-74Y(%5G9Q
+M.;&CNT9/.(D(0E-%1E-38298NLWC1:8#&:TRBD72U("/%-3!D/9BWJ:]FM#)
+M2L@[*@&EK:079)8-B@%&PML&Q0"QSC<@!>;%@V(`6%EHV(`6$+T`+00*I0;U
+M`+6F`+<5+:@OPH!:+<%V-Y:H6@0ST6@@$DQO&U0"]M7&.2N,;AN4`HP8H!<7
+MT;QP4`N;A(R`&`P88BZ-&+V-:04?;20GS/LL>$_B,!&RT)$%@$(*)!"$E!7/
+M#&8("!8N/9=K.,FB'MY.._/VD>C9#^`XS.XJ/S:XR1TI^MMN1AER0/FI,QI<
+MI!S/-3&8!4S2B>DK$=5/`G2Z><=$L7)SB`(%.`?MXB?J?H_!K]]%1:Q0>>D5
+M@*,0!$21@`8Q[N?N_7_H;4[#S/![4O,^[NUOC?7F"'Z'YMMYO*;_)-<!Z[TG
+MI*)=+?,[8F8#>K^K9([W=II7_32_/>'@"M-U3'I3>\5F/7!,>LN:H3*N!L;;
+M")']UU7>>-S\,?K65#!/&(542)(!76C2F<92T@@7G-NX#D][M'6*;YS)AF7<
+M!W7=#3Y1,RGT_`:&!`EU8>JEM/&<Z=3T%4V1[G3DVDH\X<(1KVY(YKFX4,W#
+M@OCO$:6B8^HAC+,.^S`V.CG>JEI"+[5?4O\_]DT0",,XH95*#$@#=L,AO4L+
+M1BB(3Q$X?C1IAS!$AY.>_%4]AI=*'&F6&\>U;\YG,QV14-HP9\BY30H/3].G
+MTW36AQ.N"4&8U(-$CSEJ:IAKE6J,KC=.U9$\H:1I/5!WK37"2WTTCL+"6YJD
+MVV8?W_`MAI=@)]J^U-YAOBS;:'(S4SPBJP))LEQ'+GK;<]US[@5VN)U.SEI]
+M@B6(>WE8&UNN(Z_Y^_U`>?=I<YH<:Y7@Z9C$)>*[4=\'V/"\YOXXU=RH7$2P
+MZ8AP5/2</TOZ\C(9=&&[AG/8E@*VB@8L:0:5=Y66\X2D.7TV9:?@;+B>@#F"
+M^(R"5",K@5=:R=P=>/%\_!=LCS0>*ISX$*;G?\$9(P-<"734Z=7:V/E#,EJ3
+MR#)DN].):$0+S";E13Q8UADO"%],GD)5UBLW<J)YR".E/J3J`^PF6,0SG-%0
+M"7N9K0*D#I.`[B%7`^)[%EN<\.D]+[$>UDCN34&A3.I3U+69_K:PL#9:%6F)
+M[AU5/05TLKLJ2*QB0,US:"U%(#G!9N81MN&'7T1O*J^]%%^#HV->-]LNGN*=
+M"C%H8>WG7$,^&0"244E4:#V6Y!289:<&E<<-ZGKH1[>$BW"MUU,#SL;,,),V
+M565B6/E!Z,H8E#]WD=(P%@X(,/C7GD<S]$14+$KE2?!'&@4#"J4DUM@S<>0D
+MP-:,NZ$0>8GQY;JN=^^\XXXN0&5=W>Z5]AZ1HYC%E&S'8*.!D@5[<8]"EYC)
+M7*.I"&7-3RH1V#K4>$VO7@MZ*G*`]>M6049!<IIHH&:*@U..`8SPN9NZ/@W$
+M&,^",8M/J#@-9F,F35FU[UMWUZ`A^/!1>\$(C%$3O$(">"B@IT'Y=.=H)`'G
+MP?T,;OF2.6;FQ;,.#Y<(PT)/0+73.OI!]&#-""F<TJ>[4ST51A!FJDN2B3PA
+MCB(Q@J)!V14/5@R7:FG%FN\:RY!,K%<CRJ)2E'H':71::U+B9EZ&^[QA"$(6
+MW[UV*8E.$)YLMO(SQ!W:VB68:T<\[J:GE`^T,VO'GU:)Q<37E7%6&7=6*0:C
+M130555L1[```B"D1'L4)04H@+`D`!*40I2""85*?;,!0/,ML%:I2GZ7JOT_^
+M__JGX^`88*"^A2B!("$DD)-JTBB*)!&01619$18(D%1(C(BL!EM046+$148*
+MB0448@JBJK$4L`JZA/-TU(2O62'UK"RTDD#%#32HU54TJU&$I.=`:'<L4M&Z
+M#3XD##Y(;+O*'P?O/*L$0M7X4(Q+A$./HU"$E?+2H4$0_*[S[.?+^5OM!_4_
+M&;Y:7'A#\NXTI=P]9X81`(@)D"("VFZ#(``(E`BHF35`Z,7BT/QW.\K-?*=`
+M#H[THS)C:DZ[>>T32S-L$$!!O<Z/1:=GW7L.-`@+OC?L!%%%01YJ0`W\#O_<
+MU7+AYV=\KX_M\G+/<I8S?E:J'"]%[4IBH5:8;!*?B5.\9;(40FH14V2K4D9\
+MU79K*ZG:G;26OW<;!(4112K2I_&OTNYP.TXS2`2<66Z>M9<,*\;?V9^D]EW*
+MBQ6*UR5PQ\J=9&)2U[%%,*&2VK(M$(BHTDQO)TV^76K`\E7:.HV99X,B$L68
+MSG"]BK3]QP^-(JA!,M42_#=-`S`(@)8T4R,S_Y[7P__.8YW/0JJJJJJJNK8X
+M-=3PO'T&C*J9)`]F0`%K%$*P$#"""'MX"\OETF6EW>4IT9RN8.;PY_?U:<^?
+M*X$4<G+IS96`!RXB`W?+I9`4-_^=]@=5PM10NDDBBA..4DY\"D#+`\7;U[G#
+MO=@@?%VQX&)]5][V?U]Z-?DW??P?H<?6U2\`#8A\D^S^;\VZ[QY0#'`3U,IK
+MLXHES[NTJ)5](L\+[G%+;D/B#Q`X4AG*UHL1KC9MFPLT`%,&%)B_^A;.P#UH
+MFUO;E0'(83(IV[A:>&<5`%`1414BR`"1@4.DH8`QG9@#`TT7)^C&:7C@<GE+
+MH21&K'625@X1SV8=C[7_!BK`FS4,OJG>IA^%"_<3WTX+Q5*-=*7Y#/IE(_)_
+MYYO52X/>^`A8NS+]GQ6$%J!9HFB5*_*22UE#*>TYS.T"1U[AFR44'A(ZIZ$N
+M7O')DXRK49/4T!7XG8#F7\)CF+,TPJAPV;\#4,AD7,Z/*?9D2DQDGR.^]LB(
+M%[`,/\]CK_:F,LN`#`T>]RT?A*WQ[K='\FN+&[/YKKD[GOG)".MPK9KOE&2>
+M4312<,\Y^C:>3=S-OHU-R)^F^*9H5Q"=7^-'_#GT?0V-ZX-3_S"6N2Q?O;7:
+M=G#ZR=L/JQG[<S([.GUTY(]YW<0002-&03+]]@]K1M228\@$'[8E&`X0,H(P
+M1&=K.;MCX^[[_\*P#V$[N)^U]G0V?:4`Z41`"(&!@9N"#?S[?F^CU<GQ*7,>
+MO\_!J];07#9:XP=/JNC6V$KW5]`_.82T05/S?='X=WG0YS.[I94'X$?S()[N
+M#_Y@OQH(_`@/2399*2&\0*8=X^IVZ-3#*-44=7^#1YU#@<+A<&%:']\FNF[I
+M29_6J&Z$R.&H/.2,M8LDC$UZC*6*@F7SBW:"GQ3@-&AS/D'%[PAX*Z.!&Q`!
+MK?M_?V/CA,ZX91WMR-A0992O)T0BR^HF9=VI<Z;3/3/B,,.>A-3&20"GDL&"
+M2O*AJJ$K`'3#X"@L61'"0N\_-&J])J,%%(*O_R0A*R3X>_<_]4=+TNCF/6?<
+M]IGY%UQ&M/IX7^;)C'TSL++)C1,MUVW257A0K(-$P.$V@S/RDA=MA.W#)`^<
+MI.1!C(@-*E;AB)^IQOD_^YWQ:2]K^31Z+%2J$@W$OT7PD.02BH.>E@'022(E
+M3@Y$+>HD)''<X_^[Q9E<G8)L?9]R_X3L2TLN(::ZWJ)!F6F4AID@*_Z3Z?>I
+MK!<&,1@9T",6@FYM(V?[Q8KX6%]RJ`*8F:0\/6K-)X%%08$0"I?TTOH7J&:2
+MP"RV[FF`@B!MYU]ZA5,A0DG2_Q)37"OW#@@D%P1P53,Y9BTRN'V=+Z4!-QP>
+M0Y0QJ(A,6"07X?-ZWOBHFM&@L1]UFNEG^IKIM+R/9>.LI"N99-[D[:+A+S@]
+M9SU/\?K]_\Q%2,`!A(D20!4>@D8$G;HBBL(!"(2`J'98-5R/N2MRE[9.N+,!
+MO"/VT9Y%Q@(TM(/8\%_VL"*'2P^*D+N2<O=WB`H+SS-YB;;<UE-#-N:Y9@?!
+M^#+W*IA0`QB-#D#`YB!!01448@B,1%$2",51!%BP%4BP5!&"1B(HJ"@2)$C&
+M,D#TNA0$!`_!_//C_\:,LO33YN;-]UX[=NL$NWM-W#2&/RRVQM#F%?ZYS-(C
+M!:"*BO%^GER_)Y^/U\1'3UP<.4C&$>,C?4!XXM?3VL;&:5WJ^+#L>F7!H_,N
+MIUM`#L5Y[#M_O]A6"9J&&AI_78:(A$4RYACP^Q[,#B9?EORFBL,[/%'C)]'[
+M.CACW"3O$#=`(=[_-\UU>&,/=25L+C^"'BK/E0!N1^$_"JB+_JPA`*]8CO(:
+M`,.^+BG;`ZF7BV09<[-_][:8^4KLHF.(1`0&LTSWGYJ3I.3K!0![LX-.34%X
+MKYZ.+[/.9+T`A+UD=Y@88X+<D[;(9[$K8+5I?Z$&^</H*6JWR3"CB_,77/+_
+MX^DG*!-6>WRYRQ#Z.0GAL_X^DU8%6CXLM.6/V<%ZXA\X\>Z?;"LR((5^)BH[
+M9YVM6QCU[L+>4:^0@[(+A[*2R473>#_#80G05=[MO!0B83]S4Y#69SL\FU;,
+MM[%]++><ZV/:Y5)WN%_&CUF;?Z:</"R<V\VOFXR?C$\?+,?MAET205[+6I!J
+MRA5AYEG26<>'XGB[M<9CU9H/*ZY^J8LEQ/Y>=4H#=<EIJ8&40/&J$?"Z818<
+MIQ6H\)F_";T.[2M_F=)VW!@'ND!QI,[BE=GR^B_,X7I0+3JJ4]A6Q-]XV1_5
+MU'M[]=[#.PYEXCJ&:P)_3RZ#"([W['6=LW(OD+4"CHU(W$?2=PS]B!N"A`>D
+M076@OV1*HU!09+VY&I##%336?/5%)M>9>5%%"0;X0^D(!5LP%ZR;J#4AL2A(
+M<S2DL$I55=_1LS*$$M0$ST<MVA),QC^IJ^!V\86P1":U`)2(R._\EYKN--VK
+MKDVDP]$@@CE/F](,R"?T>VL=+2L3>4N`V%1T%AG`R@("$$@E`4)0]>@`6#Y_
+M!?KZ5D(#B^G8"OV,(-.'8LE-"R&W?C;5W&U,*%TS9#DQGG02?L<W(#+,*L5`
+M3W\)2.M&$X]T'R#@C7)1N>I;-V'6_'VD:/[B\[^!BK._+R4O,AIRU>SJ67X@
+M9BGP5'Z*.")D_)5(1^2U>5IE7MC^?6;KS0@W,1]%[_1Q>7T[6YJ6XJQ.^W;Y
+M/EBI?KRW$W[U(3Z"^#'K&C9:437[_,^`K\[(S?[&%\T)U''KMU:$5SAVI&?1
+MO)WDB92)(QL1_:14'+!3-4<$"%!A'EL<M,6PH"93>*M:SVOPL/C22OB0/^XF
+MK<69BJ[(VD8/"J7=>==O$-;WW//)P10\;N+6!'EH$U.A3!PVG>^?[V.QP)[E
+MM#M7!J:JJ5FI.V-&A9([(@[VAQ'!<$'(1S;SN=_.6>^5#L1AQ&_D'TL&-9`/
+M68$)7J_190&=D@#5'\F^+AINR/5:*)DDUZ[PNR9<+9KN3=Z?U+GOLD3<33S=
+MITE&9$Q@::(*8DUSZ<4:QI+(U)BWK2;WBIFENWDW[`N'(FMFG:Z>V\N0-.!C
+M]U#!U]T8<9HC9P8<^B_][RM5^;"??IE6G\((HDSM:T1.%M7\:[:DU2F*_DM4
+MYS/(B9,$-F_^*?"5:RW^<#:*&>C'":.!%4R6T1D?:_G=$H[JG;^K-&;DAU5X
+M&\$R"F*J1F;BV>]?N_E7K/--@V7(QI0@&I.NR=19-&!(=T.&_,X7T=/'`?1*
+M%W!R_DXWII`J:7?>BE$CIAWG*'YBZ$Q'_%_<27$JIQGYCU"!+X5C(PDS@W[\
+M7\*E`_CB_W[+#`2HNE+Z5(.<CG9DS>40BX]1`,]W]9L2=-5S\JMIA,-W<&@;
+M^[8^O76V>0CBYD0'SW%)\GD[WPO%X,)C%,*J;0T`C:JCB'+92>O:H';H,-[R
+M=DRZ#I]-'NVA`SO3(FDOZW8P4EL?@9A=5^0Y7FCDLWBFFUTVRG&%.[D2V^=`
+M5#K.+)QE0NXQY^M7*(C1-,N?>U93STMV@CGTY>&R$>RPK3'2R2*?5I5(24S/
+M3K0$S`PJ(?/0Q9_SG%)RTTU3HP8:\7'A72DJ57`^O/MG`YY><>SSD?WAH=M:
+M"RO5HS+T!`\:(`9QAYB=#3-8"F2'/%UT1%Q3?D&F$[TQ2-M#%>'(OH`!2E./
+M)389QV:(LHH6GG+(3N1L[?82L*K4K0&9XD2X6@M+0N,)U%K,T-":?/Y]\MK5
+MK_Z:_I>'2UZ7+0:AKH\.K%VYPA6E!DHVG,PO?KU25M)+DT,P/AGJ<1$85R9%
+MPF!G=#T]<HR$?#[2E@+NC"6RWM$3#I[5-<Z/6[2%1ZFE73CH4URF96")%C.<
+MUS4Y90$A."A4S:-LK4[5U/+UM):-H<SSX#P(*-.@5&,JF@[R4F9.)J@T%S6&
+MY-7"0,'GK!AS[U94MKW798VT*`7T_MZ=JT=23U]YB:[5ZZC$)W<.AIMBB3:&
+M_8,[9C"SU:MY%I#G1P*,.%"7H-.MJ!L1<,-93X25*-A70/1;AU7,W4?.63TX
+M]6(=)M]%&!<M@U?E(SK#DN0I)JZEJT>U45@%VRRB)A-TW^ZQ(Q_ZZED+F:K/
+M%[7I:0$4UD$#WL$0]Y40\#A.AW7;\'O>+#S^/JY/1OZ/3K>4XW>>[AD]#5PU
+M:AAQU[/W.(AMMJ>4Q`29&#B9U_*;%>_:VI]+:'MP6ICV=R&`\X8;_^^!.GMS
+M[CNN,)<#02E3:J,LVK(;7-QHKD@J'][T+:HKY^3V'XE@FQ3YWDML=KUMVS9T
+M--UE*6'ES*\2<L#VF)@Z.*G"/L#%@/+XH^NZ]:G%Y#6=6-,6K*1L8T^J:KMN
+MP4V*$YQXT8=J[5=H0%G&1`:`(&`!2N8*%Q%,H=_@0=\O(9E#/)`D(2#`DC(Q
+M3<]9[G9P^?PUZN7?L<7/&!%`1`@!(NVVQ>LIZ+T;BH^&&6:[X%`OG)G&&W,6
+M)H$T1"14@OL:/PY6'YT^RE4`/70$D`%\6*J_[>]LELD`/3H$F<BGYO7W#-P#
+M)(+"(18=3Z.PLD1!A(L6?39=WB8-50HDFLR"P*C^G[ZY9`1/(3_#Q*Q&$F]*
+M@A`\#X%A8B2?ZU1)$9%)(Q%@"@LDG-D`8'(&,"(8(YS&#0!3:QMRG/,TU?%R
+MG7'NZ/Y>C6R':]3T>]R:N[G/F>L^-Z8W(@05",604",9-Y"A3TN;K^7U_D?5
+M]+)>,!C#_7R<;\D\CX1PL]S$<S^5PCQ;Y]N7OG-3"G1I4&VM7_;EN(G/K_I[
+MN:N:C<>^X[C@`P,/0"-31'T61;6DR@][DZ>GRX>I6>`E\3;J]#&J;J-QZDEZ
+MN`Z"S<>Q9D;G8<GSMW1G=>V4DQ'4T:78NL=:(*1TE&S_R-!0N)EE'3[0&B*!
+MXQ*NL=1!1^MME#CP3"#Z\>EWS"6?=]^))<L/*'D&0)_+'NT37FKB6HHED8[\
+MP@8?\?J3Q]N@LL\X@V,1(0:0)L21V28:XQN,AB[Z8TJAUKCT1M]NHG:;H(B@
+MS^R5=M$+[^_8K"^&BP,&JT$M,/?@J\LZP'!<-A.;DV<5D0!J$((TAJ[I<=8O
+M<WXT`V#3<Y.[4_ZJ&0Q+;CH%#^?(=#@2S:]3(($2XI=O_SZY(DP\(RP(.)68
+MXW^IE\%0)2B[NW^6>"@K:@'@@WDG:-N)I=7TH:&]V:HU#$8H@2H7&5C!B8/<
+M>+*R`ZN=[,`1\>^V(NU#+I]][;J]J$$)=@@8!C&8F38Z2ZYW@!C;&*7UJH?S
+MQ*8,+&MJ!D'$H2WJ"=:##R1L!V.SV:FBB#KMJZ-A8U=P'F)%DBD+Y(]`W<76
+M0"B`P'7/I#2C1W`Q//G]JRCF4N!U6V.,:6B(^'F_PM]?37_I^G\>W:F,#`!L
+M#$,?SLN]D@92+./&PT_IX_D\#C]]P.?H=A[GX8-3>EHG#-5Y:9#51"%*"@8,
+MR,#P4(,M6C4*U0!009;_,O-S^;=Q%1U4]/RN)VFLJGPB`SJ%?B]A6)UT%0>\
+M7?CM)8U>&P!P_@=A7"`%&/ZL=2/B:J/Z>/Q_QN./XO]HL>FR%6\R]CX<7IV1
+MM0K6BSY&M4Q1/\^R5ZB<#`'BZ1KJHV!@LE\&)<,`$827-VNZ1PXSI0/%T;N2
+M:'A7:2NQC\#-SZFY*DG.9SA'QL/C0XYFJ`..@)-DDV29VD5#RDE>]G8Q^3VW
+ML)IY;;C3C--_D9B/%?0-[\A)B^]1S.A,'R5))?(UTRN%AZ[R=7^#1>8QD6;?
+M\\>9'WS7+Q2MMQB$4G'&LKKE_5:P6VHX=!IXC/A?V!&;E12BA`S"D%5]>PD&
+MLS[;Q-_NX\>E1,6!J!`.E>BKU-7><]ML_>YUY`*]=J1"%3^'=ZG#M`_=FP\5
+M_1@U\L5HC!6/M^AK=6RKL$<4WMRZ#=/)WD-JE[^K[$5:2F,WF$W:PM9.*M4Y
+M,1F3/&3Z4AKF[0P[+OYJE&NVX5N("$H-U)M)Q]U1O+/^/[+5!F0AOSIW)JO1
+M-W"XB@\FPFF^^+'I5<9E=\R":I,J$XM:0Y$V!"D*0/[J>C4]94.6F>7>N3E^
+MZS4N7`.VR=BDAPI]W\W2SM;LA4L[C%P*HES%0]GNJ_4,L#<[Z^]\A0P/G_9<
+M-GJDQ,;U!M7+G$4.Q774HG@<3ZR^,@.(C5#=9R1V,1BJ>G;B^X1G8:0*J9PI
+M0O;M#TOG'I,BH@=IM=C3M.?3S+JKI7#,9^+T0K`E=MSFF.*<'F(&]5Y[G99G
+M$Q0MHQB/4_,W&S73.T(4?>X?VDZ)REP[?IQJS%,A"CV=$(_EC6+=\=C[AZ^L
+MT6_?WU:<<"*P,*F!BTVR-7-UZ8R*<(0Z,?*JV<():T68@T1[:_##<>AN:?DT
+MFK>X6UN;;41]M,=73:_5`8T)T.!>[ADD@M$)!&9DX4_BU5+'$2![3L[L]J^Z
+MNB>(E(74J3W"%&E0J0Z!0A1"@K/[XD5C,*BGM#&WV3BL+08N0>"'P6\JH&%[
+M_'ONYQUCK5P8Z@\6BSVU0/@G(./1*RH.1^?4F$S2GX":4R%3D!X_,0:@()!,
+MX.-/LI6"D^5H9QOY(BMN;Y[FTCO5U^=_V]-005[^R6@N"H]!I"@*J2I9445_
+M?LM+4&A$:4*A`@3/(K`5895(TB768N-]$Y",C9W-PTE8>7<6FSV_800?X^2Q
+ML6'"\!JHI4"AC#]EJ"+343WC0<ZAD@1A"H"(J`@@>"P%!X6Z=Z+>/#;E\:3H
+M*J9Z)ZHG?FL$!@@([X%`13X]*>3\4W=4+!:?80*1;@X_:7`V2$",%O%+Y;NW
+MSK?IH.1]7FZJ%F6T;`NP\"[HC>M:RB9@9<!0@5"8`P*!0@1$`LLUJIW\LM)S
+MF[S%QOO]V&GJZZ7=Y^!.7U#[F<<`H4I]\$##HI(@BL0*84T)]KZODY'.!>CM
+MN5V'C^C]SZ+:[B[]+=^EM]A+]F_!\*>SA;M^^UT*,[^Z802/D8,&I$20.<B(
+MCG.#[O,*QA>*F'Q/!Z_P-@_2/8^OT^"0@))K'@?MU`W<04B($7/6DU3`./KY
+M:1.?^/Y_JBD3"%"(29.P4)IHI_DA+0R?6Z%LR#'D>>-RY]_<[&]";4S'N9LZ
+M"Y_Z2\H5#%Z.7J?>2_*H\+?3*3@?E2><BI;"X*(;,/-+C,[=@5'(68`+PB!`
+M#C_4Q&I:S[CCH7Y:*R(MYAZ3$#(('E4F32%9#TE.LCN?!L.UW0)R1?-163@K
+MO!L)_7#I?&D`X'CGK&)`F`0($&-=4.70?Q[8?'Y'=?L7-;)4HWWPM+-;Q<?\
+MPHWN=Q_5QAJX)>)5$*M1;0//-@K!L7>5:>)F4[WO4.>,LM,94O5/E$SMAZ>H
+M\![?H>XT]I<WJ1C!D"Q\E)CXE^',%,QY\#?+K(L,A+-J!*'@`E7""M'JSH[0
+MUB@AHPP#0@JTHUF+"76.<IL,-PG^56DB=_X26G4W"#V!U`"%2_G9](:V%<B%
+M8D2#0B*R5^%$):,5*PP%)5UR0$23)=/4U*ZKG[YHVWO^<L\[K9S52*(GH-%8
+M.AT9AJE>?,L*YE4(_XY&?7:=O,PS0::.'M8IM8F#)34%%76)^HW?:5.<Q"C'
+M2:=*$+RR0P"&_NARU_58F=B!'.CV6U<3$SB/0]<\S`,Q`RYR@UGN_@3[D2$A
+M2@\5)7=&<#+6DAP&6G1<Y0?K)I'^0?*I;KT-36H=7@XN\CH+O%4M8SN]0Y71
+M5+6*G'.H$8AY0:/,=+=![_R=V&ZU[O#-+:+#/%EZM=YPV];`,V`I2IW'O-@:
+MTR\CFZ#1#1MY4,,!/NLBSMLDH*+&FJ^>S=Y6&,4AE,AE@%G2V47(DXEPJT)0
+M..PL_..*EQ<M%G=D73[G&VS+Y]`Y,;1*H49.QW2.+@L=M`K2F;+-E>-^+I,4
+M56.:ST1Q#2EAT>"]%8+(?\>5O`*'!.B37T7>L6.7PW*[?5@`6%UD\A!('2L+
+M.$R'/6!C>GKC#<5U,GN3M%F9WZDL`#J<E\*\/W>-4OYO1/K#W'8/.+L-B!CG
+MX>C5+"2X.U^#\@\X%#M@H7^B?UMO@_`IC<6<>OX?O"ZMQ?_D-P]Z(A[$]Z_%
+M+`/EE#J)UQ1L@*%@C[$1"K]>"A+B&;O@8'Q?I;)U?/;1OP=SD7<Z1,"Q'K2J
+M&8*.,0G/J6["QSZC4H^$KDKMLP$UIEA7KG..+UK'S4LB]:_+Y2>X(0+@/D`C
+M/D>5DIGL#VVM`4V40(D($48(AZH0`3N`(J^_Z7C^-$K2C]+3I-44+?CE2BE:
+M#.]`(@$(E,*(A?*OS&D'J%0$X>>2#.C>W]UAB?==P[^@X@.USAH$4HVQ5N0`
+MZODUS#,W(T.=7,.=4Z"1PJ7D&>!D_"SMO9HN>!IEBHY@LWU&4`A2C*%!*P@F
+M8:NPEZZ1OJ+8!2PM4`I5D,(BM2`%DHF4@!@-D)G$G;9"2$@VMR@%5`*C5O"T
+M4`BYZ*`8%I9>WMXV(`8>GP<;"C@H!&EW$,0`H)-61KVF4`"BE8`&6*P(T5MY
+M[,,;ND@P0:%;$:!6,4@"?R*`@&(I`?/V.OR$P*:HNV,TP%#5A;Z`2JI_A9J'
+M][V!`!.$/:?0EGVF8TSR<_YI`4.0%0RB(=X"A!$/`!0OJ`)50["B$$0M!0I0
+M2"H11'R04*J-04+S-FYJBAX210"0]YV;<VQ?3JG\W</I?IJ?0;"&6#OQLOO:
+M>I/?,69?B1'DF7D;]MP`1`).+&>KUBK4B?4=S:MC<=XWW$U4KM[G[J2EVCN;
+M/@/-;<73F[?O[4P!0W`4.`%#R=[`2!W.O9K37>X]!V]56Z^)X;I9Q1+C!41$
+MA)"20]?3*9`AEP?L?*3)N`Q3!3D0`LC0"E*)%1I%>]!0VP4.J"ALW`8GBTD@
+M#L^)$P#&[CW_!W%E/`IFIAB>S2DGPA)&9)!F9F`A"*L=/@R,)LXZQI19P9&2
+M15")D#(0,00(D`:\P,X<1RJ9G3.Q+U&^0G`B'FW@#<8A8&_T9K"I@@00;!0V
+MFV+(\9;GZW-.K6N_:8*<.7D+*!;[0KZ.DM+/;Q1#DO]1P=U<X&3$<1$.0%"*
+MH<`*'E@2@$0$5RP`1`-WN-,0AUS2828S:@01!X.]G)S7NM%=TJNDV/?;4LNK
+M9==J]QN<W=-HVD=HVIY8(+3K@H5#U'4Q[`N.(E/ZR\FGLB#GL'$&0`SMZ<IM
+M0''1*9&)%*8X2[=1)6&V:])@<X\`/.E:&%G2(^"PVUD9M`.6ZEG[0T*!?XE7
+M*)NJBN5KJ^!WS"V*^K3[TX(8P@Q9C?XV^B!<F-!/`)_$P0<6L!@6\&;4)*0:
+M&Y]1?6>0K$SDMIB"0,=)TI=B1D1`&1@9+]015`AUX.G%YCZTQSMP&.NF[Q2D
+MLFF^%S/`X*6,"GT/\-3\<Q7JRJ4003DG:>I.+EJ[:-C*DVU%JVK?RT55HA5M
+M=IL\W`ZX8X'%R6G6UJ($"HG#NPH6)[9)5#I>#661&#'.,(R#0BA?#,(=4P<9
+MC849O*SG1$]L9,1UH*!1HCV=J7?)NP'\_L2T\!H*$(67:P!AE18K\Z$!Z8K#
+M3<BJ0S<9XFVSY4)'@Q'==>**H"OOKTP&`WF3K!\@2',QTC=T"G1R-J+][XLV
+M(+8U@=`1MFP\,V/E5"&F8=JAMA>ST4A8R]DFB-V.8J;>MYL^"G(IU)_!1T1S
+M1ZKUQC]A"6W+L==(4)^N[[/IW.W'V>OI3ZQ3I)5#=,;"[4`WYH:H"EIO#QP]
+MSLR@!H'@:TL;M]IPBL<^H8]HE8\TV##;I=QSPY_<XST^OOP\'_QP8U>]QF;P
+MM/>O"3T)[*80=VMJ@'7HE+(S=H(%<+PY^)\@S<S(YO;%WJ,P^Q(GUFG48GD\
+MSS=G`-LA=((YY8/GUFD`N^9-KZ<U.6L5,N0),)!"")LGCS71M,"L:S=[>]_<
+M;HPZ-X4BF#W(*'(0`K;8HF.\+K,J(@7U(\$0%_L?>;GX@ZBQQ8+SQM-(KZ,T
+M9C:"/-1$LP6-!UB!H'J`"Z[BU1&&*B])JICY7IM$"$[=1A]Z(`N00(;F^!CC
+M5^P%&$;?H8DTT347F=$+184JB<Q,?@UJPRZEVLNV,M;F81Y6W*E@8F-@:UW+
+MUCE\O;C^9QGZN\AOP.GI?,(3UYO5//\C5J\WO?ZOCGWOHGAO*2,@R&)`"9BU
+M["+8KH`$+7&@&Z4>Y0.(9!0,+$N[M:9UZ'XN<E/AUZW;U/DPCMHB0"*]#D#^
+M_VR]PLKFTC<0TYX!26Z*67#0#.`5B05(;M=<(K='`Y!WC;<K`NI[;MT+6A3*
+MD`9\`(NC+0,%F#@A`TAR1`BB3V>^`PG`&KU$<SX&CQE>+X:VQP^/<A5[6J*S
+M!/4M6\;"HA!RDBH@?3RBPKBIEH32=%7I;"K<Z0EZ_,I6[07?[4-:1=_'4[-S
+MP9F-I"D)V=7>6EA!K$],NI#&V[..-H-1%"/>\UILE?@CGDZ_->"R,B!V.L@$
+M\&)YAC4=[_/OLTGHN.\HM45P\AYL%3UTXX8UK89FA0IA!,I6./VBK\XR="PY
+MX$>0E!].'NBXP53HL[#=M+887P^KJ$O*\J%%R3%HS53F3>PW"W)RE^0XP`&B
+MX5S4FXKO7KFF=!'B*40SE(LCGE4:[%<'28D=N(EZTAK?KT,J8/+0;J:&KD4Q
+MB[OTEDH1OBO+GDKUP8>/$/I/K&79VH!DW(/A#%O11Q,@?43>'>UDD\ER#*FT
+M')J(=2J>5.VW66K+2X(DT)IN(PK1W!R2F&OY&3M18,?"*L,:G@I^8P.Q>&WF
+M#.EZ:?20E*9N80_^%7)T<D'&5M0J$6&RB+T(USCCMKU739O\/1518<*YIG-0
+M#65V@+'Y%U6DOF2-F>'JNIOAM2U8J7U%SQ!5SP<%>O\CD:[T#9<P6C))@P9F
+MXA#D)&#<BYHDU%EY4Z)&<30'1LTC]25P84V4D'%1LVS6@>,"[%5=`GHARQIT
+M%\QD4*(FQ4)1^"94)MT,<05.QG++X<\&]/K$6S/WCS493!P1"*-:=F<4IPIN
+M/+HA_?]9K12Z4?9#B^ZG``&8)YPC&'J`:.$+6*I=A&GX74>)[[HP]&G1Q'WD
+M&I$34#4[D:E&0X>6!PZ:3'B0^W>(,D=*^/92`7Q>Q9-VAPUEQY3OTL_HZO#;
+M>#LA+:6P2J`"-2V,RA8$1Z7F[]*K)3,'CQHY$78K\B']@`8P%]=;,/U'E7#N
+M*&)X?MY1EQ%FK,8H:9K><W!,3A+XJ7WC>;;!S?'N^@'EQ,87%WG+>)!%3C>!
+MPG)6ZNZG!P'@4%04Y;)`BM,$\7AB]3RL4:\XW7W00(".LJFSTKGT*M2TN^L7
+M%@0`B`(A<`$"(1N!QX5FD<SH=5450P&>\?@KO;H<;O.81WCXCX0Q*/U9@/0C
+M%(`V()O@A7*8\:4@&#F)EC0I05R7\PBCBCE#2XF,#"KCFN@W<DX")&7&2Q%U
+M#O13N<&2B9&HDMZKMM0,]DIS60L1JBKZ01&R=S*!1\9-8U7.?SM9E<+5'C]>
+M>X>>N2Q1:\ZY(2F0,Q?:''2/&A[N9<9W,W"C.BFA"X6`#S/>PH?FQ$NZU?L5
+M:%KJY31\`:46RYB8<C4G8&[Y>I12>4+@=KUF'V84*AZ9)<=+3`TMQSW!&4&1
+MOVK3F)P\F'+M>@6I@UR)FR&V&]@54]WN43U=;>HIBQ14'9V"IBLL3##*Q],)
+M]QWNQWGS@"VU^,'ZK(O"&XX73+[$P:JK;=PJN[)<HRDVO8<U1[*Q-UY0SL%'
+M/WY"1A*,7:^X[^'K4RX?([G;.-QYYN`'K@D#KM8RHW,O:;&,_:T"^M`+*E*E
+M+79L^KAV(>=#R\,!3RVIIE4%#$M#M:[T;+*^L[L\_E->?;7GBTF.WV'SA^,C
+MI_(U5I*^F0K_A\E2M,7C("1S"";,76BQS-J0\@"(!@A7K8LPYTN8I$"81B%1
+M`2=VC#?M08HPA"!^5`AU)@H2LH%WI7IIQW$(44H5I@A&_(*0&2]9BH$/S424
+MA[ID(4F0PG+%CL8%'F96&M\T#-$984"5((`<NZN89TN`%QI6,JR;F?(Y#K];
+MTW,[F5"RU555SJEF<,8,<G[#W?6<[YKPOF/&LPZ32F8Z1HT>GI9O\^J`G)"3
+MF$F&UPO%T7I"-_4@?=<7448N.,D(T:\SOC/B0Q[.&;'-BYP3#<._R"(7]"@2
+MB;[:-2ACE"YUZ)"\@RP@*&P7C0%#GO?PG1<VFPRE-.NY$NW7,W!;O\J3[+KI
+M4Z-E)T7A["ERR(`0@6'W$QV])]<:,6/5R*`)ZX%"Y`3KF9>Z($QPJPJX;0J%
+MM77KK\]``=R#J10T14"4D%<\6L+ME\?UG3^>^5U.OD!0]L0`3B!0@@KR<9-P
+MXQ-;L=B_?>*S;KP@@@<.\Z#.-M"Q%IPM$S$,EA?"(H)'AE%@E>(`38$0KENH
+M]!A=)P]Y_=LLSAE$R%+").Z_8;-;K9`DT\WCWG0Y"P]#];[*TR"=W$V,V91A
+M71,P*$:G9H`TMG,HETJ\/!38KNF;OK\P*&5H!OJJO>I!4(\(*&-IF"F@%#?:
+MYPX,&FHI(<=[S*;`*%B<R!K\*VFQX6WU[K78U-Z*&LE9"8[6N1=@I0I:6BU*
+MDZZ;!:UO34V.1L-QA5R@8UP=L.`*9/85?J_JH!D`1'SD(B!#-P*C!$NG>V3+
+M@P&<#C!ZMB!2%%`=4,*!O.H4S#`@H%NK\B\5#*>?XGQMCF8W'\*G4SGM?J3$
+M.[`K2U%`44!BQ&16V,KX'0*3KCCC(@8G90&TX@*';F\]9.BEPZ+322R/-M10
+MR5`$IZ@@N9>,I984,W=;)`QC)JX*%<D70I#0,L/'L#HP'.DM!0M!0L=C5=''
+M14W+0!*UU''>>Y?0&'-AM15=<-%!(&;ZK>!O.*&]IL/,LNP44\D;(=EVWGN.
+M<:*;Y.R9TN"O:[A73N%1/,)PN)6#(&+%6B&Y"2A!;:[G-0<O!LKJ]=W&^;>(
+M^-\(=F/B/>'L(+-)POFTHV%?R5\SNC[ABBN!J7%-YELS%@L5(H5@58P5D`B`
+MQ/D!-HQ7,::HBH&,@RH3&"0PAK<0`BHRSV)WVT<&3@">YM+7(7/6<0U33JH%
+MFYS:'!VWP`!*]J2!E)"0B0B*((HQ$11B/WIB!1L2$UPD9"-3(1C`4W^Z@.T2
+M$RV=VM%5165C3(]7JSZ`N=#Z<"=NM9G/\83I['_K/4_HWCFKHWV:J:Y?Y'7A
+M?DI$1`BM`$0%(``A]#ENPDS3Z^)MN7]3\W6%<T-&>.*Z'<&R.8+:@@0!@(0%
+M"09`0($!0@H)Q;WT=+2$%0GCY,%<C811E_?+U:6R.#+0NHZS]YRS=_SY1%7^
+M5G?HC\/?M15/RPB@`/!S,N^=WR5*':Y8?')V/`\/I/*RLVF#JS#JB:"[02*`
+M(@,L`B`8VC"`T1V#0(X948JAZ&79='7Y?9/I#DH9\FJ9FA)"2LKEYN(?4URS
+MK.S,^\-'K^>V.FV#8+C555,5:JE1I*&A64J4TRPD#?A"`A7A?E=V;H^5^.-Z
+M6;9:`B>RV7/ZWMF<\GFAL7@"0.W=<"A9CT-E%!,43[^,@)S]'FB,H9"!IZQH
+MH1S!EM)#>P@B%+J@H=P:#%`(H!&-^E\:4(U/%V"IIP!0VP4,!8N3#&7E(4*%
+M)0E+QR`H8:"X`T;-Y?41POCSN=O=DYGW<]63['4"AD9$])!#N0$%Y%49R1H]
+M6*"?%YJ!HJ9E39'VPG`9;O/EH#D8L95,.A8F&DHX/>60794`1,M0S,&B"%^>
+M[P>L"]1T,P1:P($'TD0"Y41OAU@4,@*&P>W@],!U&R'%CMFQ:HY5&CU!-N[:
+M:`]:H6HH)F;`H[WL[.Z[\^9ZZ[8.CHFX(ZCAF4T3E@H1&D:F)3>UXW%).3O]
+MRT3:,VU>!F(A42\]S]WA?`OT/W'0ZPB&3&:)2,V*VM25/IZA($,I-Z0HI"08
+M-.R5&JC:35G(%UE`@`EGDP"BC`(HW^#4+@4(!-L%"/8+F@V"(0E!$*(9H2M"
+MHP<I@(A3.EH*%/A10BIZG)RGTY"X'GC!0"*`08_BV;4):=,W*'1$>D"AN&["
+MHYN6'+C&PP%&S;A:II;HDMNP,&X`2"C<T`$\BWO'G`H<X1#048]X,!(!5';5
+M9!`7Q65`NR`#)@+Q?`%PB!9N'JL.24`"=TBC8<^264I[CX?H76/"[!!S/&:.
+M%X#M7\\`373'H-'>@&373*.8%#/6+@=`;!$.`>9,UQMY*T*=9H'VFCSJY7!1
+MH?-G*<O,SZM)H[S5ACLRWLNC#>%!;>7G+:^;0H7;MI8I6M-//XE"IS@R@H7E
+MY\2C1W-"$VZCS`4,FYEC"$C)Q.UJUX'<V"C-8*&,!0P.5E--UX7@*&H.B;%0
+ML+&6EQKHA_$SSME2NEX/@\11XBG.X,`4--8G3ED+.WP7^'FY4Y7)CEWI**H9
+M44)PT)$0/,^UQZ'N/X]?+\725]GGS$W`4(.Y4IXFLYV[SPZ/.7ID;*W5,DZ7
+M6NO,9"[`%LY37W7WV2T8:.]H"AB:H&G4F3,'3ADO=?%))6R;'4M$0U]M1N4<
+M,V)O"@MH*''QS7D)N`H?*TZ#32Y1#:TPJ%X*%502"V(;4JY>2_3P_3?C7Y81
+MP,^I,KDUEX*'2RG3Z1TR=K[S57UI`^G-6<@AIA:KW**=FLHRLF,>RE9I:;CV
+M4C_OU2_?Z=CQ.71PKA'F+1J.K@V'#!L0F\Q=I##\/`0="-8S0ZE_`R/TQ<ZV
+M&3,_K3)<4$0*N!0XCG>F'CHT4`W8<[TPTZU!0+[.[FW,VK1354`PU6:N@I$Y
+M1)%S)K0='IB5-T]&)5RK!@S/9"_3E$4!NNR>F!0@9T1/(CV^`DDA/[34!0RQ
+M%#(P6<\X#56L2%-:EHOT6QP7!X.0;!#X&/ASC>:8LLPWEBS*LKKB9-)5-!59
+M;6UU`W:U?"X$VMI5J-"JJM33NIPX&OL!*OGM;9XNSKN6C=V;OA4M:TIL8[8*
+M%^J)980DA-L3E:P4-XO,2W1]3!ORDA(8FT"AA0<T0`B0@@$AD<IIX]K7)))?
+M<.[GHCS^J;>@TH(;+`IJ,.ZW<J;D-%3:3/3Q\*J;-,MSQHN:?A,B!F[43+*A
+M3T`NL]D$+W",F=1;?[324]FE`>.(-U!^J\((H=5D)E'S]CYGC\FGS[,.=D#,
+M(@6/J18(LK%TQ`B`(48]'1WW<%0RDAXIVF(Y#P3)VT/;XM<X*$(=^2K1'24&
+M55^C@6F/V]WOI]OR"@NK\CN)K%SO$([H`B`/5XM7"(&62-<CT\*JF+[2+_WG
+MKXK0J9>?VC8[E<)6]2F'B^O^_4N,>`RGOW`@G[W'RU`?#%[PDA$DU(]^8A?^
+MDQ/MS"1D8>ER,>3H3/'H7"ZZZZZ8`23.A,Z?;PB*/NR+C\>IA[S;IO[X\L(U
+M*8+6$!40?^>X!1K^-^)7O8>D0_%NKYCSH<TR'OLV.OQ`4@X0_2\83>ZS]:)(
+M#/7AQ%$8&:1AS>,M=[MMCGM6%&D&#F`2`,8!0\5[J>,"A_;L#]"=R+AE/7]C
+M8_=MCV(DO(2>>\_GL\JRX/G?045JAA`"?.G7@>0?@4#[;Q3V6/>^I+CR_SZ/
+M,QH'S_0_0J>U@>)/_$/5:-1JY7&7'UTX3B"P`2@J&]3PK1Y37045.-[&RU@C
+MRZE!QRM1S7R%'CX/#[_R-&9Z3/H$A9[*ITAY+H87N/MQ^XRSN=4GN]8J"*9T
+M4R?\IT_Z'OD_W1@',I\5%O.?>V!^_>KA%_VPS55;10&&]E*IK?KLI,/7_/>L
+M^UO:R&]I_AK"3J<UAO"':52CZ0SHW&=@[_]DDT5E69\1(RM#Y('517P>+\;_
+M27^:>[[K:'0_IRO#AY]*0D\W_]V,W?7WO7[;][\4N]4J;74]OKR<YX+,3HS5
+M-^>#I("ZF)[\D.+7[JW<1M_S+T\R07]^.GHN2N_V9W^UAH/?M6L(]G=;K8`^
+MNGF*OQV7S(P>`QF$K9K.8#_/:_`86%)Q#=W]L'PKE*TZ/Q/>W0X:[]Z!=<AP
+M[M,3V:G65?K3L9DD?V^Q*VB.OE[QI9PM'#=^<;.7QLQSN>MVAGZ3XE<T)#Y?
+MF*H8QF?OJ!!W!F41S*"'QE"1;W2$G@CFMLBQZBT?S1KV.)RT(3((Y1TN%]N\
+M[?\DP3J"1[<&#L#@)<<.!W^8K$$/A-T3CHK\\@8_A2\!>^R4@7Z<;!&Y2#\_
+MZ)!2!?*E\$B%&8XI)1DC5[YX0Q.D!U5!X>T_#9.<7W8\W8*\2(#[7OKPL/%P
+MMCZ'U_NJ)T\='S>((D_7A^ELI=U(3,[P-9[+TT'PWDE'"$\!X=_\_).ROW^?
+MC=.S-W,8.>T2CBVG&3T>S'H/R<V,(]17Y\?Z9949J%A>==M"JX)?-VOP7GM-
+M?2\':;;5N;OB<3>9^20W4&3S:/LW:AA<AG0Q/QE^%$C9;^YY5[*/TX4]:U)+
+MR.=ENOC<%J+`\(2[L7FL9$7U_UQ["R"69C;JW556R,+O.,RK&&>RVH-G6TXL
+MDV\!)L(@OU(`.H@8<80FQRK)$PE(T\YV=T-QZICXH'U:!W.%:XYY4M:_.D`5
+M6YB":A=D94"H`(#`W"$#%A,')0]-U:>&S":X@W%\BOH3^V+%,$"HQKE""HB-
+M0A!C@V((WR@$O#G3>I#[/G[2P@U&5UR47BO1?WMZ5$;Y`0%V0?IONU7!O;OQ
+M$->N4W#HL,OL_MU_I-KT.>\Z;3O>4:*LX#Q,&CM7">7Z$\6]4ZMY7I=NTYM%
+MZ)IY48P2K*WEJ^2V-(B`/`IKS(?6MQ2E'=>U[*5&>8($I,!YRH*,FI%59T3G
+MCT@9#11"[,IUXXTZJ=+@L^BO,#!,@8`B,,'D:[,(IRKJN!N(PCUN7ETFMNQ>
+MT.M,<5L4#9FB*%?$W!57FM?/^ZBA@2T-7E"Z%F;\[:8XR0<6)_+$E*H!FF8.
+M-XG<(8#8^U:S%08IU0*`6B3A$>0E<[+<ZK@N!FS4:YV48;0PM!EH/5%A[CMP
+M$&^(`B?L%`P>JG_>:@;>-`Y1E`&`8=(RYUE')]1`TYY(A:#RB0FG3$PE+)8S
+MGU.@!,R[6^+K@E&1>47'U:5Y9^H"9N$SLJ5J?%:_%JV9"PQ"#C%I;C:?MTG)
+M<_+^*U#T[J#O`$?NA$H`J5@CT><;M?J"+89:J5'/N15EU7F7>F1"I0/G+">Y
+M3+-@8%+J^"D)LAGHE1:IW4%D>L70=!S'KQZ=T/&:X3,<[QS#1;Q0:L.Y4(WR
+MIS8('-XK,_=EA`C,5^$HZS9@[X!)(&TP;5L0+F9IIL:86^R:&;<$8IY<9"=$
+M980D2B%BWIQ8MF1**D<C'(B(H>]I;;CK69[X^A0WPLO@0K_*(X]F;<'PTXE7
+M=W36:V(H)-<H3-9VJ2*8<)R3>CY_U'(8WEH]4NH>1WYRQ+BR</?UNR'F7?3D
+MMT2R'C%XN48K6]_0=R98O.?AXM=&"^,8F;?1F5KU"<RW6$%"J"HU6`[)>@4%
+M$1U.K,)S+4!]61]+Q!Q];=1<:0H&&9F^&`@320!JS8'6STZ[:=E*IZ;&BDC7
+M0Z/7-5O>MY:IK*BM/5>;X56^9&U^#42.H)OFI54HV1)`TJC7_B33GAVXJ]7O
+M;?1"OI([IPP,[MV,/M;SJ$X)F]1/8&A&510:&ID)5D![*U)9=_1^5X(."9$3
+MAKAD3Q"G(58]/R>7K9'EWM'SQL4<(VSXPXG5&YKMU-_C3ND*S57\G4:0+B9,
+MJ5UN=Z]5!0TZS\:=[S.J>H-<K0YH6-N7,(0P<'BJ!U.&WQQQ+M=8D`JJ%TC`
+MV8O[\4"(>)[0]<R`YSOCG4S:@B1`=(&#*9Q5"$!`TZ\[P<5B!VH%*9$H@-=[
+M@OO8,]4"KEF@KLC'OVU1@TC.JJ5E+%4@H:S!+"N5'H0`/I[O@]/6&@/E8.VK
+M1A8',GW)\Y&$!8FA`9,)%T=LD&Q69%/J(]AM-J[P;/M==J8K$*&@89V&ME8"
+MND7RM#$V]AD=V*V[6[S=23=Z!389@HD9G;3JULY3B57)>6K0B-@S.BC387!M
+M$S)!YJMA-!`JT[;'[Z^+^[0R-)::%H%<W@K)X=V]%EM'[L1N-/H$+/ZPK=PZ
+M90IF0PY)Q1"6)NO=H,!ANF>GHKM=7G#8VW_]:.U^;<&A9&M/6UP?W""!BY%`
+M#![EE,U-#7?W49=0ZXLS<=KZ:P-?Z3.X9G9?7W,9U.N2TLZ.@I-#Z@G7\7TV
+MWHSA0AEJ*,1,`G^Y-'RV*AEKF,/?,:P^UZ&F<"J&#J0NMG0&<\V@F>9R#G`8
+M8"2$M4:2?X:&&W[K8\*=>CQHL8G]'<]@CN1F#'"X-ZO8\(=;X+BJT=]2+C:H
+M4PL_D99">XRIU6^@S@B;6=;A"S6J!DD&;F8.@CY3\G*1J,;<LF7<C4PQ,D/U
+M<-TY*?E&G^YK2P,`]W0X8'Q->%1,\3U?C65;#&*>6O<Z/7LG$Y-:=(5M<>E!
+MFVJJJM,IDRO),/K661%M4\6#1,IBT04O9HXN64;!]\FH*H#<46AK6%-'LCF9
+MR+1L24TY4/W_$$4`;*4R6-)=-<[!3VX70!7=GKY%5A/>5U.!K<CQI^/OK%BE
+M6S8>P4`/<AR`HXY(>^X".'H%Q?;P',T8(,[(O1T\\K!%">*#TZ3L)AZ$/:3#
+MN#L_''38,`!CF+]:(8[7>H+[G4L`8'8$'2;(;A-TB>Y-?`Z0SHGO<-&]>=?1
+M.%\D]#]-"\?6"0!S,$=]"\WZJKFWW+0,KN8@H5#,P4JO+2[I8+)K.GE;OZ'7
+MW6^-;6=X]"-%4;W@V9C.#*N(]M'VAWIC7&N_#'E;W?3^T'>]-2-X=9B^4;U\
+MT'*-(H-.>>8:,Q(3.V46OUD]TQT7D-PM+!C5]1&$A5_.0$FU.WL(&AB[^J(W
+MC9_.U;3@%I%C#)%M;R_(%(ZBT`U7Z%$^2K53FF"->R$&0GTQ1HJCRC*ZNL1@
+M;F!0>FK6OK[E(YYHF^=GYS,F>9DC+2@>J2@N@/>\BL^-6Z=!H*-?OLIAZ_NK
+MLDN"E,GB8]*I2!;=UH7JBS.6AF88^:>-ZOR=_N7A"M\B,YE=CK<O+*-R,X#L
+MY9<)!(/=I<-GKYE)T>V?B(2%+;-$FTH0P@=0=)7(@D5HIYCOV$EW.MZP_:HB
+M&,OED]W=BZGUITM#NKAC8,`1SO"V/<*,?4Q+AGF/V=O(_QZ9Q08'TG;(.%W>
+M3QI"^R0+9F25\+`V81V6@)V/X&8HAATY-]YTO.V[=I1-2`X6_"5%@0JCBP0?
+M!4@"!(7#-S*G*12#Q7ISP]OR(^?&&48%!EP>;\@B($4F'_XNY(IPH2!)0!**
+`
+end
diff --git a/gdb/testsuite/gdb.base/tab-crash.exp b/gdb/testsuite/gdb.base/tab-crash.exp
new file mode 100644
--- /dev/null
+++ b/gdb/testsuite/gdb.base/tab-crash.exp
@@ -0,0 +1,43 @@
+# This testcase is part of GDB, the GNU debugger.
+
+# Copyright 2017 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/>.
+
+if { ![istarget x86_64-*-* ] || ![is_lp64_target] } {
+ return
+}
+
+standard_testfile
+
+# gcc-base-debuginfo-6.3.1-1.fc25.x86_64
+# /usr/lib/debug/lib64/libgcc_s-6.3.1-20161221.so.1.debug
+# objcopy -R .debug_loc -R .debug_ranges -R .debug_info -R .debug_abbrev -R .debug_aranges -R .debug_str -R .comment ...
+
+set debugfilebz2uu ${srcdir}/${subdir}/${testfile}.bz2.uu
+set debugfile [standard_output_file ${testfile}]
+
+if {[catch "system \"uudecode -o - ${debugfilebz2uu} | bzip2 -dc >${debugfile}\""] != 0} {
+ untested "failed uudecode or bzip2"
+ return -1
+}
+file stat ${debugfile} debugfilestat
+if {$debugfilestat(size) != 71936} {
+ untested "uudecode or bzip2 produce invalid result"
+ return -1
+}
+
+clean_restart ${debugfile}
+
+gdb_test "complete p si" "complete p si\r\np size_of_encoded_value"

View File

@ -0,0 +1,81 @@
From FEDORA_PATCHES Mon Sep 17 00:00:00 2001
From: Jan Kratochvil <jan.kratochvil@redhat.com>
Date: Fri, 23 Mar 2018 20:42:44 +0100
Subject: gdb-rhbz1553104-s390x-arch12-test.patch
;; [s390x] Backport arch12 instructions decoding (RH BZ 1553104).
;; =fedoratest
diff --git a/gdb/testsuite/gdb.arch/s390x-arch12.S b/gdb/testsuite/gdb.arch/s390x-arch12.S
new file mode 100644
--- /dev/null
+++ b/gdb/testsuite/gdb.arch/s390x-arch12.S
@@ -0,0 +1,4 @@
+.text
+.globl load_guarded
+load_guarded:
+.byte 0xeb,0xbf,0xf0,0x58,0x00,0x24,0xe3,0xf0,0xff,0x50,0xff,0x71,0xb9,0x04,0x00,0xbf,0xe3,0x20,0xb0,0xa0,0x00,0x24,0xe3,0x10,0xb0,0xa0,0x00,0x04,0xe3,0x10,0x10,0x00,0x00,0x4c,0xe3,0x10,0xb0,0xa8,0x00,0x24,0xe3,0x10,0xb0,0xa8,0x00,0x04,0xb9,0x04,0x00,0x21,0xe3,0x40,0xb1,0x20,0x00,0x04,0xeb,0xbf,0xb1,0x08,0x00,0x04,0x07,0xf4
diff --git a/gdb/testsuite/gdb.arch/s390x-arch12.exp b/gdb/testsuite/gdb.arch/s390x-arch12.exp
new file mode 100644
--- /dev/null
+++ b/gdb/testsuite/gdb.arch/s390x-arch12.exp
@@ -0,0 +1,34 @@
+# Copyright 2018 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/>.
+
+#if { ![istarget s390x-*linux-*] || ![is_lp64_target] } {
+# verbose "Skipping s390x-prologue-skip.exp"
+# return
+#}
+
+set testfile "s390x-arch12"
+set uufile "${srcdir}/${subdir}/${testfile}.o.uu"
+set ofile "${srcdir}/${subdir}/${testfile}.o"
+
+if { [catch "system \"uudecode -o ${ofile} ${uufile}\"" ] != 0 } {
+ untested "failed uudecode"
+ return -1
+}
+
+gdb_exit
+gdb_start
+gdb_load $ofile
+
+gdb_test "disas load_guarded" " <\\+28>:\tlgg\t%r1,0\\(%r1\\)\r\n\[^\r\n\]* <\\+34>:\tstg\t%r1,168\\(%r11\\)\r\n.*"
diff --git a/gdb/testsuite/gdb.arch/s390x-arch12.o.uu b/gdb/testsuite/gdb.arch/s390x-arch12.o.uu
new file mode 100644
--- /dev/null
+++ b/gdb/testsuite/gdb.arch/s390x-arch12.o.uu
@@ -0,0 +1,20 @@
+begin 644 s390x-arch12.o
+M?T5,1@("`0`````````````!`!8````!````````````````````````````
+M``$X``````!```````!```<`!.N_\%@`)./P_U#_<;D$`+_C(+"@`"3C$+"@
+M``3C$!```$SC$+"H`"3C$+"H``2Y!``AXT"Q(``$Z[^Q"``$!_0`+G-Y;71A
+M8@`N<W1R=&%B`"YS:'-T<G1A8@`N=&5X=``N9&%T80`N8G-S````````````
+M`````````````````````````````````P```0``````````````````````
+M`````P```@```````````````````````````P```P``````````````````
+M```````!$````0``````````````````````;&]A9%]G=6%R9&5D````````
+M````````````````````````````````````````````````````````````
+M`````````````````````````!L````!``````````8`````````````````
+M``!``````````$`````````````````````$```````````````A`````0``
+M```````#````````````````````@```````````````````````````````
+M!```````````````)P````@``````````P```````````````````(``````
+M``````````````````````````0``````````````!$````#````````````
+M``````````````````"``````````"P````````````````````!````````
+M```````!`````@``````````````````````````````L`````````!X````
+M!@````0`````````"``````````8````"0````,`````````````````````
+H`````````2@`````````#@````````````````````$`````````````
+`
+end

View File

@ -0,0 +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-rhbz947564-findvar-assertion-frame-failed-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
diff --git a/gdb/testsuite/gdb.threads/tls-rhbz947564.cc b/gdb/testsuite/gdb.threads/tls-rhbz947564.cc
new file mode 100644
--- /dev/null
+++ b/gdb/testsuite/gdb.threads/tls-rhbz947564.cc
@@ -0,0 +1,53 @@
+#include <iostream>
+#include <pthread.h>
+
+class x
+ {
+ public:
+ int n;
+
+ x() : n(0) {}
+ };
+
+class y
+ {
+ public:
+ int v;
+
+ y() : v(0) {}
+ static __thread x *xp;
+ };
+
+__thread x *y::xp;
+
+static void
+foo (y *yp)
+{
+ yp->v = 1; /* foo_marker */
+}
+
+static void *
+bar (void *unused)
+{
+ x xinst;
+ y::xp= &xinst;
+
+ y yy;
+ foo(&yy);
+
+ return NULL;
+}
+
+int
+main(int argc, char *argv[])
+{
+ pthread_t t[2];
+
+ pthread_create (&t[0], NULL, bar, NULL);
+ pthread_create (&t[1], NULL, bar, NULL);
+
+ pthread_join (t[0], NULL);
+ pthread_join (t[1], NULL);
+
+ return 0;
+}
diff --git a/gdb/testsuite/gdb.threads/tls-rhbz947564.exp b/gdb/testsuite/gdb.threads/tls-rhbz947564.exp
new file mode 100644
--- /dev/null
+++ b/gdb/testsuite/gdb.threads/tls-rhbz947564.exp
@@ -0,0 +1,75 @@
+# Copyright (C) 2013 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 tls-rhbz947564
+set srcfile ${testfile}.cc
+set binfile [standard_output_file ${testfile}]
+
+if [istarget "*-*-linux"] then {
+ set target_cflags "-D_MIT_POSIX_THREADS"
+} else {
+ set target_cflags ""
+}
+
+if {[gdb_compile_pthreads "${srcdir}/${subdir}/${srcfile}" "${binfile}" executable [list c++ debug]] != "" } {
+ return -1
+}
+
+gdb_exit
+gdb_start
+gdb_reinitialize_dir $srcdir/$subdir
+
+gdb_load ${binfile}
+
+if { ![runto_main] } {
+ fail "Can't run to function main"
+ return 0
+}
+
+gdb_breakpoint "foo"
+gdb_continue_to_breakpoint "foo" ".* foo_marker .*"
+
+proc get_xp_val {try} {
+ global expect_out
+ global gdb_prompt
+ global hex
+
+ set xp_val ""
+ gdb_test_multiple "print *yp" "print yp value" {
+ -re { = \{v = 0, static xp = (0x[0-9a-f]+)\}.* } {
+ pass "print $try value of *yp"
+ set xp_val $expect_out(1,string)
+ }
+ -re "$gdb_prompt $" {
+ fail "print $try value of *yp"
+ }
+ timeout {
+ fail "print $try value of *yp (timeout)"
+ }
+ }
+ return $xp_val
+}
+
+set first_run [get_xp_val "first"]
+
+gdb_test "continue" "Breakpoint \[0-9\]+, foo \\\(yp=$hex\\\) at.*"
+
+set second_run [get_xp_val "second"]
+
+if { $first_run != $second_run } {
+ pass "different values for TLS variable"
+} else {
+ fail "different values for TLS variable"
+}

View File

@ -0,0 +1,731 @@
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-rhel5.9-testcase-xlf-var-inside-mod.patch
;; Include testcase for `Unable to see a variable inside a module (XLF)' (BZ 823789).
;;=fedoratest
diff --git a/gdb/testsuite/gdb.fortran/xlf-variable.S b/gdb/testsuite/gdb.fortran/xlf-variable.S
new file mode 100644
--- /dev/null
+++ b/gdb/testsuite/gdb.fortran/xlf-variable.S
@@ -0,0 +1,638 @@
+/* Copyright (C) 2012 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/>. */
+
+/* This file has been generated from the file named `xlf-variable.f', which
+ should be present in this directory. The command used to generate this
+ file was:
+
+ xlf -qnoopt -g9 -S xlf-variable.f -o xlf-variable.S
+
+ After issuing this command, you must hand-edit this file and remove the
+ mentions for `_xlfExit', since it is only present in XLF-specific
+ libraries. You must also make sure to remove the file named `mod1.mod'
+ which will be created in the compilation directory.
+
+ In order to generated this file, the following XLF package was used:
+
+ xlf.14.1.0.0.linux.eval.tar.gz
+
+ These instructions may be different for different versions of the XLF
+ compiler. */
+
+.set r0,0; .set SP,1; .set RTOC,2; .set r3,3; .set r4,4
+.set r5,5; .set r6,6; .set r7,7; .set r8,8; .set r9,9
+.set r10,10; .set r11,11; .set r12,12; .set r13,13; .set r14,14
+.set r15,15; .set r16,16; .set r17,17; .set r18,18; .set r19,19
+.set r20,20; .set r21,21; .set r22,22; .set r23,23; .set r24,24
+.set r25,25; .set r26,26; .set r27,27; .set r28,28; .set r29,29
+.set r30,30; .set r31,31
+.set fp0,0; .set fp1,1; .set fp2,2; .set fp3,3; .set fp4,4
+.set fp5,5; .set fp6,6; .set fp7,7; .set fp8,8; .set fp9,9
+.set fp10,10; .set fp11,11; .set fp12,12; .set fp13,13; .set fp14,14
+.set fp15,15; .set fp16,16; .set fp17,17; .set fp18,18; .set fp19,19
+.set fp20,20; .set fp21,21; .set fp22,22; .set fp23,23; .set fp24,24
+.set fp25,25; .set fp26,26; .set fp27,27; .set fp28,28; .set fp29,29
+.set fp30,30; .set fp31,31
+.set v0,0; .set v1,1; .set v2,2; .set v3,3; .set v4,4
+.set v5,5; .set v6,6; .set v7,7; .set v8,8; .set v9,9
+.set v10,10; .set v11,11; .set v12,12; .set v13,13; .set v14,14
+.set v15,15; .set v16,16; .set v17,17; .set v18,18; .set v19,19
+.set v20,20; .set v21,21; .set v22,22; .set v23,23; .set v24,24
+.set v25,25; .set v26,26; .set v27,27; .set v28,28; .set v29,29
+.set v30,30; .set v31,31
+.set q0,0; .set q1,1; .set q2,2; .set q3,3; .set q4,4
+.set q5,5; .set q6,6; .set q7,7; .set q8,8; .set q9,9
+.set q10,10; .set q11,11; .set q12,12; .set q13,13; .set q14,14
+.set q15,15; .set q16,16; .set q17,17; .set q18,18; .set q19,19
+.set q20,20; .set q21,21; .set q22,22; .set q23,23; .set q24,24
+.set q25,25; .set q26,26; .set q27,27; .set q28,28; .set q29,29
+.set q30,30; .set q31,31
+.set MQ,0; .set XER,1; .set FROM_RTCU,4; .set FROM_RTCL,5; .set FROM_DEC,6
+.set LR,8; .set CTR,9; .set TID,17; .set DSISR,18; .set DAR,19; .set TO_RTCU,20
+.set TO_RTCL,21; .set TO_DEC,22; .set SDR_0,24; .set SDR_1,25; .set SRR_0,26
+.set SRR_1,27
+.set BO_dCTR_NZERO_AND_NOT,0; .set BO_dCTR_NZERO_AND_NOT_1,1
+.set BO_dCTR_ZERO_AND_NOT,2; .set BO_dCTR_ZERO_AND_NOT_1,3
+.set BO_IF_NOT,4; .set BO_IF_NOT_1,5; .set BO_IF_NOT_2,6
+.set BO_IF_NOT_3,7; .set BO_dCTR_NZERO_AND,8; .set BO_dCTR_NZERO_AND_1,9
+.set BO_dCTR_ZERO_AND,10; .set BO_dCTR_ZERO_AND_1,11; .set BO_IF,12
+.set BO_IF_1,13; .set BO_IF_2,14; .set BO_IF_3,15; .set BO_dCTR_NZERO,16
+.set BO_dCTR_NZERO_1,17; .set BO_dCTR_ZERO,18; .set BO_dCTR_ZERO_1,19
+.set BO_ALWAYS,20; .set BO_ALWAYS_1,21; .set BO_ALWAYS_2,22
+.set BO_ALWAYS_3,23; .set BO_dCTR_NZERO_8,24; .set BO_dCTR_NZERO_9,25
+.set BO_dCTR_ZERO_8,26; .set BO_dCTR_ZERO_9,27; .set BO_ALWAYS_8,28
+.set BO_ALWAYS_9,29; .set BO_ALWAYS_10,30; .set BO_ALWAYS_11,31
+.set CR0_LT,0; .set CR0_GT,1; .set CR0_EQ,2; .set CR0_SO,3
+.set CR1_FX,4; .set CR1_FEX,5; .set CR1_VX,6; .set CR1_OX,7
+.set CR2_LT,8; .set CR2_GT,9; .set CR2_EQ,10; .set CR2_SO,11
+.set CR3_LT,12; .set CR3_GT,13; .set CR3_EQ,14; .set CR3_SO,15
+.set CR4_LT,16; .set CR4_GT,17; .set CR4_EQ,18; .set CR4_SO,19
+.set CR5_LT,20; .set CR5_GT,21; .set CR5_EQ,22; .set CR5_SO,23
+.set CR6_LT,24; .set CR6_GT,25; .set CR6_EQ,26; .set CR6_SO,27
+.set CR7_LT,28; .set CR7_GT,29; .set CR7_EQ,30; .set CR7_SO,31
+.set TO_LT,16; .set TO_GT,8; .set TO_EQ,4; .set TO_LLT,2; .set TO_LGT,1
+
+ .file "xlf-variable.f"
+ .globl __mod1_NMOD_____mod1
+ .type __mod1_NMOD_____mod1,@function
+ .size __mod1_NMOD_____mod1,32
+ .globl main
+ .type main,@function
+ .size main,68
+ .globl __mod1_NMOD_sub1
+ .type __mod1_NMOD_sub1,@function
+ .size __mod1_NMOD_sub1,136
+ .globl _main
+ .type _main,@function
+ .size _main,68
+
+ .section ".text"
+ .align 7
+.LC.text:
+__mod1_NMOD_____mod1:
+ stwu SP,-32(SP)
+ stw r31,28(SP)
+ or r31,SP,SP
+ b $+0x4
+ addi r11,r31,32
+ lwz r31,-4(r11)
+ or SP,r11,r11
+ bclr BO_ALWAYS,CR0_LT
+.LC.text32:
+
+__mod1_NMOD_sub1:
+ stwu SP,-32(SP)
+ stw r31,28(SP)
+ stw r30,24(SP)
+ or r31,SP,SP
+ addis r30,r0,.const_dr@ha
+ addi r30,r30,.const_dr@l
+ addis r3,r0,__N_mod1@ha
+ addi r3,r3,__N_mod1@l
+ addi r0,r0,1
+ stb r0,4(r3)
+ addi r4,r0,14
+ stb r4,5(r3)
+ stb r0,7(r3)
+ addis r5,r0,__N__mod1@ha
+ addi r5,r5,__N__mod1@l
+ stw r5,0(r3)
+ lbz r5,6(r3)
+ rlwinm r5,r5,0,25,25
+ ori r5,r5,0x0040
+ stb r5,6(r3)
+ lwz r5,0(r3)
+ lfs fp0,0(r30)
+ stfs fp0,0(r5)
+ stb r0,4(r3)
+ stb r4,5(r3)
+ addi r4,r0,0
+ stb r4,6(r3)
+ stb r0,7(r3)
+ b $+0x4
+ addi r11,r31,32
+ lwz r30,-8(r11)
+ lwz r31,-4(r11)
+ or SP,r11,r11
+ bclr BO_ALWAYS,CR0_LT
+.LC.text168:
+ .long 0
+ .skip 0x54
+.LC.text256:
+
+main:
+_main:
+ mfspr r0,LR
+ stwu SP,-32(SP)
+ stw r31,28(SP)
+ stw r0,36(SP)
+ or r31,SP,SP
+ bl __mod1_NMOD_sub1
+ addi r3,r0,0
+.LC.text288:
+
+ tw TO_EQ,r14,r14
+ addi r3,r0,0
+ b $+0x4
+ addi r11,r31,32
+ lwz r31,-4(r11)
+ lwz r0,4(r11)
+ mtspr LR,r0
+ or SP,r11,r11
+ bclr BO_ALWAYS,CR0_LT
+.LC.text324:
+
+
+ .section ".rodata","a"
+ .align 2
+.LC.rodata:
+ .type .const_dr,@object
+ .size .const_dr,4
+.const_dr:
+ .long 0x40400000
+
+ .section ".eh_frame","wa"
+ .align 2
+.LC.eh_frame:
+ .long 0x0000000c
+ .long 0x00000000
+ .long 0x0100047c
+ .long 0x410c0100
+ .long 0x0000001c
+ .long 0x00000014
+ .long .LC.text
+ .long 0x00000020
+ .long 0x410e2041
+ .long 0x9f01410d
+ .long 0x1f410a42
+ .long 0xdf420b00
+ .long 0x00000020
+ .long 0x00000034
+ .long .LC.text32
+ .long 0x00000088
+ .long 0x410e2041
+ .long 0x9f01419e
+ .long 0x02410d1f
+ .long 0x590a42de
+ .long 0x41df420b
+ .long 0x0000000c
+ .long 0x00000000
+ .long 0x0100047c
+ .long 0x410c0100
+ .long 0x00000020
+ .long 0x00000014
+ .long .LC.text256
+ .long 0x00000044
+ .long 0x420e2041
+ .long 0x9f014111
+ .long 0x417f410d
+ .long 0x1f460a42
+ .long 0xdf440b00
+
+ .section ".data","wa"
+ .align 4
+.LC.data:
+ .globl __N_mod1
+ .type __N_mod1,@object
+ .size __N_mod1,8
+__N_mod1:
+ .long 0x00000000
+ .long 0x01000001
+
+ .section ".except.1","wa"
+ .align 1
+.LC.except.1:
+ .long .LC.text288
+ .byte 0x01
+ .byte 0x09
+
+ .ident "Fri Jun 15 16:35:45 2012 .IBM XL Fortran for Linux, V14.1 (5765-J05, 5725-C75) Version 14.01.0000.0000.Fri Jun 15 16:35:45 2012 .IBM XL Fortran for Linux, V14.1 (5765-J05, 5725-C75) Version 14.01.0000.0000."
+
+ .section ".debug_aranges"
+ .align 0
+.LC.debug_aranges:
+ .long 0x0000001c
+ .byte 0x00
+ .byte 0x02
+ .long .LC.debug_info
+ .long 0x04000000
+ .byte 0x00
+ .byte 0x00
+ .long .LC.text
+ .long 0x000000a8
+ .long 0x00000000
+ .long 0x00000000
+ .long 0x0000001c
+ .byte 0x00
+ .byte 0x02
+ .long .LC.debug_info273
+ .long 0x04000000
+ .byte 0x00
+ .byte 0x00
+ .long .LC.text256
+ .long 0x00000044
+ .long 0x00000000
+ .long 0x00000000
+
+ .section ".debug_pubnames"
+ .align 0
+.LC.debug_pubnames:
+ .long 0x0000002f
+ .byte 0x00
+ .byte 0x02
+ .long .LC.debug_info
+ .long 0x00000111
+ .long 0x000000dc
+ .long 0x79000000
+ .long 0x00ec7a00
+ .long 0x000000fc
+ .long 0x5f5f6d6f
+ .long 0x64315f4e
+ .long 0x4d4f445f
+ .long 0x73756231
+ .long 0x00000000
+ .long 0x00000000
+ .byte 0x18
+ .byte 0x00
+ .byte 0x02
+ .long .LC.debug_info273
+ .long 0x00000127
+ .long 0x0000010f
+ .long 0x5f6d6169
+ .long 0x6e000000
+ .byte 0x00
+ .byte 0x00
+
+ .section ".debug_info"
+ .align 0
+.LC.debug_info:
+ .long 0x0000010d
+ .byte 0x00
+ .byte 0x02
+ .long .LC.debug_abbrev
+ .long 0x0401786c
+ .long 0x662d7661
+ .long 0x72696162
+ .long 0x6c652e66
+ .byte 0x00
+ .long .LC.debug_line
+ .long .LC.text
+ .long .LC.text168
+ .long 0x082f726f
+ .long 0x6f742f73
+ .long 0x65726769
+ .long 0x6f646a2f
+ .long 0x6764622d
+ .long 0x372e302e
+ .long 0x312d3432
+ .long 0x2e656c35
+ .long 0x2f676462
+ .long 0x2d372e30
+ .long 0x2e312f67
+ .long 0x64622f74
+ .long 0x65737473
+ .long 0x75697465
+ .long 0x2f676462
+ .long 0x2e666f72
+ .long 0x7472616e
+ .long 0x0049424d
+ .long 0x20584c20
+ .long 0x466f7274
+ .long 0x72616e20
+ .long 0x666f7220
+ .long 0x4c696e75
+ .long 0x782c2056
+ .long 0x31342e31
+ .long 0x20283537
+ .long 0x36352d4a
+ .long 0x30352c20
+ .long 0x35373235
+ .long 0x2d433735
+ .long 0x29205665
+ .long 0x7273696f
+ .long 0x6e203134
+ .long 0x2e30312e
+ .long 0x30303030
+ .long 0x2e303030
+ .long 0x30000249
+ .long 0x4e544547
+ .long 0x45520004
+ .long 0x05030005
+ .long 0x02524541
+ .long 0x4c000404
+ .long 0x04050000
+ .long 0x0000c706
+ .long 0x6d6f6431
+ .long 0x00070503
+ .long __N_mod1
+ .long 0x79000100
+ .long 0x01000000
+ .long 0xd0070503
+ .long __N__mod1
+ .long 0x7a000100
+ .long 0x01000000
+ .long 0xc7087375
+ .byte 0x62
+ .byte 0x31
+ .byte 0x00
+ .long .LC.text32
+ .long .LC.text168
+ .long 0x01180101
+ .byte 0x6f
+ .byte 0x00
+ .byte 0x00
+.LC.debug_info273:
+ .long 0x00000123
+ .byte 0x00
+ .byte 0x02
+ .long .LC.debug_abbrev97
+ .long 0x0401786c
+ .long 0x662d7661
+ .long 0x72696162
+ .long 0x6c652e66
+ .byte 0x00
+ .long .LC.debug_line98
+ .long .LC.text256
+ .long .LC.text324
+ .long 0x082f726f
+ .long 0x6f742f73
+ .long 0x65726769
+ .long 0x6f646a2f
+ .long 0x6764622d
+ .long 0x372e302e
+ .long 0x312d3432
+ .long 0x2e656c35
+ .long 0x2f676462
+ .long 0x2d372e30
+ .long 0x2e312f67
+ .long 0x64622f74
+ .long 0x65737473
+ .long 0x75697465
+ .long 0x2f676462
+ .long 0x2e666f72
+ .long 0x7472616e
+ .long 0x0049424d
+ .long 0x20584c20
+ .long 0x466f7274
+ .long 0x72616e20
+ .long 0x666f7220
+ .long 0x4c696e75
+ .long 0x782c2056
+ .long 0x31342e31
+ .long 0x20283537
+ .long 0x36352d4a
+ .long 0x30352c20
+ .long 0x35373235
+ .long 0x2d433735
+ .long 0x29205665
+ .long 0x7273696f
+ .long 0x6e203134
+ .long 0x2e30312e
+ .long 0x30303030
+ .long 0x2e303030
+ .long 0x30000249
+ .long 0x4e544547
+ .long 0x45520004
+ .long 0x05030005
+ .long 0x02524541
+ .long 0x4c000404
+ .long 0x04000000
+ .long 0xb9050000
+ .long 0x0000c706
+ .long 0x000000f4
+ .long 0x26264e26
+ .long 0x6d6f6431
+ .long 0x00080779
+ .long 0x00022300
+ .long 0x000000d4
+ .long 0x00060000
+ .long 0x010f2626
+ .long 0x4e26266d
+ .long 0x6f643100
+ .long 0x04077a00
+ .long 0x02230000
+ .long 0x0000c700
+ .long 0x085f6d61
+ .byte 0x69
+ .byte 0x6e
+ .byte 0x00
+ .long .LC.text256
+ .long .LC.text324
+ .long 0x0201016f
+ .long 0x000000b9
+ .byte 0x00
+
+ .section ".debug_abbrev"
+ .align 0
+.LC.debug_abbrev:
+ .long 0x01110103
+ .long 0x08100611
+ .long 0x01120113
+ .long 0x0b1b0825
+ .long 0x08000002
+ .long 0x24000308
+ .long 0x0b0b3e0b
+ .long 0x00000324
+ .long 0x000b0b3e
+ .long 0x0b000004
+ .long 0x15000000
+ .long 0x050f0033
+ .long 0x0b491300
+ .long 0x00061e01
+ .long 0x03080000
+ .long 0x07340002
+ .long 0x0a03083a
+ .long 0x0b3b0b3f
+ .long 0x0c491300
+ .long 0x00082e00
+ .long 0x03081101
+ .long 0x12013a0b
+ .long 0x3b0b3f0c
+ .long 0x400a0000
+ .byte 0x00
+.LC.debug_abbrev97:
+ .long 0x01110103
+ .long 0x08100611
+ .long 0x01120113
+ .long 0x0b1b0825
+ .long 0x08000002
+ .long 0x24000308
+ .long 0x0b0b3e0b
+ .long 0x00000324
+ .long 0x000b0b3e
+ .long 0x0b000004
+ .long 0x15004913
+ .long 0x0000050f
+ .long 0x00330b49
+ .long 0x13000006
+ .long 0x13010113
+ .long 0x03080b0b
+ .long 0x0000070d
+ .long 0x00030838
+ .long 0x0a491300
+ .long 0x00082e00
+ .long 0x03081101
+ .long 0x1201360b
+ .long 0x3f0c400a
+ .long 0x49130000
+ .byte 0x00
+
+ .section ".debug_line"
+ .align 0
+.LC.debug_line:
+ .long 0x0000005e
+ .long 0x00020000
+ .long 0x00220101
+ .long 0x9cdc0a00
+ .long 0x01010101
+ .long 0x00000001
+ .long 0x00786c66
+ .long 0x2d766172
+ .long 0x6961626c
+ .long 0x652e6600
+ .long 0x00000000
+ .long 0x04010005
+ .byte 0x02
+ .long .LC.text
+ .long 0x03130109
+ .long 0x000c0309
+ .long 0x01090014
+ .long 0x037b0109
+ .long 0x00180301
+ .long 0x01090038
+ .long 0x03010109
+ .long 0x000c0301
+ .long 0x01090014
+ .long 0x03010109
+ .long 0x00180001
+ .byte 0x01
+.LC.debug_line98:
+ .long 0x00000046
+ .long 0x00020000
+ .long 0x00220101
+ .long 0x9cdc0a00
+ .long 0x01010101
+ .long 0x00000001
+ .long 0x00786c66
+ .long 0x2d766172
+ .long 0x6961626c
+ .long 0x652e6600
+ .long 0x00000000
+ .long 0x04010005
+ .byte 0x02
+ .long .LC.text256
+ .long 0x031f0109
+ .long 0x00140300
+ .long 0x01090004
+ .long 0x03010109
+ .long 0x002c0001
+ .byte 0x01
+
+ .section ".debug_frame"
+ .align 0
+.LC.debug_frame:
+ .long 0x0000000c
+ .long 0xffffffff
+ .long 0x0100047c
+ .long 0x410c0100
+ .long 0x0000001c
+ .long .LC.debug_frame
+ .long .LC.text
+ .long 0x00000020
+ .long 0x410e2041
+ .long 0x9f01410d
+ .long 0x1f410a42
+ .long 0xdf420b00
+ .long 0x00000020
+ .long .LC.debug_frame
+ .long .LC.text32
+ .long 0x00000088
+ .long 0x410e2041
+ .long 0x9f01419e
+ .long 0x02410d1f
+ .long 0x590a42de
+ .long 0x41df420b
+.LC.debug_frame84:
+ .long 0x0000000c
+ .long 0xffffffff
+ .long 0x0100047c
+ .long 0x410c0100
+ .long 0x00000020
+ .long .LC.debug_frame84
+ .long .LC.text256
+ .long 0x00000044
+ .long 0x420e2041
+ .long 0x9f014111
+ .long 0x417f410d
+ .long 0x1f460a42
+ .long 0xdf440b00
+
+ .section ".debug_pubtypes"
+ .align 0
+.LC.debug_pubtypes:
+ .long 0x00000023
+ .byte 0x00
+ .byte 0x02
+ .long .LC.debug_info
+ .long 0x00000111
+ .long 0x000000b9
+ .long 0x494e5445
+ .long 0x47455200
+ .long 0x000000c7
+ .long 0x5245414c
+ .long 0x00000000
+ .long 0x00000000
+ .byte 0x3e
+ .byte 0x00
+ .byte 0x02
+ .long .LC.debug_info273
+ .long 0x00000127
+ .long 0x000000b9
+ .long 0x494e5445
+ .long 0x47455200
+ .long 0x000000c7
+ .long 0x5245414c
+ .long 0x00000000
+ .long 0xda26264e
+ .long 0x266d6f64
+ .long 0x31000000
+ .long 0x00f42626
+ .long 0x4e26266d
+ .long 0x6f643100
+ .long 0x00000000
+
+ .comm __N__mod1,4,16
diff --git a/gdb/testsuite/gdb.fortran/xlf-variable.exp b/gdb/testsuite/gdb.fortran/xlf-variable.exp
new file mode 100644
--- /dev/null
+++ b/gdb/testsuite/gdb.fortran/xlf-variable.exp
@@ -0,0 +1,37 @@
+# Copyright 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/>.
+
+# This test can only be run on PPC64 machines.
+
+if { ![istarget powerpc64-*] || ![is_ilp32_target] } {
+ return -1
+}
+
+set testfile "xlf-variable"
+set srcfile ${testfile}.S
+
+if { [prepare_for_testing $testfile.exp $testfile $srcfile] } {
+ return -1
+}
+
+if { ![runto_main] } {
+ return -1
+}
+
+gdb_test "step" ".*y => z.*" "y => z"
+gdb_test "step" ".*y = 3\.0.*" "y = 3.0"
+gdb_test "step" ".*nullify \\(y\\).*" "nullify (y)"
+gdb_test "print z" "= 3" "z = 3"
+gdb_test "ptype z" "= REAL" "z is REAL"
diff --git a/gdb/testsuite/gdb.fortran/xlf-variable.f b/gdb/testsuite/gdb.fortran/xlf-variable.f
new file mode 100644
--- /dev/null
+++ b/gdb/testsuite/gdb.fortran/xlf-variable.f
@@ -0,0 +1,33 @@
+c Copyright 2012 Free Software Foundation, Inc.
+c
+c This program is free software; you can redistribute it and/or modify
+c it under the terms of the GNU General Public License as published by
+c the Free Software Foundation; either version 3 of the License, or
+c (at your option) any later version.
+c
+c This program is distributed in the hope that it will be useful,
+c but WITHOUT ANY WARRANTY; without even the implied warranty of
+c MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
+c GNU General Public License for more details.
+c
+c You should have received a copy of the GNU General Public License
+c along with this program. If not, see <http://www.gnu.org/licenses/>.
+
+c This file is the Fortran source file for xlf-variable.f.
+c It was used to generate the assembly output called xlf-variable.S,
+c which was generated using IBM's XLF compiler.
+
+ module mod1
+ real, pointer :: y
+ real, target :: z
+ contains
+ subroutine sub1
+ y => z
+ y = 3.0
+ nullify (y)
+ end subroutine
+ end module
+
+ use mod1
+ call sub1
+ end

Some files were not shown because too many files have changed in this diff Show More