Compare commits

...

605 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
252 changed files with 23435 additions and 67095 deletions

View File

@ -1,2 +0,0 @@
gdb-7.1.tar.bz2
libstdc++-v3-python-r155978.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,21 +0,0 @@
# Makefile for source rpm: gdb
# $Id: Makefile,v 1.4 2009/11/26 01:53:59 notting Exp $
NAME := gdb
SPECFILE = $(firstword $(wildcard *.spec))
define find-makefile-common
for d in common ../common ../../common ; do if [ -f $$d/Makefile.common ] ; then if [ -f $$d/CVS/Root -a -w $$d/Makefile.common ] ; then cd $$d ; cvs -Q update ; fi ; echo "$$d/Makefile.common" ; break ; fi ; done
endef
MAKEFILE_COMMON := $(shell $(find-makefile-common))
ifeq ($(MAKEFILE_COMMON),)
# attempt a checkout
define checkout-makefile-common
test -f CVS/Root && { cvs -Q -d $$(cat CVS/Root) checkout common && echo "common/Makefile.common" ; } || { echo "ERROR: I can't figure out how to checkout the 'common' module." ; exit -1 ; } >&2
endef
MAKEFILE_COMMON := $(shell $(checkout-makefile-common))
endif
include $(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

@ -1,5 +1,15 @@
--- /dev/null 1 Jan 1970 00:00:00 -0000
+++ ./gdb/testsuite/gdb.base/attach-see-vdso.c 6 Jul 2007 14:14:44 -0000
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.
+
@ -26,9 +36,11 @@
+ pause ();
+ return 1;
+}
--- /dev/null 1 Jan 1970 00:00:00 -0000
+++ ./gdb/testsuite/gdb.base/attach-see-vdso.exp 6 Jul 2007 14:14:44 -0000
@@ -0,0 +1,79 @@
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
@ -47,13 +59,6 @@
+
+# This file was created by Jan Kratochvil <jan.kratochvil@redhat.com>.
+
+if $tracelevel then {
+ strace $tracelevel
+}
+
+set prms_id 0
+set bug_id 0
+
+# This test only works on Linux
+if { ![istarget "*-*-linux-gnu*"] } {
+ return 0
@ -61,8 +66,8 @@
+
+set testfile "attach-see-vdso"
+set srcfile ${testfile}.c
+set binfile ${objdir}/${subdir}/${testfile}
+set escapedbinfile [string_to_regexp ${objdir}/${subdir}/${testfile}]
+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).
+#

View File

@ -1,88 +0,0 @@
2005-12-01 Jeff Johnston <jjohnstn@redhat.com>
* frame.c (backtrace_past_zero_pc): New static variable.
(get_prev_frame): Don't return NULL for zero pc value if
backtrace past-zero-frame option is turned on.
(_initialize_frame): Initialize new command to allow backtracing
past a zero pc value (set backtrace past-zero-pc).
testsuite/gdb.base:
2005-12-01 Jeff Johnston <jjohnstn@redhat.com>
* setshow.exp: Add testing of "set backtrace past-zero-pc" option.
2007-10-15 Jan Kratochvil <jan.kratochvil@redhat.com>
Port to GDB-6.7.
Index: gdb-6.7/gdb/testsuite/gdb.base/setshow.exp
===================================================================
--- gdb-6.7.orig/gdb/testsuite/gdb.base/setshow.exp 2007-08-23 20:14:17.000000000 +0200
+++ gdb-6.7/gdb/testsuite/gdb.base/setshow.exp 2007-10-15 21:34:52.000000000 +0200
@@ -106,6 +106,16 @@ if { ![target_info exists use_gdb_stub]
delete_breakpoints
gdb_test "run" "Starting program:.*foo bar blup baz bubble.*" "passing args"
}
+#test show backtrace past-zero-pc
+gdb_test "show backtrace past-zero-pc" "Whether backtraces should continue past a zero pc value is off." "default show backtrace past-zero-pc (off)"
+#test set backtrace past-zero-pc on
+gdb_test "set backtrace past-zero-pc on" "" "set backtrace past-zero-pc on"
+#test show backtrace past-zero-pc
+gdb_test "show backtrace past-zero-pc" "Whether backtraces should continue past a zero pc value is on." "show backtrace past-zero-pc (on)"
+#test set backtrace past-zero-pc off
+gdb_test "set backtrace past-zero-pc off" "" "set backtrace past-zero-pc off"
+#test show backtrace past-zero-pc
+gdb_test "show backtrace past-zero-pc" "Whether backtraces should continue past a zero pc value is off." "show backtrace past-zero-pc (off)"
#test set check range on
gdb_test "set check range on" "" "set check range on"
#test show check range on
Index: gdb-6.7/gdb/frame.c
===================================================================
--- gdb-6.7.orig/gdb/frame.c 2007-10-12 22:35:58.000000000 +0200
+++ gdb-6.7/gdb/frame.c 2007-10-15 21:34:52.000000000 +0200
@@ -133,6 +133,16 @@ Whether backtraces should continue past
value);
}
+static int backtrace_past_zero_pc;
+static void
+show_backtrace_past_zero_pc (struct ui_file *file, int from_tty,
+ struct cmd_list_element *c, const char *value)
+{
+ fprintf_filtered (file, _("\
+Whether backtraces should continue past a zero pc value is %s.\n"),
+ value);
+}
+
static int backtrace_past_entry;
static void
show_backtrace_past_entry (struct ui_file *file, int from_tty,
@@ -1483,9 +1493,7 @@ get_prev_frame (struct frame_info *this_
}
if (this_frame->level > 0
-#if 0
- && backtrace_past_zero_pc
-#endif
+ && !backtrace_past_zero_pc
&& get_frame_type (this_frame) == NORMAL_FRAME
&& get_frame_type (get_next_frame (this_frame)) == NORMAL_FRAME
&& get_frame_pc (this_frame) == 0)
@@ -1850,6 +1858,17 @@ the rest of the stack trace."),
&set_backtrace_cmdlist,
&show_backtrace_cmdlist);
+ add_setshow_boolean_cmd ("past-zero-pc", class_obscure,
+ &backtrace_past_zero_pc, _("\
+Set whether backtraces should continue past a zero pc value."), _("\
+Show whether backtraces should continue past a zero pc value."), _("\
+Normally GDB stops backtracing when it finds a zero pc.\n\
+Set this variable if you need to see the rest of the stack trace."),
+ NULL,
+ show_backtrace_past_zero_pc,
+ &set_backtrace_cmdlist,
+ &show_backtrace_cmdlist);
+
add_setshow_integer_cmd ("limit", class_obscure,
&backtrace_limit, _("\
Set an upper bound on the number of backtrace levels."), _("\

View File

@ -1,6 +1,15 @@
diff -u -ruNp gdb-6.3-unpatched/gdb/testsuite/gdb.arch/powerpc-bcl-prologue-asm32.S gdb-6.3/gdb/testsuite/gdb.arch/powerpc-bcl-prologue-asm32.S
--- gdb-6.3-unpatched/gdb/testsuite/gdb.arch/powerpc-bcl-prologue-asm32.S 1969-12-31 19:00:00.000000000 -0500
+++ gdb-6.3/gdb/testsuite/gdb.arch/powerpc-bcl-prologue-asm32.S 2007-08-02 13:23:10.000000000 -0400
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.
+
@ -80,9 +89,10 @@ diff -u -ruNp gdb-6.3-unpatched/gdb/testsuite/gdb.arch/powerpc-bcl-prologue-asm3
+}
+
+*/
diff -u -ruNp gdb-6.3-unpatched/gdb/testsuite/gdb.arch/powerpc-bcl-prologue-asm64.S gdb-6.3/gdb/testsuite/gdb.arch/powerpc-bcl-prologue-asm64.S
--- gdb-6.3-unpatched/gdb/testsuite/gdb.arch/powerpc-bcl-prologue-asm64.S 1969-12-31 19:00:00.000000000 -0500
+++ gdb-6.3/gdb/testsuite/gdb.arch/powerpc-bcl-prologue-asm64.S 2007-08-02 14:28:56.000000000 -0400
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.
+
@ -182,9 +192,10 @@ diff -u -ruNp gdb-6.3-unpatched/gdb/testsuite/gdb.arch/powerpc-bcl-prologue-asm6
+}
+
+*/
diff -u -ruNp gdb-6.3-unpatched/gdb/testsuite/gdb.arch/powerpc-bcl-prologue.c gdb-6.3/gdb/testsuite/gdb.arch/powerpc-bcl-prologue.c
--- gdb-6.3-unpatched/gdb/testsuite/gdb.arch/powerpc-bcl-prologue.c 1969-12-31 19:00:00.000000000 -0500
+++ gdb-6.3/gdb/testsuite/gdb.arch/powerpc-bcl-prologue.c 2007-08-02 13:25:10.000000000 -0400
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.
+
@ -215,10 +226,11 @@ diff -u -ruNp gdb-6.3-unpatched/gdb/testsuite/gdb.arch/powerpc-bcl-prologue.c gd
+ func1 ();
+ return 0;
+}
diff -u -ruNp gdb-6.3-unpatched/gdb/testsuite/gdb.arch/powerpc-bcl-prologue.exp gdb-6.3/gdb/testsuite/gdb.arch/powerpc-bcl-prologue.exp
--- gdb-6.3-unpatched/gdb/testsuite/gdb.arch/powerpc-bcl-prologue.exp 1969-12-31 19:00:00.000000000 -0500
+++ gdb-6.3/gdb/testsuite/gdb.arch/powerpc-bcl-prologue.exp 2007-08-02 14:21:29.000000000 -0400
@@ -0,0 +1,79 @@
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
@ -238,13 +250,6 @@ diff -u -ruNp gdb-6.3-unpatched/gdb/testsuite/gdb.arch/powerpc-bcl-prologue.exp
+# Test unwinding fixes of the PPC platform, specifically on the coping with BCL
+# jump of the PIE code.
+
+if $tracelevel then {
+ strace $tracelevel
+}
+
+set prms_id 0
+set bug_id 0
+
+if ![istarget "powerpc*-*-linux*"] then {
+ verbose "Skipping powerpc-linux prologue tests."
+ return
@ -263,8 +268,8 @@ diff -u -ruNp gdb-6.3-unpatched/gdb/testsuite/gdb.arch/powerpc-bcl-prologue.exp
+ fail "powerpc arch test"
+ return
+}
+set objfile2 ${objdir}/${subdir}/${testfile}-asm.o
+set binfile ${objdir}/${subdir}/${testfile}
+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
@ -298,12 +303,10 @@ diff -u -ruNp gdb-6.3-unpatched/gdb/testsuite/gdb.arch/powerpc-bcl-prologue.exp
+ pass $test
+ }
+}
Fixup the testcase for ppc64 biarch GDB.
--- ./gdb/testsuite/gdb.arch/powerpc-prologue.exp 2008-01-13 13:32:19.000000000 +0100
+++ ./gdb/testsuite/gdb.arch/powerpc-prologue.exp 2008-01-02 00:04:10.000000000 +0100
@@ -17,8 +17,9 @@
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

View File

@ -1,10 +1,19 @@
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.
--- /dev/null 1 Jan 1970 00:00:00 -0000
+++ ./gdb/testsuite/gdb.threads/threaded-exec.c 17 Jan 2007 23:10:22 -0000
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.
+
@ -52,8 +61,10 @@
+ execl ("/bin/true", "/bin/true", NULL);
+ abort ();
+}
--- /dev/null 1 Jan 1970 00:00:00 -0000
+++ ./gdb/testsuite/gdb.threads/threaded-exec.exp 17 Jan 2007 23:10:22 -0000
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.
@ -77,7 +88,7 @@
+
+set testfile threaded-exec
+set srcfile ${testfile}.c
+set binfile ${objdir}/${subdir}/${testfile}
+set binfile [standard_output_file ${testfile}]
+
+if {[gdb_compile_pthreads "${srcdir}/${subdir}/${srcfile}" "${binfile}" executable []] != "" } {
+ return -1
@ -92,7 +103,7 @@
+gdb_run_cmd
+
+gdb_test_multiple {} "Program exited" {
+ -re "\r\nProgram exited normally.\r\n$gdb_prompt $" {
+ -re "\r\n\\\[Inferior .* exited normally\\\]\r\n$gdb_prompt $" {
+ pass "Program exited"
+ }
+}

View File

@ -1,201 +0,0 @@
https://bugzilla.redhat.com/bugzilla/show_bug.cgi?id=231832
Index: gdb-6.8/gdb/symmisc.c
===================================================================
--- gdb-6.8.orig/gdb/symmisc.c 2008-03-17 16:06:24.000000000 +0100
+++ gdb-6.8/gdb/symmisc.c 2008-07-14 10:27:50.000000000 +0200
@@ -230,8 +230,8 @@ print_objfile_statistics (void)
if (OBJSTAT (objfile, sz_strtab) > 0)
printf_filtered (_(" Space used by a.out string tables: %d\n"),
OBJSTAT (objfile, sz_strtab));
- printf_filtered (_(" Total memory used for objfile obstack: %d\n"),
- obstack_memory_used (&objfile->objfile_obstack));
+ printf_filtered (_(" Total memory used for objfile obstack: %ld\n"),
+ (long) obstack_memory_used (&objfile->objfile_obstack));
printf_filtered (_(" Total memory used for psymbol cache: %d\n"),
bcache_memory_used (objfile->psymbol_cache));
printf_filtered (_(" Total memory used for macro cache: %d\n"),
Index: gdb-6.8/include/obstack.h
===================================================================
--- gdb-6.8.orig/include/obstack.h 2005-05-10 12:21:08.000000000 +0200
+++ gdb-6.8/include/obstack.h 2008-07-14 10:27:50.000000000 +0200
@@ -188,31 +188,31 @@ struct obstack /* control current objec
/* Declare the external functions we use; they are in obstack.c. */
-extern void _obstack_newchunk (struct obstack *, int);
+extern void _obstack_newchunk (struct obstack *, PTR_INT_TYPE);
extern void _obstack_free (struct obstack *, void *);
-extern int _obstack_begin (struct obstack *, int, int,
+extern int _obstack_begin (struct obstack *, PTR_INT_TYPE, int,
void *(*) (long), void (*) (void *));
-extern int _obstack_begin_1 (struct obstack *, int, int,
+extern int _obstack_begin_1 (struct obstack *, PTR_INT_TYPE, int,
void *(*) (void *, long),
void (*) (void *, void *), void *);
-extern int _obstack_memory_used (struct obstack *);
+extern PTR_INT_TYPE _obstack_memory_used (struct obstack *);
/* Do the function-declarations after the structs
but before defining the macros. */
void obstack_init (struct obstack *obstack);
-void * obstack_alloc (struct obstack *obstack, int size);
+void * obstack_alloc (struct obstack *obstack, PTR_INT_TYPE size);
-void * obstack_copy (struct obstack *obstack, void *address, int size);
-void * obstack_copy0 (struct obstack *obstack, void *address, int size);
+void * obstack_copy (struct obstack *obstack, void *address, PTR_INT_TYPE size);
+void * obstack_copy0 (struct obstack *obstack, void *address, PTR_INT_TYPE size);
void obstack_free (struct obstack *obstack, void *block);
-void obstack_blank (struct obstack *obstack, int size);
+void obstack_blank (struct obstack *obstack, PTR_INT_TYPE size);
-void obstack_grow (struct obstack *obstack, void *data, int size);
-void obstack_grow0 (struct obstack *obstack, void *data, int size);
+void obstack_grow (struct obstack *obstack, void *data, PTR_INT_TYPE size);
+void obstack_grow0 (struct obstack *obstack, void *data, PTR_INT_TYPE size);
void obstack_1grow (struct obstack *obstack, int data_char);
void obstack_ptr_grow (struct obstack *obstack, void *data);
@@ -220,20 +220,20 @@ void obstack_int_grow (struct obstack *o
void * obstack_finish (struct obstack *obstack);
-int obstack_object_size (struct obstack *obstack);
+PTR_INT_TYPE obstack_object_size (struct obstack *obstack);
-int obstack_room (struct obstack *obstack);
-void obstack_make_room (struct obstack *obstack, int size);
+PTR_INT_TYPE obstack_room (struct obstack *obstack);
+void obstack_make_room (struct obstack *obstack, PTR_INT_TYPE size);
void obstack_1grow_fast (struct obstack *obstack, int data_char);
void obstack_ptr_grow_fast (struct obstack *obstack, void *data);
void obstack_int_grow_fast (struct obstack *obstack, int data);
-void obstack_blank_fast (struct obstack *obstack, int size);
+void obstack_blank_fast (struct obstack *obstack, PTR_INT_TYPE size);
void * obstack_base (struct obstack *obstack);
void * obstack_next_free (struct obstack *obstack);
int obstack_alignment_mask (struct obstack *obstack);
-int obstack_chunk_size (struct obstack *obstack);
-int obstack_memory_used (struct obstack *obstack);
+size_t obstack_chunk_size (struct obstack *obstack);
+size_t obstack_memory_used (struct obstack *obstack);
/* Error handler called when `obstack_chunk_alloc' failed to allocate
more memory. This can be set to a user defined function. The
@@ -318,7 +318,7 @@ extern int obstack_exit_failure;
# define obstack_make_room(OBSTACK,length) \
__extension__ \
({ struct obstack *__o = (OBSTACK); \
- int __len = (length); \
+ PTR_INT_TYPE __len = (length); \
if (__o->chunk_limit - __o->next_free < __len) \
_obstack_newchunk (__o, __len); \
(void) 0; })
@@ -331,7 +331,7 @@ __extension__ \
# define obstack_grow(OBSTACK,where,length) \
__extension__ \
({ struct obstack *__o = (OBSTACK); \
- int __len = (length); \
+ PTR_INT_TYPE __len = (length); \
if (__o->next_free + __len > __o->chunk_limit) \
_obstack_newchunk (__o, __len); \
_obstack_memcpy (__o->next_free, (where), __len); \
@@ -341,7 +341,7 @@ __extension__ \
# define obstack_grow0(OBSTACK,where,length) \
__extension__ \
({ struct obstack *__o = (OBSTACK); \
- int __len = (length); \
+ PTR_INT_TYPE __len = (length); \
if (__o->next_free + __len + 1 > __o->chunk_limit) \
_obstack_newchunk (__o, __len + 1); \
_obstack_memcpy (__o->next_free, (where), __len); \
@@ -392,7 +392,7 @@ __extension__ \
# define obstack_blank(OBSTACK,length) \
__extension__ \
({ struct obstack *__o = (OBSTACK); \
- int __len = (length); \
+ PTR_INT_TYPE __len = (length); \
if (__o->chunk_limit - __o->next_free < __len) \
_obstack_newchunk (__o, __len); \
obstack_blank_fast (__o, __len); \
@@ -532,7 +532,7 @@ __extension__ \
# define obstack_free(h,obj) \
( (h)->temp = (char *) (obj) - (char *) (h)->chunk, \
(((h)->temp > 0 && (h)->temp < (h)->chunk_limit - (char *) (h)->chunk)\
- ? (int) ((h)->next_free = (h)->object_base \
+ ? (PTR_INT_TYPE) ((h)->next_free = (h)->object_base \
= (h)->temp + (char *) (h)->chunk) \
: (((obstack_free) ((h), (h)->temp + (char *) (h)->chunk), 0), 0)))
Index: gdb-6.8/libiberty/obstack.c
===================================================================
--- gdb-6.8.orig/libiberty/obstack.c 2005-05-10 17:33:33.000000000 +0200
+++ gdb-6.8/libiberty/obstack.c 2008-07-14 10:27:50.000000000 +0200
@@ -44,9 +44,11 @@
#if !defined (_LIBC) && defined (__GNU_LIBRARY__) && __GNU_LIBRARY__ > 1
#include <gnu-versions.h>
#if _GNU_OBSTACK_INTERFACE_VERSION == OBSTACK_INTERFACE_VERSION
+#if 0 /* 64-bit obstack is not compatible with any glibc implementation. */
#define ELIDE_CODE
#endif
#endif
+#endif
#ifndef ELIDE_CODE
@@ -139,7 +141,7 @@ struct obstack *_obstack;
free up some memory, then call this again. */
int
-_obstack_begin (struct obstack *h, int size, int alignment,
+_obstack_begin (struct obstack *h, PTR_INT_TYPE size, int alignment,
POINTER (*chunkfun) (long), void (*freefun) (void *))
{
register struct _obstack_chunk *chunk; /* points to new chunk */
@@ -183,7 +185,7 @@ _obstack_begin (struct obstack *h, int s
}
int
-_obstack_begin_1 (struct obstack *h, int size, int alignment,
+_obstack_begin_1 (struct obstack *h, PTR_INT_TYPE size, int alignment,
POINTER (*chunkfun) (POINTER, long),
void (*freefun) (POINTER, POINTER), POINTER arg)
{
@@ -235,7 +237,7 @@ _obstack_begin_1 (struct obstack *h, int
to the beginning of the new one. */
void
-_obstack_newchunk (struct obstack *h, int length)
+_obstack_newchunk (struct obstack *h, PTR_INT_TYPE length)
{
register struct _obstack_chunk *old_chunk = h->chunk;
register struct _obstack_chunk *new_chunk;
@@ -388,11 +390,11 @@ obstack_free (struct obstack *h, POINTER
abort ();
}
-int
+PTR_INT_TYPE
_obstack_memory_used (struct obstack *h)
{
register struct _obstack_chunk* lp;
- register int nbytes = 0;
+ register PTR_INT_TYPE nbytes = 0;
for (lp = h->chunk; lp != 0; lp = lp->prev)
{
@@ -421,6 +423,7 @@ print_and_abort (void)
}
#if 0
+/* These functions are now broken for 64-bit obstack! */
/* These are now turned off because the applications do not use it
and it uses bcopy via obstack_grow, which causes trouble on sysV. */

View File

@ -1,6 +1,16 @@
--- /dev/null 2008-03-23 13:41:46.072650180 +0100
+++ gdb-6.3/gdb/testsuite/gdb.base/focus-cmd-prev.exp 2008-03-23 23:46:45.000000000 +0100
@@ -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-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
@ -24,5 +34,20 @@
+gdb_exit
+gdb_start
+
+gdb_test "focus cmd"
+gdb_test "focus prev"
+# 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

@ -1,28 +0,0 @@
2004-09-27 Andrew Cagney <cagney@gnu.org>
* frame.c (get_prev_frame): Stop backtrace when a zero PC and
successive normal frames.
Index: gdb-6.8.50.20081128/gdb/frame.c
===================================================================
--- gdb-6.8.50.20081128.orig/gdb/frame.c 2008-12-04 01:34:37.000000000 +0100
+++ gdb-6.8.50.20081128/gdb/frame.c 2008-12-04 01:35:47.000000000 +0100
@@ -1566,6 +1566,18 @@ get_prev_frame (struct frame_info *this_
return NULL;
}
+ if (this_frame->level > 0
+#if 0
+ && backtrace_past_zero_pc
+#endif
+ && get_frame_type (this_frame) == NORMAL_FRAME
+ && get_frame_type (get_next_frame (this_frame)) == NORMAL_FRAME
+ && get_frame_pc (this_frame) == 0)
+ {
+ frame_debug_got_null_frame (this_frame, "zero PC");
+ return NULL;
+ }
+
return get_prev_frame_1 (this_frame);
}

View File

@ -1,25 +0,0 @@
2005-02-07 Jeff Johnston <jjohnstn@redhat.com>
* linux-nat.c (linux_nat_xfer_memory): Don't use
linux_proc_xfer_memory for ia64.
Index: gdb-6.8.50.20090803/gdb/linux-nat.c
===================================================================
--- gdb-6.8.50.20090803.orig/gdb/linux-nat.c 2009-08-04 06:29:47.000000000 +0200
+++ gdb-6.8.50.20090803/gdb/linux-nat.c 2009-08-04 06:29:55.000000000 +0200
@@ -4495,10 +4495,15 @@ linux_xfer_partial (struct target_ops *o
offset &= ((ULONGEST) 1 << addr_bit) - 1;
}
+#ifndef NATIVE_XFER_UNWIND_TABLE
+ /* FIXME: For ia64, we cannot currently use linux_proc_xfer_memory
+ for accessing thread storage. Revert when Bugzilla 147436
+ is fixed. */
xfer = linux_proc_xfer_partial (ops, object, annex, readbuf, writebuf,
offset, len);
if (xfer != 0)
return xfer;
+#endif
return super_xfer_partial (ops, object, annex, readbuf, writebuf,
offset, len);

View File

@ -1,25 +1,35 @@
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 -up -ruNp gdb-7.0.1-empty/gdb/Makefile.in gdb-7.0.1/gdb/Makefile.in
--- gdb-7.0.1-empty/gdb/Makefile.in 2010-04-07 20:36:04.000000000 +0200
+++ gdb-7.0.1/gdb/Makefile.in 2010-04-07 20:36:42.000000000 +0200
@@ -989,7 +989,7 @@ install: all install-only
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
# The "install-only" target also installs the syscalls' XML files in
# the system.
-install-only: $(CONFIG_INSTALL) xml-syscall-install
+install-only: install-gstack $(CONFIG_INSTALL) xml-syscall-install
-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 \
@@ -1021,9 +1021,26 @@ install-tui:
$(DESTDIR)$(man1dir) ; \
$(INSTALL_DATA) $(srcdir)/gdb.1 \
$(DESTDIR)$(man1dir)/$$transformed_name.1
@@ -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:
@ -37,17 +47,15 @@ diff -up -ruNp gdb-7.0.1-empty/gdb/Makefile.in gdb-7.0.1/gdb/Makefile.in
+ $(DESTDIR)$(man1dir) ; \
+ : $(INSTALL_DATA) $(srcdir)/gstack.1 \
+ $(DESTDIR)$(man1dir)/$$transformed_name.1
-uninstall: force $(CONFIG_UNINSTALL)
+
+uninstall: force uninstall-gstack $(CONFIG_UNINSTALL)
transformed_name=`t='$(program_transform_name)'; \
echo gdb | sed -e $$t` ; \
if test "x$$transformed_name" = x; then \
@@ -1045,6 +1062,17 @@ uninstall-tui:
fi ; \
rm -f $(DESTDIR)$(bindir)/$$transformed_name$(EXEEXT) \
$(DESTDIR)$(man1dir)/$$transformed_name.1
@@ -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)'; \
@ -59,13 +67,15 @@ diff -up -ruNp gdb-7.0.1-empty/gdb/Makefile.in gdb-7.0.1/gdb/Makefile.in
+ 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
diff -up -ruNp gdb-7.0.1-empty/gdb/gstack.sh gdb-7.0.1/gdb/gstack.sh
--- gdb-7.0.1-empty/gdb/gstack.sh 1970-01-01 01:00:00.000000000 +0100
+++ gdb-7.0.1/gdb/gstack.sh 2010-04-07 20:36:47.000000000 +0200
@@ -0,0 +1,48 @@
$(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
@ -95,16 +105,11 @@ diff -up -ruNp gdb-7.0.1-empty/gdb/gstack.sh gdb-7.0.1/gdb/gstack.sh
+ fi
+fi
+
+GDB=${GDB:-/usr/bin/gdb}
+
+if $GDB -nx --quiet --batch --readnever > /dev/null 2>&1; then
+ readnever=--readnever
+else
+ readnever=
+fi
+GDB=${GDB:-gdb}
+
+# Run GDB, strip out unwanted noise.
+$GDB --quiet $readnever -nx /proc/$1/exe $1 <<EOF 2>&1 |
+# --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
@ -114,82 +119,10 @@ diff -up -ruNp gdb-7.0.1-empty/gdb/gstack.sh gdb-7.0.1/gdb/gstack.sh
+ -e 's/^\((gdb) \)*//' \
+ -e '/^#/p' \
+ -e '/^Thread/p'
--- /dev/null 2010-04-07 06:20:52.289994508 +0200
+++ gdb-7.0.1/gdb/testsuite/gdb.base/gstack.exp 2010-04-07 21:53:57.000000000 +0200
@@ -0,0 +1,71 @@
+# Copyright (C) 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/>.
+
+set testfile gstack
+set executable ${testfile}
+set binfile ${objdir}/${subdir}/$executable
+if {[build_executable ${testfile} ${executable} "" {debug}] == -1} {
+ return -1
+}
+
+set test "spawn inferior"
+set command "${binfile}"
+set res [remote_spawn host $command];
+if { $res < 0 || $res == "" } {
+ perror "Spawning $command failed."
+ fail $test
+ return
+}
+set pid [exp_pid -i $res]
+gdb_expect {
+ -re "looping\r\n" {
+ pass $test
+ }
+ eof {
+ fail "$test (eof)"
+ return
+ }
+ timeout {
+ fail "$test (timeout)"
+ return
+ }
+}
+gdb_exit
+
+# Testcase uses the most simple notification not to get caught by attach on
+# exiting the function. Still we could retry the gstack command if we fail.
+
+set test "spawn gstack"
+set command "sh -c GDB=$GDB\\ sh\\ ${srcdir}/../gstack.sh\\ $pid\\;echo\\ GSTACK-END"
+set res [remote_spawn host $command];
+if { $res < 0 || $res == "" } {
+ perror "Spawning $command failed."
+ fail $test
+}
+set pid [exp_pid -i $res]
+gdb_expect {
+ -re {^#0 +0x[0-9a-f]+ in \.?func \(\)\r\n#1 +0x[0-9a-f]+ in \.?main \(\)\r\nGSTACK-END\r\n$} {
+ pass $test
+ }
+ eof {
+ fail "$test (eof)"
+ }
+ timeout {
+ fail "$test (timeout)"
+ }
+}
+gdb_exit
+
+remote_exec host "kill -9 $pid"
--- /dev/null 2010-04-07 06:20:52.289994508 +0200
+++ gdb-7.0.1/gdb/testsuite/gdb.base/gstack.c 2010-04-07 21:46:52.000000000 +0200
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.
+
@ -234,3 +167,92 @@ diff -up -ruNp gdb-7.0.1-empty/gdb/gstack.sh gdb-7.0.1/gdb/gstack.sh
+
+ 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

@ -1,20 +0,0 @@
Index: gdb-6.8.50.20090802/gdb/gcore.c
===================================================================
--- gdb-6.8.50.20090802.orig/gdb/gcore.c 2009-08-03 12:27:55.000000000 +0200
+++ gdb-6.8.50.20090802/gdb/gcore.c 2009-08-03 12:28:56.000000000 +0200
@@ -479,8 +479,14 @@ gcore_copy_callback (bfd *obfd, asection
if (size > total_size)
size = total_size;
+ /* Warn if read error occurs except if we were trying to read the
+ first page for ia64. The first page is marked readable, but it cannot
+ be read. */
if (target_read_memory (bfd_section_vma (obfd, osec) + offset,
- memhunk, size) != 0)
+ memhunk, size) != 0
+ && (strcmp (gdbarch_bfd_arch_info (target_gdbarch)->arch_name,
+ "ia64")
+ || bfd_section_vma (obfd, osec) != 0))
{
warning (_("Memory read failed for corefile section, %s bytes at %s."),
plongest (size),

View File

@ -1,126 +0,0 @@
2005-07-14 Jeff Johnsotn <jjohnstn@redhat.com>
* linux-nat.c (linux_nat_xfer_memory): Incorporate Fujitsu
work-around to use /proc/mem for storage, but to fall-back
to PTRACE for ia64 rse register areas.
* ia64-linux-nat.c (ia64_rse_slot_num): New static function.
(ia64_rse_skip_regs): Ditto.
(ia64_linux_check_stack_region): New function.
Index: gdb-6.8.50.20090803/gdb/linux-nat.c
===================================================================
--- gdb-6.8.50.20090803.orig/gdb/linux-nat.c 2009-08-04 06:29:55.000000000 +0200
+++ gdb-6.8.50.20090803/gdb/linux-nat.c 2009-08-04 06:30:53.000000000 +0200
@@ -4495,15 +4495,38 @@ linux_xfer_partial (struct target_ops *o
offset &= ((ULONGEST) 1 << addr_bit) - 1;
}
-#ifndef NATIVE_XFER_UNWIND_TABLE
- /* FIXME: For ia64, we cannot currently use linux_proc_xfer_memory
- for accessing thread storage. Revert when Bugzilla 147436
- is fixed. */
xfer = linux_proc_xfer_partial (ops, object, annex, readbuf, writebuf,
offset, len);
if (xfer != 0)
- return xfer;
+ {
+#ifdef NATIVE_XFER_UNWIND_TABLE
+ struct mem_region range;
+ range.lo = memaddr;
+ range.hi = memaddr + len;
+
+ /* FIXME: For ia64, we cannot currently use
+ linux_proc_xfer_partial for accessing rse register storage.
+ Revert when Bugzilla 147436 is fixed. */
+#ifdef NATIVE_XFER_UNWIND_TABLE
+ extern int ia64_linux_check_stack_region (struct lwp_info *lwp,
+ void *range);
+#endif
+ if (iterate_over_lwps (ia64_linux_check_stack_region, &range) != NULL)
+ { /* This region contains ia64 rse registers, we have to re-read. */
+ int xxfer;
+
+ /* Re-read register stack area. */
+ xxfer = super_xfer_partial (ops, object, annex,
+ readbuf + (range.lo - memaddr),
+ writebuf + (range.lo - memaddr),
+ offset + (range.lo - memaddr),
+ range.hi - range.lo);
+ if (xxfer == 0)
+ xfer = 0;
+ }
#endif
+ return xfer;
+ }
return super_xfer_partial (ops, object, annex, readbuf, writebuf,
offset, len);
Index: gdb-6.8.50.20090803/gdb/ia64-linux-nat.c
===================================================================
--- gdb-6.8.50.20090803.orig/gdb/ia64-linux-nat.c 2009-02-23 01:03:49.000000000 +0100
+++ gdb-6.8.50.20090803/gdb/ia64-linux-nat.c 2009-08-04 06:30:53.000000000 +0200
@@ -809,6 +809,64 @@ ia64_linux_xfer_partial (struct target_o
void _initialize_ia64_linux_nat (void);
+/*
+ * Note: taken from ia64_tdep.c
+ *
+ */
+
+static __inline__ unsigned long
+ia64_rse_slot_num (unsigned long addr)
+{
+ return (addr >> 3) & 0x3f;
+}
+
+/* Skip over a designated number of registers in the backing
+ store, remembering every 64th position is for NAT. */
+static __inline__ unsigned long
+ia64_rse_skip_regs (unsigned long addr, long num_regs)
+{
+ long delta = ia64_rse_slot_num(addr) + num_regs;
+
+ if (num_regs < 0)
+ delta -= 0x3e;
+ return addr + ((num_regs + delta/0x3f) << 3);
+}
+
+/*
+ * Check mem_region is stack or not. If stack, /proc/<pid>/mem cannot return
+ * expected value.
+ */
+int ia64_linux_check_stack_region(struct lwp_info *ti, struct mem_region *range)
+{
+ CORE_ADDR addr;
+ int error;
+ unsigned long bsp, cfm, bspstore;
+ long sof;
+ pid_t pid = ptid_get_lwp(ti->ptid);
+ bsp = ptrace(PTRACE_PEEKUSER, pid, PT_AR_BSP ,NULL);
+ if (bsp == (unsigned long)-1) {
+ return 1;
+ }
+ /* stack is allocated by one-segment, not separated into several segments.
+ So, we only have to check whether bsp is in *range* or not. */
+ if((range->lo <= bsp) && (bsp <= range->hi)) {
+ bspstore = ptrace(PTRACE_PEEKUSER, pid, PT_AR_BSPSTORE, NULL);
+ cfm = ptrace(PTRACE_PEEKUSER, pid, PT_CFM, NULL);
+ sof = cfm & 0x3f;
+ bsp = ia64_rse_skip_regs(bsp, -sof);
+ range->lo = bspstore;
+ range->hi = bsp;
+ /* we have to check the size of dirty register stack area */
+ /*
+ fprintf_unfiltered(gdb_stdlog, "<%d> <%p> <%lx> <%p> <%p>\n",
+ pid, bsp, sof, range->lo, range->hi);
+ */
+ return 1;
+ }
+
+ return 0;
+}
+
void
_initialize_ia64_linux_nat (void)
{

View File

@ -1,117 +0,0 @@
2005-07-25 Jeff Johnstno <jjohnstn@redhat.com>
* libunwind-frame.c (libunwind_frame_prev_register): Check valuep
is not NULL before copying cursor address into it.
testsuite:
2005-07-25 Jeff Johnstno <jjohnstn@redhat.com>
* gdb.arch/ia64-sigtramp.exp: New test.
* gdb.arch/ia64-sigtramp.c: Ditto.
2008-02-24 Jan Kratochvil <jan.kratochvil@redhat.com>
Port to GDB-6.8pre. (Only the testcase has remained.)
--- gdb-6.3/gdb/testsuite/gdb.arch/ia64-sigtramp.c.fix 2005-07-25 16:42:46.000000000 -0400
+++ gdb-6.3/gdb/testsuite/gdb.arch/ia64-sigtramp.c 2005-07-25 16:42:08.000000000 -0400
@@ -0,0 +1,23 @@
+#include <stdio.h>
+#include <signal.h>
+
+int *l;
+
+void x (int sig)
+{
+ printf ("in signal handler for signal %d\n", sig);
+}
+
+int main()
+{
+ int k;
+
+ signal (SIGSEGV, &x);
+
+ k = *l;
+
+ printf ("k is %d\n", k);
+
+ return 0;
+}
+
--- gdb-6.3/gdb/testsuite/gdb.arch/ia64-sigtramp.exp.fix 2005-07-25 16:42:50.000000000 -0400
+++ gdb-6.3/gdb/testsuite/gdb.arch/ia64-sigtramp.exp 2005-07-25 16:42:01.000000000 -0400
@@ -0,0 +1,73 @@
+# 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.
+
+# Please email any bugs, comments, and/or additions to this file to:
+# bug-gdb@prep.ai.mit.edu
+
+# This file was written by Jeff Johnston (jjohnstn@redhat.com)
+
+if $tracelevel then {
+ strace $tracelevel
+}
+
+#
+# test running programs
+#
+set prms_id 0
+set bug_id 0
+
+if ![istarget "ia64-*-*"] then {
+ return
+}
+
+set testfile "ia64-sigtramp"
+set srcfile ${testfile}.c
+set binfile ${objdir}/${subdir}/${testfile}
+
+if { [gdb_compile "${srcdir}/${subdir}/${srcfile}" "${binfile}" executable {debug additional_flags=-w}] != "" } {
+ gdb_suppress_entire_file "Testcase compile failed, so all tests in this file will automatically fail."
+}
+
+if [get_compiler_info ${binfile}] {
+ return -1
+}
+
+gdb_exit
+set match_max_old [match_max]
+match_max -d 1000000
+gdb_start
+match_max -d $match_max_old
+gdb_reinitialize_dir $srcdir/$subdir
+gdb_load ${binfile}
+
+if ![runto_main] then {
+ fail "Can't run to main"
+ return 0
+}
+
+gdb_test "handle SIGSEGV" "SIGSEGV.*Yes.*Yes.*Yes.*Segmentation fault"
+gdb_test "next" "" "first next"
+gdb_test "next" "Program received signal SIGSEGV.*" "getting SIGSEGV"
+gdb_breakpoint "x"
+gdb_test "continue" "Breakpoint.*x.*" "continue to x"
+
+gdb_test "f 1" ".*signal handler called.*" "frame 1"
+
+# gdb-7.0+ no longer prints the pseudo registers as they are computed.
+# frame_info says: /* For moment, only display registers that were saved on the
+# stack. */
+gdb_test "set debug frame 1"
+gdb_test "info frame" "Stack level 1, .*frame_unwind_register_value \\(frame=1,regnum=750\\(p63\\),\[^\r\n\]*\r\n\[^\r\n\]*-> computed bytes=.*" "info sigtramp frame"

View File

@ -1,116 +0,0 @@
2005-11-15 Jeff Johnston <jjohnstn@redhat.com>
* linux-thread-db.c (thread_db_wait): Don't bother continuing if
the wait result indicates the program terminated with a signal.
* linux-nat.c (linux_nat_wait): For SIGILL and SIGTRAP, don't
throw away the event if the user has specified nostop noprint.
gdb/testsuite:
2005-11-15 Jeff Johnston <jjohnstn@redhat.com>
* gdb.arch/ia64-sigill.c: New test.
* gdb.arch/ia64-sigill.exp: Ditto.
Index: gdb-6.8.50.20081128/gdb/testsuite/gdb.arch/ia64-sigill.exp
===================================================================
--- /dev/null 1970-01-01 00:00:00.000000000 +0000
+++ gdb-6.8.50.20081128/gdb/testsuite/gdb.arch/ia64-sigill.exp 2008-12-02 21:10:57.000000000 +0100
@@ -0,0 +1,59 @@
+# 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.
+
+# Please email any bugs, comments, and/or additions to this file to:
+# bug-gdb@prep.ai.mit.edu
+
+# This file was written by Jeff Johnston (jjohnstn@redhat.com)
+
+if $tracelevel then {
+ strace $tracelevel
+}
+
+#
+# test running programs
+#
+set prms_id 0
+set bug_id 0
+
+if ![istarget "ia64-*-*"] then {
+ return
+}
+
+set testfile "ia64-sigill"
+set srcfile ${testfile}.c
+set binfile ${objdir}/${subdir}/${testfile}
+
+# Deliberately compile with pthreads, even though test is single-threaded.
+# We want to force gdb thread code to be exercised.
+if { [gdb_compile_pthreads "${srcdir}/${subdir}/${srcfile}" "${binfile}" executable {debug additional_flags=-w}] != "" } {
+ gdb_suppress_entire_file "Testcase compile failed, so all tests in this file will automatically fail."
+}
+
+if [get_compiler_info ${binfile}] {
+ return -1
+}
+
+gdb_exit
+gdb_start
+gdb_reinitialize_dir $srcdir/$subdir
+gdb_load ${binfile}
+
+# We set up SIGILL nostop, noprint, pass and then run the program.
+# We expect to just see a normal run.
+gdb_test "handle SIGILL nostop noprint" "SIGILL.*No.*No.*Yes.*" "handle sigill"
+gdb_test "run" "Starting program.*ia64-sigill.*\[New thread.*\].*hello world.*Program exited normally." "run to exit"
+
Index: gdb-6.8.50.20081128/gdb/testsuite/gdb.arch/ia64-sigill.c
===================================================================
--- /dev/null 1970-01-01 00:00:00.000000000 +0000
+++ gdb-6.8.50.20081128/gdb/testsuite/gdb.arch/ia64-sigill.c 2008-12-02 21:10:57.000000000 +0100
@@ -0,0 +1,8 @@
+#include <stdio.h>
+
+int main()
+{
+ printf ("hello world\n");
+ return 0;
+}
+
Index: gdb-6.8.50.20081128/gdb/linux-nat.c
===================================================================
--- gdb-6.8.50.20081128.orig/gdb/linux-nat.c 2008-12-02 19:04:38.000000000 +0100
+++ gdb-6.8.50.20081128/gdb/linux-nat.c 2008-12-02 21:11:11.000000000 +0100
@@ -2974,7 +2974,8 @@ retry:
threads can be a bit time-consuming so if we want decent
performance with heavily multi-threaded programs, especially when
they're using a high frequency timer, we'd better avoid it if we
- can. */
+ can. For possible trap signals like SIGTRAP and SIGILL, don't
+ avoid reporting. */
if (WIFSTOPPED (status))
{
@@ -2992,7 +2993,9 @@ retry:
&& inf->stop_soon == NO_STOP_QUIETLY
&& signal_stop_state (signo) == 0
&& signal_print_state (signo) == 0
- && signal_pass_state (signo) == 1)
+ && signal_pass_state (signo) == 1
+ && signo != TARGET_SIGNAL_ILL
+ && signo != TARGET_SIGNAL_TRAP)
{
/* FIMXE: kettenis/2001-06-06: Should we resume all threads
here? It is not clear we should. GDB may not expect

View File

@ -1,158 +0,0 @@
2005-07-08 Jeff Johnston <jjohnstn@redhat.com>
* ia64-tdep.c (ia64_sigtramp_frame_prev_register): Build
pseudo-registers the same as ia64_pseudo_register_read.
2008-04-16 Yi Zhan <yi.zhan@intel.com>
* ia64-tdep.c (ia64_sigtramp_frame_prev_register): Fix an
ISO C compliance compilation error.
2008-02-12 Jan Kratochvil <jan.kratochvil@redhat.com>
Port to gdb-6.8.50.20081128, follow the upstream change:
http://sourceware.org/cgi-bin/cvsweb.cgi/src/gdb/ia64-tdep.c.diff?cvsroot=src&r1=1.176&r2=1.177
Index: gdb-6.8.50.20081128/gdb/ia64-tdep.c
===================================================================
--- gdb-6.8.50.20081128.orig/gdb/ia64-tdep.c 2008-11-26 06:27:48.000000000 +0100
+++ gdb-6.8.50.20081128/gdb/ia64-tdep.c 2008-12-02 19:04:32.000000000 +0100
@@ -2107,6 +2107,94 @@ ia64_sigtramp_frame_prev_register (struc
return frame_unwind_got_constant (this_frame, regnum, pc);
}
+ /* Red Hat patch begin. */
+ else if (IA64_NAT0_REGNUM <= regnum && regnum <= IA64_NAT31_REGNUM)
+ {
+ /* NAT pseudo registers 0-31: get them from UNAT.
+ * "copied" from ia64_pseudo_register_read() */
+ ULONGEST unatN_val;
+ ULONGEST unat;
+ read_memory (cache->saved_regs[IA64_UNAT_REGNUM], (char *) &unat,
+ register_size (target_gdbarch, IA64_UNAT_REGNUM));
+ unatN_val = (unat & (1LL << (regnum - IA64_NAT0_REGNUM))) != 0;
+ return frame_unwind_got_constant (this_frame, regnum, unatN_val);
+ }
+ else if (IA64_NAT32_REGNUM <= regnum && regnum <= IA64_NAT127_REGNUM)
+ {
+ /* NAT pseudo registers 32-127.
+ * "copied" from ia64_pseudo_register_read()
+ * FIXME: Not currently tested -- cannot get the frame to include
+ * NAT32-NAT127. */
+ ULONGEST bsp;
+ ULONGEST cfm;
+ ULONGEST natN_val = 0;
+ CORE_ADDR gr_addr = 0, nat_addr = 0;
+
+ read_memory (cache->saved_regs[IA64_BSP_REGNUM], (char *) &bsp,
+ register_size (target_gdbarch, IA64_BSP_REGNUM));
+ read_memory (cache->saved_regs[IA64_CFM_REGNUM], (char *) &cfm,
+ register_size (target_gdbarch, IA64_CFM_REGNUM));
+
+ /* The bsp points at the end of the register frame so we
+ subtract the size of frame from it to get start of register frame. */
+ bsp = rse_address_add (bsp, -(cfm & 0x7f));
+
+ if ((cfm & 0x7f) > regnum - V32_REGNUM)
+ gr_addr = rse_address_add (bsp, (regnum - V32_REGNUM));
+
+ if (gr_addr != 0)
+ {
+ /* Compute address of nat collection bits */
+ CORE_ADDR nat_collection;
+ int nat_bit;
+ nat_addr = gr_addr | 0x1f8;
+ /* If our nat collection address is bigger than bsp, we have to get
+ the nat collection from rnat. Otherwise, we fetch the nat
+ collection from the computed address. FIXME: Do not know if
+ RNAT can be not stored in the frame--being extra cautious. */
+ if (nat_addr >= bsp)
+ {
+ nat_addr = cache->saved_regs[IA64_RNAT_REGNUM];
+ if (nat_addr != 0)
+ read_memory (nat_addr, (char *) &nat_collection,
+ register_size (target_gdbarch, IA64_RNAT_REGNUM));
+ }
+ else
+ nat_collection = read_memory_integer (nat_addr, 8, BFD_ENDIAN_LITTLE);
+ if (nat_addr != 0)
+ {
+ nat_bit = (gr_addr >> 3) & 0x3f;
+ natN_val = (nat_collection >> nat_bit) & 1;
+ return frame_unwind_got_constant (this_frame, regnum, natN_val);
+ }
+ }
+ warning (_("ia64_sigtramp_frame_prev_register: unhandled register %d"),
+ regnum);
+ }
+ else if (regnum == VBOF_REGNUM)
+ {
+ /* BOF pseudo register.
+ * "copied" from ia64_pseudo_register_read()
+ *
+ * A virtual register frame start is provided for user convenience.
+ * It can be calculated as the bsp - sof (sizeof frame). */
+ ULONGEST bsp;
+ ULONGEST cfm;
+ ULONGEST bof;
+
+ read_memory (cache->saved_regs[IA64_BSP_REGNUM], (char *) &bsp,
+ register_size (target_gdbarch, IA64_BSP_REGNUM));
+ read_memory (cache->saved_regs[IA64_CFM_REGNUM], (char *) &cfm,
+ register_size (target_gdbarch, IA64_CFM_REGNUM));
+
+ /* The bsp points at the end of the register frame so we
+ subtract the size of frame from it to get beginning of frame. */
+ bof = rse_address_add (bsp, -(cfm & 0x7f));
+
+ return frame_unwind_got_constant (this_frame, regnum, bof);
+ }
+ /* Red Hat patch end. */
+
else if ((regnum >= IA64_GR32_REGNUM && regnum <= IA64_GR127_REGNUM)
|| (regnum >= V32_REGNUM && regnum <= V127_REGNUM))
{
@@ -2121,7 +2209,42 @@ ia64_sigtramp_frame_prev_register (struc
return frame_unwind_got_constant (this_frame, regnum, 0);
}
- else /* All other registers not listed above. */
+ /* Red Hat patch begin. */
+ else if (VP0_REGNUM <= regnum && regnum <= VP63_REGNUM)
+ {
+ /* VP 0-63.
+ * "copied" from ia64_pseudo_register_read()
+ *
+ * FIXME: Not currently tested--cannot get the frame to include PR. */
+ CORE_ADDR pr_addr = 0;
+
+ pr_addr = cache->saved_regs[IA64_PR_REGNUM];
+ if (pr_addr != 0)
+ {
+ ULONGEST pr;
+ ULONGEST cfm;
+ ULONGEST prN_val;
+ read_memory (pr_addr, (char *) &pr,
+ register_size (target_gdbarch, IA64_PR_REGNUM));
+ read_memory (cache->saved_regs[IA64_CFM_REGNUM], (char *) &cfm,
+ register_size (target_gdbarch, IA64_CFM_REGNUM));
+
+ /* Get the register rename base for this frame and adjust the
+ * register name to take rotation into account. */
+ if (VP16_REGNUM <= regnum && regnum <= VP63_REGNUM)
+ {
+ int rrb_pr = (cfm >> 32) & 0x3f;
+ regnum = VP16_REGNUM + ((regnum - VP16_REGNUM) + rrb_pr) % 48;
+ }
+ prN_val = (pr & (1LL << (regnum - VP0_REGNUM))) != 0;
+ return frame_unwind_got_constant (this_frame, regnum, prN_val);
+ }
+ warning (_("ia64_sigtramp_frame_prev_register: unhandled register %d"),
+ regnum);
+ }
+ /* Red Hat patch end. */
+
+ /* All other registers not listed above. */
{
CORE_ADDR addr = cache->saved_regs[regnum];

View File

@ -1,3 +1,11 @@
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
@ -9,10 +17,10 @@
* gdb.base/attach-32.exp: Fix forgotten $GDBFLAGS as set.
Index: gdb-6.8.50.20081128/gdb/testsuite/gdb.base/attach-32.c
===================================================================
--- /dev/null 1970-01-01 00:00:00.000000000 +0000
+++ gdb-6.8.50.20081128/gdb/testsuite/gdb.base/attach-32.c 2008-12-07 10:06:03.000000000 +0100
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
@ -34,11 +42,11 @@ Index: gdb-6.8.50.20081128/gdb/testsuite/gdb.base/attach-32.c
+ }
+ return 0;
+}
Index: gdb-6.8.50.20081128/gdb/testsuite/gdb.base/attach-32.exp
===================================================================
--- /dev/null 1970-01-01 00:00:00.000000000 +0000
+++ gdb-6.8.50.20081128/gdb/testsuite/gdb.base/attach-32.exp 2008-12-07 10:08:52.000000000 +0100
@@ -0,0 +1,252 @@
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
@ -57,13 +65,6 @@ Index: gdb-6.8.50.20081128/gdb/testsuite/gdb.base/attach-32.exp
+#
+# This test was based on attach.exp and modified for 32/64 bit Linux systems. */
+
+if $tracelevel then {
+ strace $tracelevel
+}
+
+set prms_id 0
+set bug_id 0
+
+# 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
@ -84,9 +85,9 @@ Index: gdb-6.8.50.20081128/gdb/testsuite/gdb.base/attach-32.exp
+set testfile "attach-32"
+set srcfile ${testfile}.c
+set srcfile2 ${testfile}b.c
+set binfile ${objdir}/${subdir}/${testfile}
+set binfile2 ${objdir}/${subdir}/${testfile}b
+set escapedbinfile [string_to_regexp ${objdir}/${subdir}/${testfile}]
+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}"
@ -160,7 +161,7 @@ Index: gdb-6.8.50.20081128/gdb/testsuite/gdb.base/attach-32.exp
+
+ # Allow the test process to exit, to cleanup after ourselves.
+
+ gdb_test "continue" "Program exited normally." "after attach-32, exit"
+ 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
@ -241,7 +242,7 @@ Index: gdb-6.8.50.20081128/gdb/testsuite/gdb.base/attach-32.exp
+ # Get rid of the process
+
+ gdb_test "p should_exit = 1"
+ gdb_test "c" "Program exited normally."
+ gdb_test "c" {\[Inferior .* exited normally\]}
+
+ # Be paranoid
+
@ -261,7 +262,7 @@ Index: gdb-6.8.50.20081128/gdb/testsuite/gdb.base/attach-32.exp
+}
+
+set GDBFLAGS_orig $GDBFLAGS
+set GDBFLAGS "--pid=$testpid"
+set GDBFLAGS "-iex \"set height 0\" --pid=$testpid"
+gdb_start
+set GDBFLAGS $GDBFLAGS_orig
+
@ -283,7 +284,7 @@ Index: gdb-6.8.50.20081128/gdb/testsuite/gdb.base/attach-32.exp
+}
+
+set GDBFLAGS_orig $GDBFLAGS
+set GDBFLAGS "--pid=$testpid"
+set GDBFLAGS "-iex \"set height 0\" --pid=$testpid"
+gdb_start
+set GDBFLAGS $GDBFLAGS_orig
+
@ -291,10 +292,10 @@ Index: gdb-6.8.50.20081128/gdb/testsuite/gdb.base/attach-32.exp
+do_call_attach_tests
+
+return 0
Index: gdb-6.8.50.20081128/gdb/testsuite/gdb.base/attach-32b.c
===================================================================
--- /dev/null 1970-01-01 00:00:00.000000000 +0000
+++ gdb-6.8.50.20081128/gdb/testsuite/gdb.base/attach-32b.c 2008-12-07 10:06:03.000000000 +0100
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

View File

@ -1,26 +0,0 @@
2005-03-24 Jeff Johnston <jjohnstn@redhat.com>
* valops.c (check_field_in): Use check_typedef for base classes
to avoid problems with opaque type references.
Index: gdb-6.8.50.20081128/gdb/valops.c
===================================================================
--- gdb-6.8.50.20081128.orig/gdb/valops.c 2008-12-08 10:56:11.000000000 +0100
+++ gdb-6.8.50.20081128/gdb/valops.c 2008-12-08 10:59:14.000000000 +0100
@@ -2484,8 +2484,14 @@ check_field (struct type *type, const ch
}
for (i = TYPE_N_BASECLASSES (type) - 1; i >= 0; i--)
- if (check_field (TYPE_BASECLASS (type, i), name))
- return 1;
+ {
+ /* Check the base classes. Make sure we have the real type for
+ each base class as opposed to an opaque declaration. */
+ struct type *baseclass = check_typedef (TYPE_BASECLASS (type, i));
+
+ if (check_field (baseclass, name))
+ return 1;
+ }
return 0;
}

View File

@ -1,3 +1,11 @@
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.
@ -5,26 +13,10 @@
* gdb.cp/b146835b.cc: Ditto.
* gdb.cp/b146835.h: Ditto.
Index: gdb-6.8.50.20090811/gdb/testsuite/gdb.cp/b146835b.cc
===================================================================
--- /dev/null 1970-01-01 00:00:00.000000000 +0000
+++ gdb-6.8.50.20090811/gdb/testsuite/gdb.cp/b146835b.cc 2009-08-12 06:07:50.000000000 +0200
@@ -0,0 +1,11 @@
+#include "b146835.h"
+
+C::C() { d = 0; x = 3; }
+
+int C::z (char *s) { return 0; }
+
+C::~C() {}
+
+void A::funcD (class E *e, class D *d) {}
+void A::funcE (E *e, D *d) {}
+void A::funcF (unsigned long x, D *d) {}
Index: gdb-6.8.50.20090811/gdb/testsuite/gdb.cp/b146835.cc
===================================================================
--- /dev/null 1970-01-01 00:00:00.000000000 +0000
+++ gdb-6.8.50.20090811/gdb/testsuite/gdb.cp/b146835.cc 2009-08-12 06:07:50.000000000 +0200
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>
@ -58,11 +50,11 @@ Index: gdb-6.8.50.20090811/gdb/testsuite/gdb.cp/b146835.cc
+ f.foo();
+}
+
Index: gdb-6.8.50.20090811/gdb/testsuite/gdb.cp/b146835.exp
===================================================================
--- /dev/null 1970-01-01 00:00:00.000000000 +0000
+++ gdb-6.8.50.20090811/gdb/testsuite/gdb.cp/b146835.exp 2009-08-12 06:58:28.000000000 +0200
@@ -0,0 +1,54 @@
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.
@ -84,17 +76,10 @@ Index: gdb-6.8.50.20090811/gdb/testsuite/gdb.cp/b146835.exp
+# Check that GDB can properly print an inherited member variable
+# (Bugzilla 146835)
+
+if $tracelevel {
+ strace $tracelevel
+}
+
+set prms_id 0
+set bug_id 0
+
+set testfile "b146835"
+set srcfile ${testfile}.cc
+set srcfile2 ${testfile}b.cc
+set binfile ${objdir}/${subdir}/${testfile}
+set binfile [standard_output_file ${testfile}]
+if {[gdb_compile "${srcdir}/${subdir}/${srcfile} ${srcdir}/${subdir}/${srcfile2}" "${binfile}" executable {debug c++}] != "" } {
+ return -1
+}
@ -117,10 +102,10 @@ Index: gdb-6.8.50.20090811/gdb/testsuite/gdb.cp/b146835.exp
+
+# Verify that we can access the inherited member d
+gdb_test "p d" " = \\(D \\*\\) *0x0" "Verify inherited member d accessible"
Index: gdb-6.8.50.20090811/gdb/testsuite/gdb.cp/b146835.h
===================================================================
--- /dev/null 1970-01-01 00:00:00.000000000 +0000
+++ gdb-6.8.50.20090811/gdb/testsuite/gdb.cp/b146835.h 2009-08-12 06:07:50.000000000 +0200
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 {
@ -158,3 +143,19 @@ Index: gdb-6.8.50.20090811/gdb/testsuite/gdb.cp/b146835.h
+ 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

@ -1,305 +0,0 @@
2005-12-14 Jeff Johnston <jjohnstn@redhat.com>
* symfile-mem.c (read_memory): New static read callback function.
(symfile_add_from_memory): Pass read_memory to bfd instead of
target_read_memory.
* target.c (target_xfer_memory): Add support for LONGEST len and
change all callers.
(deprecated_debug_xfer_memory, target_read_memory): Ditto.
(target_write_memory, do_xfer_memory): Ditto.
(target_xfer_memory_partial, target_read_memory_partial): Ditto.
(target_write_memory_partial): Ditto.
* infptrace.c (child_xfer_memory): Ditto.
* linux-nat.c (linux_nat_xfer_memory): Ditto.
(linux_nat_proc_xfer_memory): Ditto.
* dcache.c (dcache_xfer_memory): Ditto.
* exec.c (xfer_memory): Ditto.
* remote.c (remote_xfer_memory): Ditto.
* remote-sim.c (gdbsim_xfer_interior_memory): Ditto.
* target.h: Change prototypes for functions changed above.
* linux-nat.h: Ditto.
* remote.h: Ditto.
* dcache.h: Ditto.
2007-10-15 Jan Kratochvil <jan.kratochvil@redhat.com>
Port to GDB-6.7.
Index: gdb-7.0.50.20100115/gdb/symfile-mem.c
===================================================================
--- gdb-7.0.50.20100115.orig/gdb/symfile-mem.c 2010-01-01 08:31:42.000000000 +0100
+++ gdb-7.0.50.20100115/gdb/symfile-mem.c 2010-01-15 03:22:23.000000000 +0100
@@ -57,6 +57,14 @@
#include "elf/common.h"
+/* Local callback routine to pass to bfd to read from target memory,
+ using a len constrained to INT_MAX. */
+static int
+read_target_memory (bfd_vma addr, bfd_byte *buf, int len)
+{
+ return target_read_memory (addr, buf, (LONGEST)len);
+}
+
/* Read inferior memory at ADDR to find the header of a loaded object file
and read its in-core symbols out of inferior memory. TEMPL is a bfd
representing the target's format. NAME is the name to use for this
@@ -77,7 +85,7 @@ symbol_file_add_from_memory (struct bfd
error (_("add-symbol-file-from-memory not supported for this target"));
nbfd = bfd_elf_bfd_from_remote_memory (templ, addr, &loadbase,
- target_read_memory);
+ read_target_memory);
if (nbfd == NULL)
error (_("Failed to read a valid object file image from memory."));
Index: gdb-7.0.50.20100115/gdb/target.c
===================================================================
--- gdb-7.0.50.20100115.orig/gdb/target.c 2010-01-15 03:22:13.000000000 +0100
+++ gdb-7.0.50.20100115/gdb/target.c 2010-01-15 03:22:23.000000000 +0100
@@ -59,7 +59,7 @@ static int nosymbol (char *, CORE_ADDR *
static void tcomplain (void) ATTR_NORETURN;
-static int nomemory (CORE_ADDR, char *, int, int, struct target_ops *);
+static LONGEST nomemory (CORE_ADDR, char *, int, int, struct target_ops *);
static int return_zero (void);
@@ -494,7 +494,7 @@ target_terminal_inferior (void)
(*current_target.to_terminal_inferior) ();
}
-static int
+static LONGEST
nomemory (CORE_ADDR memaddr, char *myaddr, int len, int write,
struct target_ops *t)
{
@@ -726,7 +726,7 @@ update_current_target (void)
(void (*) (struct regcache *))
noprocess);
de_fault (deprecated_xfer_memory,
- (int (*) (CORE_ADDR, gdb_byte *, int, int, struct mem_attrib *, struct target_ops *))
+ (LONGEST (*) (CORE_ADDR, gdb_byte *, LONGEST, int, struct mem_attrib *, struct target_ops *))
nomemory);
de_fault (to_files_info,
(void (*) (struct target_ops *))
@@ -1497,7 +1497,7 @@ target_xfer_partial (struct target_ops *
it makes no progress, and then return how much was transferred). */
int
-target_read_memory (CORE_ADDR memaddr, gdb_byte *myaddr, int len)
+target_read_memory (CORE_ADDR memaddr, gdb_byte *myaddr, LONGEST len)
{
/* Dispatch to the topmost target, not the flattened current_target.
Memory accesses check target->to_has_(all_)memory, and the
@@ -1513,7 +1513,7 @@ target_read_memory (CORE_ADDR memaddr, g
the target's stack. This may trigger different cache behavior. */
int
-target_read_stack (CORE_ADDR memaddr, gdb_byte *myaddr, int len)
+target_read_stack (CORE_ADDR memaddr, gdb_byte *myaddr, LONGEST len)
{
/* Dispatch to the topmost target, not the flattened current_target.
Memory accesses check target->to_has_(all_)memory, and the
@@ -1532,7 +1532,7 @@ target_read_stack (CORE_ADDR memaddr, gd
Callers that can deal with partial writes should call target_write. */
int
-target_write_memory (CORE_ADDR memaddr, const gdb_byte *myaddr, int len)
+target_write_memory (CORE_ADDR memaddr, const gdb_byte *myaddr, LONGEST len)
{
/* Dispatch to the topmost target, not the flattened current_target.
Memory accesses check target->to_has_(all_)memory, and the
@@ -3098,8 +3098,8 @@ debug_to_prepare_to_store (struct regcac
fprintf_unfiltered (gdb_stdlog, "target_prepare_to_store ()\n");
}
-static int
-deprecated_debug_xfer_memory (CORE_ADDR memaddr, bfd_byte *myaddr, int len,
+static LONGEST
+deprecated_debug_xfer_memory (CORE_ADDR memaddr, bfd_byte *myaddr, LONGEST len,
int write, struct mem_attrib *attrib,
struct target_ops *target)
{
@@ -3109,8 +3109,8 @@ deprecated_debug_xfer_memory (CORE_ADDR
attrib, target);
fprintf_unfiltered (gdb_stdlog,
- "target_xfer_memory (%s, xxx, %d, %s, xxx) = %d",
- paddress (target_gdbarch, memaddr), len,
+ "target_xfer_memory (%s, xxx, %ld, %s, xxx) = %d",
+ paddress (target_gdbarch, memaddr), (long) len,
write ? "write" : "read", retval);
if (retval > 0)
Index: gdb-7.0.50.20100115/gdb/target.h
===================================================================
--- gdb-7.0.50.20100115.orig/gdb/target.h 2010-01-15 03:22:13.000000000 +0100
+++ gdb-7.0.50.20100115/gdb/target.h 2010-01-15 03:22:23.000000000 +0100
@@ -406,10 +406,10 @@ struct target_ops
NOTE: cagney/2004-10-01: This has been entirely superseeded by
to_xfer_partial and inferior inheritance. */
- int (*deprecated_xfer_memory) (CORE_ADDR memaddr, gdb_byte *myaddr,
- int len, int write,
- struct mem_attrib *attrib,
- struct target_ops *target);
+ LONGEST (*deprecated_xfer_memory) (CORE_ADDR memaddr, gdb_byte *myaddr,
+ LONGEST len, int write,
+ struct mem_attrib *attrib,
+ struct target_ops *target);
void (*to_files_info) (struct target_ops *);
int (*to_insert_breakpoint) (struct gdbarch *, struct bp_target_info *);
@@ -786,12 +786,12 @@ extern void target_dcache_invalidate (vo
extern int target_read_string (CORE_ADDR, char **, int, int *);
-extern int target_read_memory (CORE_ADDR memaddr, gdb_byte *myaddr, int len);
+extern int target_read_memory (CORE_ADDR memaddr, gdb_byte *myaddr, LONGEST len);
-extern int target_read_stack (CORE_ADDR memaddr, gdb_byte *myaddr, int len);
+extern int target_read_stack (CORE_ADDR memaddr, gdb_byte *myaddr, LONGEST len);
extern int target_write_memory (CORE_ADDR memaddr, const gdb_byte *myaddr,
- int len);
+ LONGEST len);
/* Fetches the target's memory map. If one is found it is sorted
and returned, after some consistency checking. Otherwise, NULL
Index: gdb-7.0.50.20100115/gdb/dcache.c
===================================================================
--- gdb-7.0.50.20100115.orig/gdb/dcache.c 2010-01-01 08:31:30.000000000 +0100
+++ gdb-7.0.50.20100115/gdb/dcache.c 2010-01-15 03:22:23.000000000 +0100
@@ -468,10 +468,10 @@ dcache_free (DCACHE *dcache)
NOTE: This is different than the to_xfer_partial interface, in which
positive values less than LEN mean further transfers may be possible. */
-int
+LONGEST
dcache_xfer_memory (struct target_ops *ops, DCACHE *dcache,
CORE_ADDR memaddr, gdb_byte *myaddr,
- int len, int should_write)
+ LONGEST len, int should_write)
{
int i;
int res;
Index: gdb-7.0.50.20100115/gdb/dcache.h
===================================================================
--- gdb-7.0.50.20100115.orig/gdb/dcache.h 2010-01-01 08:31:30.000000000 +0100
+++ gdb-7.0.50.20100115/gdb/dcache.h 2010-01-15 03:22:23.000000000 +0100
@@ -35,8 +35,8 @@ void dcache_free (DCACHE *);
/* Simple to call from <remote>_xfer_memory */
-int dcache_xfer_memory (struct target_ops *ops, DCACHE *cache, CORE_ADDR mem,
- gdb_byte *my, int len, int should_write);
+LONGEST dcache_xfer_memory (struct target_ops *ops, DCACHE *cache, CORE_ADDR mem,
+ gdb_byte *my, LONGEST len, int should_write);
void dcache_update (DCACHE *dcache, CORE_ADDR memaddr, gdb_byte *myaddr,
int len);
Index: gdb-7.0.50.20100115/gdb/exec.c
===================================================================
--- gdb-7.0.50.20100115.orig/gdb/exec.c 2010-01-14 22:01:24.000000000 +0100
+++ gdb-7.0.50.20100115/gdb/exec.c 2010-01-15 03:22:23.000000000 +0100
@@ -578,7 +578,7 @@ map_vmap (bfd *abfd, bfd *arch)
}
-int
+LONGEST
section_table_xfer_memory_partial (gdb_byte *readbuf, const gdb_byte *writebuf,
ULONGEST offset, LONGEST len,
struct target_section *sections,
Index: gdb-7.0.50.20100115/gdb/linux-nat.c
===================================================================
--- gdb-7.0.50.20100115.orig/gdb/linux-nat.c 2010-01-15 03:22:14.000000000 +0100
+++ gdb-7.0.50.20100115/gdb/linux-nat.c 2010-01-15 03:22:23.000000000 +0100
@@ -5117,7 +5117,7 @@ linux_xfer_partial (struct target_ops *o
#endif
if (iterate_over_lwps (ia64_linux_check_stack_region, &range) != NULL)
{ /* This region contains ia64 rse registers, we have to re-read. */
- int xxfer;
+ LONGEST xxfer;
/* Re-read register stack area. */
xxfer = super_xfer_partial (ops, object, annex,
Index: gdb-7.0.50.20100115/gdb/remote.c
===================================================================
--- gdb-7.0.50.20100115.orig/gdb/remote.c 2010-01-12 22:40:24.000000000 +0100
+++ gdb-7.0.50.20100115/gdb/remote.c 2010-01-15 03:22:23.000000000 +0100
@@ -25,6 +25,7 @@
#include "gdb_string.h"
#include <ctype.h>
#include <fcntl.h>
+#include <limits.h>
#include "inferior.h"
#include "bfd.h"
#include "symfile.h"
@@ -6175,12 +6176,19 @@ handle_notification (char *buf, size_t l
if SHOULD_WRITE is nonzero. Returns length of data written or
read; 0 for error. TARGET is unused. */
-static int
-remote_xfer_memory (CORE_ADDR mem_addr, gdb_byte *buffer, int mem_len,
+static LONGEST
+remote_xfer_memory (CORE_ADDR mem_addr, gdb_byte *buffer, LONGEST mem_len,
int should_write, struct mem_attrib *attrib,
struct target_ops *target)
{
int res;
+ int len;
+
+ /* This routine is not set up to handle > INT_MAX bytes. */
+ if (mem_len >= (LONGEST)INT_MAX)
+ return 0;
+
+ len = (int)mem_len;
set_general_thread (inferior_ptid);
@@ -6189,7 +6197,7 @@ remote_xfer_memory (CORE_ADDR mem_addr,
else
res = remote_read_bytes (mem_addr, buffer, mem_len);
- return res;
+ return (LONGEST)res;
}
/* Sends a packet with content determined by the printf format string
Index: gdb-7.0.50.20100115/gdb/remote-sim.c
===================================================================
--- gdb-7.0.50.20100115.orig/gdb/remote-sim.c 2010-01-01 08:31:40.000000000 +0100
+++ gdb-7.0.50.20100115/gdb/remote-sim.c 2010-01-15 03:22:23.000000000 +0100
@@ -752,11 +752,14 @@ gdbsim_prepare_to_store (struct regcache
Returns the number of bytes transferred. */
-static int
-gdbsim_xfer_inferior_memory (CORE_ADDR memaddr, gdb_byte *myaddr, int len,
+static LONGEST
+gdbsim_xfer_inferior_memory (CORE_ADDR memaddr, gdb_byte *myaddr, LONGEST len,
int write, struct mem_attrib *attrib,
struct target_ops *target)
{
+ /* Convert to len type that sim_read and sim_write can handle. */
+ int xfer_len = (int)len;
+
/* If no program is running yet, then ignore the simulator for
memory. Pass the request down to the next target, hopefully
an exec file. */
Index: gdb-7.0.50.20100115/gdb/exec.h
===================================================================
--- gdb-7.0.50.20100115.orig/gdb/exec.h 2010-01-01 08:31:31.000000000 +0100
+++ gdb-7.0.50.20100115/gdb/exec.h 2010-01-15 03:22:23.000000000 +0100
@@ -60,7 +60,7 @@ extern int resize_section_table (struct
One, and only one, of readbuf or writebuf must be non-NULL. */
-extern int section_table_xfer_memory_partial (gdb_byte *, const gdb_byte *,
+extern LONGEST section_table_xfer_memory_partial (gdb_byte *, const gdb_byte *,
ULONGEST, LONGEST,
struct target_section *,
struct target_section *,

View File

@ -1,8 +1,149 @@
Index: gdb-6.8.50.20090302/gdb/testsuite/gdb.base/gcore-shmid0.exp
===================================================================
--- /dev/null 1970-01-01 00:00:00.000000000 +0000
+++ gdb-6.8.50.20090302/gdb/testsuite/gdb.base/gcore-shmid0.exp 2009-06-29 16:24:36.000000000 +0200
@@ -0,0 +1,96 @@
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
@ -46,21 +187,26 @@ Index: gdb-6.8.50.20090302/gdb/testsuite/gdb.base/gcore-shmid0.exp
+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 ${objdir}/${subdir}/gcore-shmid0.test]
+set escapedfilename [string_to_regexp [standard_output_file gcore-shmid0.test]]
+
+set test "save a corefile"
+gdb_test_multiple "gcore ${objdir}/${subdir}/gcore-shmid0.test" $test {
+gdb_test_multiple "gcore [standard_output_file gcore-shmid0.test]" $test {
+ -re "Saved corefile ${escapedfilename}\[\r\n\]+$gdb_prompt $" {
+ pass $test
+ }
@ -75,7 +221,7 @@ Index: gdb-6.8.50.20090302/gdb/testsuite/gdb.base/gcore-shmid0.exp
+gdb_continue_to_end "finish"
+
+set test "core-file command"
+gdb_test_multiple "core-file $objdir/$subdir/gcore-shmid0.test" $test {
+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"
@ -99,131 +245,3 @@ Index: gdb-6.8.50.20090302/gdb/testsuite/gdb.base/gcore-shmid0.exp
+ fail $test
+ }
+}
Index: gdb-6.8.50.20090302/gdb/testsuite/gdb.base/gcore-shmid0.c
===================================================================
--- /dev/null 1970-01-01 00:00:00.000000000 +0000
+++ gdb-6.8.50.20090302/gdb/testsuite/gdb.base/gcore-shmid0.c 2009-06-29 16:22:49.000000000 +0200
@@ -0,0 +1,123 @@
+/* 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>
+
+/* 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 void
+initialized (void)
+{
+}
+
+static void
+unresolved (void)
+{
+}
+
+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;
+}

View File

@ -1,24 +0,0 @@
2004-11-24 Andrew Cagney <cagney@gnu.org>
* printcmd.c (build_address_symbolic): Find a section for the
address.
Index: gdb-6.8.50.20081128/gdb/printcmd.c
===================================================================
--- gdb-6.8.50.20081128.orig/gdb/printcmd.c 2008-12-04 01:36:05.000000000 +0100
+++ gdb-6.8.50.20081128/gdb/printcmd.c 2008-12-04 01:37:18.000000000 +0100
@@ -616,6 +616,14 @@ build_address_symbolic (CORE_ADDR addr,
addr = overlay_mapped_address (addr, section);
}
}
+ /* To ensure that the symbol returned belongs to the correct setion
+ (and that the last [random] symbol from the previous section
+ isn't returned) try to find the section containing PC. First try
+ the overlay code (which by default returns NULL); and second try
+ the normal section code (which almost always succeeds). */
+ section = find_pc_overlay (addr);
+ if (section == NULL)
+ section = find_pc_section (addr);
/* First try to find the address in the symbol table, then
in the minsyms. Take the closest one. */

View File

@ -1,111 +0,0 @@
2004-06-22 Andrew Cagney <cagney@gnu.org>
* rs6000-tdep.c (struct rs6000_framedata): Add field "func_start".
(skip_prologue): Delete local variable "orig_pc", use
"func_start". Add local variable "num_skip_linux_syscall_insn",
use to skip over first half of a GNU/Linux syscall and update
"func_start".
Index: gdb-6.8.50.20090802/gdb/rs6000-tdep.c
===================================================================
--- gdb-6.8.50.20090802.orig/gdb/rs6000-tdep.c 2009-07-31 17:23:20.000000000 +0200
+++ gdb-6.8.50.20090802/gdb/rs6000-tdep.c 2009-08-03 09:52:39.000000000 +0200
@@ -126,6 +126,7 @@ static const char *powerpc_vector_abi_st
struct rs6000_framedata
{
+ CORE_ADDR func_start; /* True function start. */
int offset; /* total size of frame --- the distance
by which we decrement sp to allocate
the frame */
@@ -1488,7 +1489,6 @@ static CORE_ADDR
skip_prologue (struct gdbarch *gdbarch, CORE_ADDR pc, CORE_ADDR lim_pc,
struct rs6000_framedata *fdata)
{
- CORE_ADDR orig_pc = pc;
CORE_ADDR last_prologue_pc = pc;
CORE_ADDR li_found_pc = 0;
gdb_byte buf[4];
@@ -1506,12 +1506,14 @@ skip_prologue (struct gdbarch *gdbarch,
int minimal_toc_loaded = 0;
int prev_insn_was_prologue_insn = 1;
int num_skip_non_prologue_insns = 0;
+ int num_skip_ppc64_gnu_linux_syscall_insn = 0;
int r0_contains_arg = 0;
const struct bfd_arch_info *arch_info = gdbarch_bfd_arch_info (gdbarch);
struct gdbarch_tdep *tdep = gdbarch_tdep (gdbarch);
enum bfd_endian byte_order = gdbarch_byte_order (gdbarch);
memset (fdata, 0, sizeof (struct rs6000_framedata));
+ fdata->func_start = pc;
fdata->saved_gpr = -1;
fdata->saved_fpr = -1;
fdata->saved_vr = -1;
@@ -1545,6 +1547,55 @@ skip_prologue (struct gdbarch *gdbarch,
break;
op = extract_unsigned_integer (buf, 4, byte_order);
+ /* A PPC64 GNU/Linux system call function is split into two
+ sub-functions: a non-threaded fast-path (__NAME_nocancel)
+ which does not use a frame; and a threaded slow-path
+ (Lpseudo_cancel) that does create a frame. Ref:
+ nptl/sysdeps/unix/sysv/linux/powerpc/powerpc32/sysdep-cancel.h
+
+ *INDENT-OFF*
+ NAME:
+ SINGLE_THREAD_P
+ bne- .Lpseudo_cancel
+ __NAME_nocancel:
+ li r0,162
+ sc
+ bnslr+
+ b 0x7fe014ef64 <.__syscall_error>
+ Lpseudo_cancel:
+ stdu r1,-128(r1)
+ ...
+ *INDENT-ON*
+
+ Unfortunatly, because the latter case uses a local label (not
+ in the symbol table) a PC in "Lpseudo_cancel" appears to be
+ in "__NAME_nocancel". The following code recognizes this,
+ adjusting FUNC_START to point to where "Lpseudo_cancel"
+ should be, and parsing the prologue sequence as if
+ "Lpseudo_cancel" was the entry point. */
+
+ if (((op & 0xffff0000) == 0x38000000 /* li r0,N */
+ && pc == fdata->func_start + 0
+ && num_skip_ppc64_gnu_linux_syscall_insn == 0)
+ || (op == 0x44000002 /* sc */
+ && pc == fdata->func_start + 4
+ && num_skip_ppc64_gnu_linux_syscall_insn == 1)
+ || (op == 0x4ca30020 /* bnslr+ */
+ && pc == fdata->func_start + 8
+ && num_skip_ppc64_gnu_linux_syscall_insn == 2))
+ {
+ num_skip_ppc64_gnu_linux_syscall_insn++;
+ continue;
+ }
+ else if ((op & 0xfc000003) == 0x48000000 /* b __syscall_error */
+ && pc == fdata->func_start + 12
+ && num_skip_ppc64_gnu_linux_syscall_insn == 3)
+ {
+ num_skip_ppc64_gnu_linux_syscall_insn = -1;
+ fdata->func_start = pc;
+ continue;
+ }
+
if ((op & 0xfc1fffff) == 0x7c0802a6)
{ /* mflr Rx */
/* Since shared library / PIC code, which needs to get its
@@ -1726,9 +1777,9 @@ skip_prologue (struct gdbarch *gdbarch,
we have no line table information or the line info tells
us that the subroutine call is not part of the line
associated with the prologue. */
- if ((pc - orig_pc) > 8)
+ if ((pc - fdata->func_start) > 8)
{
- struct symtab_and_line prologue_sal = find_pc_line (orig_pc, 0);
+ struct symtab_and_line prologue_sal = find_pc_line (fdata->func_start, 0);
struct symtab_and_line this_sal = find_pc_line (pc, 0);
if ((prologue_sal.line == 0) || (prologue_sal.line != this_sal.line))

View File

@ -1,31 +0,0 @@
2004-10-22 Andrew Cagney <cagney@gnu.org>
* solib-svr4.c (enable_break): Convert a symbol descriptor into
the corresponding function entry point.
(solib_break_names): Delete "._dl_debug_state", no longer needed.
2007-10-12 Jan Kratochvil <jan.kratochvil@redhat.com>
Port to GDB-6.7.
Index: gdb-6.8.50.20090802/gdb/solib-svr4.c
===================================================================
--- gdb-6.8.50.20090802.orig/gdb/solib-svr4.c 2009-08-03 10:03:36.000000000 +0200
+++ gdb-6.8.50.20090802/gdb/solib-svr4.c 2009-08-03 10:51:15.000000000 +0200
@@ -1431,7 +1431,15 @@ enable_break (struct svr4_info *info)
{
sym_addr = bfd_lookup_symbol (tmp_bfd, *bkpt_namep);
if (sym_addr != 0)
- break;
+ {
+ /* The symbol might be a descriptor, convert to into the
+ corresponding code address. */
+ sym_addr = gdbarch_convert_from_func_ptr_addr (target_gdbarch,
+ sym_addr,
+ tmp_bfd_target);
+ if (sym_addr != 0)
+ break;
+ }
}
if (sym_addr != 0)

View File

@ -1,96 +0,0 @@
2004-11-18 Andrew Cagney <cagney@gnu.org>
* dwarf2read.c: Include "top.c".
(dwarf2_has_info): Check for readnever_symbol_files.
* symfile.c (readnever_symbol_files): Define.
* top.h (readnever_symbol_files): Declare.
* main.c (captured_main): Add --readnever option.
(print_gdb_help): Ditto.
2004-11-18 Andrew Cagney <cagney@gnu.org>
* gdb.texinfo (File Options): Document --readnever.
Index: gdb-7.0.90.20100306/gdb/doc/gdb.texinfo
===================================================================
--- gdb-7.0.90.20100306.orig/gdb/doc/gdb.texinfo 2010-03-06 23:19:13.000000000 +0100
+++ gdb-7.0.90.20100306/gdb/doc/gdb.texinfo 2010-03-06 23:20:35.000000000 +0100
@@ -995,6 +995,12 @@ Read each symbol file's entire symbol ta
the default, which is to read it incrementally as it is needed.
This makes startup slower, but makes future operations faster.
+@item --readnever
+@cindex @code{--readnever}
+Do not read each symbol file's symbolic debug information. This makes
+startup faster but at the expense of not being able to perform
+symbolic debugging.
+
@end table
@node Mode Options
Index: gdb-7.0.90.20100306/gdb/main.c
===================================================================
--- gdb-7.0.90.20100306.orig/gdb/main.c 2010-03-06 23:20:23.000000000 +0100
+++ gdb-7.0.90.20100306/gdb/main.c 2010-03-06 23:20:35.000000000 +0100
@@ -382,6 +382,7 @@ captured_main (void *data)
{"xdb", no_argument, &xdb_commands, 1},
{"dbx", no_argument, &dbx_commands, 1},
{"readnow", no_argument, &readnow_symbol_files, 1},
+ {"readnever", no_argument, &readnever_symbol_files, 1},
{"r", no_argument, &readnow_symbol_files, 1},
{"quiet", no_argument, &quiet, 1},
{"q", no_argument, &quiet, 1},
@@ -1033,6 +1034,7 @@ Options:\n\n\
fputs_unfiltered (_("\
--quiet Do not print version number on startup.\n\
--readnow Fully read symbol files on first access.\n\
+ --readnever Do not read symbol files.\n\
"), stream);
fputs_unfiltered (_("\
--se=FILE Use FILE as symbol file and executable file.\n\
Index: gdb-7.0.90.20100306/gdb/symfile.c
===================================================================
--- gdb-7.0.90.20100306.orig/gdb/symfile.c 2010-03-06 23:19:13.000000000 +0100
+++ gdb-7.0.90.20100306/gdb/symfile.c 2010-03-06 23:20:35.000000000 +0100
@@ -79,6 +79,7 @@ static void clear_symtab_users_cleanup (
/* Global variables owned by this file */
int readnow_symbol_files; /* Read full symbols immediately */
+int readnever_symbol_files; /* Never read full symbols. */
/* External variables and functions referenced. */
Index: gdb-7.0.90.20100306/gdb/dwarf2read.c
===================================================================
--- gdb-7.0.90.20100306.orig/gdb/dwarf2read.c 2010-03-06 23:19:13.000000000 +0100
+++ gdb-7.0.90.20100306/gdb/dwarf2read.c 2010-03-06 23:20:54.000000000 +0100
@@ -52,6 +52,7 @@
#include "f-lang.h"
#include "typeprint.h"
#include "jv-lang.h"
+#include "top.h"
#include <fcntl.h>
#include "gdb_string.h"
@@ -1222,7 +1223,8 @@ dwarf2_has_info (struct objfile *objfile
bfd_map_over_sections (objfile->obfd, dwarf2_locate_sections, NULL);
}
- return (dwarf2_per_objfile->info.asection != NULL
+ return !readnever_symbol_files
+ && (dwarf2_per_objfile->info.asection != NULL
&& dwarf2_per_objfile->abbrev.asection != NULL);
}
Index: gdb-7.0.90.20100306/gdb/top.h
===================================================================
--- gdb-7.0.90.20100306.orig/gdb/top.h 2010-01-01 08:31:42.000000000 +0100
+++ gdb-7.0.90.20100306/gdb/top.h 2010-03-06 23:20:35.000000000 +0100
@@ -63,6 +63,7 @@ extern void set_prompt (char *);
/* From random places. */
extern int readnow_symbol_files;
+extern int readnever_symbol_files;
/* Perform _initialize initialization */
extern void gdb_init (char *);

View File

@ -1,22 +0,0 @@
2003-07-11 Elena Zannoni <ezannoni@redhat.com>
* lib/gdb.exp (setup_kfail, kfail): Redefine procedures.
--- ./gdb/testsuite/lib/gdb.exp.1 2004-11-24 15:59:46.131394720 -0500
+++ ./gdb/testsuite/lib/gdb.exp 2004-11-24 16:01:06.304206600 -0500
@@ -63,6 +63,15 @@
### Only procedures should come after this point.
+if {![llength [info procs kfail]]} {
+ proc setup_kfail { args } {
+ #setup_xfail args
+ }
+ proc kfail { bugid message } {
+ fail $message
+ }
+}
+
#
# gdb_version -- extract and print the version number of GDB
#

View File

@ -1,103 +0,0 @@
2003-11-17 Elena Zannoni <ezannoni@redhat.com>
From Jeff Johnston <jjohnstn@redhat.com>
* gdb.arch/ia64-libunwind.exp: New file.
* gdb.arch/ia64-libunwind.c: New file.
2004-08-03 Jeff Johnston <jjohnstn@redhat.com>
* gdb.arch/ia64-libunwind.exp: Fix test string to match
current code base.
[ acquire_unwind_info -> ia64_find_proc_info_x ]
2009-04-30 Jan Kratochvil <jan.kratochvil@redhat.com>
Remove a race from send_gdb "COMMAND\n".
Cleanup.
Merge in: Patch4: gdb-6.3-rh-testlibunwind1fix-20041202.patch
--- /dev/null 2009-04-19 08:52:54.499000000 +0200
+++ gdb-6.8/gdb/testsuite/gdb.arch/ia64-libunwind.c 2009-04-30 19:15:16.000000000 +0200
@@ -0,0 +1,26 @@
+/* Copyright 2003, 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 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>
+
+int
+main ()
+{
+ printf ("hello world\n");
+
+ return 0;
+}
--- /dev/null 2009-04-19 08:52:54.499000000 +0200
+++ gdb-6.8/gdb/testsuite/gdb.arch/ia64-libunwind.exp 2009-04-30 19:19:22.000000000 +0200
@@ -0,0 +1,52 @@
+# Copyright 2003, 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.
+
+# Please email any bugs, comments, and/or additions to this file to:
+# bug-gdb@prep.ai.mit.edu
+
+# This file was written by Jeff Johnston (jjohnstn@redhat.com)
+
+if ![istarget "ia64-*-*"] then {
+ return
+}
+
+set testfile "ia64-libunwind"
+set srcfile ${testfile}.c
+set binfile ${objdir}/${subdir}/${testfile}
+
+if { [gdb_compile "${srcdir}/${subdir}/${srcfile}" "${binfile}" executable {debug additional_flags=-w}] != "" } {
+ gdb_suppress_entire_file "Testcase compile failed, so all tests in this file will automatically fail."
+}
+
+if [get_compiler_info ${binfile}] {
+ return -1
+}
+
+gdb_exit
+gdb_start
+gdb_reinitialize_dir $srcdir/$subdir
+gdb_load ${binfile}
+
+gdb_test "set debug arch 1"
+gdb_breakpoint "main"
+gdb_run_cmd
+
+set test "libunwind message"
+gdb_test_multiple "" $test {
+ -re "ia64_find_proc_info_x.*$gdb_prompt $" {
+ pass $test
+ }
+}

View File

@ -1,19 +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.
Index: gdb-6.8/gdb/testsuite/gdb.gdb/selftest.exp
===================================================================
--- gdb-6.8.orig/gdb/testsuite/gdb.gdb/selftest.exp 2008-01-26 14:56:37.000000000 +0100
+++ gdb-6.8/gdb/testsuite/gdb.gdb/selftest.exp 2008-07-14 10:23:50.000000000 +0200
@@ -354,6 +354,9 @@ proc test_with_self { executable } {
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"
+ }
-re ".*$gdb_prompt $" { fail "printed version" }
timeout { fail "(timeout) printed version" }
}
# 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

@ -1,211 +0,0 @@
http://sourceware.org/ml/gdb-patches/2005-05/threads.html#00637
Proposed upstream but never committed upstream.
2005-06-09 Jeff Johnston <jjohnstn@redhat.com>
* gdb.base/gdbinit.exp: New testcase.
* gdb.base/gdbinit.sample: Sample .gdbinit for gdbinit.exp.
2005-06-08 Daniel Jacobowitz <dan@codesourcery.com>
Jeff Johnston <jjohnstn@redhat.com>
* Makefile.in (cli-cmds.o): Update.
* configure.in: Add check for getuid.
* configure: Regenerated.
* config.in: Ditto.
* main.c (captured_main): Pass -1 to source_command when loading
gdbinit files.
* cli/cli-cmds.c: Include "gdb_stat.h" and <fcntl.h>.
(source_command): Update documentation. Check permissions if
FROM_TTY is -1.
Index: gdb-7.0.50.20100121/gdb/cli/cli-cmds.c
===================================================================
--- gdb-7.0.50.20100121.orig/gdb/cli/cli-cmds.c 2010-01-18 07:25:22.000000000 +0100
+++ gdb-7.0.50.20100121/gdb/cli/cli-cmds.c 2010-01-21 15:12:28.000000000 +0100
@@ -38,6 +38,7 @@
#include "objfiles.h"
#include "source.h"
#include "disasm.h"
+#include "gdb_stat.h"
extern void disconnect_or_stop_tracing (int from_tty);
#include "ui-out.h"
@@ -488,6 +489,29 @@ find_and_open_script (int from_tty, char
file, O_RDONLY, &full_pathname);
make_cleanup (xfree, full_pathname);
+#ifdef HAVE_GETUID
+ if (from_tty == -1)
+ {
+ struct stat statbuf;
+
+ if (fstat (fd, &statbuf) < 0)
+ {
+ close (fd);
+ /* Do not do_cleanups (old_cleanups) as FILE is allocated there.
+ perror_with_name calls error which should call the cleanups. */
+ perror_with_name (file);
+ }
+ if (statbuf.st_uid != getuid () || (statbuf.st_mode & S_IWOTH))
+ {
+ /* FILE gets freed by do_cleanups (old_cleanups). */
+ warning (_("not using untrusted file \"%s\""), file);
+ close (fd);
+ do_cleanups (old_cleanups);
+ return 0;
+ }
+ }
+#endif
+
/* Use the full path name, if it is found. */
if (full_pathname != NULL && fd != -1)
{
@@ -496,7 +520,7 @@ find_and_open_script (int from_tty, char
if (fd == -1)
{
- if (from_tty)
+ if (from_tty > 0)
perror_with_name (file);
else
{
@@ -554,6 +578,7 @@ source_script (char *file, int from_tty)
else
script_from_file (stream, file);
+ /* FILE gets freed by do_cleanups (old_cleanups). */
do_cleanups (old_cleanups);
}
Index: gdb-7.0.50.20100121/gdb/testsuite/gdb.base/gdbinit.exp
===================================================================
--- /dev/null 1970-01-01 00:00:00.000000000 +0000
+++ gdb-7.0.50.20100121/gdb/testsuite/gdb.base/gdbinit.exp 2010-01-21 15:11:18.000000000 +0100
@@ -0,0 +1,98 @@
+# 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.
+
+# Please email any bugs, comments, and/or additions to this file to:
+# bug-gdb@prep.ai.mit.edu
+
+# This file was written by Jeff Johnston <jjohnstn@redhat.com>.
+
+if $tracelevel then {
+ strace $tracelevel
+}
+
+set prms_id 0
+set bug_id 0
+
+# are we on a target board
+if [is_remote target] {
+ return
+}
+
+
+global verbose
+global GDB
+global GDBFLAGS
+global gdb_prompt
+global timeout
+global gdb_spawn_id;
+
+gdb_stop_suppressing_tests;
+
+verbose "Spawning $GDB -nw"
+
+if [info exists gdb_spawn_id] {
+ return 0;
+}
+
+if ![is_remote host] {
+ if { [which $GDB] == 0 } then {
+ perror "$GDB does not exist."
+ exit 1
+ }
+}
+
+set env(HOME) [pwd]
+remote_exec build "rm .gdbinit"
+remote_exec build "cp ${srcdir}/${subdir}/gdbinit.sample .gdbinit"
+remote_exec build "chmod 646 .gdbinit"
+
+set res [remote_spawn host "$GDB -nw [host_info gdb_opts]"];
+if { $res < 0 || $res == "" } {
+ perror "Spawning $GDB failed."
+ return 1;
+}
+gdb_expect 360 {
+ -re "warning: not using untrusted file.*\.gdbinit.*\[\r\n\]$gdb_prompt $" {
+ pass "untrusted .gdbinit caught."
+ }
+ -re "$gdb_prompt $" {
+ fail "untrusted .gdbinit caught."
+ }
+ timeout {
+ fail "(timeout) untrusted .gdbinit caught."
+ }
+}
+
+remote_exec build "chmod 644 .gdbinit"
+set res [remote_spawn host "$GDB -nw [host_info gdb_opts]"];
+if { $res < 0 || $res == "" } {
+ perror "Spawning $GDB failed."
+ return 1;
+}
+gdb_expect 360 {
+ -re "warning: not using untrusted file.*\.gdbinit.*\[\r\n\]$gdb_prompt $" {
+ fail "trusted .gdbinit allowed."
+ }
+ -re "in gdbinit.*$gdb_prompt $" {
+ pass "trusted .gdbinit allowed."
+ }
+ timeout {
+ fail "(timeout) trusted .gdbinit allowed."
+ }
+}
+
+remote_exec build "rm .gdbinit"
Index: gdb-7.0.50.20100121/gdb/testsuite/gdb.base/gdbinit.sample
===================================================================
--- /dev/null 1970-01-01 00:00:00.000000000 +0000
+++ gdb-7.0.50.20100121/gdb/testsuite/gdb.base/gdbinit.sample 2010-01-21 15:11:18.000000000 +0100
@@ -0,0 +1 @@
+echo "\nin gdbinit"
Index: gdb-7.0.50.20100121/gdb/main.c
===================================================================
--- gdb-7.0.50.20100121.orig/gdb/main.c 2010-01-21 15:11:09.000000000 +0100
+++ gdb-7.0.50.20100121/gdb/main.c 2010-01-21 15:11:18.000000000 +0100
@@ -818,7 +818,7 @@ Excess command line arguments ignored. (
debugging or what directory you are in. */
if (home_gdbinit && !inhibit_gdbinit)
- catch_command_errors (source_script, home_gdbinit, 0, RETURN_MASK_ALL);
+ catch_command_errors (source_script, home_gdbinit, -1, RETURN_MASK_ALL);
/* Now perform all the actions indicated by the arguments. */
if (cdarg != NULL)
@@ -887,7 +887,7 @@ Can't attach to process and specify a co
/* Read the .gdbinit file in the current directory, *if* it isn't
the same as the $HOME/.gdbinit file (it should exist, also). */
if (local_gdbinit && !inhibit_gdbinit)
- catch_command_errors (source_script, local_gdbinit, 0, RETURN_MASK_ALL);
+ catch_command_errors (source_script, local_gdbinit, -1, RETURN_MASK_ALL);
for (i = 0; i < ncmd; i++)
{

View File

@ -1,195 +0,0 @@
2005-02-11 Jeff Johnston <jjohnstn@redhat.com>
* testsuite/gdb.threads/step-thread-exit.c: New testcase.
* testsuite/gdb.threads/step-thread-exit.exp: Ditto.
Index: gdb-6.8.50.20081128/gdb/testsuite/gdb.threads/step-thread-exit.c
===================================================================
--- /dev/null 1970-01-01 00:00:00.000000000 +0000
+++ gdb-6.8.50.20081128/gdb/testsuite/gdb.threads/step-thread-exit.c 2008-12-08 22:21:26.000000000 +0100
@@ -0,0 +1,50 @@
+/* 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. */
+
+#include <pthread.h>
+#include <stdio.h>
+#include <stdlib.h>
+#include <unistd.h>
+
+void *thread_function (void *ptr)
+{
+ int *x = (int *)ptr;
+ printf("In thread_function, *x is %d\n", *x);
+} /* thread_function_end */
+
+volatile int repeat = 0;
+
+main()
+{
+ int ret;
+ pthread_t th;
+ int i = 3;
+
+ ret = pthread_create (&th, NULL, thread_function, &i);
+ do
+ {
+ repeat = 0;
+ sleep (3); /* sleep */
+ }
+ while (repeat);
+ pthread_join (th, NULL);
+ return 0;
+}
+
+
Index: gdb-6.8.50.20081128/gdb/testsuite/gdb.threads/step-thread-exit.exp
===================================================================
--- /dev/null 1970-01-01 00:00:00.000000000 +0000
+++ gdb-6.8.50.20081128/gdb/testsuite/gdb.threads/step-thread-exit.exp 2008-12-08 22:22:14.000000000 +0100
@@ -0,0 +1,130 @@
+# 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 step over a thread exit.
+
+if $tracelevel {
+ strace $tracelevel
+}
+
+set prms_id 0
+set bug_id 0
+
+set testfile "step-thread-exit"
+set srcfile ${testfile}.c
+set binfile ${objdir}/${subdir}/${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}
+
+# Reset the debug file directory so we can't debug within the C library
+gdb_test "set debug-file-directory ." "" ""
+
+#
+# Run to `main' where we begin our tests.
+#
+
+if ![runto_main] then {
+ gdb_suppress_tests
+}
+
+# FIXME: Currently the main thread will escape/exit before our thread finishes
+# without this setting.
+gdb_test "set scheduler-locking step"
+gdb_test "show scheduler-locking" "Mode for locking scheduler during execution is \"step\"." "check scheduler-locking first"
+
+set sleep_line [expr [gdb_get_line_number "sleep"]]
+set end_line [expr [gdb_get_line_number "thread_function_end"]]
+
+gdb_breakpoint "$end_line"
+gdb_test "continue" "Break.*thread_function.*" "continue to thread_function 1"
+
+# Keep nexting until we cause the thread to exit. We expect the main
+# thread to be stopped and a message printed to tell us we have stepped
+# over the thread exit.
+set test "step over thread exit 1"
+gdb_test_multiple "next" "$test" {
+ -re "\}.*$gdb_prompt $" {
+ send_gdb "next\n"
+ exp_continue
+ }
+ -re "\[Thread .* exited\].*Program received signal SIGSTOP.*$gdb_prompt $" {
+ pass "$test"
+ }
+ -re "start_thread.*$gdb_prompt $" {
+ send_gdb "next\n"
+ exp_continue
+ }
+}
+
+# Without this fixup we could end up in:
+# #0 0x00110416 in __kernel_vsyscall ()
+# #1 0x0011de26 in __lll_unlock_wake_private () from /lib/libpthread.so.0
+# #2 0x001179f4 in _L_unlock_3164 () from /lib/libpthread.so.0
+# #3 0x00116f01 in pthread_create@@GLIBC_2.1 () from /lib/libpthread.so.0
+# #4 0x08048531 in main () at ../.././gdb/testsuite/gdb.threads/step-thread-exit.c:39
+gdb_breakpoint "$sleep_line"
+gdb_test "set repeat=1" "" "Get to the sleep function prepare 1"
+gdb_test "continue" "Break.*$sleep_line.*" "Get to the sleep function 1"
+
+gdb_test "bt" "main.*$sleep_line.*" "backtrace after step 1"
+
+runto_main
+gdb_test "show scheduler-locking" "Mode for locking scheduler during execution is \"step\"." "check scheduler-locking second"
+
+gdb_breakpoint "$sleep_line"
+gdb_breakpoint "$end_line"
+set test "continue to thread_function 2"
+gdb_test_multiple "continue" "$test" {
+ -re "Break.*thread_function.*$gdb_prompt $" {
+ pass $test
+ }
+ -re "Break.*$sleep_line.*$gdb_prompt $" {
+ gdb_test "set repeat=1" "" ""
+ send_gdb "continue\n"
+ exp_continue
+ }
+}
+
+# Keep nexting until we cause the thread to exit. In this case, we
+# expect the breakpoint in the main thread to have already triggered
+# and so we should stop there with a message that we stepped over
+# the thread exit.
+set test "step over thread exit 2"
+gdb_test_multiple "next" "$test" {
+ -re "\}.*$gdb_prompt $" {
+ send_gdb "next\n"
+ exp_continue
+ }
+ -re "\[Thread .* exited\].*Break.*$sleep_line.*$gdb_prompt $" {
+ pass "$test (breakpoint hit)"
+ }
+ -re "\[Thread .* exited\].*$gdb_prompt $" {
+ pass "$test (breakpoint not hit)"
+ }
+ -re "start_thread.*$gdb_prompt $" {
+ send_gdb "next\n"
+ exp_continue
+ }
+}
+

View File

@ -1,28 +0,0 @@
2005-02-14 Jeff Johnston <jjohnstn@redhat.com>
* top.c (gdb_readline_wrapper): Ensure terminal is gdb's before calling
readline.
2007-10-14 Jan Kratochvil <jan.kratochvil@redhat.com>
Port to GDB-6.7.
Index: gdb-6.7/gdb/top.c
===================================================================
--- gdb-6.7.orig/gdb/top.c 2007-09-02 23:13:56.000000000 +0200
+++ gdb-6.7/gdb/top.c 2007-10-14 23:38:27.000000000 +0200
@@ -795,6 +795,14 @@ gdb_readline_wrapper (char *prompt)
back_to = make_cleanup (gdb_readline_wrapper_cleanup, cleanup);
+ /* Before calling readline, ensure we have the terminal. If we don't
+ have the terminal and call readline, we risk the possibility of
+ gdb being thrown into the background. This problem occurs when
+ we attach to a background process on the same terminal the background
+ process was started from and then perform some action which requires
+ a page break prompt. */
+ terminal_ours ();
+
/* Display our prompt and prevent double prompt display. */
display_gdb_prompt (prompt);
rl_already_prompted = 1;

View File

@ -1,32 +1,15 @@
Index: gdb/testsuite/ChangeLog
2005-01-21 Jeff Johnston <jjohnstn@redhat.com>
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
* gdb.cp/constructortest.exp: New test.
* gdb.cp/constructortest.cc: Ditto.
* gdb.cp/templates.exp: Change break of dtor to be fully quoted.
;; Test support of multiple destructors just like multiple constructors
;;=fedoratest
2007-09-22 Jan Kratochvil <jan.kratochvil@redhat.com>
* gdb.cp/constructortest.exp, gdb.cp/constructortest.cc: Test also the
`$delete' destructor variant.
2007-09-25 Jan Kratochvil <jan.kratochvil@redhat.com>
* gdb.cp/constructortest.exp: Delete the FIXME workaround of restarting
the whole GDB.
2007-10-05 Jan Kratochvil <jan.kratochvil@redhat.com>
* gdb.cp/constructortest.exp: Test BREAKPOINT_RE_SET for multiple PCs
by PIE.
* gdb.cp/constructortest.exp: Handle the change of settings breakpoints
always at all the ctor/dtor variants.
[ Removed the `gdb.cp/templates.exp' patch. ]
[ Updated the patch for "(X location") of GDB-6.8+. ]
--- gdb-6.3/gdb/testsuite/gdb.cp/constructortest.cc.fix Fri Jan 21 17:06:56 2005
+++ gdb-6.3/gdb/testsuite/gdb.cp/constructortest.cc Fri Jan 21 17:05:18 2005
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.
+
@ -127,9 +110,11 @@ Index: gdb/testsuite/ChangeLog
+{
+ y = 2; /* First line D */
+}
--- gdb-6.3/gdb/testsuite/gdb.cp/constructortest.exp.fix Fri Jan 21 17:07:02 2005
+++ gdb-6.3/gdb/testsuite/gdb.cp/constructortest.exp Fri Jan 21 17:05:29 2005
@@ -0,0 +1,137 @@
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.
@ -150,16 +135,9 @@ Index: gdb/testsuite/ChangeLog
+
+# Check that GDB can break at multiple forms of constructors.
+
+if $tracelevel {
+ strace $tracelevel
+}
+
+set prms_id 0
+set bug_id 0
+
+set testfile "constructortest"
+set srcfile ${testfile}.cc
+set binfile ${objdir}/${subdir}/${testfile}
+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"}] != "" } {
@ -239,7 +217,7 @@ Index: gdb/testsuite/ChangeLog
+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 .*, line ($define_line_dtor|$define_line_dtor)\\..*" "breaking on C::~C"
+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

View File

@ -1,13 +1,21 @@
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.
Index: gdb-6.8.50.20081128/gdb/testsuite/gdb.base/move-dir.c
===================================================================
--- /dev/null 1970-01-01 00:00:00.000000000 +0000
+++ gdb-6.8.50.20081128/gdb/testsuite/gdb.base/move-dir.c 2008-12-07 23:57:41.000000000 +0100
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>
@ -19,11 +27,11 @@ Index: gdb-6.8.50.20081128/gdb/testsuite/gdb.base/move-dir.c
+ other();
+}
+
Index: gdb-6.8.50.20081128/gdb/testsuite/gdb.base/move-dir.exp
===================================================================
--- /dev/null 1970-01-01 00:00:00.000000000 +0000
+++ gdb-6.8.50.20081128/gdb/testsuite/gdb.base/move-dir.exp 2008-12-07 10:13:01.000000000 +0100
@@ -0,0 +1,67 @@
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.
+
@ -41,30 +49,20 @@ Index: gdb-6.8.50.20081128/gdb/testsuite/gdb.base/move-dir.exp
+# 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
+
+if $tracelevel then {
+ strace $tracelevel
+}
+
+set prms_id 0
+set bug_id 0
+
+set testfile "move-dir"
+set srcfile ${testfile}.c
+set incfile ${testfile}.h
+set binfile ${objdir}/${subdir}/${testfile}
+set binfile [standard_output_file ${testfile}]
+
+set testdir "${objdir}/${subdir}/incdir"
+set testdir [standard_output_file incdir]
+
+remote_exec build "mkdir $testdir"
+remote_exec build "cp ${srcdir}/${subdir}/${srcfile} ${objdir}/${subdir}"
+remote_exec build "cp ${srcdir}/${subdir}/${incfile} ${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 "${objdir}/${subdir}/${srcfile}" "${binfile}" executable [list debug $additional_flags]] != "" } {
+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."
+}
+
@ -91,10 +89,10 @@ Index: gdb-6.8.50.20081128/gdb/testsuite/gdb.base/move-dir.exp
+
+set timeout $oldtimeout
+return 0
Index: gdb-6.8.50.20081128/gdb/testsuite/gdb.base/move-dir.h
===================================================================
--- /dev/null 1970-01-01 00:00:00.000000000 +0000
+++ gdb-6.8.50.20081128/gdb/testsuite/gdb.base/move-dir.h 2008-12-07 10:13:01.000000000 +0100
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>
+

File diff suppressed because it is too large Load Diff

View File

@ -1,3 +1,11 @@
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
@ -6,96 +14,29 @@
* gdb.gdb/xfullpath.exp: Ditto.
* gdb.gdb/observer.exp: Ditto.
Index: gdb-6.8.50.20090226/gdb/testsuite/gdb.gdb/complaints.exp
===================================================================
--- gdb-6.8.50.20090226.orig/gdb/testsuite/gdb.gdb/complaints.exp 2009-01-03 06:58:04.000000000 +0100
+++ gdb-6.8.50.20090226/gdb/testsuite/gdb.gdb/complaints.exp 2009-02-26 22:10:48.000000000 +0100
@@ -302,13 +302,13 @@ proc find_gdb { arg } {
set GDB_FULLPATH [find_gdb $GDB]
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 x$tool
+#remote_file host delete x$tool
# Remove any old copy lying around.
- remote_file host delete $xgdb
+ #remote_file host delete $xgdb
gdb_start
gdb_start
- set file [remote_download host $GDB_FULLPATH $xgdb]
+ #set file [remote_download host $GDB_FULLPATH $xgdb]
-set file [remote_download host $GDB_FULLPATH x$tool]
+#set file [remote_download host $GDB_FULLPATH x$tool]
- set result [selftest_setup $file $function]
+ set result [selftest_setup $GDB_FULLPATH $function]
if {$result == 0} then {
set result [uplevel $body]
}
-set setup_result [setup_test $file ]
+set setup_result [setup_test $GDB_FULLPATH ]
if {$setup_result <0} then {
return -1
}
@@ -319,4 +319,4 @@ test_short_complaints
test_empty_complaints
gdb_exit
- catch "remote_file host delete $file"
+ #catch "remote_file host delete $file"
gdb_exit;
-catch "remote_file host delete $file";
+#catch "remote_file host delete $file";
Index: gdb-6.8.50.20090226/gdb/testsuite/gdb.gdb/observer.exp
===================================================================
--- gdb-6.8.50.20090226.orig/gdb/testsuite/gdb.gdb/observer.exp 2009-02-17 20:52:27.000000000 +0100
+++ gdb-6.8.50.20090226/gdb/testsuite/gdb.gdb/observer.exp 2009-02-26 22:11:40.000000000 +0100
@@ -258,13 +258,13 @@ proc find_gdb { arg } {
set GDB_FULLPATH [find_gdb $GDB]
# Remove any old copy lying around.
-remote_file host delete x$tool
+#remote_file host delete x$tool
gdb_start
-set file [remote_download host $GDB_FULLPATH x$tool]
-set result [test_observer $file];
+#set file [remote_download host $GDB_FULLPATH x$tool]
+set result [test_observer $GDB_FULLPATH];
gdb_exit;
-catch "remote_file host delete $file";
+#catch "remote_file host delete $file";
if {$result <0} then {
warning "Couldn't test self"
Index: gdb-6.8.50.20090226/gdb/testsuite/gdb.gdb/selftest.exp
===================================================================
--- gdb-6.8.50.20090226.orig/gdb/testsuite/gdb.gdb/selftest.exp 2009-02-26 22:09:59.000000000 +0100
+++ gdb-6.8.50.20090226/gdb/testsuite/gdb.gdb/selftest.exp 2009-02-26 22:10:48.000000000 +0100
@@ -551,13 +551,13 @@ proc find_gdb { arg } {
set GDB_FULLPATH [find_gdb $GDB]
# Remove any old copy lying around.
-remote_file host delete x$tool
+#remote_file host delete x$tool
gdb_start
-set file [remote_download host $GDB_FULLPATH x$tool]
-set result [test_with_self $file];
+#set file [remote_download host $GDB_FULLPATH x$tool]
+set result [test_with_self $GDB_FULLPATH];
gdb_exit;
-catch "remote_file host delete $file";
+#catch "remote_file host delete $file";
if {$result <0} then {
warning "Couldn't test self"
Index: gdb-6.8.50.20090226/gdb/testsuite/gdb.gdb/xfullpath.exp
===================================================================
--- gdb-6.8.50.20090226.orig/gdb/testsuite/gdb.gdb/xfullpath.exp 2009-01-03 06:58:04.000000000 +0100
+++ gdb-6.8.50.20090226/gdb/testsuite/gdb.gdb/xfullpath.exp 2009-02-26 22:10:48.000000000 +0100
@@ -179,13 +179,13 @@ proc find_gdb { arg } {
set GDB_FULLPATH [find_gdb $GDB]
# Remove any old copy lying around.
-remote_file host delete x$tool
+#remote_file host delete x$tool
gdb_start
-set file [remote_download host $GDB_FULLPATH x$tool]
-set result [test_with_self $file];
+#set file [remote_download host $GDB_FULLPATH x$tool]
+set result [test_with_self $GDB_FULLPATH];
gdb_exit;
-catch "remote_file host delete $file";
+#catch "remote_file host delete $file";
if {$result <0} then {
warning "Couldn't test self"
if {$result < 0} then {
warning "Couldn't test self"

View File

@ -1,3 +1,11 @@
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
@ -32,17 +40,20 @@
(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/watchthreads2.c: New test case.
* testsuite/gdb.threads/watchthreads2.exp: Ditto.
* 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.
Index: gdb-6.5/gdb/testsuite/gdb.threads/watchthreads2.c
===================================================================
--- /dev/null 1970-01-01 00:00:00.000000000 +0000
+++ gdb-6.5/gdb/testsuite/gdb.threads/watchthreads-threaded.c 2006-07-12 01:54:29.000000000 -0300
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.
+
@ -110,11 +121,11 @@ Index: gdb-6.5/gdb/testsuite/gdb.threads/watchthreads2.c
+ pthread_exit(NULL);
+}
+
Index: gdb-6.5/gdb/testsuite/gdb.threads/watchthreads2.exp
===================================================================
--- /dev/null 1970-01-01 00:00:00.000000000 +0000
+++ gdb-6.5/gdb/testsuite/gdb.threads/watchthreads-threaded.exp 2006-07-12 01:54:29.000000000 -0300
@@ -0,0 +1,133 @@
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.
@ -135,22 +146,15 @@ Index: gdb-6.5/gdb/testsuite/gdb.threads/watchthreads2.exp
+
+# Check that GDB can support multiple watchpoints across threads.
+
+if $tracelevel {
+ strace $tracelevel
+}
+
+set prms_id 0
+set bug_id 0
+
+# 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 "watchthreads2"
+set testfile "watchthreads-threaded"
+set srcfile ${testfile}.c
+set binfile ${objdir}/${subdir}/${testfile}
+set binfile [standard_output_file ${testfile}]
+if {[gdb_compile_pthreads "${srcdir}/${subdir}/${srcfile}" "${binfile}" executable [list debug "incdir=${objdir}"]] != "" } {
+ return -1
+}
@ -205,13 +209,13 @@ Index: gdb-6.5/gdb/testsuite/gdb.threads/watchthreads2.exp
+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 .*watchthreads2.c:$init_line.*$gdb_prompt $"
+ -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 .*watchthreads2.c:$init_line.*$gdb_prompt $"
+ -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 .*watchthreads2.c:$inc_line.*$gdb_prompt $"
+ -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 .*watchthreads2.c:$inc_line.*$gdb_prompt $"
+ -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

View File

@ -1,9 +1,15 @@
Index: ./gdb/testsuite/gdb.threads/threadcrash.c
===================================================================
RCS file: gdb/testsuite/gdb.threads/threadcrash.c
diff -N gdb/testsuite/gdb.threads/threadcrash.c
--- /dev/null 1 Jan 1970 00:00:00 -0000
+++ ./gdb/testsuite/gdb.threads/threadcrash.c 31 Oct 2006 17:54:38 -0000
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.
@ -306,12 +312,10 @@ diff -N gdb/testsuite/gdb.threads/threadcrash.c
+
+ return 0;
+}
Index: ./gdb/testsuite/gdb.threads/threadcrash.exp
===================================================================
RCS file: gdb/testsuite/gdb.threads/threadcrash.exp
diff -N gdb/testsuite/gdb.threads/threadcrash.exp
--- /dev/null 1 Jan 1970 00:00:00 -0000
+++ ./gdb/testsuite/gdb.threads/threadcrash.exp 31 Oct 2006 17:54:38 -0000
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.
+
@ -319,7 +323,7 @@ diff -N gdb/testsuite/gdb.threads/threadcrash.exp
+set testfile threadcrash
+set srcfile ${testfile}.c
+set shellfile ${srcdir}/${subdir}/${testfile}.sh
+set binfile ${objdir}/${subdir}/${testfile}
+set binfile [standard_output_file ${testfile}]
+
+set GDB_abs ${GDB}
+if [regexp "^\[^/\]" ${GDB_abs}] {
@ -337,7 +341,7 @@ diff -N gdb/testsuite/gdb.threads/threadcrash.exp
+}
+
+# ${shellfile} argument must not contain any directories.
+set fd [open "|bash ${shellfile} ${binfile} $GDB -nw $GDBFLAGS" r]
+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
@ -350,12 +354,10 @@ diff -N gdb/testsuite/gdb.threads/threadcrash.exp
+}
+
+return 0
Index: ./gdb/testsuite/gdb.threads/threadcrash.sh
===================================================================
RCS file: gdb/testsuite/gdb.threads/threadcrash.sh
diff -N gdb/testsuite/gdb.threads/threadcrash.sh
--- /dev/null 1 Jan 1970 00:00:00 -0000
+++ ./gdb/testsuite/gdb.threads/threadcrash.sh 31 Oct 2006 17:54:38 -0000
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
+
@ -480,7 +482,7 @@ diff -N gdb/testsuite/gdb.threads/threadcrash.sh
+ local FAILURES=0
+
+ mustNotHave '??' || ((FAILURES++))
+ mustHaveCorrectAmount 12 threadcrash.c: || ((FAILURES++))
+ mustHaveCorrectAmount 11 threadcrash.c: || ((FAILURES++))
+
+ mustHaveSevenThreads || ((FAILURES++))
+ mustHaveSequence sleep "makeSyscall (ignored=" || ((FAILURES++))
@ -681,12 +683,10 @@ diff -N gdb/testsuite/gdb.threads/threadcrash.sh
+rm -rf $WORKDIR
+
+exit $FAILURES
Index: ./gdb/testsuite/gdb.threads/threadcrash.sh-orig
===================================================================
RCS file: gdb/testsuite/gdb.threads/threadcrash.sh-orig
diff -N gdb/testsuite/gdb.threads/threadcrash.sh-orig
--- /dev/null 1 Jan 1970 00:00:00 -0000
+++ ./gdb/testsuite/gdb.threads/threadcrash.sh-orig 31 Oct 2006 17:54:38 -0000
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
+

View File

@ -1,3 +1,11 @@
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:
@ -16,8 +24,10 @@ http://sourceware.org/ml/gdb-patches/2007-01/msg00434.html
* gdb.dwarf2/dw2-included.exp, gdb.dwarf2/dw2-included.c,
gdb.dwarf2/dw2-included.h: New files.
--- /dev/null 1 Jan 1970 00:00:00 -0000
+++ ./gdb/testsuite/gdb.dwarf2/dw2-included.c 2 Jan 2007 00:20:27 -0000
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.
+
@ -45,8 +55,10 @@ http://sourceware.org/ml/gdb-patches/2007-01/msg00434.html
+{
+ return 0;
+}
--- /dev/null 1 Jan 1970 00:00:00 -0000
+++ ./gdb/testsuite/gdb.dwarf2/dw2-included.exp 2 Jan 2007 00:20:27 -0000
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.
+
@ -79,7 +91,7 @@ http://sourceware.org/ml/gdb-patches/2007-01/msg00434.html
+
+set testfile "dw2-included"
+set srcfile ${testfile}.c
+set binfile ${objdir}/${subdir}/${testfile}
+set binfile [standard_output_file ${testfile}]
+
+if { [gdb_compile "${srcdir}/${subdir}/${srcfile}" "${binfile}" executable {debug}] != "" } {
+ return -1
@ -94,9 +106,11 @@ http://sourceware.org/ml/gdb-patches/2007-01/msg00434.html
+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\nint integer;\r"
--- /dev/null 1 Jan 1970 00:00:00 -0000
+++ ./gdb/testsuite/gdb.dwarf2/dw2-included.h 2 Jan 2007 00:20:27 -0000
+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.
+

View File

@ -1,3 +1,11 @@
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>
@ -19,7 +27,10 @@ will get:
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>
@ -30,114 +41,24 @@ 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
Index: gdb-7.0.50.20100128/gdb/gdbtypes.c
===================================================================
--- gdb-7.0.50.20100128.orig/gdb/gdbtypes.c 2010-01-28 12:52:17.000000000 +0100
+++ gdb-7.0.50.20100128/gdb/gdbtypes.c 2010-01-28 12:52:48.000000000 +0100
@@ -3978,6 +3978,9 @@ gdbtypes_post_init (struct gdbarch *gdba
= arch_type (gdbarch, TYPE_CODE_INTERNAL_FUNCTION, 0,
"<internal function>");
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)
+ builtin_type->nodebug_text_symbol_errno_location
+ = lookup_function_type (lookup_pointer_type (builtin_type->builtin_int));
+
return builtin_type;
}
Index: gdb-7.0.50.20100128/gdb/gdbtypes.h
===================================================================
--- gdb-7.0.50.20100128.orig/gdb/gdbtypes.h 2010-01-28 12:52:17.000000000 +0100
+++ gdb-7.0.50.20100128/gdb/gdbtypes.h 2010-01-28 12:52:48.000000000 +0100
@@ -1245,6 +1245,8 @@ struct builtin_type
/* This type is used to represent a GDB internal function. */
struct type *internal_fn;
+
+ struct type *nodebug_text_symbol_errno_location;
};
/* Return the type table for the specified architecture. */
Index: gdb-7.0.50.20100128/gdb/parse.c
===================================================================
--- gdb-7.0.50.20100128.orig/gdb/parse.c 2010-01-28 12:52:19.000000000 +0100
+++ gdb-7.0.50.20100128/gdb/parse.c 2010-01-28 12:53:20.000000000 +0100
@@ -509,7 +509,11 @@ write_exp_msymbol (struct minimal_symbol
case mst_text:
case mst_file_text:
case mst_solib_trampoline:
- write_exp_elt_type (objfile_type (objfile)->nodebug_text_symbol);
+ if (builtin_type (gdbarch)->nodebug_text_symbol_errno_location != NULL
+ && strcmp (SYMBOL_LINKAGE_NAME (msymbol), "__errno_location") == 0)
+ write_exp_elt_type (builtin_type (gdbarch)->nodebug_text_symbol_errno_location);
+ else
+ write_exp_elt_type (objfile_type (objfile)->nodebug_text_symbol);
break;
case mst_text_gnu_ifunc:
Index: gdb-7.0.50.20100128/gdb/target.c
===================================================================
--- gdb-7.0.50.20100128.orig/gdb/target.c 2010-01-28 12:52:29.000000000 +0100
+++ gdb-7.0.50.20100128/gdb/target.c 2010-01-28 12:52:48.000000000 +0100
@@ -1000,6 +1000,25 @@ pop_all_targets (int quitting)
pop_all_targets_above (dummy_stratum, quitting);
}
+static int
+resolve_errno (void *arg)
+{
+ CORE_ADDR *arg_addr = arg;
+ struct expression *expr;
+ struct cleanup *old_chain = 0;
+ struct value *val;
+
+ expr = parse_expression ("__errno_location()");
+ old_chain = make_cleanup (free_current_contents, &expr);
+ val = evaluate_expression (expr);
+ *arg_addr = value_as_address (val);
+ release_value (val);
+ value_free (val);
+ do_cleanups (old_chain);
+
+ return 1;
+}
+
/* Using the objfile specified in OBJFILE, find the address for the
current thread's thread-local storage with offset OFFSET. */
CORE_ADDR
@@ -1090,7 +1109,28 @@ target_translate_tls_address (struct obj
/* It wouldn't be wrong here to try a gdbarch method, too; finding
TLS is an ABI-specific thing. But we don't do that yet. */
else
- error (_("Cannot find thread-local variables on this target"));
+ {
+ struct minimal_symbol *msymbol;
+
+ msymbol = lookup_minimal_symbol ("errno", NULL, NULL);
+ if (msymbol != NULL
+ && SYMBOL_VALUE_ADDRESS (msymbol) == offset
+ && (SYMBOL_OBJ_SECTION (msymbol)->objfile == objfile
+ || (objfile->separate_debug_objfile != NULL
+ && SYMBOL_OBJ_SECTION (msymbol)->objfile
+ == objfile->separate_debug_objfile)
+ || (objfile->separate_debug_objfile_backlink != NULL
+ && SYMBOL_OBJ_SECTION (msymbol)->objfile
+ == objfile->separate_debug_objfile_backlink)))
+ {
+ if (!catch_errors (resolve_errno, (void *) &addr, "",
+ RETURN_MASK_ALL))
+ error (_("TLS symbol `errno' not resolved for non-TLS program."
+ " You should compile the program with `gcc -pthread'."));
+ }
+ else
+ error (_("Cannot find thread-local variables on this target"));
+ }
return addr;
}
Index: gdb-7.0.50.20100128/gdb/testsuite/gdb.dwarf2/dw2-errno.c
===================================================================
--- /dev/null 1970-01-01 00:00:00.000000000 +0000
+++ gdb-7.0.50.20100128/gdb/testsuite/gdb.dwarf2/dw2-errno.c 2010-01-28 12:52:48.000000000 +0100
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.
+
@ -167,11 +88,11 @@ Index: gdb-7.0.50.20100128/gdb/testsuite/gdb.dwarf2/dw2-errno.c
+
+ return 0; /* breakpoint */
+}
Index: gdb-7.0.50.20100128/gdb/testsuite/gdb.dwarf2/dw2-errno.exp
===================================================================
--- /dev/null 1970-01-01 00:00:00.000000000 +0000
+++ gdb-7.0.50.20100128/gdb/testsuite/gdb.dwarf2/dw2-errno.exp 2010-01-28 12:52:48.000000000 +0100
@@ -0,0 +1,67 @@
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
@ -187,16 +108,9 @@ Index: gdb-7.0.50.20100128/gdb/testsuite/gdb.dwarf2/dw2-errno.exp
+# 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 $tracelevel then {
+ strace $tracelevel
+}
+
+set prms_id 0
+set bug_id 0
+
+set testfile dw2-errno
+set srcfile ${testfile}.c
+set binfile ${objdir}/${subdir}/${testfile}
+set binfile [standard_output_file ${testfile}]
+
+proc prep {} {
+ global srcdir subdir binfile
@ -239,3 +153,112 @@ Index: gdb-7.0.50.20100128/gdb/testsuite/gdb.dwarf2/dw2-errno.exp
+
+# 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

@ -1,28 +0,0 @@
https://bugzilla.redhat.com/bugzilla/show_bug.cgi?id=190810
2006-09-26 Jan Kratochvil <jan.kratochvil@redhat.com>
* remote.c (remote_wait): Suggestion on crash due to nonmatching target.
(remote_async_wait): Likewise.
Index: gdb-6.8.50.20090818/gdb/remote.c
===================================================================
--- gdb-6.8.50.20090818.orig/gdb/remote.c 2009-08-18 21:00:35.000000000 +0200
+++ gdb-6.8.50.20090818/gdb/remote.c 2009-08-18 21:04:46.000000000 +0200
@@ -4408,8 +4408,13 @@ Packet: '%s'\n"),
VEC_safe_push (cached_reg_t, event->regcache, &cached_reg);
}
+ /* It may also occur on amd64 which defaults to 32-bit i386
+ target. gdbserver(1) is not aware of the `set architecture'
+ name itself as it is not using libbfd. */
if (*p != ';')
- error (_("Remote register badly formatted: %s\nhere: %s"),
+ error (_("Remote register badly formatted: %s\nhere: %s"
+ "\nTry to load the executable by `file' first,"
+ "\nyou may also check `set/show architecture'."),
buf, p);
++p;
}

View File

@ -1,17 +0,0 @@
Index: gdb-7.0.90.20100306/gdb/symfile.c
===================================================================
--- gdb-7.0.90.20100306.orig/gdb/symfile.c 2010-03-06 23:20:35.000000000 +0100
+++ gdb-7.0.90.20100306/gdb/symfile.c 2010-03-06 23:26:25.000000000 +0100
@@ -3642,6 +3642,12 @@ default_symfile_relocate (struct objfile
{
bfd *abfd = objfile->obfd;
+ /* Executable files have all the relocations already resolved.
+ * Handle files linked with --emit-relocs.
+ * http://sources.redhat.com/ml/gdb/2006-08/msg00137.html */
+ if ((abfd->flags & EXEC_P) != 0)
+ return NULL;
+
/* We're only interested in sections with relocation
information. */
if ((sectp->flags & SEC_RELOC) == 0)

View File

@ -1,423 +0,0 @@
https://bugzilla.redhat.com/bugzilla/show_bug.cgi?id=216711
FIXME: This workaround should be dropped and
glibc/sysdeps/unix/sysv/linux/x86_64/clone.S should get CFI for the child
instead.
2006-12-17 Jan Kratochvil <jan.kratochvil@redhat.com>
* gdb/amd64-linux-tdep.c (linux_clone_code): New variable.
(LINUX_CLONE_LEN): New definition.
(amd64_linux_clone_running, amd64_linux_outermost_frame): New function.
(amd64_linux_init_abi): Initialize `outermost_frame_p'.
* gdb/i386-tdep.c (i386_gdbarch_init): Likewise.
* gdb/i386-tdep.h (gdbarch_tdep): Add `outermost_frame_p' member.
* gdb/amd64-tdep.c (amd64_frame_this_id): Call `outermost_frame_p'.
2006-12-17 Jan Kratochvil <jan.kratochvil@redhat.com>
* gdb.threads/bt-clone-stop.exp, gdb.threads/bt-clone-stop.c:
New file.
2007-10-16 Jan Kratochvil <jan.kratochvil@redhat.com>
Port to GDB-6.7.
Index: gdb-6.8.50.20090802/gdb/amd64-linux-tdep.c
===================================================================
--- gdb-6.8.50.20090802.orig/gdb/amd64-linux-tdep.c 2009-07-02 19:25:52.000000000 +0200
+++ gdb-6.8.50.20090802/gdb/amd64-linux-tdep.c 2009-08-03 15:50:08.000000000 +0200
@@ -238,6 +238,80 @@ amd64_linux_register_reggroup_p (struct
/* Set the program counter for process PTID to PC. */
+/* Detect the outermost frame; during unwind of
+ #5 0x000000305cec68c3 in clone () from /lib64/tls/libc.so.6
+ avoid the additional bogus frame
+ #6 0x0000000000000000 in ??
+ We compare if the `linux_clone_code' block is _before_ unwound PC. */
+
+static const unsigned char linux_clone_code[] =
+{
+/* libc/sysdeps/unix/sysv/linux/x86_64/clone.S */
+/* #ifdef RESET_PID */
+/* ... */
+/* mov $SYS_ify(getpid), %eax */
+/* 0xb8, 0x27, 0x00, 0x00, 0x00 */
+/* OR */
+/* mov $SYS_ify(getpid), %rax */
+/* 0x48, 0xc7, 0xc0, 0x27, 0x00, 0x00, 0x00 */
+/* so just: */
+ 0x27, 0x00, 0x00, 0x00,
+/* syscall */
+ 0x0f, 0x05,
+/* movl %eax, %fs:PID */
+ 0x64, 0x89, 0x04, 0x25, 0x94, 0x00, 0x00, 0x00,
+/* movl %eax, %fs:TID */
+ 0x64, 0x89, 0x04, 0x25, 0x90, 0x00, 0x00, 0x00,
+/* #endif */
+/* |* Set up arguments for the function call. *| */
+/* popq %rax |* Function to call. *| */
+ 0x58,
+/* popq %rdi |* Argument. *| */
+ 0x5f,
+/* call *%rax$ */
+ 0xff, 0xd0
+};
+
+#define LINUX_CLONE_LEN (sizeof linux_clone_code)
+
+static int
+amd64_linux_clone_running (struct frame_info *this_frame)
+{
+ CORE_ADDR pc = get_frame_pc (this_frame);
+ unsigned char buf[LINUX_CLONE_LEN];
+
+ if (!safe_frame_unwind_memory (this_frame, pc - LINUX_CLONE_LEN, buf,
+ LINUX_CLONE_LEN))
+ return 0;
+
+ if (memcmp (buf, linux_clone_code, LINUX_CLONE_LEN) != 0)
+ return 0;
+
+ return 1;
+}
+
+static int
+amd64_linux_outermost_frame (struct frame_info *this_frame)
+{
+ CORE_ADDR pc = get_frame_pc (this_frame);
+ char *name;
+
+ find_pc_partial_function (pc, &name, NULL, NULL);
+
+ /* If we have NAME, we can optimize the search.
+ `clone' NAME still needs to have the code checked as its name may be
+ present in the user code.
+ `__clone' NAME should not be present in the user code but in the initial
+ parts of the `__clone' implementation the unwind still makes sense.
+ More detailed unwinding decision would be too much sensitive to possible
+ subtle changes in specific glibc revisions. */
+ if (name == NULL || strcmp (name, "clone") == 0
+ || strcmp ("__clone", name) == 0)
+ return (amd64_linux_clone_running (this_frame) != 0);
+
+ return 0;
+}
+
static void
amd64_linux_write_pc (struct regcache *regcache, CORE_ADDR pc)
{
@@ -276,6 +350,8 @@ amd64_linux_init_abi (struct gdbarch_inf
tdep->sc_reg_offset = amd64_linux_sc_reg_offset;
tdep->sc_num_regs = ARRAY_SIZE (amd64_linux_sc_reg_offset);
+ tdep->outermost_frame_p = amd64_linux_outermost_frame;
+
/* GNU/Linux uses SVR4-style shared libraries. */
set_solib_svr4_fetch_link_map_offsets
(gdbarch, svr4_lp64_fetch_link_map_offsets);
Index: gdb-6.8.50.20090802/gdb/amd64-tdep.c
===================================================================
--- gdb-6.8.50.20090802.orig/gdb/amd64-tdep.c 2009-07-02 19:25:52.000000000 +0200
+++ gdb-6.8.50.20090802/gdb/amd64-tdep.c 2009-08-03 15:50:08.000000000 +0200
@@ -1736,11 +1736,16 @@ amd64_frame_this_id (struct frame_info *
{
struct amd64_frame_cache *cache =
amd64_frame_cache (this_frame, this_cache);
+ struct gdbarch_tdep *tdep = gdbarch_tdep (get_frame_arch (this_frame));
/* This marks the outermost frame. */
if (cache->base == 0)
return;
+ /* Detect OS dependent outermost frames; such as `clone'. */
+ if (tdep->outermost_frame_p && tdep->outermost_frame_p (this_frame))
+ return;
+
(*this_id) = frame_id_build (cache->base + 16, cache->pc);
}
--- gdb-6.8.50.20090811/gdb/i386-tdep.c.orig 2009-08-10 05:02:39.000000000 +0200
+++ gdb-6.8.50.20090811/gdb/i386-tdep.c 2009-08-11 16:33:51.000000000 +0200
@@ -5432,6 +5432,9 @@ i386_gdbarch_init (struct gdbarch_info i
tdep->sc_pc_offset = -1;
tdep->sc_sp_offset = -1;
+ /* Unwinding stops on i386 automatically. */
+ tdep->outermost_frame_p = NULL;
+
tdep->record_regmap = i386_record_regmap;
/* The format used for `long double' on almost all i386 targets is
--- gdb-6.8.50.20090811/gdb/i386-tdep.h.orig 2009-08-10 05:02:39.000000000 +0200
+++ gdb-6.8.50.20090811/gdb/i386-tdep.h 2009-08-11 16:34:08.000000000 +0200
@@ -120,6 +120,9 @@ struct gdbarch_tdep
int (*i386_sysenter_record) (struct regcache *regcache);
/* Parse syscall args. */
int (*i386_syscall_record) (struct regcache *regcache);
+
+ /* Detect OS dependent outermost frames; such as `clone'. */
+ int (*outermost_frame_p) (struct frame_info *this_frame);
};
/* Floating-point registers. */
--- a/gdb/ia64-tdep.c
+++ b/gdb/ia64-tdep.c
@@ -2122,6 +2122,138 @@ static const struct frame_unwind ia64_frame_unwind =
default_frame_sniffer
};
+/* Detect the outermost frame; during unwind of
+ #6 0x2000000000347100 in __clone2 () from /lib/libc.so.6.1
+ avoid the additional bogus frame
+ #7 0x0000000000000000 in ?? () */
+
+static char linux_clone2_code[] =
+{
+/* libc/sysdeps/unix/sysv/linux/ia64/clone2.S */
+ 0x09, 0x00, 0x20, 0x12, 0x90, 0x11, 0x00, 0x40,
+ 0x28, 0x20, 0x23, 0x00, 0x00, 0x00, 0x04, 0x00,
+/* st4 [r9]=r8 */
+/* st4 [r10]=r8 */
+/* ;; */
+/* #endif */
+ 0x02, 0x50, 0x21, 0x40, 0x18, 0x14, 0x90, 0x02,
+ 0x90, 0x00, 0x42, 0x00, 0x00, 0x00, 0x04, 0x00,
+/* 1: ld8 out1=[in0],8 |* Retrieve code pointer. *| */
+/* mov out0=in4 |* Pass proper argument to fn *| */
+/* ;; */
+ 0x11, 0x08, 0x00, 0x40, 0x18, 0x10, 0x60, 0x50,
+ 0x05, 0x80, 0x03, 0x00, 0x68, 0x00, 0x80, 0x12,
+/* ld8 gp=[in0] |* Load function gp. *| */
+/* mov b6=out1 */
+/* br.call.dptk.many rp=b6 |* Call fn(arg) in the child *| */
+/* ;; */
+ 0x10, 0x48, 0x01, 0x10, 0x00, 0x21, 0x10, 0x00,
+ 0xa0, 0x00, 0x42, 0x00, 0x98, 0xdf, 0xf7, 0x5b,
+/* mov out0=r8 |* Argument to _exit *| */
+/* mov gp=loc0 */
+/* .globl HIDDEN_JUMPTARGET(_exit) */
+/* br.call.dpnt.many rp=HIDDEN_JUMPTARGET(_exit) */
+/* |* call _exit with result from fn. *| */
+ 0x11, 0x00, 0x00, 0x00, 0x01, 0x00, 0x00, 0x00,
+ 0x00, 0x02, 0x00, 0x80, 0x00, 0x00, 0x84, 0x00
+/* ret |* Not reached. *| */
+};
+
+#define LINUX_CLONE_PRE_SLOTS 3 /* Number of slots before PC. */
+#define LINUX_CLONE_LEN (sizeof linux_clone2_code)
+
+static int
+ia64_linux_clone2_running (struct frame_info *this_frame)
+{
+ CORE_ADDR pc = get_frame_pc (this_frame);
+ char buf[LINUX_CLONE_LEN];
+ struct minimal_symbol *minsym;
+ long long instr;
+
+ if (!safe_frame_unwind_memory (this_frame, pc - LINUX_CLONE_PRE_SLOTS * 16,
+ buf, LINUX_CLONE_LEN))
+ return 0;
+
+ if (memcmp (buf, linux_clone2_code, LINUX_CLONE_PRE_SLOTS * 16) != 0)
+ return 0;
+
+ /* Adjust the expected "_exit" address. */
+ minsym = lookup_minimal_symbol_text ("_exit", NULL);
+ if (minsym == NULL)
+ return 0;
+
+ instr = slotN_contents (&linux_clone2_code[LINUX_CLONE_PRE_SLOTS * 16], 2);
+ instr &= ~(((1L << 20) - 1) << 13);
+ /* Address is relative to the jump instruction slot, not the next one. */
+ instr |= (((SYMBOL_VALUE_ADDRESS (minsym) - (pc & ~0xfL)) >> 4)
+ & ((1L << 20) - 1)) << 13;
+ replace_slotN_contents (&linux_clone2_code[LINUX_CLONE_PRE_SLOTS * 16], instr,
+ 2);
+
+ if (memcmp (&buf[LINUX_CLONE_PRE_SLOTS * 16],
+ &linux_clone2_code[LINUX_CLONE_PRE_SLOTS * 16],
+ LINUX_CLONE_LEN - (LINUX_CLONE_PRE_SLOTS * 16)) != 0)
+ return 0;
+
+ return 1;
+}
+
+static int
+ia64_outermost_frame (struct frame_info *this_frame)
+{
+ CORE_ADDR pc = get_frame_pc (this_frame);
+ char *name;
+
+ find_pc_partial_function (pc, &name, NULL, NULL);
+
+ /* If we have NAME, we can optimize the search.
+ `clone' NAME still needs to have the code checked as its name may be
+ present in the user code.
+ `__clone' NAME should not be present in the user code but in the initial
+ parts of the `__clone' implementation the unwind still makes sense.
+ More detailed unwinding decision would be too much sensitive to possible
+ subtle changes in specific glibc revisions. */
+ if (name == NULL || strcmp (name, "clone2") == 0
+ || strcmp ("__clone2", name) == 0)
+ return (ia64_linux_clone2_running (this_frame) != 0);
+
+ return 0;
+}
+
+static void
+ia64_clone2_frame_this_id (struct frame_info *this_frame, void **this_cache,
+ struct frame_id *this_id)
+{
+ /* Leave the default outermost frame at *THIS_ID. */
+}
+
+static struct value *
+ia64_clone2_frame_prev_register (struct frame_info *this_frame,
+ void **this_cache, int regnum)
+{
+ return frame_unwind_got_register (this_frame, regnum, regnum);
+}
+
+static int
+ia64_clone2_frame_sniffer (const struct frame_unwind *self,
+ struct frame_info *this_frame,
+ void **this_prologue_cache)
+{
+ if (ia64_outermost_frame (this_frame))
+ return 1;
+
+ return 0;
+}
+
+static const struct frame_unwind ia64_clone2_frame_unwind =
+{
+ NORMAL_FRAME,
+ &ia64_clone2_frame_this_id,
+ &ia64_clone2_frame_prev_register,
+ NULL,
+ &ia64_clone2_frame_sniffer
+};
+
/* Signal trampolines. */
static void
@@ -3824,6 +3955,7 @@ ia64_gdbarch_init (struct gdbarch_info info, struct gdbarch_list *arches)
set_gdbarch_dummy_id (gdbarch, ia64_dummy_id);
set_gdbarch_unwind_pc (gdbarch, ia64_unwind_pc);
+ frame_unwind_append_unwinder (gdbarch, &ia64_clone2_frame_unwind);
#ifdef HAVE_LIBUNWIND_IA64_H
frame_unwind_append_unwinder (gdbarch,
&ia64_libunwind_sigtramp_frame_unwind);
Index: gdb-6.8.50.20090802/gdb/testsuite/gdb.threads/bt-clone-stop.c
===================================================================
--- /dev/null 1970-01-01 00:00:00.000000000 +0000
+++ gdb-6.8.50.20090802/gdb/testsuite/gdb.threads/bt-clone-stop.c 2009-08-03 15:50:08.000000000 +0200
@@ -0,0 +1,39 @@
+/* This testcase is part of GDB, the GNU debugger.
+
+ Copyright 2006 Free Software Foundation, Inc.
+
+ This program is free software; you can redistribute it and/or modify
+ it under the terms of the GNU General Public License as published by
+ the Free Software Foundation; either version 2 of the License, or
+ (at your option) any later version.
+
+ This program is distributed in the hope that it will be useful,
+ but WITHOUT ANY WARRANTY; without even the implied warranty of
+ MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
+ GNU General Public License for more details.
+
+ You should have received a copy of the GNU General Public License
+ along with this program; if not, write to the Free Software
+ Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston,
+ MA 02110-1301, USA. */
+
+
+#include <pthread.h>
+#include <unistd.h>
+#include <assert.h>
+
+
+void *threader (void *arg)
+{
+ assert (0);
+ return NULL;
+}
+
+int main (void)
+{
+ pthread_t t1;
+
+ pthread_create (&t1, NULL, threader, (void *) NULL);
+ for (;;)
+ pause();
+}
Index: gdb-6.8.50.20090802/gdb/testsuite/gdb.threads/bt-clone-stop.exp
===================================================================
--- /dev/null 1970-01-01 00:00:00.000000000 +0000
+++ gdb-6.8.50.20090802/gdb/testsuite/gdb.threads/bt-clone-stop.exp 2009-08-03 15:50:08.000000000 +0200
@@ -0,0 +1,61 @@
+# Copyright 2006 Free Software Foundation, Inc.
+
+# This program is free software; you can redistribute it and/or modify
+# it under the terms of the GNU General Public License as published by
+# the Free Software Foundation; either version 2 of the License, or
+# (at your option) any later version.
+#
+# This program is distributed in the hope that it will be useful,
+# but WITHOUT ANY WARRANTY; without even the implied warranty of
+# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
+# GNU General Public License for more details.
+#
+# You should have received a copy of the GNU General Public License
+# along with this program; if not, write to the Free Software
+# Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA.
+
+# Backtraced `clone' must not have `PC == 0' as its previous frame.
+
+if $tracelevel then {
+ strace $tracelevel
+}
+
+set testfile bt-clone-stop
+set srcfile ${testfile}.c
+set binfile ${objdir}/${subdir}/${testfile}
+if { [gdb_compile_pthreads "${srcdir}/${subdir}/${srcfile}" "${binfile}" executable {debug}] != "" } {
+ untested "Couldn't compile test program"
+ return -1
+}
+
+# Get things started.
+
+gdb_exit
+gdb_start
+gdb_reinitialize_dir $srcdir/$subdir
+gdb_load ${binfile}
+
+# threader: threader.c:8: threader: Assertion `0' failed.
+# Program received signal SIGABRT, Aborted.
+
+gdb_test "run" \
+ "Program received signal SIGABRT.*" \
+ "run"
+
+# Former gdb unwind (the first function is `clone'):
+# #5 0x0000003421ecd62d in ?? () from /lib64/libc.so.6
+# #6 0x0000000000000000 in ?? ()
+# (gdb)
+# Tested `amd64_linux_outermost_frame' functionality should omit the line `#6'.
+#
+# Two `-re' cases below must be in this order (1st is a subset of the 2nd one).
+# Unhandled case below should not happen and it is fortunately handled by
+# `amd64_linux_outermost_frame' as FAIL (and result `0x0 entry output invalid').
+gdb_test_multiple "bt" "0x0 entry output invalid" {
+ -re "in threader \\(.*\n#\[0-9\]* *0x0* in .*$gdb_prompt $" {
+ fail "0x0 entry found"
+ }
+ -re "in threader \\(.*$gdb_prompt $" {
+ pass "0x0 entry not found"
+ }
+}

View File

@ -1,8 +1,50 @@
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
--- /dev/null 2006-12-17 14:18:21.881669220 -0500
+++ gdb-6.5/gdb/testsuite/gdb.base/step-over-trampoline.exp 2006-12-17 16:52:51.000000000 -0500
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.
+
@ -26,7 +68,7 @@ https://bugzilla.redhat.com/bugzilla/show_bug.cgi?id=218379
+
+set testfile step-over-trampoline
+set srcfile ${testfile}.c
+set binfile ${objdir}/${subdir}/${testfile}
+set binfile [standard_output_file ${testfile}]
+if { [gdb_compile "${srcdir}/${subdir}/${srcfile}" "${binfile}" executable {debug}] != "" } {
+ untested "Couldn't compile test program"
+ return -1
@ -58,34 +100,3 @@ https://bugzilla.redhat.com/bugzilla/show_bug.cgi?id=218379
+ fail "stepped into trampoline"
+ }
+}
--- /dev/null 2006-12-17 14:18:21.881669220 -0500
+++ gdb-6.5/gdb/testsuite/gdb.base/step-over-trampoline.c 2006-12-17 16:18:12.000000000 -0500
@@ -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;
+}

View File

@ -1,21 +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
Index: gdb-6.8.50.20090803/gdb/symtab.c
===================================================================
--- gdb-6.8.50.20090803.orig/gdb/symtab.c 2009-08-03 16:09:36.000000000 +0200
+++ gdb-6.8.50.20090803/gdb/symtab.c 2009-08-03 16:13:13.000000000 +0200
@@ -2261,6 +2261,13 @@ find_pc_sect_line (CORE_ADDR pc, struct
/* See above comment about why warning is commented out */
/* warning ("In stub for %s; unable to find real function/line info", SYMBOL_LINKAGE_NAME (msymbol)) */ ;
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 (SYMBOL_VALUE (mfunsym) == pc)
+ warning ("In stub for %s (0x%s); interlocked, please submit the binary to http://bugzilla.redhat.com", SYMBOL_LINKAGE_NAME (msymbol), paddress (target_gdbarch, pc));
+ else if (BMSYMBOL_VALUE_ADDRESS (mfunsym) == pc)
+ warning ("In stub for %s (0x%s); interlocked, please submit the binary to http://bugzilla.redhat.com", msymbol.minsym->linkage_name (), paddress (target_gdbarch (), pc));
+ /* fall through */
else
return find_pc_line (SYMBOL_VALUE_ADDRESS (mfunsym), 0);
}
{
/* Detect an obvious case of infinite recursion. If this

View File

@ -1,7 +1,16 @@
diff -u -ruNp gdb-6.3-unpatched/gdb/testsuite/gdb.base/tracefork-zombie.exp gdb-6.3/gdb/testsuite/gdb.base/tracefork-zombie.exp
--- gdb-6.3-unpatched/gdb/testsuite/gdb.base/tracefork-zombie.exp 1969-12-31 19:00:00.000000000 -0500
+++ gdb-6.3/gdb/testsuite/gdb.base/tracefork-zombie.exp 2007-07-31 13:04:12.000000000 -0400
@@ -0,0 +1,82 @@
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
@ -18,13 +27,6 @@ diff -u -ruNp gdb-6.3-unpatched/gdb/testsuite/gdb.base/tracefork-zombie.exp gdb-
+# 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 prms_id 0
+set bug_id 0
+
+# are we on a target board
+if [is_remote target] then {
+ return 0

View File

@ -1,52 +0,0 @@
for gdb/ChangeLog:
2006-08-22 Will Drewry <wad@google.com>
Tavis Ormandy <taviso@google.com>
* dwarf2read.c (decode_locdesc): Enforce location description stack
boundaries.
* dwarfread.c (locval): Likewise.
2007-10-15 Jan Kratochvil <jan.kratochvil@redhat.com>
Port to GDB-6.7.
Index: gdb-6.7/gdb/dwarf2read.c
===================================================================
--- gdb-6.7.orig/gdb/dwarf2read.c 2007-10-15 00:08:30.000000000 +0200
+++ gdb-6.7/gdb/dwarf2read.c 2007-10-15 21:42:43.000000000 +0200
@@ -9070,8 +9070,7 @@ dwarf2_fundamental_type (struct objfile
callers will only want a very basic result and this can become a
complaint.
- Note that stack[0] is unused except as a default error return.
- Note that stack overflow is not yet handled. */
+ Note that stack[0] is unused except as a default error return. */
static CORE_ADDR
decode_locdesc (struct dwarf_block *blk, struct dwarf2_cu *cu)
@@ -9088,7 +9087,7 @@ decode_locdesc (struct dwarf_block *blk,
i = 0;
stacki = 0;
- stack[stacki] = 0;
+ stack[++stacki] = 0;
while (i < size)
{
@@ -9270,6 +9269,16 @@ decode_locdesc (struct dwarf_block *blk,
dwarf_stack_op_name (op));
return (stack[stacki]);
}
+ /* Enforce maximum stack depth of size-1 to avoid ++stacki writing
+ outside of the allocated space. Also enforce minimum > 0.
+ -- wad@google.com 14 Aug 2006 */
+ if (stacki >= sizeof (stack) / sizeof (*stack) - 1)
+ internal_error (__FILE__, __LINE__,
+ _("location description stack too deep: %d"),
+ stacki);
+ if (stacki <= 0)
+ internal_error (__FILE__, __LINE__,
+ _("location description stack too shallow"));
}
return (stack[stacki]);
}

View File

@ -1,6 +1,15 @@
diff -u -X /home/jkratoch/.diffi.list -ruNp gdb-6.5/gdb/testsuite/gdb.base/gcore-excessive-memory.c gdb-6.5-unknown/gdb/testsuite/gdb.base/gcore-excessive-memory.c
--- gdb-6.5/gdb/testsuite/gdb.base/gcore-excessive-memory.c 1970-01-01 01:00:00.000000000 +0100
+++ gdb-6.5-unknown/gdb/testsuite/gdb.base/gcore-excessive-memory.c 2008-01-08 11:25:45.000000000 +0100
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.
+
@ -39,10 +48,11 @@ diff -u -X /home/jkratoch/.diffi.list -ruNp gdb-6.5/gdb/testsuite/gdb.base/gcore
+
+ return 0;
+}
diff -u -X /home/jkratoch/.diffi.list -ruNp gdb-6.5/gdb/testsuite/gdb.base/gcore-excessive-memory.exp gdb-6.5-unknown/gdb/testsuite/gdb.base/gcore-excessive-memory.exp
--- gdb-6.5/gdb/testsuite/gdb.base/gcore-excessive-memory.exp 1970-01-01 01:00:00.000000000 +0100
+++ gdb-6.5-unknown/gdb/testsuite/gdb.base/gcore-excessive-memory.exp 2008-01-08 11:47:32.000000000 +0100
@@ -0,0 +1,101 @@
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
@ -59,18 +69,11 @@ diff -u -X /home/jkratoch/.diffi.list -ruNp gdb-6.5/gdb/testsuite/gdb.base/gcore
+# 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 prms_id 0
+set bug_id 0
+
+set testfile gcore-excessive-memory
+set srcfile ${testfile}.c
+set shfile ${objdir}/${subdir}/${testfile}-gdb.sh
+set corefile ${objdir}/${subdir}/${testfile}.core
+set binfile ${objdir}/${subdir}/${testfile}
+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

View File

@ -1,847 +0,0 @@
2006-10-01 Jan Kratochvil <jan.kratochvil@redhat.com>
Fujitsu
* amd64-linux-nat.c: Support new linux_elfcore_write_prpsinfo,
linux_elfcore_write_prstatus, linux_elfcore_write_prfpreg.
(i386_linux_gregset32_reg_offset): New mapping for i386 on amd64.
* gcore.c (gcore_create_callback): Comment vdso Linux kernel bug.
* configure.ac: Check for <sys/user32.h>, <sys/procfs32.h>.
* configure, config.in: Regenerated.
* gdb_user32.h, gdb_procfs32.h: Define 32-bit core files even for
64-bit gdb, provide fallbacks for <sys/user32.h> and <sys/procfs32.h>.
* linux-nat.c: Virtualize `elfcore_*' by (*`linux_elfcore_*').
(linux_nat_do_thread_registers): Likewise.
(linux_nat_make_corefile_notes): Likewise.
* linux-nat.h: Likewise.
* Makefile.in: Dependencies updated.
2007-10-16 Jan Kratochvil <jan.kratochvil@redhat.com>
Port to GDB-6.7.
2008-02-24 Jan Kratochvil <jan.kratochvil@redhat.com>
Port to GDB-6.8pre.
Index: gdb-7.0.50.20100115/gdb/amd64-linux-nat.c
===================================================================
--- gdb-7.0.50.20100115.orig/gdb/amd64-linux-nat.c 2010-01-15 03:16:43.000000000 +0100
+++ gdb-7.0.50.20100115/gdb/amd64-linux-nat.c 2010-01-15 03:20:58.000000000 +0100
@@ -51,6 +51,9 @@
#include "i386-linux-tdep.h"
#include "amd64-nat.h"
#include "i386-nat.h"
+#include "i387-tdep.h"
+#include "elf-bfd.h"
+#include "gdb_procfs32.h"
/* Mapping between the general-purpose registers in GNU/Linux x86-64
`struct user' format and GDB's register cache layout. */
@@ -85,6 +88,35 @@ static int amd64_linux_gregset64_reg_off
GNU/Linux i386 registers are all 32-bit, but since we're
little-endian we get away with that. */
+/* This info is not reusable from "i386-linux-nat.c" as gdb itself runs in
+ 64-bit mode and so ptrace(2) has 64-bit structure layout.
+ Just the corefile being generated has 32-bit layout so we need to do
+ a conversion specific to the i386-on-amd64 compatibility mode. */
+static int i386_linux_gregset32_reg_offset[] =
+{
+ 6 * 4, /* %eax */
+ 1 * 4, /* %ecx */
+ 2 * 4, /* %edx */
+ 0 * 4, /* %ebx */
+ 15 * 4, /* %esp */
+ 5 * 4, /* %ebp */
+ 3 * 4, /* %esi */
+ 4 * 4, /* %edi */
+ 12 * 4, /* %eip */
+ 14 * 4, /* %eflags */
+ 13 * 4, /* %cs */
+ 16 * 4, /* %ss */
+ 7 * 4, /* %ds */
+ 8 * 4, /* %es */
+ 9 * 4, /* %fs */
+ 10 * 4, /* %gs */
+ -1, -1, -1, -1, -1, -1, -1, -1,
+ -1, -1, -1, -1, -1, -1, -1, -1,
+ -1, -1, -1, -1, -1, -1, -1, -1,
+ -1,
+ 11 * 4 /* "orig_eax" */
+};
+
/* From <sys/reg.h> on GNU/Linux i386. */
static int amd64_linux_gregset32_reg_offset[] =
{
@@ -103,6 +135,96 @@ static int amd64_linux_gregset32_reg_off
};
+/* This functions make ELF32 32-bit elfcore note sections
+ on amd64 environment. */
+
+static char *
+amd64_linux_elfcore_write_prpsinfo (bfd *abfd, char *buf, int *bufsiz,
+ const char *fname, const char *psargs)
+{
+ if (gdbarch_ptr_bit (target_gdbarch) == 32)
+ {
+ int note_type;
+ char *note_name = "CORE";
+ struct elf_prpsinfo32 data;
+ note_type = NT_PRPSINFO;
+
+ memset (&data, 0, sizeof (data));
+ strncpy (data.pr_fname, fname, sizeof (data.pr_fname));
+ strncpy (data.pr_psargs, psargs, sizeof (data.pr_psargs));
+ return elfcore_write_note (abfd, buf, bufsiz,
+ note_name, note_type, &data, sizeof (data));
+ }
+ else
+ return elfcore_write_prpsinfo (abfd, buf, bufsiz, fname, psargs);
+}
+
+static void
+amd64_linux_set_registers (const gdb_byte *gregs, gdb_byte *buf)
+{
+ int i;
+ /* Copy the i386 registers in the amd64 layout into i386 layout. */
+ for (i = 0; i < I386_NUM_GREGS; i++)
+ memcpy(buf + i386_linux_gregset32_reg_offset[i],
+ gregs + amd64_linux_gregset32_reg_offset[i], 4);
+ for (i = I386_CS_REGNUM; i <= I386_GS_REGNUM; i++)
+ memcpy(buf + i386_linux_gregset32_reg_offset[i],
+ gregs + amd64_linux_gregset32_reg_offset[i], 4);
+}
+
+static char *
+amd64_linux_elfcore_write_prstatus (bfd *abfd, char *buf, int *bufsiz,
+ long pid, int cursig, const void *gregs)
+{
+ if (gdbarch_ptr_bit (target_gdbarch) == 32)
+ {
+ char *note_name = "CORE";
+ struct elf_prstatus32 prstat;
+ memset (&prstat, 0, sizeof (prstat));
+ prstat.pr_pid = pid;
+ prstat.pr_cursig = cursig;
+ amd64_linux_set_registers (gregs, (gdb_byte *) &prstat.pr_reg);
+ return elfcore_write_note (abfd, buf, bufsiz, note_name,
+ NT_PRSTATUS, &prstat, sizeof (prstat));
+ }
+ else
+ return elfcore_write_prstatus (abfd, buf, bufsiz, pid, cursig, gregs);
+}
+
+static char *
+amd64_elfcore_write_prxfpreg32 (bfd *abfd, char *buf, int *bufsiz,
+ struct regcache *regcache)
+{
+ char *note_name = "LINUX";
+ elf_fpxregset32_t fpxregs32;
+
+ i387_collect_fxsave (regcache, -1, &fpxregs32);
+ return elfcore_write_note(abfd, buf, bufsiz,
+ note_name, NT_PRXFPREG, &fpxregs32,
+ sizeof(fpxregs32));
+}
+
+static char *
+amd64_linux_elfcore_write_prfpreg (bfd *abfd, char *buf,
+ int *bufsiz, const void *fpregs, int size,
+ struct regcache *regcache)
+{
+ if (gdbarch_ptr_bit (target_gdbarch) == 32)
+ {
+ char *note_name = "CORE";
+ elf_fpregset32_t fpregs32;
+
+ i387_collect_fsave (regcache, -1, &fpregs32);
+ buf = elfcore_write_note(abfd, buf, bufsiz, note_name,
+ NT_FPREGSET, &fpregs32, sizeof(fpregs32));
+
+ return amd64_elfcore_write_prxfpreg32 (abfd, buf, bufsiz, regcache);
+ }
+ else
+ return elfcore_write_prfpreg (abfd, buf, bufsiz, fpregs, size);
+}
+
+
/* Transfering the general-purpose registers between GDB, inferiors
and core files. */
@@ -727,6 +849,11 @@ _initialize_amd64_linux_nat (void)
t->to_fetch_registers = amd64_linux_fetch_inferior_registers;
t->to_store_registers = amd64_linux_store_inferior_registers;
+ /* This functions make elfcore note sections. */
+ linux_elfcore_write_prpsinfo = amd64_linux_elfcore_write_prpsinfo;
+ linux_elfcore_write_prstatus = amd64_linux_elfcore_write_prstatus;
+ linux_elfcore_write_prfpreg = amd64_linux_elfcore_write_prfpreg;
+
/* Register the target. */
linux_nat_add_target (t);
linux_nat_set_new_thread (t, amd64_linux_new_thread);
Index: gdb-7.0.50.20100115/gdb/config.in
===================================================================
--- gdb-7.0.50.20100115.orig/gdb/config.in 2010-01-15 03:16:43.000000000 +0100
+++ gdb-7.0.50.20100115/gdb/config.in 2010-01-15 03:20:58.000000000 +0100
@@ -149,6 +149,9 @@
/* Define to 1 if you have the <elf_hp.h> header file. */
#undef HAVE_ELF_HP_H
+/* Define if struct elf_prstatus32 is available. */
+#undef HAVE_ELF_PRSTATUS32
+
/* Define to 1 if your system has the etext variable. */
#undef HAVE_ETEXT
@@ -490,6 +493,9 @@
/* Define to 1 if you have the <sys/poll.h> header file. */
#undef HAVE_SYS_POLL_H
+/* Define to 1 if you have the <sys/procfs32.h> header file. */
+#undef HAVE_SYS_PROCFS32_H
+
/* Define to 1 if you have the <sys/procfs.h> header file. */
#undef HAVE_SYS_PROCFS_H
@@ -517,6 +523,9 @@
/* Define to 1 if you have the <sys/types.h> header file. */
#undef HAVE_SYS_TYPES_H
+/* Define to 1 if you have the <sys/user32.h> header file. */
+#undef HAVE_SYS_USER32_H
+
/* Define to 1 if you have the <sys/user.h> header file. */
#undef HAVE_SYS_USER_H
Index: gdb-7.0.50.20100115/gdb/configure
===================================================================
--- gdb-7.0.50.20100115.orig/gdb/configure 2010-01-15 03:16:43.000000000 +0100
+++ gdb-7.0.50.20100115/gdb/configure 2010-01-15 03:20:58.000000000 +0100
@@ -10043,6 +10043,268 @@ $as_echo "#define STDC_HEADERS 1" >>conf
fi
+
+
+for ac_header in sys/user32.h sys/procfs32.h
+do
+as_ac_Header=`echo "ac_cv_header_$ac_header" | $as_tr_sh`
+if eval "test \"\${$as_ac_Header+set}\" = set"; then
+ echo "$as_me:$LINENO: checking for $ac_header" >&5
+echo $ECHO_N "checking for $ac_header... $ECHO_C" >&6
+if eval "test \"\${$as_ac_Header+set}\" = set"; then
+ echo $ECHO_N "(cached) $ECHO_C" >&6
+fi
+echo "$as_me:$LINENO: result: `eval echo '${'$as_ac_Header'}'`" >&5
+echo "${ECHO_T}`eval echo '${'$as_ac_Header'}'`" >&6
+else
+ # Is the header compilable?
+echo "$as_me:$LINENO: checking $ac_header usability" >&5
+echo $ECHO_N "checking $ac_header usability... $ECHO_C" >&6
+cat >conftest.$ac_ext <<_ACEOF
+/* confdefs.h. */
+_ACEOF
+cat confdefs.h >>conftest.$ac_ext
+cat >>conftest.$ac_ext <<_ACEOF
+/* end confdefs.h. */
+$ac_includes_default
+#include <$ac_header>
+_ACEOF
+rm -f conftest.$ac_objext
+if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5
+ (eval $ac_compile) 2>conftest.er1
+ ac_status=$?
+ grep -v '^ *+' conftest.er1 >conftest.err
+ rm -f conftest.er1
+ cat conftest.err >&5
+ echo "$as_me:$LINENO: \$? = $ac_status" >&5
+ (exit $ac_status); } &&
+ { ac_try='test -z "$ac_c_werror_flag"
+ || test ! -s conftest.err'
+ { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
+ (eval $ac_try) 2>&5
+ ac_status=$?
+ echo "$as_me:$LINENO: \$? = $ac_status" >&5
+ (exit $ac_status); }; } &&
+ { ac_try='test -s conftest.$ac_objext'
+ { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
+ (eval $ac_try) 2>&5
+ ac_status=$?
+ echo "$as_me:$LINENO: \$? = $ac_status" >&5
+ (exit $ac_status); }; }; then
+ ac_header_compiler=yes
+else
+ echo "$as_me: failed program was:" >&5
+sed 's/^/| /' conftest.$ac_ext >&5
+
+ac_header_compiler=no
+fi
+rm -f conftest.err conftest.$ac_objext conftest.$ac_ext
+echo "$as_me:$LINENO: result: $ac_header_compiler" >&5
+echo "${ECHO_T}$ac_header_compiler" >&6
+
+# Is the header present?
+echo "$as_me:$LINENO: checking $ac_header presence" >&5
+echo $ECHO_N "checking $ac_header presence... $ECHO_C" >&6
+cat >conftest.$ac_ext <<_ACEOF
+/* confdefs.h. */
+_ACEOF
+cat confdefs.h >>conftest.$ac_ext
+cat >>conftest.$ac_ext <<_ACEOF
+/* end confdefs.h. */
+#include <$ac_header>
+_ACEOF
+if { (eval echo "$as_me:$LINENO: \"$ac_cpp conftest.$ac_ext\"") >&5
+ (eval $ac_cpp conftest.$ac_ext) 2>conftest.er1
+ ac_status=$?
+ grep -v '^ *+' conftest.er1 >conftest.err
+ rm -f conftest.er1
+ cat conftest.err >&5
+ echo "$as_me:$LINENO: \$? = $ac_status" >&5
+ (exit $ac_status); } >/dev/null; then
+ if test -s conftest.err; then
+ ac_cpp_err=$ac_c_preproc_warn_flag
+ ac_cpp_err=$ac_cpp_err$ac_c_werror_flag
+ else
+ ac_cpp_err=
+ fi
+else
+ ac_cpp_err=yes
+fi
+if test -z "$ac_cpp_err"; then
+ ac_header_preproc=yes
+else
+ echo "$as_me: failed program was:" >&5
+sed 's/^/| /' conftest.$ac_ext >&5
+
+ ac_header_preproc=no
+fi
+rm -f conftest.err conftest.$ac_ext
+echo "$as_me:$LINENO: result: $ac_header_preproc" >&5
+echo "${ECHO_T}$ac_header_preproc" >&6
+
+# So? What about this header?
+case $ac_header_compiler:$ac_header_preproc:$ac_c_preproc_warn_flag in
+ yes:no: )
+ { echo "$as_me:$LINENO: WARNING: $ac_header: accepted by the compiler, rejected by the preprocessor!" >&5
+echo "$as_me: WARNING: $ac_header: accepted by the compiler, rejected by the preprocessor!" >&2;}
+ { echo "$as_me:$LINENO: WARNING: $ac_header: proceeding with the compiler's result" >&5
+echo "$as_me: WARNING: $ac_header: proceeding with the compiler's result" >&2;}
+ ac_header_preproc=yes
+ ;;
+ no:yes:* )
+ { echo "$as_me:$LINENO: WARNING: $ac_header: present but cannot be compiled" >&5
+echo "$as_me: WARNING: $ac_header: present but cannot be compiled" >&2;}
+ { echo "$as_me:$LINENO: WARNING: $ac_header: check for missing prerequisite headers?" >&5
+echo "$as_me: WARNING: $ac_header: check for missing prerequisite headers?" >&2;}
+ { echo "$as_me:$LINENO: WARNING: $ac_header: see the Autoconf documentation" >&5
+echo "$as_me: WARNING: $ac_header: see the Autoconf documentation" >&2;}
+ { echo "$as_me:$LINENO: WARNING: $ac_header: section \"Present But Cannot Be Compiled\"" >&5
+echo "$as_me: WARNING: $ac_header: section \"Present But Cannot Be Compiled\"" >&2;}
+ { echo "$as_me:$LINENO: WARNING: $ac_header: proceeding with the preprocessor's result" >&5
+echo "$as_me: WARNING: $ac_header: proceeding with the preprocessor's result" >&2;}
+ { echo "$as_me:$LINENO: WARNING: $ac_header: in the future, the compiler will take precedence" >&5
+echo "$as_me: WARNING: $ac_header: in the future, the compiler will take precedence" >&2;}
+ (
+ cat <<\_ASBOX
+## ------------------------------------------ ##
+## Report this to the AC_PACKAGE_NAME lists. ##
+## ------------------------------------------ ##
+_ASBOX
+ ) |
+ sed "s/^/$as_me: WARNING: /" >&2
+ ;;
+esac
+echo "$as_me:$LINENO: checking for $ac_header" >&5
+echo $ECHO_N "checking for $ac_header... $ECHO_C" >&6
+if eval "test \"\${$as_ac_Header+set}\" = set"; then
+ echo $ECHO_N "(cached) $ECHO_C" >&6
+else
+ eval "$as_ac_Header=\$ac_header_preproc"
+fi
+echo "$as_me:$LINENO: result: `eval echo '${'$as_ac_Header'}'`" >&5
+echo "${ECHO_T}`eval echo '${'$as_ac_Header'}'`" >&6
+
+fi
+if test `eval echo '${'$as_ac_Header'}'` = yes; then
+ cat >>confdefs.h <<_ACEOF
+#define `echo "HAVE_$ac_header" | $as_tr_cpp` 1
+_ACEOF
+
+fi
+
+done
+
+echo "$as_me:$LINENO: checking for struct elf_prstatus32.pr_reg" >&5
+echo $ECHO_N "checking for struct elf_prstatus32.pr_reg... $ECHO_C" >&6
+if test "${ac_cv_member_struct_elf_prstatus32_pr_reg+set}" = set; then
+ echo $ECHO_N "(cached) $ECHO_C" >&6
+else
+ cat >conftest.$ac_ext <<_ACEOF
+/* confdefs.h. */
+_ACEOF
+cat confdefs.h >>conftest.$ac_ext
+cat >>conftest.$ac_ext <<_ACEOF
+/* end confdefs.h. */
+#include <sys/procfs.h>
+
+int
+main ()
+{
+static struct elf_prstatus32 ac_aggr;
+if (ac_aggr.pr_reg)
+return 0;
+ ;
+ return 0;
+}
+_ACEOF
+rm -f conftest.$ac_objext
+if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5
+ (eval $ac_compile) 2>conftest.er1
+ ac_status=$?
+ grep -v '^ *+' conftest.er1 >conftest.err
+ rm -f conftest.er1
+ cat conftest.err >&5
+ echo "$as_me:$LINENO: \$? = $ac_status" >&5
+ (exit $ac_status); } &&
+ { ac_try='test -z "$ac_c_werror_flag"
+ || test ! -s conftest.err'
+ { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
+ (eval $ac_try) 2>&5
+ ac_status=$?
+ echo "$as_me:$LINENO: \$? = $ac_status" >&5
+ (exit $ac_status); }; } &&
+ { ac_try='test -s conftest.$ac_objext'
+ { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
+ (eval $ac_try) 2>&5
+ ac_status=$?
+ echo "$as_me:$LINENO: \$? = $ac_status" >&5
+ (exit $ac_status); }; }; then
+ ac_cv_member_struct_elf_prstatus32_pr_reg=yes
+else
+ echo "$as_me: failed program was:" >&5
+sed 's/^/| /' conftest.$ac_ext >&5
+
+cat >conftest.$ac_ext <<_ACEOF
+/* confdefs.h. */
+_ACEOF
+cat confdefs.h >>conftest.$ac_ext
+cat >>conftest.$ac_ext <<_ACEOF
+/* end confdefs.h. */
+#include <sys/procfs.h>
+
+int
+main ()
+{
+static struct elf_prstatus32 ac_aggr;
+if (sizeof ac_aggr.pr_reg)
+return 0;
+ ;
+ return 0;
+}
+_ACEOF
+rm -f conftest.$ac_objext
+if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5
+ (eval $ac_compile) 2>conftest.er1
+ ac_status=$?
+ grep -v '^ *+' conftest.er1 >conftest.err
+ rm -f conftest.er1
+ cat conftest.err >&5
+ echo "$as_me:$LINENO: \$? = $ac_status" >&5
+ (exit $ac_status); } &&
+ { ac_try='test -z "$ac_c_werror_flag"
+ || test ! -s conftest.err'
+ { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
+ (eval $ac_try) 2>&5
+ ac_status=$?
+ echo "$as_me:$LINENO: \$? = $ac_status" >&5
+ (exit $ac_status); }; } &&
+ { ac_try='test -s conftest.$ac_objext'
+ { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
+ (eval $ac_try) 2>&5
+ ac_status=$?
+ echo "$as_me:$LINENO: \$? = $ac_status" >&5
+ (exit $ac_status); }; }; then
+ ac_cv_member_struct_elf_prstatus32_pr_reg=yes
+else
+ echo "$as_me: failed program was:" >&5
+sed 's/^/| /' conftest.$ac_ext >&5
+
+ac_cv_member_struct_elf_prstatus32_pr_reg=no
+fi
+rm -f conftest.err conftest.$ac_objext conftest.$ac_ext
+fi
+rm -f conftest.err conftest.$ac_objext conftest.$ac_ext
+fi
+echo "$as_me:$LINENO: result: $ac_cv_member_struct_elf_prstatus32_pr_reg" >&5
+echo "${ECHO_T}$ac_cv_member_struct_elf_prstatus32_pr_reg" >&6
+if test $ac_cv_member_struct_elf_prstatus32_pr_reg = yes; then
+
+cat >>confdefs.h <<\_ACEOF
+#define HAVE_ELF_PRSTATUS32 1
+_ACEOF
+
+fi
+
# elf_hp.h is for HP/UX 64-bit shared library support.
# FIXME: kettenis/20030102: In most cases we include these (ctype.h, time.h)
# unconditionally, so what's the point in checking these?
Index: gdb-7.0.50.20100115/gdb/configure.ac
===================================================================
--- gdb-7.0.50.20100115.orig/gdb/configure.ac 2010-01-15 03:16:43.000000000 +0100
+++ gdb-7.0.50.20100115/gdb/configure.ac 2010-01-15 03:20:58.000000000 +0100
@@ -758,6 +758,11 @@ AC_SUBST(PYTHON_CFLAGS)
AC_HEADER_DIRENT
AC_HEADER_STAT
AC_HEADER_STDC
+AC_CHECK_HEADERS([sys/user32.h sys/procfs32.h])
+AC_CHECK_MEMBER([struct elf_prstatus32.pr_reg],
+ [AC_DEFINE(HAVE_ELF_PRSTATUS32, 1,
+ [Define if struct elf_prstatus32 is available. ])],
+ [], [#include <sys/procfs.h>])
# elf_hp.h is for HP/UX 64-bit shared library support.
# FIXME: kettenis/20030102: In most cases we include these (ctype.h, time.h)
# unconditionally, so what's the point in checking these?
Index: gdb-7.0.50.20100115/gdb/gcore.c
===================================================================
--- gdb-7.0.50.20100115.orig/gdb/gcore.c 2010-01-15 03:17:59.000000000 +0100
+++ gdb-7.0.50.20100115/gdb/gcore.c 2010-01-15 03:20:58.000000000 +0100
@@ -376,6 +376,11 @@ gcore_create_callback (CORE_ADDR vaddr,
asection *osec;
flagword flags = SEC_ALLOC | SEC_HAS_CONTENTS | SEC_LOAD;
+ /* Some Linux kernel versions around 2.6.17 have for i386 inferiors running
+ in compatibility mode on amd64 kernel their VSYSCALL page (at 0xffffe000)
+ protected as RWX==000 by default and gdb fails to read the library header
+ upon loading the core. This is a Linux kernel bug being fixed. */
+
/* If the memory segment has no permissions set, ignore it, otherwise
when we later try to access it for read/write, we'll get an error
or jam the kernel. */
Index: gdb-7.0.50.20100115/gdb/gdb_procfs32.h
===================================================================
--- /dev/null 1970-01-01 00:00:00.000000000 +0000
+++ gdb-7.0.50.20100115/gdb/gdb_procfs32.h 2010-01-15 03:20:58.000000000 +0100
@@ -0,0 +1,128 @@
+#ifdef HAVE_SYS_PROCFS32_H
+#include <sys/procfs32.h>
+#elif !defined HAVE_ELF_PRSTATUS32
+
+/* Copyright (C) 2006 Free Software Foundation, Inc.
+ This file is part of the GNU C Library.
+
+ The GNU C Library is free software; you can redistribute it and/or
+ modify it under the terms of the GNU Lesser General Public
+ License as published by the Free Software Foundation; either
+ version 2.1 of the License, or (at your option) any later version.
+
+ The GNU C Library 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
+ Lesser General Public License for more details.
+
+ You should have received a copy of the GNU Lesser General Public
+ License along with the GNU C Library; if not, write to the Free
+ Software Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA
+ 02111-1307 USA. */
+
+#ifndef _SYS_PROCFS32_H
+#define _SYS_PROCFS32_H 1
+
+/* This is somewhat modelled after the file of the same name on SVR4
+ systems. It provides a definition of the core file format for ELF
+ used on Linux. It doesn't have anything to do with the /proc file
+ system, even though Linux has one.
+
+ Anyway, the whole purpose of this file is for GDB and GDB only.
+ Don't read too much into it. Don't use it for anything other than
+ GDB unless you know what you are doing. */
+
+#include <features.h>
+#include <sys/time.h>
+#include <sys/types.h>
+#include "gdb_user32.h"
+
+/* We define here only the symbols differing from their 64-bit variant. */
+#include <sys/procfs.h>
+
+__BEGIN_DECLS
+
+/* Type for a general-purpose register. */
+typedef unsigned int elf_greg32_t;
+
+/* And the whole bunch of them. We could have used `struct
+ user_regs_struct' directly in the typedef, but tradition says that
+ the register set is an array, which does have some peculiar
+ semantics, so leave it that way. */
+#define ELF_NGREG32 (sizeof (struct user_regs32_struct) / sizeof(elf_greg32_t))
+typedef elf_greg32_t elf_gregset32_t[ELF_NGREG32];
+
+/* Register set for the floating-point registers. */
+typedef struct user_fpregs32_struct elf_fpregset32_t;
+
+/* Register set for the extended floating-point registers. Includes
+ the Pentium III SSE registers in addition to the classic
+ floating-point stuff. */
+typedef struct user_fpxregs32_struct elf_fpxregset32_t;
+
+
+/* Definitions to generate Intel SVR4-like core files. These mostly
+ have the same names as the SVR4 types with "elf_" tacked on the
+ front to prevent clashes with Linux definitions, and the typedef
+ forms have been avoided. This is mostly like the SVR4 structure,
+ but more Linuxy, with things that Linux does not support and which
+ GDB doesn't really use excluded. */
+
+struct prstatus32_timeval
+ {
+ int tv_sec;
+ int tv_usec;
+ };
+
+struct elf_prstatus32
+ {
+ struct elf_siginfo pr_info; /* Info associated with signal. */
+ short int pr_cursig; /* Current signal. */
+ unsigned int pr_sigpend; /* Set of pending signals. */
+ unsigned int pr_sighold; /* Set of held signals. */
+ __pid_t pr_pid;
+ __pid_t pr_ppid;
+ __pid_t pr_pgrp;
+ __pid_t pr_sid;
+ struct prstatus32_timeval pr_utime; /* User time. */
+ struct prstatus32_timeval pr_stime; /* System time. */
+ struct prstatus32_timeval pr_cutime; /* Cumulative user time. */
+ struct prstatus32_timeval pr_cstime; /* Cumulative system time. */
+ elf_gregset32_t pr_reg; /* GP registers. */
+ int pr_fpvalid; /* True if math copro being used. */
+ };
+
+
+struct elf_prpsinfo32
+ {
+ char pr_state; /* Numeric process state. */
+ char pr_sname; /* Char for pr_state. */
+ char pr_zomb; /* Zombie. */
+ char pr_nice; /* Nice val. */
+ unsigned int pr_flag; /* Flags. */
+ unsigned short int pr_uid;
+ unsigned short int pr_gid;
+ int pr_pid, pr_ppid, pr_pgrp, pr_sid;
+ /* Lots missing */
+ char pr_fname[16]; /* Filename of executable. */
+ char pr_psargs[ELF_PRARGSZ]; /* Initial part of arg list. */
+ };
+
+
+/* The rest of this file provides the types for emulation of the
+ Solaris <proc_service.h> interfaces that should be implemented by
+ users of libthread_db. */
+
+/* Register sets. Linux has different names. */
+typedef elf_gregset_t prgregset32_t;
+typedef elf_fpregset_t prfpregset32_t;
+
+/* Process status and info. In the end we do provide typedefs for them. */
+typedef struct elf_prstatus32 prstatus32_t;
+typedef struct elf_prpsinfo32 prpsinfo32_t;
+
+__END_DECLS
+
+#endif /* _SYS_PROCFS32_H */
+
+#endif /* HAVE_SYS_PROCFS32_H */
Index: gdb-7.0.50.20100115/gdb/gdb_user32.h
===================================================================
--- /dev/null 1970-01-01 00:00:00.000000000 +0000
+++ gdb-7.0.50.20100115/gdb/gdb_user32.h 2010-01-15 03:20:58.000000000 +0100
@@ -0,0 +1,108 @@
+#ifdef HAVE_SYS_USER32_H
+#include <sys/user32.h>
+#else
+
+#ifdef HAVE_STDINT_H
+#include <stdint.h>
+typedef int32_t gdb_int32_t;
+typedef uint32_t gdb_uint32_t;
+#else
+typedef signed int gdb_uint32_t;
+typedef unsigned int gdb_uint32_t;
+#endif
+
+/* Copyright (C) 2006 Free Software Foundation, Inc.
+ This file is part of the GNU C Library.
+
+ The GNU C Library is free software; you can redistribute it and/or
+ modify it under the terms of the GNU Lesser General Public
+ License as published by the Free Software Foundation; either
+ version 2.1 of the License, or (at your option) any later version.
+
+ The GNU C Library 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
+ Lesser General Public License for more details.
+
+ You should have received a copy of the GNU Lesser General Public
+ License along with the GNU C Library; if not, write to the Free
+ Software Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA
+ 02111-1307 USA. */
+
+#ifndef _SYS_USER32_H
+#define _SYS_USER32_H 1
+
+/* These are the 32-bit x86 structures. */
+
+struct user_fpregs32_struct
+{
+ int32_t cwd;
+ int32_t swd;
+ int32_t twd;
+ int32_t fip;
+ int32_t fcs;
+ int32_t foo;
+ int32_t fos;
+ int32_t st_space [20];
+};
+
+struct user_fpxregs32_struct
+{
+ unsigned short int cwd;
+ unsigned short int swd;
+ unsigned short int twd;
+ unsigned short int fop;
+ int32_t fip;
+ int32_t fcs;
+ int32_t foo;
+ int32_t fos;
+ int32_t mxcsr;
+ int32_t reserved;
+ int32_t st_space[32]; /* 8*16 bytes for each FP-reg = 128 bytes */
+ int32_t xmm_space[32]; /* 8*16 bytes for each XMM-reg = 128 bytes */
+ int32_t padding[56];
+};
+
+struct user_regs32_struct
+{
+ int32_t ebx;
+ int32_t ecx;
+ int32_t edx;
+ int32_t esi;
+ int32_t edi;
+ int32_t ebp;
+ int32_t eax;
+ int32_t xds;
+ int32_t xes;
+ int32_t xfs;
+ int32_t xgs;
+ int32_t orig_eax;
+ int32_t eip;
+ int32_t xcs;
+ int32_t eflags;
+ int32_t esp;
+ int32_t xss;
+};
+
+struct user32
+{
+ struct user_regs32_struct regs;
+ int u_fpvalid;
+ struct user_fpregs32_struct i387;
+ uint32_t u_tsize;
+ uint32_t u_dsize;
+ uint32_t u_ssize;
+ uint32_t start_code;
+ uint32_t start_stack;
+ int32_t signal;
+ int reserved;
+ struct user_regs32_struct* u_ar0;
+ struct user_fpregs32_struct* u_fpstate;
+ uint32_t magic;
+ char u_comm [32];
+ int u_debugreg [8];
+};
+
+#endif /* _SYS_USER32_H */
+
+#endif /* HAVE_SYS_USER32_H */
Index: gdb-7.0.50.20100115/gdb/linux-nat.c
===================================================================
--- gdb-7.0.50.20100115.orig/gdb/linux-nat.c 2010-01-15 03:20:45.000000000 +0100
+++ gdb-7.0.50.20100115/gdb/linux-nat.c 2010-01-15 03:20:58.000000000 +0100
@@ -225,6 +225,21 @@ static LONGEST (*super_xfer_partial) (st
const gdb_byte *,
ULONGEST, LONGEST);
+/* This functions make elfcore note sections.
+ They may get overriden by code adjusting data for multi-target builds. */
+char *(*linux_elfcore_write_prpsinfo)
+ (bfd *, char *, int *, const char *, const char *) = elfcore_write_prpsinfo;
+char *(*linux_elfcore_write_prstatus)
+ (bfd *, char *, int *, long, int, const void *) = elfcore_write_prstatus;
+static char *
+linux_elfcore_write_prfpreg_bfd (bfd *abfd, char *buf, int *bufsiz,
+ const void *fpregs, int size, struct regcache *regcache)
+{
+ return elfcore_write_prfpreg (abfd, buf, bufsiz, fpregs, size);
+}
+char *(*linux_elfcore_write_prfpreg) (bfd *, char *, int *, const void *, int,
+ struct regcache *) = linux_elfcore_write_prfpreg_bfd;
+
static int debug_linux_nat;
static void
show_debug_linux_nat (struct ui_file *file, int from_tty,
@@ -4187,7 +4202,7 @@ linux_nat_do_thread_registers (bfd *obfd
else
fill_gregset (regcache, &gregs, -1);
- note_data = (char *) elfcore_write_prstatus (obfd,
+ note_data = (char *) linux_elfcore_write_prstatus (obfd,
note_data,
note_size,
lwp,
@@ -4237,10 +4252,10 @@ linux_nat_do_thread_registers (bfd *obfd
else
fill_fpregset (regcache, &fpregs, -1);
- note_data = (char *) elfcore_write_prfpreg (obfd,
+ note_data = (char *) linux_elfcore_write_prfpreg (obfd,
note_data,
note_size,
- &fpregs, sizeof (fpregs));
+ &fpregs, sizeof (fpregs), regcache);
}
return note_data;
@@ -4423,9 +4438,9 @@ linux_nat_make_corefile_notes (bfd *obfd
psargs_end - string_end);
}
}
- note_data = (char *) elfcore_write_prpsinfo (obfd,
- note_data,
- note_size, fname, psargs);
+ note_data = (char *) linux_elfcore_write_prpsinfo (obfd, note_data,
+ note_size, fname,
+ psargs);
}
/* Dump information for threads. */
Index: gdb-7.0.50.20100115/gdb/linux-nat.h
===================================================================
--- gdb-7.0.50.20100115.orig/gdb/linux-nat.h 2010-01-15 03:17:07.000000000 +0100
+++ gdb-7.0.50.20100115/gdb/linux-nat.h 2010-01-15 03:21:26.000000000 +0100
@@ -169,3 +169,12 @@ struct siginfo *linux_nat_get_siginfo (p
/* Compute and return the processor core of a given thread. */
int linux_nat_core_of_thread_1 (ptid_t ptid);
+
+/* These functions make elfcore note sections.
+ They may get overriden by code adjusting data for multi-target builds. */
+extern char *(*linux_elfcore_write_prpsinfo)
+ (bfd *, char *, int *, const char *, const char *);
+extern char *(*linux_elfcore_write_prstatus)
+ (bfd *, char *, int *, long, int, const void *);
+extern char *(*linux_elfcore_write_prfpreg)
+ (bfd *, char *, int *, const void *, int, struct regcache *);

View File

@ -1,6 +1,15 @@
diff -u -rup gdb-6.3-orig/gdb/testsuite/gdb.base/unwind-leak.c gdb-6.3/gdb/testsuite/gdb.base/unwind-leak.c
--- gdb-6.3-orig/gdb/testsuite/gdb.base/unwind-leak.c 2007-12-19 15:12:55.000000000 -0500
+++ gdb-6.3/gdb/testsuite/gdb.base/unwind-leak.c 2007-12-19 13:55:22.000000000 -0500
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.
+
@ -31,10 +40,11 @@ diff -u -rup gdb-6.3-orig/gdb/testsuite/gdb.base/unwind-leak.c gdb-6.3/gdb/tests
+ alarm (0);
+ return 0;
+}
diff -u -rup gdb-6.3-orig/gdb/testsuite/gdb.base/unwind-leak.exp gdb-6.3/gdb/testsuite/gdb.base/unwind-leak.exp
--- gdb-6.3-orig/gdb/testsuite/gdb.base/unwind-leak.exp 2007-12-19 15:12:53.000000000 -0500
+++ gdb-6.3/gdb/testsuite/gdb.base/unwind-leak.exp 2007-12-19 15:11:35.000000000 -0500
@@ -0,0 +1,90 @@
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
@ -51,17 +61,10 @@ diff -u -rup gdb-6.3-orig/gdb/testsuite/gdb.base/unwind-leak.exp gdb-6.3/gdb/tes
+# 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 prms_id 0
+set bug_id 0
+
+set testfile unwind-leak
+set srcfile ${testfile}.c
+set shfile ${objdir}/${subdir}/${testfile}-gdb.sh
+set binfile ${objdir}/${subdir}/${testfile}
+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

View File

@ -1,9 +1,15 @@
Index: ./gdb/testsuite/gdb.base/largecore-last-address-lock.exp
===================================================================
RCS file: ./gdb/testsuite/gdb.base/largecore-last-address-lock.exp
diff -N ./gdb/testsuite/gdb.base/largecore-last-address-lock.exp
--- /dev/null 1 Jan 1970 00:00:00 -0000
+++ ./gdb/testsuite/gdb.base/largecore-last-address-lock.exp 15 Nov 2006 21:43:24 -0000
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.
+

View File

@ -1,62 +1,18 @@
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
--- /dev/null 2007-12-14 20:45:09.113039517 +0100
+++ gdb-6.5/gdb/testsuite/gdb.base/watchpoint-during-step.exp 2007-12-24 19:42:00.000000000 +0100
@@ -0,0 +1,51 @@
+# 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.
+
+if $tracelevel then {
+ strace $tracelevel
+}
+
+set prms_id 0
+set bug_id 0
+
+set testfile watchpoint-during-step
+set srcfile ${testfile}.c
+set binfile ${objdir}/${subdir}/${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"
--- /dev/null 2007-12-14 20:45:09.113039517 +0100
+++ gdb-6.5/gdb/testsuite/gdb.base/watchpoint-during-step.c 2007-12-24 19:38:10.000000000 +0100
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.
+
@ -88,3 +44,52 @@ Fix has been committed to:
+ 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

@ -1,13 +1,18 @@
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
Index: ./gdb/testsuite/gdb.base/readline-overflow.exp
===================================================================
RCS file: ./gdb/testsuite/gdb.base/readline-overflow.exp
diff -N ./gdb/testsuite/gdb.base/readline-overflow.exp
--- /dev/null 1 Jan 1970 00:00:00 -0000
+++ ./gdb/testsuite/gdb.base/readline-overflow.exp 13 Nov 2006 23:42:50 -0000
@@ -0,0 +1,125 @@
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
@ -39,98 +44,76 @@ diff -N ./gdb/testsuite/gdb.base/readline-overflow.exp
+ strace $tracelevel
+}
+
+# Don't let a .inputrc file or an existing setting of INPUTRC mess up
+# the test results. Even if /dev/null doesn't exist on the particular
+# platform, the readline library will use the default setting just by
+# failing to open the file. OTOH, opening /dev/null successfully will
+# also result in the default settings being used since nothing will be
+# read from this file.
+global env
+if [info exists env(INPUTRC)] {
+ set old_inputrc $env(INPUTRC)
+}
+set env(INPUTRC) "/dev/null"
+
+set oldtimeout1 $timeout
+set timeout 600
+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
+
+if [info exists env(GDBHISTFILE)] {
+ set old_gdbhistfile $env(GDBHISTFILE)
+}
+if [info exists env(HISTSIZE)] {
+ set old_histsize $env(HISTSIZE)
+}
+set env(GDBHISTFILE) "${srcdir}/${subdir}/gdb_history"
+set env(HISTSIZE) "10"
+ # 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"
+
+gdb_exit
+gdb_start
+gdb_reinitialize_dir $srcdir/$subdir
+ 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 {
+ 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
+ }
+ incr i
+ if {$i <= $total} {
+ send_gdb "X"
+ exp_continue
+ }
+ }
+ -re "\[ \b\r\n\]" {
+ exp_continue
+ exp_continue
+ }
+ eof {
+ fail "gdb sending total $total characters"
+ note "Failed after sending $i characters, reason: EOF"
+ gdb_clear_suppressed
+ 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
+ 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
+ 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"
+}
+gdb_test "\r" \
+ "No executable file specified..*" \
+ "All the characters transferred"
+
+
+# Restore globals modified in this test...
+if [info exists old_inputrc] {
+ set env(INPUTRC) $old_inputrc
+} else {
+ unset env(INPUTRC)
+}
+if [info exists old_gdbhistfile] {
+ set env(GDBHISTFILE) $old_gdbhistfile
+} else {
+ unset env(GDBHISTFILE)
+}
+if [info exists old_histsize] {
+ set env(HISTSIZE) $old_histsize
+} else {
+ unset env(HISTSIZE)
+}
+set timeout $oldtimeout1
+
+return 0

View File

@ -1,165 +0,0 @@
Fix Valgrind paste of >= 256 * (screen width) characters (as 130001).
Invalid write of size 4
at 0x8203BD9: rl_redisplay (display.c:812)
by 0x81F5130: _rl_internal_char_cleanup (readline.c:427)
by 0x81F52B3: readline_internal_char (readline.c:508)
by 0x8209817: rl_callback_read_char (callback.c:184)
by 0x8135312: rl_callback_read_char_wrapper (event-top.c:179)
by 0x8135B7B: stdin_event_handler (event-top.c:432)
by 0x81349F2: handle_file_event (event-loop.c:730)
by 0x81342AB: process_event (event-loop.c:343)
by 0x81342F4: gdb_do_one_event (event-loop.c:380)
by 0x81313AC: catch_errors (exceptions.c:515)
by 0x80CE8CA: tui_command_loop (tui-interp.c:151)
by 0x81318B9: current_interp_command_loop (interps.c:278)
Address 0x43DCEB8 is 0 bytes after a block of size 1,024 alloc'd
at 0x4005400: malloc (vg_replace_malloc.c:149)
by 0x8087084: xmalloc (utils.c:959)
by 0x8202CA7: init_line_structures (display.c:440)
by 0x8202D14: rl_redisplay (display.c:471)
by 0x81F4F53: readline_internal_setup (readline.c:363)
by 0x820958C: _rl_callback_newline (callback.c:89)
by 0x82095BB: rl_callback_handler_install (callback.c:101)
by 0x80CE896: tui_command_loop (tui-interp.c:138)
by 0x81318B9: current_interp_command_loop (interps.c:278)
by 0x807E69A: captured_command_loop (main.c:101)
by 0x81313AC: catch_errors (exceptions.c:515)
by 0x807F55A: captured_main (main.c:826)
2006-11-08 Jan Kratochvil <jan.kratochvil@redhat.com>
* readline/display.c (line_state, line_state_array, line_state_visible,
line_state_invisible): Encapsulate _rl_wrapped_line, inv_lbreaks,
inv_lbsize, vis_lbreaks, vis_lbsize, visible_line, invisible_line.
(init_line_structures): Initialize both _rl_wrapped_line ones now.
(rl_redisplay): Fix _rl_wrapped_line handling by using its own size.
Swap whole `line_state_visible' / `line_state_invisible' structures.
(update_line): Update for new `_rl_wrapped_line'.
Index: ./readline/display.c
===================================================================
--- ./readline/display.c 5 May 2006 18:26:12 -0000 1.11
+++ ./readline/display.c 8 Nov 2006 18:23:33 -0000
@@ -73,15 +73,31 @@ static void delete_chars PARAMS((int));
static void insert_some_chars PARAMS((char *, int, int));
static void cr PARAMS((void));
+struct line_state
+ {
+ char *line;
+ int *lbreaks;
+ int lbreaks_size;
+#if defined (HANDLE_MULTIBYTE)
+ int *wrapped_line;
+ int wrapped_line_size;
+#endif
+ };
+static struct line_state line_state_array[2];
+static struct line_state *line_state_visible = &line_state_array[0];
+static struct line_state *line_state_invisible = &line_state_array[1];
+
#if defined (HANDLE_MULTIBYTE)
static int _rl_col_width PARAMS((const char *, int, int));
-static int *_rl_wrapped_line;
#else
# define _rl_col_width(l, s, e) (((e) <= (s)) ? 0 : (e) - (s))
#endif
-static int *inv_lbreaks, *vis_lbreaks;
-static int inv_lbsize, vis_lbsize;
+/* FIXME: Backward compatible naming. */
+#define inv_lbreaks (line_state_invisible->lbreaks)
+#define inv_lbsize (line_state_invisible->lbreaks_size)
+#define vis_lbreaks (line_state_visible->lbreaks)
+#define vis_lbsize (line_state_visible->lbreaks_size)
/* Heuristic used to decide whether it is faster to move from CUR to NEW
by backing up or outputting a carriage return and moving forward. */
@@ -150,8 +166,9 @@ static int last_lmargin;
/* The line display buffers. One is the line currently displayed on
the screen. The other is the line about to be displayed. */
-static char *visible_line = (char *)NULL;
-static char *invisible_line = (char *)NULL;
+/* FIXME: Backward compatible naming. */
+#define visible_line (line_state_visible->line)
+#define invisible_line (line_state_invisible->line)
/* A buffer for `modeline' messages. */
static char msg_buf[128];
@@ -437,7 +454,10 @@ init_line_structures (minsize)
inv_lbreaks = (int *)xmalloc (inv_lbsize * sizeof (int));
vis_lbreaks = (int *)xmalloc (vis_lbsize * sizeof (int));
#if defined (HANDLE_MULTIBYTE)
- _rl_wrapped_line = (int *)xmalloc (vis_lbsize * sizeof (int));
+ line_state_visible->wrapped_line_size = vis_lbsize;
+ line_state_visible->wrapped_line = (int *)xmalloc (line_state_visible->wrapped_line_size * sizeof (int));
+ line_state_invisible->wrapped_line_size = inv_lbsize;
+ line_state_invisible->wrapped_line = (int *)xmalloc (line_state_invisible->wrapped_line_size * sizeof (int));
#endif
inv_lbreaks[0] = vis_lbreaks[0] = 0;
}
@@ -572,10 +592,15 @@ rl_redisplay ()
{ \
inv_lbsize *= 2; \
inv_lbreaks = (int *)xrealloc (inv_lbreaks, inv_lbsize * sizeof (int)); \
- _rl_wrapped_line = (int *)xrealloc (_rl_wrapped_line, inv_lbsize * sizeof (int)); \
} \
inv_lbreaks[++newlines] = out; \
- _rl_wrapped_line[newlines] = _rl_wrapped_multicolumn; \
+ if (newlines >= (line_state_invisible->wrapped_line_size - 1)) \
+ { \
+ line_state_invisible->wrapped_line_size *= 2; \
+ line_state_invisible->wrapped_line = (int *)xrealloc (line_state_invisible->wrapped_line, \
+ line_state_invisible->wrapped_line_size * sizeof (int)); \
+ } \
+ line_state_invisible->wrapped_line[newlines] = _rl_wrapped_multicolumn; \
lpos = 0; \
} \
} while (0)
@@ -605,7 +630,7 @@ rl_redisplay ()
#endif
#if defined (HANDLE_MULTIBYTE)
- memset (_rl_wrapped_line, 0, vis_lbsize);
+ memset (line_state_invisible->wrapped_line, 0, line_state_invisible->wrapped_line_size * sizeof (int));
num = 0;
#endif
@@ -1118,17 +1143,10 @@ rl_redisplay ()
/* Swap visible and non-visible lines. */
{
- char *vtemp = visible_line;
- int *itemp = vis_lbreaks, ntemp = vis_lbsize;
-
- visible_line = invisible_line;
- invisible_line = vtemp;
-
- vis_lbreaks = inv_lbreaks;
- inv_lbreaks = itemp;
-
- vis_lbsize = inv_lbsize;
- inv_lbsize = ntemp;
+ struct line_state *line_state_temp = line_state_visible;
+
+ line_state_visible = line_state_invisible;
+ line_state_invisible = line_state_temp;
rl_display_fixed = 0;
/* If we are displaying on a single line, and last_lmargin is > 0, we
@@ -1194,8 +1212,9 @@ update_line (old, new, current_line, oma
/* This fixes only double-column characters, but if the wrapped
character comsumes more than three columns, spaces will be
inserted in the string buffer. */
- if (_rl_wrapped_line[current_line] > 0)
- _rl_clear_to_eol (_rl_wrapped_line[current_line]);
+ if (current_line < line_state_visible->wrapped_line_size
+ && line_state_visible->wrapped_line[current_line] > 0)
+ _rl_clear_to_eol (line_state_visible->wrapped_line[current_line]);
memset (&ps, 0, sizeof (mbstate_t));
ret = mbrtowc (&wc, new, MB_CUR_MAX, &ps);

View File

@ -1,6 +1,15 @@
diff -up -ruNp gdb-6.5-orig/gdb/testsuite/gdb.base/datalib-lib.c gdb-6.5/gdb/testsuite/gdb.base/datalib-lib.c
--- gdb-6.5-orig/gdb/testsuite/gdb.base/datalib-lib.c 1969-12-31 19:00:00.000000000 -0500
+++ gdb-6.5/gdb/testsuite/gdb.base/datalib-lib.c 2008-05-29 13:51:50.000000000 -0400
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.
+
@ -24,9 +33,10 @@ diff -up -ruNp gdb-6.5-orig/gdb/testsuite/gdb.base/datalib-lib.c gdb-6.5/gdb/tes
+ bug-gdb@prep.ai.mit.edu */
+
+int var;
diff -up -ruNp gdb-6.5-orig/gdb/testsuite/gdb.base/datalib-main.c gdb-6.5/gdb/testsuite/gdb.base/datalib-main.c
--- gdb-6.5-orig/gdb/testsuite/gdb.base/datalib-main.c 1969-12-31 19:00:00.000000000 -0500
+++ gdb-6.5/gdb/testsuite/gdb.base/datalib-main.c 2008-05-29 13:51:39.000000000 -0400
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.
+
@ -54,9 +64,10 @@ diff -up -ruNp gdb-6.5-orig/gdb/testsuite/gdb.base/datalib-main.c gdb-6.5/gdb/te
+{
+ return 0;
+}
diff -up -ruNp gdb-6.5-orig/gdb/testsuite/gdb.base/datalib.exp gdb-6.5/gdb/testsuite/gdb.base/datalib.exp
--- gdb-6.5-orig/gdb/testsuite/gdb.base/datalib.exp 1969-12-31 19:00:00.000000000 -0500
+++ gdb-6.5/gdb/testsuite/gdb.base/datalib.exp 2008-05-29 14:58:33.000000000 -0400
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.
+
@ -77,8 +88,8 @@ diff -up -ruNp gdb-6.5-orig/gdb/testsuite/gdb.base/datalib.exp gdb-6.5/gdb/tests
+set testfile datalib
+set srcfilemain ${testfile}-main.c
+set srcfilelib ${testfile}-lib.c
+set libfile ${objdir}/${subdir}/${testfile}-lib.so
+set binfile ${objdir}/${subdir}/${testfile}-main
+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

View File

@ -1,15 +1,21 @@
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
@ -23,10 +29,10 @@ The testsuite needs `gdb-6.5-tls-of-separate-debuginfo.patch'.
Port to gdb-6.7.50.20080227.
Index: gdb-6.7.50.20080227/gdb/testsuite/gdb.threads/tls-sepdebug-main.c
===================================================================
--- /dev/null 1970-01-01 00:00:00.000000000 +0000
+++ gdb-6.7.50.20080227/gdb/testsuite/gdb.threads/tls-sepdebug-main.c 2008-02-27 09:00:15.000000000 +0100
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.
+
@ -53,10 +59,10 @@ Index: gdb-6.7.50.20080227/gdb/testsuite/gdb.threads/tls-sepdebug-main.c
+{
+ return 0;
+}
Index: gdb-6.7.50.20080227/gdb/testsuite/gdb.threads/tls-sepdebug-shared.c
===================================================================
--- /dev/null 1970-01-01 00:00:00.000000000 +0000
+++ gdb-6.7.50.20080227/gdb/testsuite/gdb.threads/tls-sepdebug-shared.c 2008-02-27 09:00:15.000000000 +0100
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.
+
@ -80,9 +86,11 @@ Index: gdb-6.7.50.20080227/gdb/testsuite/gdb.threads/tls-sepdebug-shared.c
+ bug-gdb@prep.ai.mit.edu */
+
+__thread int var = 42;
--- /dev/null 2009-02-10 00:19:00.494289687 +0100
+++ gdb-6.8.50.20090209-x/gdb/testsuite/gdb.threads/tls-sepdebug.exp 2009-02-10 00:49:38.000000000 +0100
@@ -0,0 +1,86 @@
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
@ -107,10 +115,10 @@ Index: gdb-6.7.50.20080227/gdb/testsuite/gdb.threads/tls-sepdebug-shared.c
+set srcmainfile ${testfile}-main.c
+set srcsharedfile ${testfile}-shared.c
+
+set binmainfile ${objdir}/${subdir}/${testfile}-main
+set binmainfile [standard_output_file ${testfile}-main]
+set binsharedbase ${testfile}-shared.so
+set binsharedfile ${objdir}/${subdir}/${binsharedbase}
+set binshareddebugfile ${objdir}/${subdir}/${binsharedbase}.debug
+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.
@ -144,7 +152,8 @@ Index: gdb-6.7.50.20080227/gdb/testsuite/gdb.threads/tls-sepdebug-shared.c
+# \$PWD is easy - it is the absolute way
+# ${subdir} would fail on "print var"
+
+foreach ld_library_path [list [pwd]/${subdir} ./${subdir}] name { absolute relative } {
+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

View File

@ -1,24 +0,0 @@
Dependency on: gdb-6.5-bz185337-resolve-tls-without-debuginfo-v2.patch
2006-09-01 Jan Kratochvil <jan.kratochvil@redhat.com>
* target.c (target_translate_tls_address): Fix for separate debuginfo.
diff -rup gdb-6.5.orig/gdb/target.c gdb-6.5/gdb/target.c
--- gdb-6.5.orig/gdb/target.c 2006-09-20 17:13:35.000000000 -0400
+++ gdb-6.5/gdb/target.c 2006-09-20 17:15:53.000000000 -0400
@@ -769,6 +769,12 @@ target_translate_tls_address (struct obj
ptid_t ptid = inferior_ptid;
volatile struct gdb_exception ex;
+ /* Resolve: Cannot find shared library
+ `/usr/lib/debug/lib/lib....so.debug' in dynamic linker's load
+ module list */
+ if (objfile->separate_debug_objfile_backlink != NULL)
+ objfile = objfile->separate_debug_objfile_backlink;
+
TRY_CATCH (ex, RETURN_MASK_ALL)
{
CORE_ADDR lm_addr;

View File

@ -1,5 +1,11 @@
From FEDORA_PATCHES Mon Sep 17 00:00:00 2001
From: Fedora GDB patches <invalid@email.com>
Date: Fri, 27 Oct 2017 21:07:50 +0200
Subject: gdb-6.6-buildid-locate-core-as-arg.patch
;;=push+jan
http://sourceware.org/ml/gdb-patches/2010-01/msg00558.html
Subject: Re: [patch] print a more useful error message for "gdb core"
[ Fixed up since the mail. ]
@ -31,16 +37,13 @@ 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.
@ -58,29 +61,19 @@ Http://sourceware.org/ml/gdb-patches/2010-01/msg00517.html
* exec.c (exec_file_attach): Print a more useful error message if the
user did "gdb core".
--- ./gdb/exceptions.h 2010-04-11 22:31:30.000000000 +0200
+++ ./gdb/exceptions.h 2010-04-11 22:31:47.000000000 +0200
@@ -78,6 +78,9 @@ enum errors {
/* Feature is not supported in this copy of GDB. */
UNSUPPORTED_ERROR,
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/>. */
+ /* Attempt to load a core file as executable. */
+ IS_CORE_ERROR,
+
/* Add more errors here. */
NR_ERRORS
};
--- ./gdb/exec.c 2010-04-11 22:31:30.000000000 +0200
+++ ./gdb/exec.c 2010-04-11 22:41:26.000000000 +0200
@@ -34,6 +34,7 @@
#include "arch-utils.h"
#include "gdbthread.h"
#include "progspace.h"
#include "defs.h"
+#include "arch-utils.h"
+#include "exceptions.h"
#include <fcntl.h>
#include "readline/readline.h"
@@ -256,12 +257,27 @@ exec_file_attach (char *filename, int fr
#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))
{
@ -95,62 +88,61 @@ Http://sourceware.org/ml/gdb-patches/2010-01/msg00517.html
/* Make sure to close exec_bfd, or else "run" might try to use
it. */
exec_close ();
- error (_("\"%s\": not in executable format: %s"),
- scratch_pathname,
- gdb_bfd_errmsg (bfd_get_error (), matching));
- 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);
+ _("\"%s\" is a core file.\n"
+ "Please specify an executable to debug."),
+ scratch_pathname);
+ else
+ error (_("\"%s\": not in executable format: %s"),
+ scratch_pathname,
+ gdb_bfd_errmsg (bfd_get_error (), matching));
+ error (_("\"%ps\": not in executable format: %s"),
+ styled_string (file_name_style.style (), scratch_pathname),
+ gdb_bfd_errmsg (bfd_get_error (), matching).c_str ());
}
/* FIXME - This should only be run for RS6000, but the ifdef is a poor
--- ./gdb/main.c 2010-04-11 22:31:30.000000000 +0200
+++ ./gdb/main.c 2010-04-11 22:31:47.000000000 +0200
@@ -241,6 +241,36 @@ captured_command_loop (void *data)
return 1;
}
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 (char *filename, int from_tty)
+exec_or_core_file_attach (const char *filename, int from_tty)
+{
+ volatile struct gdb_exception e;
+
+ gdb_assert (exec_bfd == NULL);
+
+ TRY_CATCH (e, RETURN_MASK_ALL)
+ try
+ {
+ exec_file_attach (filename, from_tty);
+ }
+ if (e.reason < 0)
+ catch (gdb_exception_error &e)
+ {
+ if (e.error == IS_CORE_ERROR)
+ {
+ core_file_command (filename, from_tty);
+ 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 (e);
+ throw_exception (std::move (e));
+ }
+}
+
static int
captured_main (void *data)
static void
captured_main_1 (struct captured_main_args *context)
{
@@ -703,6 +733,8 @@ extern int gdbtk_test (char *);
@@ -959,6 +987,8 @@ captured_main_1 (struct captured_main_args *context)
{
symarg = argv[optind];
execarg = argv[optind];
@ -159,11 +151,11 @@ Http://sourceware.org/ml/gdb-patches/2010-01/msg00517.html
optind++;
}
@@ -835,10 +867,25 @@ Excess command line arguments ignored. (
@@ -1114,12 +1144,25 @@ captured_main_1 (struct captured_main_args *context)
&& symarg != NULL
&& strcmp (execarg, symarg) == 0)
{
+ catch_command_errors_ftype *func;
+ 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). */
@ -176,15 +168,29 @@ Http://sourceware.org/ml/gdb-patches/2010-01/msg00517.html
+ 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! */
- if (catch_command_errors (exec_file_attach, execarg, !batch, RETURN_MASK_ALL))
+ open it, better only print one error message.
+ catch_command_errors returns non-zero on success!
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. */
+ if (catch_command_errors (func, execarg, !batch, RETURN_MASK_ALL)
+ && core_bfd == NULL)
catch_command_errors (symbol_file_add_main, symarg, !batch, RETURN_MASK_ALL);
+ 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);
}
else
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"

File diff suppressed because it is too large Load Diff

View File

@ -1,33 +0,0 @@
https://bugzilla.redhat.com/bugzilla/show_bug.cgi?id=225783
Index: gdb-6.8.50.20081128/gdb/Makefile.in
===================================================================
--- gdb-6.8.50.20081128.orig/gdb/Makefile.in 2008-12-02 23:06:16.000000000 +0100
+++ gdb-6.8.50.20081128/gdb/Makefile.in 2008-12-02 23:28:02.000000000 +0100
@@ -1490,8 +1490,10 @@ po/$(PACKAGE).pot: force
.SUFFIXES: .y .l
.y.c:
- $(SHELL) $(YLWRAP) $< y.tab.c $@.tmp -- $(YACC) $(YFLAGS)
- -sed -e '/extern.*malloc/d' \
+ rm -f $@ $@.tmp
+ $(SHELL) $(YLWRAP) $< y.tab.c $@ -- $(YACC) $(YFLAGS) && mv $@ $@.tmp \
+ || (rm -f $@; false)
+ sed -e '/extern.*malloc/d' \
-e '/extern.*realloc/d' \
-e '/extern.*free/d' \
-e '/include.*malloc.h/d' \
@@ -1500,9 +1502,9 @@ po/$(PACKAGE).pot: force
-e 's/\([ \t;,(]\)free\([ \t]*[&(),]\)/\1xfree\2/g' \
-e 's/\([ \t;,(]\)free$$/\1xfree/g' \
-e '/^#line.*y.tab.c/d' \
- < $@.tmp > $@.new
- -rm $@.tmp
- mv $@.new ./$*.c
+ -e "s/^\(#line.*\)`basename $<`/\1`echo $<|sed 's/\//\\\\\//g'`/" \
+ < $@.tmp > $@
+ rm -f $@.tmp
.l.c:
if [ "$(FLEX)" ] && $(FLEX) --version >/dev/null 2>&1; then \
$(FLEX) -o$@ $< && \

View File

@ -1,27 +0,0 @@
https://bugzilla.redhat.com/bugzilla/show_bug.cgi?id=225783
--- gdb-6.8/gdb/testsuite/gdb.base/prelink.exp.orig 2008-07-12 08:56:43.000000000 +0200
+++ gdb-6.8/gdb/testsuite/gdb.base/prelink.exp 2008-07-12 08:59:59.000000000 +0200
@@ -55,7 +55,7 @@ if { [gdb_compile "${srcdir}/${subdir}/$
# single new unprelinked library address without wasting the first one/two
# memory areas. We do not care of the efficiency of loading such resulting
# exec-shield unfriendly prelinked library.
-if {[catch "system \"prelink -qNR --no-exec-shield ${libfile}\""] != 0} {
+if {[catch "system \"/usr/sbin/prelink -qNR --no-exec-shield ${libfile}\""] != 0} {
# Maybe we don't have prelink.
return -1
}
@@ -96,11 +96,11 @@ if { $found == 0 } {
return 0
}
-if {[catch "system \"prelink -uN ${libfile}\""] != 0} {
+if {[catch "system \"/usr/sbin/prelink -uN ${libfile}\""] != 0} {
untested "${testfile}.so was not prelinked, maybe system libraries are not prelinked?"
return 0
}
-catch "system \"prelink -qNR --no-exec-shield ${libfile}\""
+catch "system \"/usr/sbin/prelink -qNR --no-exec-shield ${libfile}\""
# Start with a fresh gdb

View File

@ -1,3 +1,11 @@
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'.
@ -6,34 +14,25 @@
* gdb.base/gcorebg.exp, gdb.base/gcorebg.c: New files.
--- gdb-6.6-orig/gdb/gdb_gcore.sh 2005-12-17 17:33:59.000000000 -0500
+++ gdb-6.6/gdb/gdb_gcore.sh 2007-04-22 05:42:50.000000000 -0400
@@ -71,7 +71,9 @@
quit
EOF
- gdb -x $tmpfile -batch
+ # `</dev/null' to avoid touching interactive terminal if it is
+ # available but not accessible (SIGTTIN risk)
+ gdb -x $tmpfile -batch </dev/null
if [ -r $name.$pid ] ; then
rc=0
--- /dev/null 1 Jan 1970 00:00:00 -0000
+++ ./gdb/testsuite/gdb.base/gcorebg.c 25 Feb 2007 12:21:20 -0000
@@ -0,0 +1,43 @@
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[256];
+ char buf[1024*2 + 500];
+ int gotint;
+
+ if (argc != 4)
+ {
@ -50,8 +49,10 @@
+ if (strcmp (argv[1], "detached") == 0)
+ setpgrp ();
+ ppid = getppid ();
+ sprintf (buf, "sh %s -o %s %d", argv[2], argv[3], (int) ppid);
+ 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;
+
@ -61,14 +62,17 @@
+ break;
+
+ default:
+ fprintf (stderr,"Sleeping as PID %d\n", getpid ());
+ sleep (60);
+ }
+
+ return 0;
+}
--- /dev/null 1 Jan 1970 00:00:00 -0000
+++ ./gdb/testsuite/gdb.base/gcorebg.exp 25 Feb 2007 12:21:20 -0000
@@ -0,0 +1,120 @@
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
@ -93,22 +97,15 @@
+# It also tests a regression with `gdb_gcore.sh' being run without its
+# accessible terminal.
+
+if $tracelevel then {
+ strace $tracelevel
+}
+
+set prms_id 0
+set bug_id 0
+
+if ![info exists GCORE] {
+ set GCORE "${srcdir}/../gdb_gcore.sh"
+ set GCORE "[standard_output_file ../../../../gcore]"
+}
+verbose "using GCORE = $GCORE" 2
+
+set testfile "gcorebg"
+set srcfile ${testfile}.c
+set binfile ${objdir}/${subdir}/${testfile}
+set corefile ${objdir}/${subdir}/${testfile}.test
+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
@ -157,11 +154,11 @@
+ pass "Spawning $detached gcore"
+ remote_expect target 20 {
+ timeout {
+ fail "Spawned $detached gcore finished"
+ fail "Spawned $detached gcore finished (timeout)"
+ remote_exec target "kill -9 -[exp_pid -i $res]"
+ return 1
+ }
+ eof {
+ "Saved corefile .*\r\nKilling parent PID " {
+ pass "Spawned $detached gcore finished"
+ remote_wait target 20
+ }

View File

@ -1,12 +1,21 @@
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.
--- /dev/null 1 Jan 1970 00:00:00 -0000
+++ ./gdb/testsuite/gdb.arch/powerpc-power6.exp 25 Feb 2007 18:27:39 -0000
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.
+
@ -33,7 +42,7 @@ requires too recent GCC.
+
+set testfile "powerpc-power6"
+set srcfile ${testfile}.s
+set objfile ${objdir}/${subdir}/${testfile}.o
+set objfile [standard_output_file ${testfile}.o]
+
+if { [gdb_compile "${srcdir}/${subdir}/${srcfile}" "${objfile}" object {debug}] != "" } {
+ untested "PowerPC prologue tests"
@ -53,17 +62,19 @@ requires too recent GCC.
+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 *f1,f2,f1\r\n.*" "Power6 disassembly daddq"
+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 *f1,f2,f1\r\n.*" "Power6 disassembly dsubq"
+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 *f1,f2,f1\r\n.*" "Power6 disassembly dmulq"
+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 *f1,f2,f1\r\n.*" "Power6 disassembly ddivq"
+gdb_test "disass func" ":\tddivq *f0,f2,f0\r\n.*" "Power6 disassembly ddivq"
+gdb_test "disass func" ":\tdcmpu *cr1,f2,f1\r\n.*" "Power6 disassembly dcmpu"
+gdb_test "disass func" ":\tdcmpuq *cr1,f2,f1\r\n.*" "Power6 disassembly dcmpuq"
--- /dev/null 1 Jan 1970 00:00:00 -0000
+++ ./gdb/testsuite/gdb.arch/powerpc-power6.s 25 Feb 2007 18:27:39 -0000
+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
@ -72,12 +83,12 @@ requires too recent GCC.
+ .long 0x7c284fec /* dcbzl r8,r9 */
+ .long 0xed405834 /* frsqrtes f10,f11 */
+ .long 0xec220804 /* dadd f1,f2,f1 */
+ .long 0xfc220804 /* daddq f1,f2,f1 */
+ .long 0xfc020004 /* daddq f0,f2,f0 */
+ .long 0xec220c04 /* dsub f1,f2,f1 */
+ .long 0xfc220c04 /* dsubq f1,f2,f1 */
+ .long 0xfc020404 /* dsubq f0,f2,f0 */
+ .long 0xec220844 /* dmul f1,f2,f1 */
+ .long 0xfc220844 /* dmulq f1,f2,f1 */
+ .long 0xfc020044 /* dmulq f0,f2,f0 */
+ .long 0xec220c44 /* ddiv f1,f2,f1 */
+ .long 0xfc220c44 /* ddivq f1,f2,f1 */
+ .long 0xfc020444 /* ddivq f0,f2,f0 */
+ .long 0xec820d04 /* dcmpu cr1,f2,f1 */
+ .long 0xfc820d04 /* dcmpuq cr1,f2,f1 */
+ .long 0xfc820504 /* dcmpuq cr1,f2,f0 */

View File

@ -1,128 +0,0 @@
2008-03-01 Jan Kratochvil <jan.kratochvil@redhat.com>
Port to GDB-6.8pre.
Remove the `[' character from the GDB-6.8 default message.
Index: gdb-7.0.50.20100115/gdb/linux-nat.c
===================================================================
--- gdb-7.0.50.20100115.orig/gdb/linux-nat.c 2010-01-15 03:22:31.000000000 +0100
+++ gdb-7.0.50.20100115/gdb/linux-nat.c 2010-01-15 03:23:28.000000000 +0100
@@ -724,7 +724,7 @@ holding the child stopped. Try \"set de
remove_breakpoints_pid (GET_PID (inferior_ptid));
}
- if (info_verbose || debug_linux_nat)
+ if (1 /* Fedora Bug 235197 */ || info_verbose || debug_linux_nat)
{
target_terminal_ours ();
fprintf_filtered (gdb_stdlog,
Index: gdb-7.0.50.20100115/gdb/testsuite/gdb.base/fork-detach.c
===================================================================
--- /dev/null 1970-01-01 00:00:00.000000000 +0000
+++ gdb-7.0.50.20100115/gdb/testsuite/gdb.base/fork-detach.c 2010-01-15 03:22:52.000000000 +0100
@@ -0,0 +1,57 @@
+/* This testcase is part of GDB, the GNU debugger.
+
+ Copyright 2007 Free Software Foundation, Inc.
+
+ This program is free software; you can redistribute it and/or modify
+ it under the terms of the GNU General Public License as published by
+ the Free Software Foundation; either version 2 of the License, or
+ (at your option) any later version.
+
+ This program is distributed in the hope that it will be useful,
+ but WITHOUT ANY WARRANTY; without even the implied warranty of
+ MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
+ GNU General Public License for more details.
+
+ You should have received a copy of the GNU General Public License
+ along with this program; if not, write to the Free Software
+ Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA.
+
+ Please email any bugs, comments, and/or additions to this file to:
+ bug-gdb@prep.ai.mit.edu */
+
+#include <sys/types.h>
+#include <sys/wait.h>
+#include <unistd.h>
+#include <assert.h>
+#include <stdlib.h>
+
+static void func (void)
+{
+}
+
+int main (void)
+{
+ pid_t child;
+
+ child = fork ();
+ switch (child)
+ {
+ case -1:
+ abort ();
+ case 0:
+ func ();
+ break;
+ default:
+ {
+/* We do not test the switching to the other fork by GDB `fork 1'. */
+#if 0
+ pid_t got;
+
+ got = waitpid (child, NULL, 0);
+ assert (got == child);
+#endif
+ break;
+ }
+ }
+ return 0;
+}
Index: gdb-7.0.50.20100115/gdb/testsuite/gdb.base/fork-detach.exp
===================================================================
--- /dev/null 1970-01-01 00:00:00.000000000 +0000
+++ gdb-7.0.50.20100115/gdb/testsuite/gdb.base/fork-detach.exp 2010-01-15 03:22:52.000000000 +0100
@@ -0,0 +1,43 @@
+# 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.
+
+if $tracelevel then {
+ strace $tracelevel
+}
+
+set prms_id 0
+set bug_id 0
+
+set testfile fork-detach
+set srcfile ${testfile}.c
+set binfile ${objdir}/${subdir}/${testfile}
+if { [gdb_compile "${srcdir}/${subdir}/${srcfile}" "${binfile}" executable {debug}] != "" } {
+ untested "Couldn't compile test program"
+ return -1
+}
+
+# Get things started.
+
+gdb_exit
+gdb_start
+gdb_reinitialize_dir $srcdir/$subdir
+gdb_load ${binfile}
+
+gdb_run_cmd
+# `Starting program: .*' prefix is available since gdb-6.7.
+gdb_test "" \
+ "Detaching after fork from child process.*Program exited normally\\..*" \
+ "Info message caught"

View File

@ -1,12 +1,20 @@
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.
Index: gdb-6.8.50.20081128/gdb/testsuite/gdb.threads/atomic-seq-threaded.c
===================================================================
--- /dev/null 1970-01-01 00:00:00.000000000 +0000
+++ gdb-6.8.50.20081128/gdb/testsuite/gdb.threads/atomic-seq-threaded.c 2008-12-08 22:27:01.000000000 +0100
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.
+
@ -179,10 +187,10 @@ Index: gdb-6.8.50.20081128/gdb/testsuite/gdb.threads/atomic-seq-threaded.c
+
+ return 0; /* _exit_ */
+}
Index: gdb-6.8.50.20081128/gdb/testsuite/gdb.threads/atomic-seq-threaded.exp
===================================================================
--- /dev/null 1970-01-01 00:00:00.000000000 +0000
+++ gdb-6.8.50.20081128/gdb/testsuite/gdb.threads/atomic-seq-threaded.exp 2008-12-08 22:31:01.000000000 +0100
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
@ -209,7 +217,7 @@ Index: gdb-6.8.50.20081128/gdb/testsuite/gdb.threads/atomic-seq-threaded.exp
+
+set testfile atomic-seq-threaded
+set srcfile ${testfile}.c
+set binfile ${objdir}/${subdir}/${testfile}
+set binfile [standard_output_file ${testfile}]
+
+foreach opts {{} {compiler=gcc4} {FAIL}} {
+ if {$opts eq "FAIL"} {

View File

@ -1,142 +0,0 @@
2007-07-08 Jan Kratochvil <jan.kratochvil@redhat.com>
* linux-nat.c (linux_lwp_is_zombie): New function.
(wait_lwp): Fix lockup on exit of the thread group leader.
(linux_xfer_partial): Renamed to ...
(linux_xfer_partial_lwp): ... here.
(linux_xfer_partial): New function wrapping LINUX_XFER_PARTIAL_LWP.
2008-02-24 Jan Kratochvil <jan.kratochvil@redhat.com>
Port to GDB-6.8pre.
Index: gdb-6.8.50.20081209/gdb/linux-nat.c
===================================================================
--- gdb-6.8.50.20081209.orig/gdb/linux-nat.c 2008-12-10 01:27:34.000000000 +0100
+++ gdb-6.8.50.20081209/gdb/linux-nat.c 2008-12-10 01:28:14.000000000 +0100
@@ -1981,6 +1981,31 @@ linux_handle_extended_wait (struct lwp_i
_("unknown ptrace event %d"), event);
}
+static int
+linux_lwp_is_zombie (long lwp)
+{
+ char buffer[MAXPATHLEN];
+ FILE *procfile;
+ int retval = 0;
+
+ sprintf (buffer, "/proc/%ld/status", lwp);
+ procfile = fopen (buffer, "r");
+ if (procfile == NULL)
+ {
+ warning (_("unable to open /proc file '%s'"), buffer);
+ return 0;
+ }
+ while (fgets (buffer, sizeof (buffer), procfile) != NULL)
+ if (strcmp (buffer, "State:\tZ (zombie)\n") == 0)
+ {
+ retval = 1;
+ break;
+ }
+ fclose (procfile);
+
+ return retval;
+}
+
/* Wait for LP to stop. Returns the wait status, or 0 if the LWP has
exited. */
@@ -1988,16 +2013,31 @@ static int
wait_lwp (struct lwp_info *lp)
{
pid_t pid;
- int status;
+ int status = 0;
int thread_dead = 0;
gdb_assert (!lp->stopped);
gdb_assert (lp->status == 0);
- pid = my_waitpid (GET_LWP (lp->ptid), &status, 0);
- if (pid == -1 && errno == ECHILD)
+ /* Thread group leader may have exited but we would lock up by WAITPID as it
+ waits on all its threads; __WCLONE is not applicable for the leader.
+ The thread leader restrictions is only a performance optimization here.
+ LINUX_NAT_THREAD_ALIVE cannot be used here as it requires a STOPPED
+ process; it gets ESRCH both for the zombie and for running processes. */
+ if (is_lwp (lp->ptid) && GET_PID (lp->ptid) == GET_LWP (lp->ptid)
+ && linux_lwp_is_zombie (GET_LWP (lp->ptid)))
+ {
+ thread_dead = 1;
+ if (debug_linux_nat)
+ fprintf_unfiltered (gdb_stdlog, "WL: Threads leader %s vanished.\n",
+ target_pid_to_str (lp->ptid));
+ }
+
+ if (!thread_dead)
{
- pid = my_waitpid (GET_LWP (lp->ptid), &status, __WCLONE);
+ pid = my_waitpid (GET_LWP (lp->ptid), &status, 0);
+ if (pid == -1 && errno == ECHILD)
+ pid = my_waitpid (GET_LWP (lp->ptid), &status, __WCLONE);
if (pid == -1 && errno == ECHILD)
{
/* The thread has previously exited. We need to delete it
@@ -4153,8 +4193,10 @@ linux_nat_xfer_osdata (struct target_ops
return len;
}
+/* Transfer from the specific LWP currently set by PID of INFERIOR_PTID. */
+
static LONGEST
-linux_xfer_partial (struct target_ops *ops, enum target_object object,
+linux_xfer_partial_lwp (struct target_ops *ops, enum target_object object,
const char *annex, gdb_byte *readbuf,
const gdb_byte *writebuf, ULONGEST offset, LONGEST len)
{
@@ -4201,6 +4243,45 @@ linux_xfer_partial (struct target_ops *o
offset, len);
}
+/* nptl_db expects being able to transfer memory just by specifying PID.
+ After the thread group leader exists the Linux kernel turns the task
+ into zombie no longer permitting accesses to its memory.
+ Transfer the memory from an arbitrary LWP_LIST entry in such case. */
+
+static LONGEST
+linux_xfer_partial (struct target_ops *ops, enum target_object object,
+ const char *annex, gdb_byte *readbuf,
+ const gdb_byte *writebuf, ULONGEST offset, LONGEST len)
+{
+ LONGEST xfer;
+ struct lwp_info *lp;
+ /* Not using SAVE_INFERIOR_PTID already here for better performance. */
+ struct cleanup *old_chain = NULL;
+ ptid_t inferior_ptid_orig = inferior_ptid;
+
+ errno = 0;
+ xfer = linux_xfer_partial_lwp (ops, object, annex, readbuf, writebuf,
+ offset, len);
+
+ for (lp = lwp_list; xfer == 0 && (errno == EACCES || errno == ESRCH)
+ && lp != NULL; lp = lp->next)
+ {
+ if (!is_lwp (lp->ptid) || ptid_equal (lp->ptid, inferior_ptid_orig))
+ continue;
+
+ if (old_chain == NULL)
+ old_chain = save_inferior_ptid ();
+ inferior_ptid = BUILD_LWP (GET_LWP (lp->ptid), GET_LWP (lp->ptid));
+ errno = 0;
+ xfer = linux_xfer_partial_lwp (ops, object, annex, readbuf, writebuf,
+ offset, len);
+ }
+
+ if (old_chain != NULL)
+ do_cleanups (old_chain);
+ return xfer;
+}
+
/* Create a prototype generic GNU/Linux target. The client can override
it with local methods. */

View File

@ -1,121 +0,0 @@
2007-07-07 Jan Kratochvil <jan.kratochvil@redhat.com>
* gdb.threads/leader-exit.c, gdb.threads/leader-exit.exp: New files.
--- /dev/null 1 Jan 1970 00:00:00 -0000
+++ ./gdb/testsuite/gdb.threads/leader-exit.c 7 Jul 2007 15:21:57 -0000
@@ -0,0 +1,47 @@
+/* Clean exit of the thread group leader should not break GDB.
+
+ Copyright 2007 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. */
+
+#include <pthread.h>
+#include <assert.h>
+#include <unistd.h>
+
+static void *start (void *arg)
+{
+ for (;;)
+ pause ();
+ /* NOTREACHED */
+ assert (0);
+ return arg;
+}
+
+int main (void)
+{
+ pthread_t thread;
+ int i;
+
+ i = pthread_create (&thread, NULL, start, NULL); /* create1 */
+ assert (i == 0);
+
+ pthread_exit (NULL);
+ /* NOTREACHED */
+ assert (0);
+ return 0;
+}
--- /dev/null 1 Jan 1970 00:00:00 -0000
+++ ./gdb/testsuite/gdb.threads/leader-exit.exp 7 Jul 2007 15:21:57 -0000
@@ -0,0 +1,64 @@
+# 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.
+
+# Exit of the thread group leader should not break GDB.
+
+# This file was written by Jan Kratochvil <jan.kratochvil@redhat.com>.
+
+if $tracelevel then {
+ strace $tracelevel
+}
+
+set testfile "leader-exit"
+set srcfile ${testfile}.c
+set binfile ${objdir}/${subdir}/${testfile}
+
+if {[gdb_compile_pthreads "${srcdir}/${subdir}/${srcfile}" "${binfile}" executable {debug}] != "" } {
+ return -1
+}
+
+gdb_exit
+gdb_start
+gdb_reinitialize_dir $srcdir/$subdir
+gdb_load ${binfile}
+gdb_run_cmd
+
+proc stop_process { description } {
+ global gdb_prompt
+
+ # For this to work we must be sure to consume the "Continuing."
+ # message first, or GDB's signal handler may not be in place.
+ after 1000 {send_gdb "\003"}
+ gdb_expect {
+ -re "Program received signal SIGINT.*$gdb_prompt $"
+ {
+ pass $description
+ }
+ timeout
+ {
+ fail "$description (timeout)"
+ }
+ }
+}
+
+# Prevent races.
+sleep 8
+
+stop_process "Threads could be stopped"
+
+gdb_test "info threads" \
+ "\\* 2 Thread \[^\r\n\]* in \[^\r\n\]*" \
+ "Single thread has been left"

View File

@ -1,216 +0,0 @@
Test GCORE on 32bit inferiors on 64bit platforms.
UNSUPPORTED results are valid for `-m64' on 32bit targets.
Index: gdb-7.0.50.20100203/gdb/testsuite/gdb.base/gcore.exp
===================================================================
--- gdb-7.0.50.20100203.orig/gdb/testsuite/gdb.base/gcore.exp 2010-02-01 18:15:36.000000000 +0100
+++ gdb-7.0.50.20100203/gdb/testsuite/gdb.base/gcore.exp 2010-02-03 06:39:54.000000000 +0100
@@ -28,9 +28,14 @@ set testfile "gcore"
set srcfile ${testfile}.c
set binfile ${objdir}/${subdir}/${testfile}
-if { [gdb_compile "${srcdir}/${subdir}/${srcfile}" "${binfile}" executable {debug}] != "" } {
- untested gcore.exp
- return -1
+# `-static-libgcc' to avoid dependency on `libgcc.{i386,ppc}'.
+foreach additional_flags {{} {-m32 -static-libgcc} {-m64 -static-libgcc}} {
+
+set prefix "arch{$additional_flags}:"
+
+if { [gdb_compile "${srcdir}/${subdir}/${srcfile}" "${binfile}" executable [list debug additional_flags=$additional_flags]] != "" } {
+ unsupported "${prefix} gcore.exp"
+ continue
}
# Start with a fresh gdb.
@@ -45,23 +50,23 @@ send_gdb "help gcore\n"
gdb_expect {
-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;
+ unsupported "${prefix} gdb does not support gcore on this target"
+ continue
}
-re "Save a core file .*$gdb_prompt $" {
- pass "help gcore"
+ pass "${prefix} help gcore"
}
-re ".*$gdb_prompt $" {
- fail "help gcore"
+ fail "${prefix} help gcore"
}
timeout {
- fail "help gcore (timeout)"
+ fail "${prefix} help gcore (timeout)"
}
}
if { ! [ runto_main ] } then {
- untested gcore.exp
- return -1
+ untested "${prefix} gcore.exp"
+ continue
}
proc capture_command_output { command prefix } {
@@ -69,7 +74,7 @@ proc capture_command_output { command pr
global expect_out
set output_string ""
- gdb_test_multiple "$command" "capture_command_output for $command" {
+ gdb_test_multiple "$command" "${prefix} capture_command_output for $command" {
-re "${command}\[\r\n\]+${prefix}(.*)\[\r\n\]+$gdb_prompt $" {
set output_string $expect_out(1,string)
}
@@ -103,22 +108,22 @@ set escapedfilename [string_to_regexp ${
set core_supported 0
gdb_test_multiple "gcore ${objdir}/${subdir}/gcore.test" \
- "save a corefile" \
+ "${prefix} save a corefile" \
{
-re "Saved corefile ${escapedfilename}\[\r\n\]+$gdb_prompt $" {
- pass "save a corefile"
+ pass "${prefix} save a corefile"
global core_supported
set core_supported 1
}
-re "Can't create a corefile\[\r\n\]+$gdb_prompt $" {
- unsupported "save a corefile"
+ unsupported "${prefix} save a corefile"
global core_supported
set core_supported 0
}
}
if {!$core_supported} {
- return -1
+ continue
}
# Now restart gdb and load the corefile.
@@ -130,31 +135,31 @@ gdb_load ${binfile}
send_gdb "core ${objdir}/${subdir}/gcore.test\n"
gdb_expect {
-re ".* is not a core dump:.*$gdb_prompt $" {
- fail "re-load generated corefile (bad file format)"
+ fail "${prefix} re-load generated corefile (bad file format)"
# No use proceeding from here.
- return;
+ continue
}
-re ".*: No such file or directory.*$gdb_prompt $" {
- fail "re-load generated corefile (file not found)"
+ fail "${prefix} re-load generated corefile (file not found)"
# No use proceeding from here.
- return;
+ continue
}
-re ".*Couldn't find .* registers in core file.*$gdb_prompt $" {
- fail "re-load generated corefile (incomplete note section)"
+ fail "${prefix} re-load generated corefile (incomplete note section)"
}
-re "Core was generated by .*$gdb_prompt $" {
- pass "re-load generated corefile"
+ pass "${prefix} re-load generated corefile"
}
-re ".*$gdb_prompt $" {
- fail "re-load generated corefile"
+ fail "${prefix} re-load generated corefile"
}
timeout {
- fail "re-load generated corefile (timeout)"
+ fail "${prefix} re-load generated corefile (timeout)"
}
}
send_gdb "where\n"
-gdb_expect_list "where in corefile" ".*$gdb_prompt $" {
+gdb_expect_list "${prefix} where in corefile" ".*$gdb_prompt $" {
".*\[\r\n\]+#0 .* terminal_func \\(\\) at "
".*\[\r\n\]+#1 .* array_func \\(\\) at "
".*\[\r\n\]+#2 .* factorial_func \\(value=1\\) at "
@@ -168,61 +173,64 @@ gdb_expect_list "where in corefile" ".*$
set post_corefile_regs [capture_command_output "info registers" ""]
if ![string compare $pre_corefile_regs $post_corefile_regs] then {
- pass "corefile restored general registers"
+ pass "${prefix} corefile restored general registers"
} else {
- fail "corefile restored general registers"
+ fail "${prefix} corefile restored general registers"
}
set post_corefile_allregs [capture_command_output "info all-reg" ""]
if ![string compare $pre_corefile_allregs $post_corefile_allregs] then {
- pass "corefile restored all registers"
+ pass "${prefix} corefile restored all registers"
} else {
- fail "corefile restored all registers"
+ fail "${prefix} corefile restored all registers"
}
set post_corefile_extern_array \
[capture_command_output "print extern_array" "$print_prefix"]
if ![string compare $pre_corefile_extern_array $post_corefile_extern_array] {
- pass "corefile restored extern array"
+ pass "${prefix} corefile restored extern array"
} else {
- fail "corefile restored extern array"
+ fail "${prefix} corefile restored extern array"
}
set post_corefile_static_array \
[capture_command_output "print static_array" "$print_prefix"]
if ![string compare $pre_corefile_static_array $post_corefile_static_array] {
- pass "corefile restored static array"
+ pass "${prefix} corefile restored static array"
} else {
- fail "corefile restored static array"
+ fail "${prefix} corefile restored static array"
}
set post_corefile_uninit_array \
[capture_command_output "print un_initialized_array" "$print_prefix"]
if ![string compare $pre_corefile_uninit_array $post_corefile_uninit_array] {
- pass "corefile restored un-initialized array"
+ pass "${prefix} corefile restored un-initialized array"
} else {
- fail "corefile restored un-initialized array"
+ fail "${prefix} corefile restored un-initialized array"
}
set post_corefile_heap_string \
[capture_command_output "print heap_string" "$print_prefix"]
if ![string compare $pre_corefile_heap_string $post_corefile_heap_string] {
- pass "corefile restored heap array"
+ pass "${prefix} corefile restored heap array"
} else {
- fail "corefile restored heap array"
+ fail "${prefix} corefile restored heap array"
}
set post_corefile_local_array \
[capture_command_output "print array_func::local_array" "$print_prefix"]
if ![string compare $pre_corefile_local_array $post_corefile_local_array] {
- pass "corefile restored stack array"
+ pass "${prefix} corefile restored stack array"
} else {
- fail "corefile restored stack array"
+ fail "${prefix} corefile restored stack array"
}
set post_corefile_backtrace [capture_command_output "backtrace" ""]
if ![string compare $pre_corefile_backtrace $post_corefile_backtrace] {
- pass "corefile restored backtrace"
+ pass "${prefix} corefile restored backtrace"
} else {
- fail "corefile restored backtrace"
+ fail "${prefix} corefile restored backtrace"
+}
+
+# $additional_flags:
}

View File

@ -1,116 +0,0 @@
2007-10-16 Jan Kratochvil <jan.kratochvil@redhat.com>
Port to GDB-6.7.
Index: gdb-6.7/gdb/doc/Makefile.in
===================================================================
--- gdb-6.7.orig/gdb/doc/Makefile.in 2007-07-26 12:34:00.000000000 +0200
+++ gdb-6.7/gdb/doc/Makefile.in 2007-10-16 16:31:08.000000000 +0200
@@ -109,9 +109,7 @@ DVIPS = dvips
GDB_DOC_SOURCE_INCLUDES = \
$(srcdir)/fdl.texi \
$(srcdir)/gpl.texi \
- $(srcdir)/agentexpr.texi \
- $(READLINE_DIR)/rluser.texi \
- $(READLINE_DIR)/inc-hist.texinfo
+ $(srcdir)/agentexpr.texi
GDB_DOC_BUILD_INCLUDES = \
gdb-cfg.texi \
GDBvn.texi
Index: gdb-6.7/gdb/doc/gdb.texinfo
===================================================================
--- gdb-6.7.orig/gdb/doc/gdb.texinfo 2007-10-16 16:19:19.000000000 +0200
+++ gdb-6.7/gdb/doc/gdb.texinfo 2007-10-16 16:32:10.000000000 +0200
@@ -158,8 +158,8 @@ software in general. We will miss him.
* GDB Bugs:: Reporting bugs in @value{GDBN}
-* Command Line Editing:: Command Line Editing
-* Using History Interactively:: Using History Interactively
+* Command Line Editing: (rluserman). Command Line Editing
+* Using History Interactively: (history). Using History Interactively
* Formatting Documentation:: How to format and print @value{GDBN} documentation
* Installing GDB:: Installing GDB
* Maintenance Commands:: Maintenance Commands
@@ -15533,7 +15533,7 @@ Disable command line editing.
Show whether command line editing is enabled.
@end table
-@xref{Command Line Editing}, for more details about the Readline
+@xref{Command Line Editing, , , rluserman, GNU Readline Library}, for more details about the Readline
interface. Users unfamiliar with @sc{gnu} Emacs or @code{vi} are
encouraged to read that chapter.
@@ -15548,7 +15548,8 @@ history facility.
@value{GDBN} uses the @sc{gnu} History library, a part of the Readline
package, to provide the history facility. @xref{Using History
-Interactively}, for the detailed description of the History library.
+Interactively, , , history, GNU History Library}, for the detailed description
+of the History library.
To issue a command to @value{GDBN} without affecting certain aspects of
the state which is seen by users, prefix it with @samp{server }
@@ -15600,7 +15601,7 @@ This defaults to the value of the enviro
@end table
History expansion assigns special meaning to the character @kbd{!}.
-@xref{Event Designators}, for more details.
+@xref{Event Designators, , , history, GNU History Library}, for more details.
@cindex history expansion, turn on/off
Since @kbd{!} is also the logical not operator in C, history expansion
@@ -16660,7 +16661,8 @@ Indicates the current program counter ad
@cindex TUI key bindings
The TUI installs several key bindings in the readline keymaps
-(@pxref{Command Line Editing}). The following key bindings
+(@pxref{Command Line Editing, , , rluserman, GNU Readline Library}).
+The following key bindings
are installed for both TUI mode and the @value{GDBN} standard mode.
@table @kbd
@@ -21937,15 +21939,6 @@ Such guesses are usually wrong. Even we
things without first using the debugger to find the facts.
@end itemize
-@c The readline documentation is distributed with the readline code
-@c and consists of the two following files:
-@c rluser.texinfo
-@c inc-hist.texinfo
-@c Use -I with makeinfo to point to the appropriate directory,
-@c environment var TEXINPUTS with TeX.
-@include rluser.texi
-@include inc-hist.texinfo
-
@node Formatting Documentation
@appendix Formatting Documentation
@@ -22115,9 +22108,6 @@ source for the @samp{-liberty} free soft
@item gdb-@value{GDBVN}/opcodes
source for the library of opcode tables and disassemblers
-@item gdb-@value{GDBVN}/readline
-source for the @sc{gnu} command-line interface
-
@item gdb-@value{GDBVN}/glob
source for the @sc{gnu} filename pattern-matching subroutine
@@ -22149,7 +22139,7 @@ where @var{host} is an identifier such a
correct value by examining your system.)
Running @samp{configure @var{host}} and then running @code{make} builds the
-@file{bfd}, @file{readline}, @file{mmalloc}, and @file{libiberty}
+@file{bfd}, @file{mmalloc}, and @file{libiberty}
libraries, then @code{gdb} itself. The configured source files, and the
binaries, are left in the corresponding source directories.
@@ -22175,7 +22165,7 @@ source tree, the @file{gdb-@var{version-
that subdirectory. That is usually not what you want. In particular,
if you run the first @file{configure} from the @file{gdb} subdirectory
of the @file{gdb-@var{version-number}} directory, you will omit the
-configuration of @file{bfd}, @file{readline}, and other sibling
+configuration of @file{bfd}, and other sibling
directories of the @file{gdb} subdirectory. This leads to build errors
about missing include files such as @file{bfd/bfd.h}.

View File

@ -1,54 +0,0 @@
Index: gdb-6.8.50.20090811/gdb/infrun.c
===================================================================
--- gdb-6.8.50.20090811.orig/gdb/infrun.c 2009-08-12 06:56:29.000000000 +0200
+++ gdb-6.8.50.20090811/gdb/infrun.c 2009-08-12 07:13:08.000000000 +0200
@@ -1075,7 +1075,7 @@ static const char *scheduler_enums[] = {
schedlock_step,
NULL
};
-static const char *scheduler_mode = schedlock_off;
+static const char *scheduler_mode = schedlock_step;
static void
show_scheduler_mode (struct ui_file *file, int from_tty,
struct cmd_list_element *c, const char *value)
Index: gdb-6.8.50.20090811/gdb/testsuite/gdb.mi/mi-console.exp
===================================================================
--- gdb-6.8.50.20090811.orig/gdb/testsuite/gdb.mi/mi-console.exp 2009-08-12 06:56:29.000000000 +0200
+++ gdb-6.8.50.20090811/gdb/testsuite/gdb.mi/mi-console.exp 2009-08-12 06:58:45.000000000 +0200
@@ -47,6 +47,9 @@ if { [gdb_compile "${srcdir}/${subdir}/
mi_run_to_main
+# thread-id=\"all\" vs. thread-id=\"1\" below:
+mi_gdb_test "210-gdb-set scheduler-locking off" "210\\^done" "set scheduler-locking off"
+
# Next over the hello() call which will produce lots of output
mi_gdb_test "220-exec-next" \
"220\\^running(\r\n\\*running,thread-id=\"all\")?" \
Index: gdb-6.8.50.20090811/gdb/testsuite/gdb.mi/mi2-console.exp
===================================================================
--- gdb-6.8.50.20090811.orig/gdb/testsuite/gdb.mi/mi2-console.exp 2009-08-12 06:56:29.000000000 +0200
+++ gdb-6.8.50.20090811/gdb/testsuite/gdb.mi/mi2-console.exp 2009-08-12 06:58:45.000000000 +0200
@@ -47,6 +47,9 @@ if { [gdb_compile "${srcdir}/${subdir}/
mi_run_to_main
+# thread-id=\"all\" vs. thread-id=\"1\" below:
+mi_gdb_test "210-gdb-set scheduler-locking off" "210\\^done" "set scheduler-locking off"
+
# Next over the hello() call which will produce lots of output
send_gdb "220-exec-next\n"
gdb_expect {
Index: gdb-6.8.50.20090811/gdb/testsuite/gdb.mi/mi-cli.exp
===================================================================
--- gdb-6.8.50.20090811.orig/gdb/testsuite/gdb.mi/mi-cli.exp 2009-06-09 19:12:42.000000000 +0200
+++ gdb-6.8.50.20090811/gdb/testsuite/gdb.mi/mi-cli.exp 2009-08-12 07:13:32.000000000 +0200
@@ -173,7 +173,7 @@ mi_execute_to "exec-continue" "breakpoin
# Test that the token is output even for CLI commands
# Also test that *stopped includes frame information.
mi_gdb_test "34 next" \
- ".*34\\\^running.*\\*running,thread-id=\"all\"" \
+ ".*34\\\^running.*\\*running,thread-id=\"1\"" \
"34 next: run"
if {!$async} {

View File

@ -1,207 +0,0 @@
2007-06-25 Jan Kratochvil <jan.kratochvil@redhat.com>
* inferior.h (enum resume_step): New definition.
(resume): Change STEP parameter type to ENUM RESUME_STEP.
* infrun.c (resume): Likewise. Extend debug printing of the STEP
parameter. Lock the scheduler only for intentional stepping.
(proceed): Replace the variable ONESTEP with tristate RESUME_STEP.
Set the third RESUME_STEP state according to BPSTAT_SHOULD_STEP.
(currently_stepping): Change the return type to ENUM RESUME_STEP.
Return RESUME_STEP_NEEDED if it is just due to BPSTAT_SHOULD_STEP.
* linux-nat.c (select_singlestep_lwp_callback): Do not focus on
the software watchpoint events.
* linux-nat.h (struct lwp_info): Redeclare STEP as ENUM RESUME_STEP.
2007-10-19 Jan Kratochvil <jan.kratochvil@redhat.com>
* infrun.c (proceed): RESUME_STEP initialized for non-stepping.
RESUME_STEP set according to STEP only at the end of the function.
2008-02-24 Jan Kratochvil <jan.kratochvil@redhat.com>
Port to GDB-6.8pre.
Index: gdb-7.0.50.20100115/gdb/inferior.h
===================================================================
--- gdb-7.0.50.20100115.orig/gdb/inferior.h 2010-01-15 03:16:43.000000000 +0100
+++ gdb-7.0.50.20100115/gdb/inferior.h 2010-01-15 03:17:07.000000000 +0100
@@ -188,7 +188,15 @@ extern void reopen_exec_file (void);
/* The `resume' routine should only be called in special circumstances.
Normally, use `proceed', which handles a lot of bookkeeping. */
-extern void resume (int, enum target_signal);
+enum resume_step
+ {
+ /* currently_stepping () should return non-zero for non-continue. */
+ RESUME_STEP_CONTINUE = 0,
+ RESUME_STEP_USER, /* Stepping is intentional by the user. */
+ RESUME_STEP_NEEDED /* Stepping only for software watchpoints. */
+ };
+
+extern void resume (enum resume_step, enum target_signal);
/* From misc files */
Index: gdb-7.0.50.20100115/gdb/infrun.c
===================================================================
--- gdb-7.0.50.20100115.orig/gdb/infrun.c 2010-01-15 03:16:43.000000000 +0100
+++ gdb-7.0.50.20100115/gdb/infrun.c 2010-01-15 03:17:32.000000000 +0100
@@ -77,7 +77,7 @@ static int follow_fork (void);
static void set_schedlock_func (char *args, int from_tty,
struct cmd_list_element *c);
-static int currently_stepping (struct thread_info *tp);
+static enum resume_step currently_stepping (struct thread_info *tp);
static int currently_stepping_or_nexting_callback (struct thread_info *tp,
void *data);
@@ -1363,7 +1363,7 @@ maybe_software_singlestep (struct gdbarc
STEP nonzero if we should step (zero to continue instead).
SIG is the signal to give the inferior (zero for none). */
void
-resume (int step, enum target_signal sig)
+resume (enum resume_step step, enum target_signal sig)
{
int should_resume = 1;
struct cleanup *old_cleanups = make_cleanup (resume_cleanups, 0);
@@ -1376,10 +1376,12 @@ resume (int step, enum target_signal sig
QUIT;
if (debug_infrun)
- fprintf_unfiltered (gdb_stdlog,
- "infrun: resume (step=%d, signal=%d), "
- "trap_expected=%d\n",
- step, sig, tp->trap_expected);
+ fprintf_unfiltered (gdb_stdlog, "infrun: resume (step=%s, signal=%d), "
+ "trap_expected=%d\n",
+ (step == RESUME_STEP_CONTINUE ? "RESUME_STEP_CONTINUE"
+ : (step == RESUME_STEP_USER ? "RESUME_STEP_USER"
+ : "RESUME_STEP_NEEDED")),
+ sig, tp->trap_expected);
/* Some targets (e.g. Solaris x86) have a kernel bug when stepping
over an instruction that causes a page fault without triggering
@@ -1501,9 +1503,10 @@ a command like `return' or `jump' to con
individually. */
resume_ptid = inferior_ptid;
}
- else if ((scheduler_mode == schedlock_on)
+ else if (scheduler_mode == schedlock_on
|| (scheduler_mode == schedlock_step
- && (step || singlestep_breakpoints_inserted_p)))
+ && (step == RESUME_STEP_USER
+ || singlestep_breakpoints_inserted_p)))
{
/* User-settable 'scheduler' mode requires solo thread resume. */
resume_ptid = inferior_ptid;
@@ -1709,7 +1712,7 @@ proceed (CORE_ADDR addr, enum target_sig
struct thread_info *tp;
CORE_ADDR pc;
struct address_space *aspace;
- int oneproc = 0;
+ enum resume_step resume_step = RESUME_STEP_CONTINUE;
/* If we're stopped at a fork/vfork, follow the branch set by the
"set follow-fork-mode" command; otherwise, we'll just proceed
@@ -1744,13 +1747,13 @@ proceed (CORE_ADDR addr, enum target_sig
actually be executing the breakpoint insn anyway.
We'll be (un-)executing the previous instruction. */
- oneproc = 1;
+ resume_step = RESUME_STEP_USER;
else if (gdbarch_single_step_through_delay_p (gdbarch)
&& gdbarch_single_step_through_delay (gdbarch,
get_current_frame ()))
/* We stepped onto an instruction that needs to be stepped
again before re-inserting the breakpoint, do so. */
- oneproc = 1;
+ resume_step = RESUME_STEP_USER;
}
else
{
@@ -1781,13 +1784,13 @@ proceed (CORE_ADDR addr, enum target_sig
is required it returns TRUE and sets the current thread to
the old thread. */
if (prepare_to_proceed (step))
- oneproc = 1;
+ resume_step = RESUME_STEP_USER;
}
/* prepare_to_proceed may change the current thread. */
tp = inferior_thread ();
- if (oneproc)
+ if (resume_step == RESUME_STEP_USER)
{
tp->trap_expected = 1;
/* If displaced stepping is enabled, we can step over the
@@ -1873,8 +1876,13 @@ proceed (CORE_ADDR addr, enum target_sig
/* Reset to normal state. */
init_infwait_state ();
+ if (step)
+ resume_step = RESUME_STEP_USER;
+ if (resume_step == RESUME_STEP_CONTINUE && bpstat_should_step ())
+ resume_step = RESUME_STEP_NEEDED;
+
/* Resume inferior. */
- resume (oneproc || step || bpstat_should_step (), tp->stop_signal);
+ resume (resume_step, tp->stop_signal);
/* Wait for it to stop (if not standalone)
and in any case decode why it stopped, and act accordingly. */
@@ -4655,13 +4663,18 @@ infrun: not switching back to stepped th
/* Is thread TP in the middle of single-stepping? */
-static int
+static enum resume_step
currently_stepping (struct thread_info *tp)
{
- return ((tp->step_range_end && tp->step_resume_breakpoint == NULL)
- || tp->trap_expected
- || tp->stepping_through_solib_after_catch
- || bpstat_should_step ());
+ if ((tp->step_range_end && tp->step_resume_breakpoint == NULL)
+ || tp->trap_expected
+ || tp->stepping_through_solib_after_catch)
+ return RESUME_STEP_USER;
+
+ if (bpstat_should_step ())
+ return RESUME_STEP_NEEDED;
+
+ return RESUME_STEP_CONTINUE;
}
/* Returns true if any thread *but* the one passed in "data" is in the
Index: gdb-7.0.50.20100115/gdb/linux-nat.c
===================================================================
--- gdb-7.0.50.20100115.orig/gdb/linux-nat.c 2010-01-15 03:16:43.000000000 +0100
+++ gdb-7.0.50.20100115/gdb/linux-nat.c 2010-01-15 03:17:07.000000000 +0100
@@ -2883,7 +2883,10 @@ count_events_callback (struct lwp_info *
static int
select_singlestep_lwp_callback (struct lwp_info *lp, void *data)
{
- if (lp->step && lp->status != 0)
+ /* We do not focus on software watchpoints as we would not catch
+ STEPPING_PAST_SINGLESTEP_BREAKPOINT breakpoints in some other thread
+ as they would remain pending due to `Push back breakpoint for %s'. */
+ if (lp->step == RESUME_STEP_USER && lp->status != 0)
return 1;
else
return 0;
Index: gdb-7.0.50.20100115/gdb/linux-nat.h
===================================================================
--- gdb-7.0.50.20100115.orig/gdb/linux-nat.h 2010-01-12 22:40:24.000000000 +0100
+++ gdb-7.0.50.20100115/gdb/linux-nat.h 2010-01-15 03:17:07.000000000 +0100
@@ -55,8 +55,8 @@ struct lwp_info
/* If non-zero, a pending wait status. */
int status;
- /* Non-zero if we were stepping this LWP. */
- int step;
+ /* The kind of stepping of this LWP. */
+ enum resume_step step;
/* Non-zero si_signo if this LWP stopped with a trap. si_addr may
be the address of a hardware watchpoint. */

View File

@ -1,60 +0,0 @@
Index: gdb-6.8.50.20090811/gdb/linux-nat.c
===================================================================
--- gdb-6.8.50.20090811.orig/gdb/linux-nat.c 2009-08-12 07:21:20.000000000 +0200
+++ gdb-6.8.50.20090811/gdb/linux-nat.c 2009-08-12 08:11:25.000000000 +0200
@@ -1656,16 +1656,18 @@ resume_set_callback (struct lwp_info *lp
static void
linux_nat_resume (struct target_ops *ops,
- ptid_t ptid, int step, enum target_signal signo)
+ ptid_t ptid, int step_int, enum target_signal signo)
{
sigset_t prev_mask;
struct lwp_info *lp;
int resume_many;
+ enum resume_step step = step_int;
if (debug_linux_nat)
fprintf_unfiltered (gdb_stdlog,
"LLR: Preparing to %s %s, %s, inferior_ptid %s\n",
- step ? "step" : "resume",
+ (step == RESUME_STEP_NEEDED
+ ? "needed" : (step ? "step" : "resume")),
target_pid_to_str (ptid),
signo ? strsignal (signo) : "0",
target_pid_to_str (inferior_ptid));
@@ -2625,10 +2627,34 @@ linux_nat_filter_event (int lwpid, int s
if (num_lwps (GET_PID (lp->ptid)) > 1)
{
+ enum resume_step step = lp->step;
+ pid_t pid = GET_PID (lp->ptid);
+
/* If there is at least one more LWP, then the exit signal
was not the end of the debugged application and should be
ignored. */
exit_lwp (lp);
+
+ if (step == RESUME_STEP_USER)
+ {
+ /* Now stop the closest LWP's ... */
+ lp = find_lwp_pid (pid_to_ptid (pid));
+ if (!lp)
+ lp = lwp_list;
+ gdb_assert (lp != NULL);
+ errno = 0;
+ ptrace (PTRACE_CONT, GET_LWP (lp->ptid), 0,
+ (void *) (unsigned long) SIGSTOP);
+ if (debug_linux_nat)
+ fprintf_unfiltered (gdb_stdlog,
+ "PTRACE_CONT %s, 0, 0 (%s)\n",
+ target_pid_to_str (lp->ptid),
+ errno ? safe_strerror (errno)
+ : "OK");
+ /* Avoid the silent `delayed SIGSTOP' handling. */
+ lp->signalled = 0;
+ }
+
return NULL;
}
}

View File

@ -1,42 +1,32 @@
--- ./gdb/testsuite/gdb.base/annota1.exp 10 Jan 2007 03:23:04 -0000 1.23
+++ ./gdb/testsuite/gdb.base/annota1.exp 10 May 2007 12:54:11 -0000
@@ -57,6 +57,8 @@ if [target_info exists gdb_stub] {
gdb_step_for_stub;
}
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 line at which break main will put the breakpoint
#
--- ./gdb/testsuite/gdb.base/annota3.exp 9 Jan 2007 17:59:09 -0000 1.12
+++ ./gdb/testsuite/gdb.base/annota3.exp 10 May 2007 12:54:11 -0000
@@ -56,6 +56,8 @@ if [target_info exists gdb_stub] {
gdb_step_for_stub;
}
# 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 line at which break main will put the breakpoint
#
--- gdb-6.6/gdb/testsuite/gdb.threads/step-thread-exit.exp-orig 2007-05-10 15:03:15.000000000 +0200
+++ gdb-6.6/gdb/testsuite/gdb.threads/step-thread-exit.exp 2007-05-10 15:04:24.000000000 +0200
@@ -58,6 +58,9 @@ gdb_test "continue" "Break.*thread_funct
# thread to be stopped and a message printed to tell us we have stepped
# over the thread exit.
set test "step over thread exit 1"
+# ppc64 is currently failing:
+set timeout_old $timeout
+set timeout 60
gdb_test_multiple "next" "$test" {
-re "\}.*$gdb_prompt $" {
send_gdb "next\n"
@@ -71,6 +74,7 @@ gdb_test_multiple "next" "$test" {
exp_continue
}
}
+set timeout $timeout_old
# Without this fixup we could end up in:
# #0 0x00110416 in __kernel_vsyscall ()
# The commands we test here produce many lines of output; disable "press
# <return> to continue" prompts.
gdb_test_no_output "set height 0"

View File

@ -1,25 +0,0 @@
--- gdb-6.6/gdb/testsuite/gdb.threads/staticthreads.exp-orig 2005-04-30 21:56:47.000000000 +0200
+++ gdb-6.6/gdb/testsuite/gdb.threads/staticthreads.exp 2008-01-11 14:30:15.000000000 +0100
@@ -44,9 +44,21 @@ gdb_load ${binfile}
gdb_test "set print sevenbit-strings" ""
+runto_main
+
+# See if we get excessive LWP there (patched glibc with unpatched GDB):
+# * 2 Thread 135661664 (LWP 3856) main () at threadloop.c:41
+# 1 process 3856 main () at threadloop.c:41
+
+set test "info threads on start"
+gdb_test_multiple "info threads" "$test" {
+ -re "^info threads\r?\n\[^\r\n\]* Thread \[^\r\n\]*\r?\n$gdb_prompt" {
+ pass "$test"
+ }
+}
+
# See if the static multi-threaded program runs.
-runto_main
gdb_test "break sem_post"
set test "Continue to main's call of sem_post"
gdb_test_multiple "continue" "$test" {

View File

@ -1,41 +0,0 @@
Original patch was:
http://sourceware.org/ml/gdb-patches/2007-12/msg00397.html
http://sourceware.org/ml/gdb-cvs/2007-12/msg00123.html
extended for the RHEL safety:
2007-12-28 Jan Kratochvil <jan.kratochvil@redhat.com>
* dwarf2read.c (fixup_partial_die): Provide full
`DW_TAG_class_type'-type backing for `DW_TAG_interface_type', even for
namespaces which should not apply for Java `DW_TAG_interface_type'.
2008-02-24 Jan Kratochvil <jan.kratochvil@redhat.com>
Port to GDB-6.8pre.
Index: ./gdb/dwarf2read.c
===================================================================
RCS file: /cvs/src/src/gdb/dwarf2read.c,v
retrieving revision 1.245
diff -u -p -r1.245 dwarf2read.c
--- ./gdb/dwarf2read.c 26 Dec 2007 12:36:18 -0000 1.245
+++ ./gdb/dwarf2read.c 27 Dec 2007 23:25:49 -0000
@@ -5887,7 +5887,8 @@ fixup_partial_die (struct partial_die_in
/* Set default names for some unnamed DIEs. */
if (part_die->name == NULL && (part_die->tag == DW_TAG_structure_type
- || part_die->tag == DW_TAG_class_type))
+ || part_die->tag == DW_TAG_class_type
+ || part_die->tag == DW_TAG_interface_type))
part_die->name = "(anonymous class)";
if (part_die->name == NULL && part_die->tag == DW_TAG_namespace)
@@ -5895,6 +5896,7 @@ fixup_partial_die (struct partial_die_in
if (part_die->tag == DW_TAG_structure_type
|| part_die->tag == DW_TAG_class_type
+ || part_die->tag == DW_TAG_interface_type
|| part_die->tag == DW_TAG_union_type)
guess_structure_name (part_die, cu);
}

View File

@ -1,710 +0,0 @@
http://sourceware.org/ml/gdb-patches/2007-12/msg00397.html
2007-12-22 Jan Kratochvil <jan.kratochvil@redhat.com>
* gdb.arch/i386-interface.S, gdb.arch/i386-interface.exp: New files.
2008-03-02 Jan Kratochvil <jan.kratochvil@redhat.com>
* gdb.arch/i386-interface.exp: Fix a testcase race.
--- /dev/null 1 Jan 1970 00:00:00 -0000
+++ ./gdb/testsuite/gdb.arch/i386-interface.S 22 Dec 2007 19:07:28 -0000
@@ -0,0 +1,628 @@
+/* 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/>.
+
+ Please email any bugs, comments, and/or additions to this file to:
+ bug-gdb@gnu.org
+
+ This file is part of the gdb testsuite.
+
+ This file was produced by:
+ $ gcj -S interface.java -ggdb2 -Wall -m32
+ from the .java file:
+ interface Interface
+ {
+ }
+ class Class implements Interface
+ {
+ }
+*/
+
+ .file "cc28Pp2B.jar"
+ .section .debug_abbrev,"",@progbits
+.Ldebug_abbrev0:
+ .section .debug_info,"",@progbits
+.Ldebug_info0:
+ .section .debug_line,"",@progbits
+.Ldebug_line0:
+ .text
+.Ltext0:
+ .local _MT_Interface
+ .comm _MT_Interface,0,4
+ .data
+ .align 4
+ .type _catch_classes_Interface, @object
+ .size _catch_classes_Interface, 24
+_catch_classes_Interface:
+ .zero 24
+ .section .rodata
+ .align 2
+ .type _Utf1, @object
+ .size _Utf1, 4
+_Utf1:
+ .value 36121
+ .value 9
+ .ascii "Interface"
+ .zero 1
+.globl _ZN9Interface6class$E
+ .data
+ .align 32
+ .type _ZN9Interface6class$E, @object
+ .size _ZN9Interface6class$E, 144
+_ZN9Interface6class$E:
+ .long _ZTVN4java4lang5ClassE+8
+ .long 403000
+ .long _Utf1
+ .value 1536
+ .zero 2
+ .long 0
+ .long 0
+ .long 0
+ .long 0
+ .long _MT_Interface
+ .value 0
+ .value 6
+ .long 0
+ .long 4
+ .value 0
+ .value 0
+ .long 0
+ .long 0
+ .long 0
+ .long 0
+ .long 0
+ .long 0
+ .long 0
+ .long _catch_classes_Interface
+ .long 0
+ .long 0
+ .value 0
+ .byte 1
+ .zero 1
+ .long 0
+ .value 0
+ .zero 2
+ .long 0
+ .long 0
+ .long 0
+ .long 0
+ .long 0
+ .long 0
+ .long 0
+ .long 0
+ .long 0
+ .long 0
+ .hidden _ZN9Interface7class$$E
+.globl _ZN9Interface7class$$E
+ .section .rodata
+ .align 4
+ .type _ZN9Interface7class$$E, @object
+ .size _ZN9Interface7class$$E, 4
+_ZN9Interface7class$$E:
+ .long _ZN9Interface6class$E
+ .text
+ .align 2
+.globl _ZN5ClassC1Ev
+ .type _ZN5ClassC1Ev, @function
+_ZN5ClassC1Ev:
+.LFB2:
+ pushl %ebp
+.LCFI0:
+ movl %esp, %ebp
+.LCFI1:
+ subl $24, %esp
+.LCFI2:
+.LBB2:
+#if 0
+ .file 1 "interface.java"
+#else
+ .file "interface.java"
+#endif
+ .loc 1 4 0
+ movl 8(%ebp), %eax
+ movl %eax, -4(%ebp)
+ movl -4(%ebp), %eax
+ movl %eax, (%esp)
+ call _ZN4java4lang6ObjectC1Ev
+.LBE2:
+ leave
+ ret
+.LFE2:
+ .size _ZN5ClassC1Ev, .-_ZN5ClassC1Ev
+ .hidden _ZTVN5ClassE
+.globl _ZTVN5ClassE
+ .data
+ .align 32
+ .type _ZTVN5ClassE, @object
+ .size _ZTVN5ClassE, 40
+_ZTVN5ClassE:
+ .long 0
+ .long 0
+ .long _ZN5Class6class$E
+ .long 4
+ .long _ZN4java4lang6Object8finalizeEJvv
+ .long _ZN4java4lang6Object8hashCodeEJiv
+ .long _ZN4java4lang6Object6equalsEJbPS1_
+ .long _ZN4java4lang6Object8toStringEJPNS0_6StringEv
+ .long _ZN4java4lang6Object5cloneEJPS1_v
+ .long _ZN4java4lang6Object22throwNoSuchMethodErrorEJvv
+ .set .L_ZN5ClassC1Ev0,_ZN5ClassC1Ev
+ .section .rodata
+ .align 2
+ .type _Utf2, @object
+ .size _Utf2, 4
+_Utf2:
+ .value 626
+ .value 6
+ .ascii "<init>"
+ .zero 1
+ .align 2
+ .type _Utf3, @object
+ .size _Utf3, 4
+_Utf3:
+ .value 39797
+ .value 3
+ .ascii "()V"
+ .zero 1
+ .data
+ .align 4
+ .type _MT_Class, @object
+ .size _MT_Class, 20
+_MT_Class:
+ .long _Utf2
+ .long _Utf3
+ .value 16384
+ .value -1
+ .long .L_ZN5ClassC1Ev0
+ .long 0
+ .align 4
+ .type _IF_Class, @object
+ .size _IF_Class, 4
+_IF_Class:
+ .long _ZN9Interface6class$E
+ .align 4
+ .type _catch_classes_Class, @object
+ .size _catch_classes_Class, 24
+_catch_classes_Class:
+ .zero 24
+ .section .rodata
+ .align 2
+ .type _Utf4, @object
+ .size _Utf4, 4
+_Utf4:
+ .value 47448
+ .value 5
+ .ascii "Class"
+ .zero 1
+.globl _ZN5Class6class$E
+ .data
+ .align 32
+ .type _ZN5Class6class$E, @object
+ .size _ZN5Class6class$E, 144
+_ZN5Class6class$E:
+ .long _ZTVN4java4lang5ClassE+8
+ .long 403000
+ .long _Utf4
+ .value 32
+ .zero 2
+ .long _ZN4java4lang6Object6class$E
+ .long 0
+ .long 0
+ .long 0
+ .long _MT_Class
+ .value 1
+ .value 6
+ .long 0
+ .long 4
+ .value 0
+ .value 0
+ .long _ZTVN5ClassE+8
+ .long 0
+ .long 0
+ .long 0
+ .long 0
+ .long 0
+ .long 0
+ .long _catch_classes_Class
+ .long _IF_Class
+ .long 0
+ .value 1
+ .byte 1
+ .zero 1
+ .long 0
+ .value 0
+ .zero 2
+ .long 0
+ .long 0
+ .long 0
+ .long 0
+ .long 0
+ .long 0
+ .long 0
+ .long 0
+ .long 0
+ .long 0
+ .hidden _ZN5Class7class$$E
+.globl _ZN5Class7class$$E
+ .section .rodata
+ .align 4
+ .type _ZN5Class7class$$E, @object
+ .size _ZN5Class7class$$E, 4
+_ZN5Class7class$$E:
+ .long _ZN5Class6class$E
+ .section .jcr,"aw",@progbits
+ .align 4
+ .long _ZN9Interface6class$E
+ .long _ZN5Class6class$E
+ .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:
+ .section .eh_frame,"a",@progbits
+.Lframe1:
+ .long .LECIE1-.LSCIE1
+.LSCIE1:
+ .long 0x0
+ .byte 0x1
+.globl __gcj_personality_v0
+ .string "zP"
+ .uleb128 0x1
+ .sleb128 -4
+ .byte 0x8
+ .uleb128 0x5
+ .byte 0x0
+ .long __gcj_personality_v0
+ .byte 0xc
+ .uleb128 0x4
+ .uleb128 0x4
+ .byte 0x88
+ .uleb128 0x1
+ .align 4
+.LECIE1:
+.LSFDE1:
+ .long .LEFDE1-.LASFDE1
+.LASFDE1:
+ .long .LASFDE1-.Lframe1
+ .long .LFB2
+ .long .LFE2-.LFB2
+ .uleb128 0x0
+ .byte 0x4
+ .long .LCFI0-.LFB2
+ .byte 0xe
+ .uleb128 0x8
+ .byte 0x85
+ .uleb128 0x2
+ .byte 0x4
+ .long .LCFI1-.LCFI0
+ .byte 0xd
+ .uleb128 0x5
+ .align 4
+.LEFDE1:
+ .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 0x117
+ .value 0x2
+ .long .Ldebug_abbrev0
+ .byte 0x4
+ .uleb128 0x1
+ .string "GNU Java 4.3.0 20071221 (experimental)"
+ .byte 0xb
+ .string "interface.java"
+ .string "/home/jkratoch/redhat/bz371831"
+ .long .Ltext0
+ .long .Letext0
+ .long .Ldebug_line0
+ .uleb128 0x2
+ .string "Interface"
+ .byte 0x4
+ .byte 0x1
+ .byte 0x0
+ .long 0x8e
+ .long 0x8e
+ .uleb128 0x3
+ .long 0x8e
+ .byte 0x2
+ .byte 0x23
+ .uleb128 0x0
+ .byte 0x1
+ .byte 0x0
+ .uleb128 0x4
+ .string "java.lang.Object"
+ .byte 0x1
+ .uleb128 0x5
+ .string "Class"
+ .byte 0x4
+ .byte 0x1
+ .byte 0x0
+ .long 0x8e
+ .long 0xe8
+ .uleb128 0x3
+ .long 0x8e
+ .byte 0x2
+ .byte 0x23
+ .uleb128 0x0
+ .byte 0x1
+ .uleb128 0x6
+ .long 0x6e
+ .byte 0x2
+ .byte 0x23
+ .uleb128 0x0
+ .byte 0x1
+ .byte 0x1
+ .uleb128 0x7
+ .byte 0x1
+ .string "<init>"
+ .byte 0x1
+ .byte 0x0
+ .string "_ZN5ClassC1Ev"
+ .byte 0x1
+ .uleb128 0x8
+ .long 0xe8
+ .byte 0x1
+ .byte 0x0
+ .byte 0x0
+ .uleb128 0x9
+ .byte 0x4
+ .long 0xa1
+ .uleb128 0xa
+ .long 0xc6
+ .long .LFB2
+ .long .LFE2
+ .long .LLST0
+ .long 0x114
+ .uleb128 0xb
+ .long 0xe8
+ .byte 0x2
+ .byte 0x91
+ .sleb128 0
+ .uleb128 0xc
+ .long 0x114
+ .byte 0x2
+ .byte 0x91
+ .sleb128 -12
+ .byte 0x0
+ .uleb128 0x9
+ .byte 0x4
+ .long 0x8e
+ .byte 0x0
+ .section .debug_abbrev
+ .uleb128 0x1
+ .uleb128 0x11
+ .byte 0x1
+ .uleb128 0x25
+ .uleb128 0x8
+ .uleb128 0x13
+ .uleb128 0xb
+ .uleb128 0x3
+ .uleb128 0x8
+ .uleb128 0x1b
+ .uleb128 0x8
+ .uleb128 0x11
+ .uleb128 0x1
+ .uleb128 0x12
+ .uleb128 0x1
+ .uleb128 0x10
+ .uleb128 0x6
+ .byte 0x0
+ .byte 0x0
+ .uleb128 0x2
+ .uleb128 0x38
+ .byte 0x1
+ .uleb128 0x3
+ .uleb128 0x8
+ .uleb128 0xb
+ .uleb128 0xb
+ .uleb128 0x3a
+ .uleb128 0xb
+ .uleb128 0x3b
+ .uleb128 0xb
+ .uleb128 0x1d
+ .uleb128 0x13
+ .uleb128 0x1
+ .uleb128 0x13
+ .byte 0x0
+ .byte 0x0
+ .uleb128 0x3
+ .uleb128 0x1c
+ .byte 0x0
+ .uleb128 0x49
+ .uleb128 0x13
+ .uleb128 0x38
+ .uleb128 0xa
+ .uleb128 0x32
+ .uleb128 0xb
+ .byte 0x0
+ .byte 0x0
+ .uleb128 0x4
+ .uleb128 0x2
+ .byte 0x0
+ .uleb128 0x3
+ .uleb128 0x8
+ .uleb128 0x3c
+ .uleb128 0xc
+ .byte 0x0
+ .byte 0x0
+ .uleb128 0x5
+ .uleb128 0x2
+ .byte 0x1
+ .uleb128 0x3
+ .uleb128 0x8
+ .uleb128 0xb
+ .uleb128 0xb
+ .uleb128 0x3a
+ .uleb128 0xb
+ .uleb128 0x3b
+ .uleb128 0xb
+ .uleb128 0x1d
+ .uleb128 0x13
+ .uleb128 0x1
+ .uleb128 0x13
+ .byte 0x0
+ .byte 0x0
+ .uleb128 0x6
+ .uleb128 0x1c
+ .byte 0x0
+ .uleb128 0x49
+ .uleb128 0x13
+ .uleb128 0x38
+ .uleb128 0xa
+ .uleb128 0x4c
+ .uleb128 0xb
+ .uleb128 0x32
+ .uleb128 0xb
+ .byte 0x0
+ .byte 0x0
+ .uleb128 0x7
+ .uleb128 0x2e
+ .byte 0x1
+ .uleb128 0x3f
+ .uleb128 0xc
+ .uleb128 0x3
+ .uleb128 0x8
+ .uleb128 0x3a
+ .uleb128 0xb
+ .uleb128 0x3b
+ .uleb128 0xb
+ .uleb128 0x2007
+ .uleb128 0x8
+ .uleb128 0x3c
+ .uleb128 0xc
+ .byte 0x0
+ .byte 0x0
+ .uleb128 0x8
+ .uleb128 0x5
+ .byte 0x0
+ .uleb128 0x49
+ .uleb128 0x13
+ .uleb128 0x34
+ .uleb128 0xc
+ .byte 0x0
+ .byte 0x0
+ .uleb128 0x9
+ .uleb128 0xf
+ .byte 0x0
+ .uleb128 0xb
+ .uleb128 0xb
+ .uleb128 0x49
+ .uleb128 0x13
+ .byte 0x0
+ .byte 0x0
+ .uleb128 0xa
+ .uleb128 0x2e
+ .byte 0x1
+ .uleb128 0x47
+ .uleb128 0x13
+ .uleb128 0x11
+ .uleb128 0x1
+ .uleb128 0x12
+ .uleb128 0x1
+ .uleb128 0x40
+ .uleb128 0x6
+ .uleb128 0x1
+ .uleb128 0x13
+ .byte 0x0
+ .byte 0x0
+ .uleb128 0xb
+ .uleb128 0x5
+ .byte 0x0
+ .uleb128 0x49
+ .uleb128 0x13
+ .uleb128 0x2
+ .uleb128 0xa
+ .byte 0x0
+ .byte 0x0
+ .uleb128 0xc
+ .uleb128 0x34
+ .byte 0x0
+ .uleb128 0x49
+ .uleb128 0x13
+ .uleb128 0x2
+ .uleb128 0xa
+ .byte 0x0
+ .byte 0x0
+ .byte 0x0
+ .section .debug_pubnames,"",@progbits
+ .long 0x15
+ .value 0x2
+ .long .Ldebug_info0
+ .long 0x11b
+ .long 0xee
+ .string "()"
+ .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
+ .ident "GCC: (GNU) 4.3.0 20071221 (experimental)"
+ .section .note.GNU-stack,"",@progbits
--- /dev/null 1 Jan 1970 00:00:00 -0000
+++ ./gdb/testsuite/gdb.arch/i386-interface.exp 22 Dec 2007 19:07:28 -0000
@@ -0,0 +1,66 @@
+# 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/>.
+
+# Please email any bugs, comments, and/or additions to this file to:
+# bug-gdb@gnu.org
+
+# This file is part of the gdb testsuite.
+
+# Test basis recognization of DW_TAG_interface_type.
+# GCC java_classify_record() produces it if returns RECORD_IS_INTERFACE.
+
+if $tracelevel {
+ strace $tracelevel
+}
+
+set prms_id 0
+set bug_id 0
+
+if {![istarget "i?86-*-*"] && ![istarget "x86_64-*-*"]} then {
+ verbose "Skipping i386 Java DW_TAG_interface_type test."
+ return
+}
+
+set testfile "i386-interface"
+set srcfile ${testfile}.S
+set binfile ${objdir}/${subdir}/${testfile}.o
+
+if { [gdb_compile "${srcdir}/${subdir}/${srcfile}" "${binfile}" object {debug additional_flags=-m32}] != "" } {
+ untested i386-gnu-cfi.exp
+ return -1
+}
+
+# Get things started.
+
+gdb_exit
+gdb_start
+gdb_reinitialize_dir $srcdir/$subdir
+gdb_load ${binfile}
+
+gdb_test "set language java"
+
+set test "ptype Interface"
+gdb_test_multiple $test $test {
+ -re "type = class Interface *extends java.lang.Object \{.*$gdb_prompt $" {
+ pass $test
+ }
+}
+
+set test "ptype Class"
+gdb_test_multiple $test $test {
+ -re "type = class Class *extends java.lang.Object implements Interface \{.*$gdb_prompt $" {
+ pass $test
+ }
+}

View File

@ -1,3 +1,11 @@
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>
@ -10,8 +18,10 @@ https://bugzilla.redhat.com/bugzilla/show_bug.cgi?id=224128
Port to GDB-6.7 - only the testcase left, patch has been reverted,
char-vectors restricted.
--- /dev/null 1 Jan 1970 00:00:00 -0000
+++ ./gdb/testsuite/gdb.base/charsign.c 26 Jan 2007 10:32:00 -0000
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.
+
@ -50,9 +60,11 @@ https://bugzilla.redhat.com/bugzilla/show_bug.cgi?id=224128
+char_n n_typed[]="A";
+char_s s_typed[]="A";
+char_u u_typed[]="A";
--- /dev/null 1 Jan 1970 00:00:00 -0000
+++ ./gdb/testsuite/gdb.base/charsign.exp 26 Jan 2007 10:32:00 -0000
@@ -0,0 +1,70 @@
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
@ -69,16 +81,9 @@ https://bugzilla.redhat.com/bugzilla/show_bug.cgi?id=224128
+# 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 prms_id 0
+set bug_id 0
+
+set testfile charsign
+set srcfile ${testfile}.c
+set binfile ${objdir}/${subdir}/${testfile}
+set binfile [standard_output_file ${testfile}]
+
+proc do_test { cflags } {
+ global srcdir

View File

@ -1,24 +0,0 @@
kernel-headers-2.6.25-0.40.rc1.git2.fc9.x86_64
In file included from /usr/include/asm/ptrace.h:4,
from ../../gdb/amd64-linux-nat.c:44:
/usr/include/asm/ptrace-abi.h:92: error: expected specifier-qualifier-list before u32
--- gdb-6.7.1-13.fc9.x86_64/gdb/amd64-linux-nat.c-orig 2008-02-15 15:37:28.000000000 -0500
+++ gdb-6.7.1-13.fc9.x86_64/gdb/amd64-linux-nat.c 2008-02-15 15:40:13.000000000 -0500
@@ -35,13 +35,13 @@
#include <sys/procfs.h>
#include <asm/prctl.h>
/* FIXME ezannoni-2003-07-09: we need <sys/reg.h> to be included after
- <asm/ptrace.h> because the latter redefines FS and GS for no apparent
+ <sys/ptrace.h> because the latter redefines FS and GS for no apparent
reason, and those definitions don't match the ones that libpthread_db
uses, which come from <sys/reg.h>. */
/* ezannoni-2003-07-09: I think this is fixed. The extraneous defs have
been removed from ptrace.h in the kernel. However, better safe than
sorry. */
-#include <asm/ptrace.h>
+#include <sys/ptrace.h>
#include <sys/reg.h>
#include "gdb_proc_service.h"

View File

@ -1,3 +1,11 @@
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
@ -13,8 +21,10 @@ http://sourceware.org/ml/gdb-patches/2007-09/msg00228.html
* (rs6000_gdbarch_init): Install ppc_dwarf2_frame_init_reg as
default dwarf2_frame_set_init_reg function.
--- /dev/null 1 Jan 1970 00:00:00 -0000
+++ ./gdb/testsuite/gdb.arch/ppc-clobbered-registers-O2.c 3 Nov 2007 22:22:28 -0000
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))
@ -37,9 +47,11 @@ http://sourceware.org/ml/gdb-patches/2007-09/msg00228.html
+ y = 14;
+ return (int)gen_movsd (&x, &y);
+}
--- /dev/null 1 Jan 1970 00:00:00 -0000
+++ ./gdb/testsuite/gdb.arch/ppc-clobbered-registers-O2.exp 3 Nov 2007 22:22:28 -0000
@@ -0,0 +1,61 @@
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
@ -58,16 +70,9 @@ http://sourceware.org/ml/gdb-patches/2007-09/msg00228.html
+#
+# This file is part of the gdb testsuite.
+
+if $tracelevel {
+ strace $tracelevel
+}
+
+# Test displaying call clobbered registers in optimized binaries for ppc.
+# GDB should not show incorrect values.
+
+set prms_id 0
+set bug_id 0
+
+if ![istarget "powerpc*-*"] then {
+ verbose "Skipping powerpc* call clobbered registers testing."
+ return
@ -75,7 +80,7 @@ http://sourceware.org/ml/gdb-patches/2007-09/msg00228.html
+
+set testfile "ppc-clobbered-registers-O2"
+set srcfile ${testfile}.c
+set binfile ${objdir}/${subdir}/${testfile}
+set binfile [standard_output_file ${testfile}]
+set compile_flags "debug additional_flags=-O2"
+
+if { [gdb_compile "${srcdir}/${subdir}/${srcfile}" "${binfile}" executable ${compile_flags}] != "" } {

View File

@ -1,68 +0,0 @@
http://sourceware.org/ml/gdb-patches/2010-03/msg01006.html
Subject: [patch or FYI] testsuite: Fix prelink.exp on system w/unprelinked system libs
Hi,
this is a more conservative variant superseded by:
[patch 4/6] testsuite: Unify to lib/prelink-support.exp
http://sourceware.org/ml/gdb-patches/2010-03/msg01002.html
where gdb.base/prelink.exp is reworked on generic lib/prelink-support.exp.
I prefer the [patch 4/6] over this patch but this mail can serve also as an
illustration of the current problem.
------------------------------------------------------------------------------
If your system for some reason currently does not have all the libraries
prelinked gdb.base/prelink.exp will get UNRESOLVED randomly also affecting
testsuite results diff.
Apparently the testcase already tried to avoid any system libraries
dependencies by "-nodefaultlibs". But currently it does has not worked that
way.
"-lm" is contained already even in dejagnu's default_target_compile (not just
in gdb/testsuite/lib/ada.exp). But I do not know why it is there and which
systems would get broken by some global gdb/testsuite/ "-lm" removal.
Thanks,
Jan
2010-03-29 Jan Kratochvil <jan.kratochvil@redhat.com>
Fix testcase false UNRESOLVED if system libraries are not prelinked.
* gdb.base/prelink.exp: New variables compile, board, err and mathlib.
Set clear board mathlib for ${libfile} compilation.
--- a/gdb/testsuite/gdb.base/prelink.exp
+++ b/gdb/testsuite/gdb.base/prelink.exp
@@ -42,7 +42,25 @@ set testfile "prelink"
set libsrcfile ${testfile}-lib.c
set libfile ${objdir}/${subdir}/${testfile}.so
-if { [gdb_compile "${srcdir}/${subdir}/${libsrcfile}" "${libfile}" executable [list debug "additional_flags=-fpic -shared -nodefaultlibs"]] != ""} {
+
+# default_target_compile would otherwise add "-lm" making the testcase
+# dependent on whether the system libraries are already prelinked.
+# prelink: Could not set /lib64/libm-2.11.1.so owner or mode: Operation not permitted
+set compile {
+ gdb_compile "${srcdir}/${subdir}/${libsrcfile}" "${libfile}" executable [list debug "additional_flags=-fpic -shared -nodefaultlibs"]
+}
+set board [target_info name]
+if [board_info $board exists mathlib] {
+ set mathlib [board_info $dest mathlib]
+ set_board_info mathlib ""
+ set err [eval $compile]
+ set_board_info mathlib $mathlib
+} else {
+ set_board_info mathlib ""
+ set err [eval $compile]
+ unset_board_info mathlib
+}
+if {$err != ""} {
# If creating the shared library fails, maybe we don't have the right tools
return -1
}

View File

@ -1,3 +1,11 @@
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>
@ -8,42 +16,22 @@ gdb/testsuite/gdb.base/fileio.exp:
* 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.
--- ./gdb/testsuite/gdb.base/fileio.c 13 Jun 2006 08:55:22 -0000 1.10
+++ ./gdb/testsuite/gdb.base/fileio.c 8 Dec 2007 16:04:10 -0000
@@ -58,6 +58,8 @@ system (const char * string);
1) Invalid string/command. - returns 127. */
static const char *strerrno (int err);
+#define ROOTSUBDIR "fileio.dir"
+
#define FILENAME "foo.fileio.test"
#define RENAMED "bar.fileio.test"
#define NONEXISTANT "nofoo.fileio.test"
@@ -542,6 +544,37 @@ strerrno (int err)
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 ()
{
+ /* ROOTSUBDIR is already prepared by fileio.exp. We use it for easy cleanup
+ (by fileio.exp) if we are run by multiple users in the same directory. */
+
+ if (chdir (ROOTSUBDIR) != 0)
+ {
+ printf ("chdir " ROOTSUBDIR ": %s\n", strerror (errno));
+ exit (1);
+ }
+
+ /* These tests
+ Open for write but no write permission returns EACCES
+ Unlinking a file in a directory w/o write access returns EACCES
@ -53,10 +41,10 @@ frames-invalid can happen asynchronously.
+ {
+ uid_t uid = 99;
+
+ if (chown (".", uid, uid) != 0)
+ if (chown (OUTDIR, uid, uid) != 0)
+ {
+ printf ("chown %d.%d " ROOTSUBDIR ": %s\n", (int) uid, (int) uid,
+ strerror (errno));
+ printf ("chown %d.%d %s: %s\n", (int) uid, (int) uid,
+ OUTDIR, strerror (errno));
+ exit (1);
+ }
+ if (setuid (uid) || geteuid () == 0)
@ -69,36 +57,48 @@ frames-invalid can happen asynchronously.
/* Don't change the order of the calls. They partly depend on each other */
test_open ();
test_write ();
--- ./gdb/testsuite/gdb.base/fileio.exp 23 Aug 2007 18:14:16 -0000 1.12
+++ ./gdb/testsuite/gdb.base/fileio.exp 8 Dec 2007 16:04:10 -0000
@@ -46,8 +46,8 @@ if [get_compiler_info ${binfile}] {
return -1;
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"]
}
-remote_exec build {sh -xc test\ -r\ dir2.fileio.test\ &&\ chmod\ -f\ +w\ dir2.fileio.test}
-remote_exec build {sh -xc rm\ -rf\ *.fileio.test}
+remote_exec build {sh -xc rm\ -rf\ fileio.dir}
+remote_exec build {sh -xc mkdir\ -m777\ 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"]
@@ -88,7 +88,7 @@ gdb_test continue \
"Opening nonexistant file returns ENOENT"
@@ -89,7 +90,7 @@ gdb_test continue \
send_gdb "continue\n" ; gdb_expect -re "$gdb_prompt $"
-catch "system \"chmod -f -w nowrt.fileio.test\""
+catch "system \"chmod -f -w fileio.dir/nowrt.fileio.test\""
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" \
@@ -252,8 +252,8 @@ gdb_test continue \
send_gdb "quit\n"
send_gdb "y\n"
@@ -276,9 +277,7 @@ gdb_test continue \
gdb_exit
-remote_exec build {sh -xc test\ -r\ dir2.fileio.test\ &&\ chmod\ -f\ +w\ dir2.fileio.test}
-remote_exec build {sh -xc rm\ -rf\ *.fileio.test}
+remote_exec build {sh -xc test\ -r\ fileio.dir/dir2.fileio.test\ &&\ chmod\ -f\ +w\ fileio.dir/dir2.fileio.test}
+remote_exec build {sh -xc rm\ -rf\ fileio.dir}
# 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

@ -1,183 +0,0 @@
Index: gdb-7.0.50.20100115/gdb/linux-nat.c
===================================================================
--- gdb-7.0.50.20100115.orig/gdb/linux-nat.c 2010-01-15 11:53:34.000000000 +0100
+++ gdb-7.0.50.20100115/gdb/linux-nat.c 2010-01-15 12:13:53.000000000 +0100
@@ -208,6 +208,9 @@ blocked. */
static struct target_ops *linux_ops;
static struct target_ops linux_ops_saved;
+/* PID of the inferior stopped by SIGSTOP before attaching (or zero). */
+static pid_t pid_was_stopped;
+
/* The method to call, if any, when a new thread is attached. */
static void (*linux_nat_new_thread) (ptid_t);
@@ -933,7 +936,14 @@ Attaching after process %d fork to child
parent_inf->waiting_for_vfork_done = 0;
}
else if (detach_fork)
- target_detach (NULL, 0);
+ {
+ /* We should check PID_WAS_STOPPED and detach it stopped accordingly.
+ In this point of code it cannot be 1 as we would not get FORK
+ executed without CONTINUE first which resets PID_WAS_STOPPED.
+ We would have to first TARGET_STOP and WAITPID it as with running
+ inferior PTRACE_DETACH, SIGSTOP will ignore the signal. */
+ target_detach (NULL, 0);
+ }
/* Note that the detach above makes PARENT_INF dangling. */
@@ -1427,6 +1437,7 @@ linux_nat_post_attach_wait (ptid_t ptid,
if (debug_linux_nat)
fprintf_unfiltered (gdb_stdlog,
"LNPAW: Attaching to a stopped process\n");
+ pid_was_stopped = GET_PID (ptid);
/* The process is definitely stopped. It is in a job control
stop, unless the kernel predates the TASK_STOPPED /
@@ -1757,6 +1768,9 @@ GPT: lwp %s had signal %s, but it is in
target_signal_to_string (signo));
}
+ if (*status == 0 && GET_PID (lp->ptid) == pid_was_stopped)
+ *status = W_STOPCODE (SIGSTOP);
+
return 0;
}
@@ -1866,6 +1880,8 @@ linux_nat_detach (struct target_ops *ops
}
else
linux_ops->to_detach (ops, args, from_tty);
+
+ pid_was_stopped = 0;
}
/* Resume LP. */
@@ -2031,6 +2047,14 @@ linux_nat_resume (struct target_ops *ops
resume_callback. */
lp->stopped = 0;
+ /* 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 == GET_PID (lp->ptid))
+ pid_was_stopped = 0;
+
if (resume_many)
iterate_over_lwps (ptid, resume_callback, NULL);
@@ -3923,6 +3947,8 @@ linux_nat_mourn_inferior (struct target_
there are other viable forks to debug. Delete the exiting
one and context-switch to the first available. */
linux_fork_mourn_inferior ();
+
+ pid_was_stopped = 0;
}
/* Convert a native/host siginfo object, into/from the siginfo in the
Index: gdb-7.0.50.20100115/gdb/testsuite/gdb.threads/attach-stopped.exp
===================================================================
--- gdb-7.0.50.20100115.orig/gdb/testsuite/gdb.threads/attach-stopped.exp 2010-01-01 08:32:06.000000000 +0100
+++ gdb-7.0.50.20100115/gdb/testsuite/gdb.threads/attach-stopped.exp 2010-01-15 11:54:57.000000000 +0100
@@ -62,7 +62,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" {
Index: gdb-7.0.50.20100115/gdb/testsuite/gdb.threads/attachstop-mt.exp
===================================================================
--- gdb-7.0.50.20100115.orig/gdb/testsuite/gdb.threads/attachstop-mt.exp 2010-01-01 08:32:06.000000000 +0100
+++ gdb-7.0.50.20100115/gdb/testsuite/gdb.threads/attachstop-mt.exp 2010-01-15 11:54:57.000000000 +0100
@@ -176,12 +176,23 @@ gdb_test "bt" ".*sleep.*(func|main).*" "
# Exit and detach the process.
gdb_exit
-# Stop the program
-remote_exec build "kill -s STOP ${testpid}"
-
# No race
sleep 2
+set fileid3 [open $status2 r];
+gets $fileid3 line1;
+gets $fileid3 line2;
+close $fileid3;
+
+set test "attach3, exit leaves process stopped"
+if {[string match "*(stopped)*" $line2]} {
+ pass $test
+} else {
+ fail $test
+}
+
+# At this point, the process should still be stopped
+
# Continue the test as we would hit another expected bug regarding
# Program received signal SIGSTOP, Stopped (signal).
# across NPTL threads.

View File

@ -1,360 +0,0 @@
Index: gdb-7.1/bfd/elf-bfd.h
===================================================================
--- gdb-7.1.orig/bfd/elf-bfd.h 2010-02-09 13:14:42.000000000 +0100
+++ gdb-7.1/bfd/elf-bfd.h 2010-05-16 20:22:38.000000000 +0200
@@ -2160,7 +2160,7 @@ extern Elf_Internal_Phdr * _bfd_elf_find
extern char *elfcore_write_note
(bfd *, char *, int *, const char *, int, const void *, int);
extern char *elfcore_write_prpsinfo
- (bfd *, char *, int *, const char *, const char *);
+ (bfd *, char *, int *, void *, const char *, const char *);
extern char *elfcore_write_prstatus
(bfd *, char *, int *, long, int, const void *);
extern char * elfcore_write_pstatus
Index: gdb-7.1/bfd/elf.c
===================================================================
--- gdb-7.1.orig/bfd/elf.c 2010-02-18 01:09:06.000000000 +0100
+++ gdb-7.1/bfd/elf.c 2010-05-16 20:25:15.000000000 +0200
@@ -8545,6 +8545,7 @@ char *
elfcore_write_prpsinfo (bfd *abfd,
char *buf,
int *bufsiz,
+ void *info,
const char *fname,
const char *psargs)
{
@@ -8571,26 +8572,40 @@ elfcore_write_prpsinfo (bfd *abfd,
int note_type = NT_PRPSINFO;
#endif
- memset (&data, 0, sizeof (data));
- strncpy (data.pr_fname, fname, sizeof (data.pr_fname));
- strncpy (data.pr_psargs, psargs, sizeof (data.pr_psargs));
+ if (info)
+ memcpy (&data, info, sizeof (data));
+ else
+ {
+ memset (&data, 0, sizeof (data));
+ strncpy (data.pr_fname, fname, sizeof (data.pr_fname));
+ strncpy (data.pr_psargs, psargs, sizeof (data.pr_psargs));
+ }
+
return elfcore_write_note (abfd, buf, bufsiz,
note_name, note_type, &data, sizeof (data));
}
else
#endif
{
+/* gdb-6.8-bz254229-gcore-prpsinfo.patch misapplication glue. */
#if defined (HAVE_PSINFO_T)
psinfo_t data;
+/* gdb-6.8-bz254229-gcore-prpsinfo.patch misapplication glue. */
int note_type = NT_PSINFO;
#else
prpsinfo_t data;
int note_type = NT_PRPSINFO;
#endif
- memset (&data, 0, sizeof (data));
- strncpy (data.pr_fname, fname, sizeof (data.pr_fname));
- strncpy (data.pr_psargs, psargs, sizeof (data.pr_psargs));
+ if (info)
+ memcpy (&data, info, sizeof (data));
+ else
+ {
+ memset (&data, 0, sizeof (data));
+ strncpy (data.pr_fname, fname, sizeof (data.pr_fname));
+ strncpy (data.pr_psargs, psargs, sizeof (data.pr_psargs));
+ }
+
return elfcore_write_note (abfd, buf, bufsiz,
note_name, note_type, &data, sizeof (data));
}
Index: gdb-7.1/gdb/amd64-linux-nat.c
===================================================================
--- gdb-7.1.orig/gdb/amd64-linux-nat.c 2010-05-16 20:22:38.000000000 +0200
+++ gdb-7.1/gdb/amd64-linux-nat.c 2010-05-16 20:22:38.000000000 +0200
@@ -140,6 +140,7 @@ static int amd64_linux_gregset32_reg_off
static char *
amd64_linux_elfcore_write_prpsinfo (bfd *abfd, char *buf, int *bufsiz,
+ void *info,
const char *fname, const char *psargs)
{
if (gdbarch_ptr_bit (target_gdbarch) == 32)
@@ -149,14 +150,20 @@ amd64_linux_elfcore_write_prpsinfo (bfd
struct elf_prpsinfo32 data;
note_type = NT_PRPSINFO;
- memset (&data, 0, sizeof (data));
- strncpy (data.pr_fname, fname, sizeof (data.pr_fname));
- strncpy (data.pr_psargs, psargs, sizeof (data.pr_psargs));
+ if (info)
+ memcpy (&data, info, sizeof (data));
+ else
+ {
+ memset (&data, 0, sizeof (data));
+ strncpy (data.pr_fname, fname, sizeof (data.pr_fname));
+ strncpy (data.pr_psargs, psargs, sizeof (data.pr_psargs));
+ }
+
return elfcore_write_note (abfd, buf, bufsiz,
note_name, note_type, &data, sizeof (data));
}
else
- return elfcore_write_prpsinfo (abfd, buf, bufsiz, fname, psargs);
+ return elfcore_write_prpsinfo (abfd, buf, bufsiz, info, fname, psargs);
}
static void
Index: gdb-7.1/gdb/fbsd-nat.c
===================================================================
--- gdb-7.1.orig/gdb/fbsd-nat.c 2010-01-01 08:31:31.000000000 +0100
+++ gdb-7.1/gdb/fbsd-nat.c 2010-05-16 20:22:38.000000000 +0200
@@ -211,6 +211,7 @@ fbsd_make_corefile_notes (bfd *obfd, int
psargs = reconcat (psargs, psargs, " ", get_inferior_args (), NULL);
note_data = elfcore_write_prpsinfo (obfd, note_data, note_size,
+ NULL,
fname, psargs);
}
Index: gdb-7.1/gdb/linux-nat.c
===================================================================
--- gdb-7.1.orig/gdb/linux-nat.c 2010-05-16 20:22:38.000000000 +0200
+++ gdb-7.1/gdb/linux-nat.c 2010-05-16 20:22:38.000000000 +0200
@@ -56,6 +56,7 @@
#include "terminal.h"
#include <sys/vfs.h>
#include "solib.h"
+#include "gdb_procfs32.h" /* for struct elf_prpsinfo32 */
#ifndef SPUFS_MAGIC
#define SPUFS_MAGIC 0x23c9b64e
@@ -228,7 +229,7 @@ static LONGEST (*super_xfer_partial) (st
/* This functions make elfcore note sections.
They may get overriden by code adjusting data for multi-target builds. */
char *(*linux_elfcore_write_prpsinfo)
- (bfd *, char *, int *, const char *, const char *) = elfcore_write_prpsinfo;
+ (bfd *, char *, int *, void *, const char *, const char *) = elfcore_write_prpsinfo;
char *(*linux_elfcore_write_prstatus)
(bfd *, char *, int *, long, int, const void *) = elfcore_write_prstatus;
static char *
@@ -4507,6 +4508,159 @@ linux_spu_make_corefile_notes (bfd *obfd
return args.note_data;
}
+/* Should be always true for Linux */
+#define HAVE_PRPSINFO_T 1
+
+#if defined (HAVE_PRPSINFO_T)
+
+/* Fills struct elf_prpsinfo{32,64} as much as possible, imitate Linux kernel
+ binfmt_elf.c. Unknown values are filled with zeroes. The structure is
+ malloced. */
+
+static void*
+fill_prpsinfo (void)
+{
+ struct stat sb;
+ char filename[sizeof ("/proc//cmdline") + sizeof (int) * 3 + 2];
+ char buf[1024];
+ char proc_state[5];
+ char proc_cmdline[sizeof (((struct elf_prpsinfo*)0)->pr_psargs) + 1];
+ unsigned flags;
+ long proc_nice;
+ unsigned proc_ppid;
+ unsigned proc_pgid;
+ unsigned proc_sid;
+ pid_t pid;
+ int fd, n;
+ char *cp, *proc_comm, *state_s;
+ /* String comes from Linux kernel binfmt_elf.c FILL_PSINFO but it is already
+ obsolete there to <linux/sched.h> TASK_* constants. */
+ const char state_string[] = "RSDTZW";
+ int state_num;
+
+ /* Get /proc/$PID/stat. */
+ pid = ptid_get_pid (inferior_ptid);
+ sprintf (filename, "/proc/%u/stat", (unsigned)pid);
+ fd = open (filename, O_RDONLY);
+ if (fd < 0)
+ return NULL;
+ fstat (fd, &sb); /* No error checking (can it ever happen?). */
+ n = read (fd, buf, sizeof (buf) - 1);
+ close (fd);
+ if (n < 0)
+ return NULL;
+ buf[n] = 0;
+
+ cp = strrchr (buf, ')'); /* Split into "PID (COMM" and "<rest>". */
+ if (!cp)
+ return NULL;
+ *cp = 0;
+
+ /* Grab COMM. */
+ proc_comm = strchr (buf, '(');
+ if (!proc_comm)
+ return NULL;
+ proc_comm++;
+
+ /* Read /proc/$PID/cmdline. */
+ proc_cmdline[0] = 0;
+ strcpy (strrchr (filename, '/'), "/cmdline");
+ fd = open (filename, O_RDONLY);
+ if (fd >= 0)
+ {
+ int n;
+
+ n = read (fd, proc_cmdline, sizeof (proc_cmdline) - 1);
+ if (n < 0)
+ n = 0;
+ proc_cmdline[n] = 0;
+ while (n--) /* Replace NULs with spaces. */
+ if (proc_cmdline[n] == 0)
+ proc_cmdline[n] = ' ';
+ close (fd);
+ }
+
+ /* Parse /proc/$PID/stat. */
+ n = sscanf (cp + 2, /* skip ") " */
+ "%4s %u " /* state, ppid */
+ "%u %u %*s %*s " /* pgid, sid, tty, tpgid */
+ "%u %*s %*s %*s " /* flags, min_flt, cmin_flt, maj_flt */
+ "%*s " /* cmaj_flt */
+ "%*s %*s " /* utime, stime */
+ "%*s %*s %*s " /* cutime, cstime, priority */
+ "%ld " /* nice */
+ /*"%*s %*s " timeout, it_real_value */
+ /*"%lu " start_time */
+ /*"%lu " vsize */
+ /*"%lu " rss */
+ /*"%lu %lu %lu " rss_rlim, start_code, end_code */
+ /*"%lu %lu %lu " start_stack, kstk_esp, kstk_eip */
+ /*"%u %u %u %u " signal, blocked, sigignore, sigcatch */
+ /*"%lu %lu %lu" wchan, nswap, cnswap */
+ , proc_state, &proc_ppid,
+ &proc_pgid, &proc_sid,
+ &flags,
+ &proc_nice);
+ if (n != 6)
+ return NULL;
+
+ state_s = strchr (state_string, proc_state[0]);
+ if (state_s != NULL)
+ state_num = state_s - state_string;
+ else
+ {
+ /* 0 means Running, some more unusal state would be better. */
+ state_num = 0;
+ }
+
+#if ULONG_MAX > 0xffffffffU
+ /* We skip this code on 32-bit gdb. */
+ if (gdbarch_ptr_bit (target_gdbarch) == 64)
+ {
+ struct elf_prpsinfo *info = xzalloc (sizeof (*info));
+
+ info->pr_state = state_num;
+ info->pr_sname = proc_state[0];
+ info->pr_zomb = (proc_state[0] == 'Z');
+ info->pr_nice = proc_nice;
+ info->pr_flag = flags;
+ info->pr_uid = sb.st_uid;
+ info->pr_gid = sb.st_gid;
+ info->pr_pid = pid;
+ info->pr_ppid = proc_ppid;
+ info->pr_pgrp = proc_pgid;
+ info->pr_sid = proc_sid;
+ strncpy (info->pr_fname, proc_comm, sizeof (info->pr_fname));
+ strncpy (info->pr_psargs, proc_cmdline, sizeof (info->pr_psargs));
+
+ return info;
+ }
+#endif
+ if (gdbarch_ptr_bit (target_gdbarch) == 32)
+ {
+ struct elf_prpsinfo32 *info = xzalloc (sizeof (*info));
+
+ info->pr_state = state_num;
+ info->pr_sname = proc_state[0];
+ info->pr_zomb = (proc_state[0] == 'Z');
+ info->pr_nice = proc_nice;
+ info->pr_flag = flags;
+ info->pr_uid = sb.st_uid;
+ info->pr_gid = sb.st_gid;
+ info->pr_pid = pid;
+ info->pr_ppid = proc_ppid;
+ info->pr_pgrp = proc_pgid;
+ info->pr_sid = proc_sid;
+ strncpy (info->pr_fname, proc_comm, sizeof (info->pr_fname));
+ strncpy (info->pr_psargs, proc_cmdline, sizeof (info->pr_psargs));
+
+ return info;
+ }
+
+ return NULL;
+}
+#endif
+
/* Fills the "to_make_corefile_note" target vector. Builds the note
section for a corefile, and returns it in a malloc buffer. */
@@ -4527,8 +4681,14 @@ linux_nat_make_corefile_notes (bfd *obfd
if (get_exec_file (0))
{
+#if defined (HAVE_PRPSINFO_T)
+ void *data = fill_prpsinfo ();
+#define DATAPTR data
+#else
+#define DATAPTR NULL
strncpy (fname, strrchr (get_exec_file (0), '/') + 1, sizeof (fname));
strncpy (psargs, get_exec_file (0), sizeof (psargs));
+#endif
if (get_inferior_args ())
{
char *string_end;
@@ -4544,9 +4704,15 @@ linux_nat_make_corefile_notes (bfd *obfd
psargs_end - string_end);
}
}
- note_data = (char *) linux_elfcore_write_prpsinfo (obfd, note_data,
- note_size, fname,
+ note_data = (char *) linux_elfcore_write_prpsinfo (obfd,
+ note_data, note_size,
+ DATAPTR,
+ fname,
psargs);
+#if defined (HAVE_PRPSINFO_T)
+ xfree (DATAPTR);
+#endif
+#undef DATAPTR
}
/* Dump information for threads. */
Index: gdb-7.1/gdb/linux-nat.h
===================================================================
--- gdb-7.1.orig/gdb/linux-nat.h 2010-05-16 20:22:37.000000000 +0200
+++ gdb-7.1/gdb/linux-nat.h 2010-05-16 20:22:38.000000000 +0200
@@ -173,7 +173,7 @@ int linux_nat_core_of_thread_1 (ptid_t p
/* These functions make elfcore note sections.
They may get overriden by code adjusting data for multi-target builds. */
extern char *(*linux_elfcore_write_prpsinfo)
- (bfd *, char *, int *, const char *, const char *);
+ (bfd *, char *, int *, void *, const char *, const char *);
extern char *(*linux_elfcore_write_prstatus)
(bfd *, char *, int *, long, int, const void *);
extern char *(*linux_elfcore_write_prfpreg)
Index: gdb-7.1/gdb/procfs.c
===================================================================
--- gdb-7.1.orig/gdb/procfs.c 2010-02-15 18:35:49.000000000 +0100
+++ gdb-7.1/gdb/procfs.c 2010-05-16 20:22:38.000000000 +0200
@@ -6184,6 +6184,7 @@ procfs_make_note_section (bfd *obfd, int
note_data = (char *) elfcore_write_prpsinfo (obfd,
note_data,
note_size,
+ NULL,
fname,
psargs);

View File

@ -1,25 +0,0 @@
Index: gdb-6.8.50.20090803/gdb/valops.c
===================================================================
--- gdb-6.8.50.20090803.orig/gdb/valops.c 2009-08-04 06:30:45.000000000 +0200
+++ gdb-6.8.50.20090803/gdb/valops.c 2009-08-04 06:33:05.000000000 +0200
@@ -926,10 +926,18 @@ value_assign (struct value *toval, struc
struct gdbarch *gdbarch;
int value_reg;
- /* Figure out which frame this is in currently. */
- frame = frame_find_by_id (VALUE_FRAME_ID (toval));
value_reg = VALUE_REGNUM (toval);
+ /* Figure out which frame this is in currently. */
+ frame = frame_find_by_id (VALUE_FRAME_ID (toval));
+ /* "set $reg+=1" should work on programs with no debug info,
+ but frame_find_by_id returns NULL here (RH bug 436037).
+ Use current frame, it represents CPU state in this case.
+ If frame_find_by_id is changed to do it internally
+ (it is contemplated there), remove this. */
+ if (!frame)
+ frame = get_current_frame ();
+ /* Probably never happens. */
if (!frame)
error (_("Value being assigned to is no longer active."));

View File

@ -1,8 +1,16 @@
From FEDORA_PATCHES Mon Sep 17 00:00:00 2001
From: Fedora GDB patches <invalid@email.com>
Date: Fri, 27 Oct 2017 21:07:50 +0200
Subject: gdb-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 -up -u -X /root/jkratoch/.diffi.list -rup gdb-6.8/gdb/testsuite/gdb.threads/threaded-exec.c gdb-6.8-patched/gdb/testsuite/gdb.threads/threaded-exec.c
--- gdb-6.8/gdb/testsuite/gdb.threads/threaded-exec.c 2008-04-16 17:05:19.000000000 -0400
+++ gdb-6.8-patched/gdb/testsuite/gdb.threads/threaded-exec.c 2008-04-16 14:43:50.000000000 -0400
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. */
@ -139,16 +147,16 @@ diff -up -u -X /root/jkratoch/.diffi.list -rup gdb-6.8/gdb/testsuite/gdb.threads
+ execl (cmd, cmd, exec_nothreads, exec_threads, phase_s, NULL);
+ assert (0);
}
diff -up -u -X /root/jkratoch/.diffi.list -rup gdb-6.8/gdb/testsuite/gdb.threads/threaded-exec.exp gdb-6.8-patched/gdb/testsuite/gdb.threads/threaded-exec.exp
--- gdb-6.8/gdb/testsuite/gdb.threads/threaded-exec.exp 2008-04-16 17:05:19.000000000 -0400
+++ gdb-6.8-patched/gdb/testsuite/gdb.threads/threaded-exec.exp 2008-04-16 14:42:49.000000000 -0400
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 ${objdir}/${subdir}/${testfile}
+set binfile_nothreads ${objdir}/${subdir}/${testfile}N
+set binfile_threads ${objdir}/${subdir}/${testfile}Y
-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}] != "" } {
@ -170,4 +178,4 @@ diff -up -u -X /root/jkratoch/.diffi.list -rup gdb-6.8/gdb/testsuite/gdb.threads
+gdb_run_cmd ${binfile_nothreads} ${binfile_threads} 0
gdb_test_multiple {} "Program exited" {
-re "\r\nProgram exited normally.\r\n$gdb_prompt $" {
-re "\r\n\\\[Inferior .* exited normally\\\]\r\n$gdb_prompt $" {

View File

@ -1,105 +0,0 @@
--- /dev/null 2009-04-19 14:49:00.974648389 +0200
+++ gdb-6.8/gdb/testsuite/gdb.arch/i386-biarch-core.exp 2009-04-19 16:30:12.000000000 +0200
@@ -0,0 +1,61 @@
+# 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 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 ability to load an elf64-i386 core file. The provided core file was
+# elf64-x8664 one but it got binary patched to i386:
+# Elf32_Ehdr.e_machine @0x12..0x13
+# Elf64_Ehdr.e_machine @0x12..0x13
+# #define EM_386 3 /* Intel 80386 */
+# #define EM_X86_64 62 /* AMD x86-64 architecture */
+# patch @0x12: 0x3E -> 0x03
+
+if { ![istarget "i?86-*-*"] && ![istarget "x86_64-*-*"] } then {
+ verbose "Skipping i386-biarch-core test."
+ return
+}
+
+set testfile "i386-biarch-core"
+set corebz2uufile ${srcdir}/${subdir}/${testfile}.core.bz2.uu
+set corefile ${objdir}/${subdir}/${testfile}.core
+# Entry point of the original executable.
+set address 0x400078
+
+if {[catch "system \"uudecode -o - ${corebz2uufile} | bzip2 -dc >${corefile}\""] != 0} {
+ untested "failed uudecode or bzip2"
+ return -1
+}
+file stat ${corefile} corestat
+if {$corestat(size) != 102400} {
+ untested "uudecode or bzip2 produce invalid result"
+ return -1
+}
+
+gdb_exit
+gdb_start
+gdb_reinitialize_dir $srcdir/$subdir
+
+# Wrongly built GDB complains by:
+# "..." is not a core dump: File format not recognized
+# As the provided test core has 64bit PRSTATUS i386 built GDB cannot parse it.
+# This is just a problem of the test care, real-world elf64-i386 file will have
+# 32bit PRSTATUS. One cannot prepare elf64-i386 core file from elf32-i386 by
+# objcopy as it corrupts the core file beyond all recognition.
+# "\r\nCore was generated by `\[^\r\n\]*'\\.\r\nProgram terminated with signal 11, Segmentation fault\\.\r\n.*"
+gdb_test "core-file ${corefile}"
+
+gdb_test "x/i $address" "\r\n\[ \t\]*$address:\[ \t\]*hlt\[ \t\]*" ".text is readable"
--- /dev/null 2009-04-19 14:49:00.974648389 +0200
+++ gdb-6.8/gdb/testsuite/gdb.arch/i386-biarch-core.S 2009-04-19 14:52:28.000000000 +0200
@@ -0,0 +1,22 @@
+/* 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 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.
+ */
+
+ .globl _start
+_start:
+ hlt
--- /dev/null 2009-04-19 14:49:00.974648389 +0200
+++ gdb-6.8/gdb/testsuite/gdb.arch/i386-biarch-core.core.bz2.uu 2009-04-19 15:02:12.000000000 +0200
@@ -0,0 +1,13 @@
+begin 600 i386-biarch-core.core.bz2
+M0EIH.3%!629361`P1\P`!)?_____\9'@"8Q)6P380'9@'&#`0D@``"``%(``
+M@`#`"!<(L`%F"(:$GH13::F-)M&D&U,AD:`--#)M0&FT0XR9--,)D9`P(Q-&
+M",(-&F``02)%38HT]0T`&AH```'H@``T^>9T*(,("&)SE`>`9@+GP=[,N)KB
+M'I8BL(L]N5TCY\%V]/?DB.BN*UZ'U@]TN7-]UJ5\_%0QTT<*086#%MHT7XVJ
+M9D"+C!"2*L:8D1XPD!`--M@*XT1H5RFYN&)(!0P0#:`I:;2;$5M&\*9"0@%:
+MK@X[T()M)9N7`D$VA!^63)%,;@8LT`(7\K&[7G;U:"B6'!GG+46ALOZF.2F-
+M!@>C*%86X$-]C2`KE;HG)UL(913VR2G]0BD:J=Z_`G@S,`W%.8RMS-#5P:J0
+MAJ2\8&X?@DE;UF68QHM<,D`('::J65/S:PAG*R-09["8DBI)'V]Y.[(/AM*L
+M"X_O^V;%FY.S6Q]FM=D37>5F,%4-F1ZF#,CFJVU;H*^IT<(%<V`.32$`JU["
+/G`68?\7<D4X4)`0,$?,`
+`
+end

View File

@ -1,162 +1,17 @@
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).
Index: gdb-6.8.50.20090909/gdb/dwarf2loc.c
===================================================================
--- gdb-6.8.50.20090909.orig/gdb/dwarf2loc.c 2009-09-09 20:08:03.000000000 +0200
+++ gdb-6.8.50.20090909/gdb/dwarf2loc.c 2009-09-09 20:10:35.000000000 +0200
@@ -56,7 +56,9 @@ find_location_expression (struct dwarf2_
CORE_ADDR low, high;
gdb_byte *loc_ptr, *buf_end;
int length;
- struct objfile *objfile = dwarf2_per_cu_objfile (baton->per_cu);
+ struct objfile *objfile1 = dwarf2_per_cu_objfile (baton->per_cu);
+ struct objfile *objfile = objfile1->separate_debug_objfile
+ ? objfile1->separate_debug_objfile : objfile1;
struct gdbarch *gdbarch = get_objfile_arch (objfile);
enum bfd_endian byte_order = gdbarch_byte_order (gdbarch);
unsigned int addr_size = dwarf2_per_cu_addr_size (baton->per_cu);
Index: gdb-6.8.50.20090909/gdb/testsuite/gdb.dwarf2/dw2-loclist-prelinked.exp
===================================================================
--- /dev/null 1970-01-01 00:00:00.000000000 +0000
+++ gdb-6.8.50.20090909/gdb/testsuite/gdb.dwarf2/dw2-loclist-prelinked.exp 2009-09-09 20:10:35.000000000 +0200
@@ -0,0 +1,102 @@
+# Copyright 2008 Free Software Foundation, Inc.
+
+# This program is free software; you can redistribute it and/or modify
+# it under the terms of the GNU General Public License as published by
+# the Free Software Foundation; either version 2 of the License, or
+# (at your option) any later version.
+#
+# This program is distributed in the hope that it will be useful,
+# but WITHOUT ANY WARRANTY; without even the implied warranty of
+# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
+# GNU General Public License for more details.
+#
+# You should have received a copy of the GNU General Public License
+# along with this program; if not, write to the Free Software
+# Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA.
+
+# Minimal DWARF-2 unit test
+
+# This test can only be run on i386/x86_64 targets which support DWARF-2.
+# For now pick a sampling of likely targets.
+if {(![istarget *-*-linux*]
+ && ![istarget *-*-gnu*]
+ && ![istarget *-*-elf*]
+ && ![istarget *-*-openbsd*])
+ || (![istarget "i?86-*-*"] && ![istarget "x86_64-*-*"])} {
+ return 0
+}
+
+set testfile "dw2-loclist-prelinked"
+set srcfuncfile ${testfile}-func.S
+set binsharedfuncfile ${objdir}/${subdir}/${testfile}.so
+set srcmainfile ${testfile}-main.c
+set binfile ${objdir}/${subdir}/${testfile}
+
+remote_exec build "rm -f ${binfile}"
+
+# get the value of gcc_compiled
+if [get_compiler_info ${binfile}] {
+ return -1
+}
+
+# This test can only be run on gcc as we use additional_flags=FIXME
+if {$gcc_compiled == 0} {
+ return 0
+}
+
+if { [gdb_compile_shlib "${srcdir}/${subdir}/${srcfuncfile}" "${binsharedfuncfile}" {debug additional_flags=-m32}] != "" } {
+ untested "Couldn't compile test library"
+ return -1
+}
+
+# The new separate debug info file will be stored in the .debug subdirectory.
+
+if [gdb_gnu_strip_debug ${binsharedfuncfile}] {
+ # check that you have a recent version of strip and objcopy installed
+ unsupported "cannot produce separate debug info files"
+ return -1
+}
+
+if {[catch "system \"/usr/sbin/prelink -qNR --no-exec-shield ${binsharedfuncfile}\""] != 0} {
+ # Maybe we don't have prelink.
+ return -1
+}
+
+if { [gdb_compile "${srcdir}/${subdir}/${srcmainfile}" \
+ "${binfile}" executable [list debug additional_flags=-m32 shlib=${binsharedfuncfile}]] != "" } {
+ return -1
+}
+
+gdb_exit
+gdb_start
+gdb_reinitialize_dir $srcdir/$subdir
+gdb_load ${binfile}
+
+gdb_run_cmd
+
+gdb_test "" "Program received signal SIGABRT, Aborted..*" "Enter abort()"
+
+# Incorrect:
+# #0 0x00110430 in __kernel_vsyscall ()
+# No symbol table info available.
+# #1 0x003d44c0 in raise () from /lib/libc.so.6
+# No symbol table info available.
+# #2 0x003d5e88 in abort () from /lib/libc.so.6
+# No symbol table info available.
+# #3 0x44f10437 in func () at dw2-loclist-prelinked.c:8
+# i = Could not find the frame base for "func".
+
+# Correct:
+# #0 0x00110430 in __kernel_vsyscall ()
+# No symbol table info available.
+# #1 0x003d44c0 in raise () from /lib/libc.so.6
+# No symbol table info available.
+# #2 0x003d5e88 in abort () from /lib/libc.so.6
+# No symbol table info available.
+# #3 0x4ae36437 in func () at dw2-loclist-prelinked.c:8
+# i = 3827288
+# #4 0x0804851a in main () at ../../../gdb/testsuite/gdb.dwarf2/dw2-loclist-prelinked-main.c:24
+# No locals.
+
+# `abort' can get expressed as `*__GI_abort'.
+gdb_test "bt full" "in \[^ \]*abort \\(.*in func \\(.*\r\n\[\t \]+i = -?\[0-9\].*in main \\(.*" "Backtrace after abort()"
Index: gdb-6.8.50.20090909/gdb/testsuite/gdb.dwarf2/dw2-loclist-prelinked-main.c
===================================================================
--- /dev/null 1970-01-01 00:00:00.000000000 +0000
+++ gdb-6.8.50.20090909/gdb/testsuite/gdb.dwarf2/dw2-loclist-prelinked-main.c 2009-09-09 20:10:35.000000000 +0200
@@ -0,0 +1,26 @@
+/* This testcase is part of GDB, the GNU debugger.
+
+ Copyright 2008 Free Software Foundation, Inc.
+
+ This program is free software; you can redistribute it and/or modify
+ it under the terms of the GNU General Public License as published by
+ the Free Software Foundation; either version 3 of the License, or
+ (at your option) any later version.
+
+ This program is distributed in the hope that it will be useful,
+ but WITHOUT ANY WARRANTY; without even the implied warranty of
+ MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
+ GNU General Public License for more details.
+
+ You should have received a copy of the GNU General Public License
+ along with this program. If not, see <http://www.gnu.org/licenses/>. */
+
+/* dw2-loclist-prelinked-func.S */
+extern void func (void);
+
+int
+main (void)
+{
+ func ();
+ return 0;
+}
Index: gdb-6.8.50.20090909/gdb/testsuite/gdb.dwarf2/dw2-loclist-prelinked-func.S
===================================================================
--- /dev/null 1970-01-01 00:00:00.000000000 +0000
+++ gdb-6.8.50.20090909/gdb/testsuite/gdb.dwarf2/dw2-loclist-prelinked-func.S 2009-09-09 20:10:35.000000000 +0200
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.
+
@ -486,3 +341,141 @@ Index: gdb-6.8.50.20090909/gdb/testsuite/gdb.dwarf2/dw2-loclist-prelinked-func.S
+ .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

@ -1,236 +0,0 @@
2008-07-10 Jan Kratochvil <jan.kratochvil@redhat.com>
* breakpoint.c (fetch_watchpoint_value): New comment on unreachable
values.
(watch_command_1): New variable VAL_CHAIN. Refuse constant watchpoints.
* gdbtypes.h (TYPE_CODE_FUNC): New comment regarding pointers to it.
2008-07-10 Jan Kratochvil <jan.kratochvil@redhat.com>
* gdb.texinfo (Set Watchpoints): Document constant value watchpoints.
2008-07-10 Jan Kratochvil <jan.kratochvil@redhat.com>
* gdb.base/watchpoint.exp: Call TEST_CONSTANT_WATCHPOINT.
(test_constant_watchpoint): New function.
(test_inaccessible_watchpoint): Cleanup (delete) the watchpoint.
Test also a double-indirection watchpoint.
gdb.base/watchpoint.c (global_ptr_ptr): New variable.
(func4): New testing code for GLOBAL_PTR_PTR.
Index: gdb-7.0.50.20100115/gdb/breakpoint.c
===================================================================
--- gdb-7.0.50.20100115.orig/gdb/breakpoint.c 2010-01-15 11:46:29.000000000 +0100
+++ gdb-7.0.50.20100115/gdb/breakpoint.c 2010-01-15 11:49:49.000000000 +0100
@@ -947,7 +947,15 @@ is_hardware_watchpoint (struct breakpoin
If VAL_CHAIN is non-NULL, *VAL_CHAIN will be released from the
value chain. The caller must free the values individually. If
VAL_CHAIN is NULL, all generated values will be left on the value
- chain. */
+ chain.
+
+ Inferior unreachable values return:
+ Inferior `int *intp = NULL;' with `watch *intp':
+ *VALP is NULL, *RESULTP contains lazy LVAL_MEMORY address 0, *VAL_CHAIN
+ contains the *RESULTP element and also INTP as LVAL_MEMORY.
+ Inferior `int **intpp = NULL;' with `watch **intpp':
+ *VALP is NULL, *RESULTP is NULL, *VAL_CHAIN contains lazy LVAL_MEMORY
+ address 0 and also INTPP as LVAL_MEMORY. */
static void
fetch_watchpoint_value (struct expression *exp, struct value **valp,
@@ -7264,7 +7272,7 @@ watch_command_1 (char *arg, int accessfl
struct breakpoint *b, *scope_breakpoint = NULL;
struct expression *exp;
struct block *exp_valid_block;
- struct value *val, *mark;
+ struct value *val, *mark, *val_chain;
struct frame_info *frame;
char *exp_start = NULL;
char *exp_end = NULL;
@@ -7352,6 +7360,27 @@ watch_command_1 (char *arg, int accessfl
exp_valid_block = innermost_block;
mark = value_mark ();
fetch_watchpoint_value (exp, &val, NULL, NULL);
+
+ /* VALUE_MARK gets us the same value as FETCH_WATCHPOINT_VALUE's VAL_CHAIN
+ parameter. Just this way we do not have to VALUE_FREE the chained VALUEs
+ ourselves. */
+ for (val_chain = value_mark ();
+ val_chain != mark;
+ val_chain = value_next (val_chain))
+ if ((VALUE_LVAL (val_chain) == lval_memory
+ && TYPE_CODE (value_type (val_chain)) != TYPE_CODE_FUNC)
+ || VALUE_LVAL (val_chain) == lval_register)
+ break;
+ if (val_chain == mark)
+ {
+ int len;
+
+ len = exp_end - exp_start;
+ while (len > 0 && isspace (exp_start[len - 1]))
+ len--;
+ error (_("Cannot watch constant value %.*s."), len, exp_start);
+ }
+ /* Break the values chain only after its check above. */
if (val != NULL)
release_value (val);
Index: gdb-7.0.50.20100115/gdb/gdbtypes.h
===================================================================
--- gdb-7.0.50.20100115.orig/gdb/gdbtypes.h 2010-01-15 03:22:31.000000000 +0100
+++ gdb-7.0.50.20100115/gdb/gdbtypes.h 2010-01-15 11:49:26.000000000 +0100
@@ -72,7 +72,22 @@ enum type_code
TYPE_CODE_UNION, /* C union or Pascal variant part */
TYPE_CODE_ENUM, /* Enumeration type */
TYPE_CODE_FLAGS, /* Bit flags type */
- TYPE_CODE_FUNC, /* Function type */
+
+ /* Function type. It is not a pointer to a function. Function reference
+ by its name (such as `printf') has this type. C automatically converts
+ this function type to a pointer to function for any operation except
+ `sizeof (function_type)' or `&function_type' (unary &).
+ `sizeof (function_type)' is undefined in C. But GCC provides extension
+ (info '(gcc)Pointer Arith') defining its size as 1 byte. DWARF does not
+ define its size but GDB defines the size the GCC compatible way - GDB
+ function MAKE_FUNCTION_TYPE. The address itself is not modifiable.
+ As the function type has size 1 but its real value has `sizeof
+ (CORE_ADDR)' we cannot use NOT_LVAL category because the address would
+ not fit in the VALUE_CONTENTS_RAW container of its VALUE. We use
+ LVAL_MEMORY (and its VALUE_ADDRESS field) for it but we must be careful
+ it is not lvalue, it is the only non-modifiable LVAL_MEMORY. */
+ TYPE_CODE_FUNC,
+
TYPE_CODE_INT, /* Integer type */
/* Floating type. This is *NOT* a complex type. Beware, there are parts
Index: gdb-7.0.50.20100115/gdb/doc/gdb.texinfo
===================================================================
--- gdb-7.0.50.20100115.orig/gdb/doc/gdb.texinfo 2010-01-15 11:12:33.000000000 +0100
+++ gdb-7.0.50.20100115/gdb/doc/gdb.texinfo 2010-01-15 11:49:26.000000000 +0100
@@ -3723,6 +3723,18 @@ This command prints a list of watchpoint
it is the same as @code{info break} (@pxref{Set Breaks}).
@end table
+If you watch for a change in a numerically entered address you need to
+dereference it as the address itself is just a constant number which will never
+change. @value{GDBN} refuses to create a watchpoint that watches
+a never-changing value:
+
+@smallexample
+(@value{GDBP}) watch 0x600850
+Cannot watch constant value 0x600850.
+(@value{GDBP}) watch *(int *) 0x600850
+Watchpoint 1: *(int *) 6293584
+@end smallexample
+
@value{GDBN} sets a @dfn{hardware watchpoint} if possible. Hardware
watchpoints execute very quickly, and the debugger reports a change in
value at the exact instruction where the change occurs. If @value{GDBN}
Index: gdb-7.0.50.20100115/gdb/testsuite/gdb.base/watchpoint.c
===================================================================
--- gdb-7.0.50.20100115.orig/gdb/testsuite/gdb.base/watchpoint.c 2009-12-30 18:33:35.000000000 +0100
+++ gdb-7.0.50.20100115/gdb/testsuite/gdb.base/watchpoint.c 2010-01-15 11:49:26.000000000 +0100
@@ -40,6 +40,7 @@ struct foo struct1, struct2, *ptr1, *ptr
int doread = 0;
char *global_ptr;
+char **global_ptr_ptr;
void marker1 ()
{
@@ -119,6 +120,10 @@ func4 ()
buf[0] = 3;
global_ptr = buf;
buf[0] = 7;
+ buf[1] = 5;
+ global_ptr_ptr = &global_ptr;
+ buf[0] = 9;
+ global_ptr++;
}
int main ()
Index: gdb-7.0.50.20100115/gdb/testsuite/gdb.base/watchpoint.exp
===================================================================
--- gdb-7.0.50.20100115.orig/gdb/testsuite/gdb.base/watchpoint.exp 2010-01-01 08:32:01.000000000 +0100
+++ gdb-7.0.50.20100115/gdb/testsuite/gdb.base/watchpoint.exp 2010-01-15 11:50:21.000000000 +0100
@@ -641,7 +641,21 @@ proc test_watchpoint_and_breakpoint {} {
}
}
}
-
+
+proc test_constant_watchpoint {} {
+ global gdb_prompt
+
+ gdb_test "watch 5" "Cannot watch constant value 5." "number is constant"
+ gdb_test "watch marker1" "Cannot watch constant value marker1." \
+ "marker1 is constant"
+ gdb_test "watch count + 6" ".*atchpoint \[0-9\]+: count \\+ 6"
+ gdb_test "set \$expr_breakpoint_number = \$bpnum" ""
+ gdb_test "delete \$expr_breakpoint_number" ""
+ gdb_test "watch 7 + count" ".*atchpoint \[0-9\]+: 7 \\+ count"
+ gdb_test "set \$expr_breakpoint_number = \$bpnum" ""
+ gdb_test "delete \$expr_breakpoint_number" ""
+}
+
proc test_inaccessible_watchpoint {} {
global gdb_prompt
@@ -662,7 +676,8 @@ proc test_inaccessible_watchpoint {} {
}
gdb_test "watch *global_ptr" ".*atchpoint \[0-9\]+: \\*global_ptr"
- gdb_test "next" ".*global_ptr = buf.*"
+ gdb_test "set \$global_ptr_breakpoint_number = \$bpnum" ""
+ gdb_test "next" ".*global_ptr = buf.*" "global_ptr next"
gdb_test_multiple "next" "next over ptr init" {
-re ".*atchpoint \[0-9\]+: \\*global_ptr\r\n\r\nOld value = .*\r\nNew value = 3 .*\r\n.*$gdb_prompt $" {
# We can not test for <unknown> here because NULL may be readable.
@@ -675,6 +690,28 @@ proc test_inaccessible_watchpoint {} {
pass "next over buffer set"
}
}
+ gdb_test "delete \$global_ptr_breakpoint_number" ""
+ gdb_test "watch **global_ptr_ptr" ".*atchpoint \[0-9\]+: \\*\\*global_ptr_ptr"
+ gdb_test "set \$global_ptr_ptr_breakpoint_number = \$bpnum" ""
+ gdb_test "next" ".*global_ptr_ptr = &global_ptr.*" "gloabl_ptr_ptr next"
+ gdb_test_multiple "next" "next over global_ptr_ptr init" {
+ -re ".*atchpoint \[0-9\]+: \\*\\*global_ptr_ptr\r\n\r\nOld value = .*\r\nNew value = 7 .*\r\n.*$gdb_prompt $" {
+ # We can not test for <unknown> here because NULL may be readable.
+ # This test does rely on *NULL != 7.
+ pass "next over global_ptr_ptr init"
+ }
+ }
+ gdb_test_multiple "next" "next over global_ptr_ptr buffer set" {
+ -re ".*atchpoint \[0-9\]+: \\*\\*global_ptr_ptr\r\n\r\nOld value = 7 .*\r\nNew value = 9 .*\r\n.*$gdb_prompt $" {
+ pass "next over global_ptr_ptr buffer set"
+ }
+ }
+ gdb_test_multiple "next" "next over global_ptr_ptr pointer advance" {
+ -re ".*atchpoint \[0-9\]+: \\*\\*global_ptr_ptr\r\n\r\nOld value = 9 .*\r\nNew value = 5 .*\r\n.*$gdb_prompt $" {
+ pass "next over global_ptr_ptr pointer advance"
+ }
+ }
+ gdb_test "delete \$global_ptr_ptr_breakpoint_number" ""
}
}
@@ -851,6 +888,17 @@ if [initialize] then {
test_watchpoint_and_breakpoint
test_watchpoint_in_big_blob
+
+ # See above.
+ if [istarget "mips-idt-*"] then {
+ gdb_exit
+ gdb_start
+ gdb_reinitialize_dir $srcdir/$subdir
+ gdb_load $binfile
+ initialize
+ }
+
+ test_constant_watchpoint
}
# Restore old timeout

View File

@ -1,76 +0,0 @@
Index: gdb-7.0.50.20100115/gdb/dwarf2read.c
===================================================================
--- gdb-7.0.50.20100115.orig/gdb/dwarf2read.c 2010-01-15 11:52:59.000000000 +0100
+++ gdb-7.0.50.20100115/gdb/dwarf2read.c 2010-01-15 11:53:57.000000000 +0100
@@ -2529,6 +2529,7 @@ scan_partial_symbols (struct partial_die
add_partial_subprogram (pdi, lowpc, highpc, need_pc, cu);
break;
case DW_TAG_variable:
+ case DW_TAG_constant:
case DW_TAG_typedef:
case DW_TAG_union_type:
if (!pdi->is_declaration)
@@ -2719,6 +2720,7 @@ add_partial_symbol (struct partial_die_i
}
break;
case DW_TAG_variable:
+ case DW_TAG_constant:
if (pdi->is_external)
{
/* Global Variable.
@@ -4770,7 +4772,8 @@ dwarf2_add_field (struct field_info *fip
fip->non_public_fields = 1;
}
}
- else if (die->tag == DW_TAG_member || die->tag == DW_TAG_variable)
+ else if (die->tag == DW_TAG_member || die->tag == DW_TAG_variable
+ || die->tag == DW_TAG_constant)
{
/* C++ static member. */
@@ -5339,7 +5342,8 @@ read_structure_type (struct die_info *di
while (child_die && child_die->tag)
{
if (child_die->tag == DW_TAG_member
- || child_die->tag == DW_TAG_variable)
+ || child_die->tag == DW_TAG_variable
+ || child_die->tag == DW_TAG_constant)
{
/* NOTE: carlton/2002-11-05: A C++ static data member
should be a DW_TAG_member that is a declaration, but
@@ -5459,6 +5463,7 @@ process_structure_scope (struct die_info
{
if (child_die->tag == DW_TAG_member
|| child_die->tag == DW_TAG_variable
+ || child_die->tag == DW_TAG_constant
|| child_die->tag == DW_TAG_inheritance)
{
/* Do nothing. */
@@ -7134,6 +7139,7 @@ load_partial_dies (bfd *abfd, gdb_byte *
&& abbrev->tag != DW_TAG_subprogram
&& abbrev->tag != DW_TAG_lexical_block
&& abbrev->tag != DW_TAG_variable
+ && abbrev->tag != DW_TAG_constant
&& abbrev->tag != DW_TAG_namespace
&& abbrev->tag != DW_TAG_module
&& abbrev->tag != DW_TAG_member)
@@ -7242,6 +7248,7 @@ load_partial_dies (bfd *abfd, gdb_byte *
if (load_all
|| abbrev->tag == DW_TAG_subprogram
|| abbrev->tag == DW_TAG_variable
+ || abbrev->tag == DW_TAG_constant
|| abbrev->tag == DW_TAG_namespace
|| part_die->is_declaration)
{
@@ -9016,6 +9023,11 @@ new_symbol (struct die_info *die, struct
/* Do not add the symbol to any lists. It will be found via
BLOCK_FUNCTION from the blockvector. */
break;
+ case DW_TAG_constant:
+ SYMBOL_TYPE (sym) = make_cv_type (1,
+ TYPE_VOLATILE (SYMBOL_TYPE (sym)),
+ SYMBOL_TYPE (sym), NULL);
+ /* PASSTHRU */
case DW_TAG_variable:
/* Compilation with minimal debug info may result in variables
with missing type entries. Change the misleading `void' type

View File

@ -1,18 +0,0 @@
--- ./gdb/dwarf2read.c 4 May 2008 17:27:01 -0000 1.260
+++ ./gdb/dwarf2read.c 4 May 2008 18:26:20 -0000
@@ -6754,7 +6754,14 @@ dwarf2_attr (struct die_info *die, unsig
for (i = 0; i < die->num_attrs; ++i)
{
if (die->attrs[i].name == name)
- return &die->attrs[i];
+ {
+ /* GCC PR ada/35998 workaround. */
+ if (name == DW_AT_byte_size
+ && DW_UNSND (&die->attrs[i]) == 0xffffffff)
+ return NULL;
+
+ return &die->attrs[i];
+ }
if (die->attrs[i].name == DW_AT_specification
|| die->attrs[i].name == DW_AT_abstract_origin)
spec = &die->attrs[i];

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