Compare commits

...

88 Commits

Author SHA1 Message Date
David Abdurachmanov 71c6f7c3bd
Bootstrap for Python 3.12 riscv64
Signed-off-by: David Abdurachmanov <davidlt@rivosinc.com>
2023-10-17 19:07:51 +03:00
David Abdurachmanov b57080f419
Add support for riscv64
Signed-off-by: David Abdurachmanov <davidlt@rivosinc.com>
2023-10-17 19:02:23 +03:00
David Abdurachmanov cb6c9d2b3b
Merge remote-tracking branch 'up/main' into main-riscv64
Signed-off-by: David Abdurachmanov <davidlt@rivosinc.com>
2023-10-17 19:00:05 +03:00
Guinevere Larsen 87ade3a000 Remove gdb-rhbz1186476-internal-error-unqualified-name-re-set-test.patch
The test was upstreamed back in 2010, but the final file has a different
name, so this was never removed:
https://sourceware.org/legacy-ml/gdb-patches/2010-06/msg00046.html
2023-10-11 16:25:55 +02:00
Kevin Buettner f4fc320c3e Backport upstream commit for overly large gdb-index files
Backport upstream commit which prevents internal error when
generating an overly large gdb-index file.  (RHBZ 1773651, Kevin
Buettner.)
2023-10-02 16:42:52 -07:00
Alexandra Hájková fec73092bb Backport upstream commit d28fbc7197b which fixes RHBZ 2233965 (
CVE-2022-48065).
2023-10-01 11:38:40 +02:00
Kevin Buettner aca26db9ee Delete gdb-6.5-sharedlibrary-path.patch, which was upstreamed in
commit 3ec033fab4a.
2023-09-28 19:13:18 -07:00
Keith Seitz 52db67646d Remove gdb-rhbz1553104-s390x-arch12-test.patch
This patch adds an s390x/arch12 binary file to disassemble, checking
for the appearance of two arch12 insns. Remove this patch in favor
of binutil's version, which is much more complete with much more
coverage.
2023-09-19 09:24:27 -07:00
Alexandra Hájková fb8a11ffe0 Bump release to 13.2-9. 2023-09-18 14:44:24 +02:00
Alexandra Hájková a5080fa18b Backport upstream commit 8f2c64de86b which fixes RHBZ 2233961,
CVE-2022-48064, (Alan Modra).
2023-09-17 13:59:16 +02:00
Keith Seitz ba3a754341 Fix %changelog dates 2023-09-15 10:54:10 -07:00
Keith Seitz 8a61e71975 Migrate to SPDX license expression 2023-09-15 09:25:16 -07:00
Andrew Burgess 22e4ee48ba Bump release. 2023-09-15 16:04:46 +01:00
Andrew Burgess ed8eee7ab5 Backport upstream fix for RHBZ 2237392
Backport upstream commit 54392c4df604f20 to fix an incorrect
obstack allocation that wold lead to memory corruption (RHBZ 2237392).
2023-09-14 22:22:33 +01:00
Andrew Burgess 60fc6a1e0f Backport upstream fix for RHBZ 2237515
Backport upstream commit f96328accde1e63 to fix a potential double
free issue in the debuginfod code (RHBZ 2237515).
2023-09-13 15:31:17 +01:00
Guinevere Larsen 9a4f6d6e4c remove gdb-6.7-testsuite-stable-results.patch
That patch only changed gdb.base/fileio.{c|exp} tests, supposedly to
make them work better when running the test as root. However, that test
only increased the number of fails by 20
2023-08-09 09:31:00 +02:00
Kevin Buettner 7e349a389b Bump release. 2023-08-07 10:40:43 -07:00
Andrew Burgess 899498bb21 Backport upstream fix for RHBZ 2196395
Backport upstream commit f3eee5861743d635 to fix a crash triggered
when debuginfod makes use of particular openssl settings.
2023-08-03 09:29:19 +01:00
Fedora Release Engineering a38bd61a55 Rebuilt for https://fedoraproject.org/wiki/Fedora_39_Mass_Rebuild
Signed-off-by: Fedora Release Engineering <releng@fedoraproject.org>
2023-07-19 20:54:50 +00:00
Python Maint a5a4c9b4bc Rebuilt for Python 3.12 2023-07-07 22:44:43 +02:00
Andrew Burgess dd38aa36ce Remove gdb-test-pid0-core.patch
The patch gdb-test-pid0-core.patch only contains a test.  A similar
test has been merged upstream in commit 8bcead69665, so I propose that
we drop this patch from Fedora, the test will be picked up next time
we rebase.
2023-07-04 14:29:08 +01:00
Mark Wielaard 2b402b25f4 Adjust gdb-add-index.patch to be silent about which gdb
Every invocation of gdb-add-index will print which possible
gdb command will be used. This is because the which command
always prints the name of the command found. Redirect both
stdout and stderr to /dev/null to suppress this when the
output isn't needed.
2023-07-01 18:31:16 +02:00
Kevin Buettner d5dc87ea90 Suppress repeated warnings when loading a core file
Backport upstream changes which prevent repeated warnings from being
printed when loading a core file  (RHBZ 2160211, Lancelot SIX).
2023-06-30 15:20:10 -07:00
Python Maint 57b0ecded6 Rebuilt for Python 3.12 2023-06-28 19:04:31 +02:00
Alexandra Hájková 61b2b883ca Fix sources file. 2023-06-28 10:56:34 +02:00
Alexandra Hájková b85c01223e Rebase to FSF GDB 13.2. 2023-06-25 16:05:18 +02:00
Python Maint 67cb8a0e81 Rebuilt for Python 3.12 2023-06-13 23:26:41 +02:00
Tomáš Hrnčiar 68fb4ae79f Hotpach rpm 4.19 soname version 2023-06-13 15:48:52 +02:00
Python Maint dacd4f346f Bootstrap for Python 3.12 2023-06-13 15:18:09 +02:00
Kevin Buettner f8c2813adc Merge #85 `libipt no longer requires initialization` 2023-06-08 23:36:15 +00:00
Keith Seitz e0c46fa352 Remove gdb-testsuite-readline63-sigint-revert.patch
This patch was removed with the 10.2 rebase (commit 8594aea),
but appears to have been accidentally reintroduced with the 11.1 rebase
(commit 1f618b9).
2023-06-08 15:34:51 -07:00
Keith Seitz dc392f53a2 libipt no longer requires initialization
Since commit d701c95bb9f6db652ada625023bf8bdf54750365, this initialization
patch has not been needed:

  commit d701c95bb9f6db652ada625023bf8bdf54750365
  Author: Markus Metzger <markus.t.metzger@intel.com>
  Date:   Mon Jan 30 17:30:44 2017 +0100

    libipt, init: remove library constructor

    Now that the instruction length decoder no longer needs initialization, we can
    remove the library's constructor.

    Change-Id: Ibaa43be9a8af6e4e4f3a78fd9c84b3589cf33e99
    Signed-off-by: Markus Metzger <markus.t.metzger@intel.com>

I've verified that RHEL7 IPT still works.
2023-06-08 13:07:39 -07:00
Andrew Burgess 5f67b86ed1 Remove gdb-lineno-makeup-test.patch
An equivalent test has been merged upstream in this commit:

  commit ef56b006501ba52b128d4e5f36657ddbf56d22bc
  Date:   Wed May 17 15:14:15 2023 +0100

      gdb/testsuite: test for a function with no line table

As this is only a test there seems little point in backporting this
commit to Fedora -- we'll pick it up next time we rebase.  For now I
suggest that we drop this patch.
2023-05-20 10:24:29 +01:00
Andrew Burgess f71aced2fd Remove gdb-ccache-workaround.patch
This patch adds a work around for an issue with older versions of
ccache -- the line number for macros defined at the compiler command
line was '1' instead of '0'.

Not only is this ccache issue fixed with newer versions of ccache, but
upstream GDB now disables ccache during testing, see commit:

  commit 49b4de64242d4ae035e0e2197837278e33c187fc
  Date:   Thu Sep 15 14:04:20 2016 +0200

      testsuite: Disable ccache

As a result this work around is no longer needed, and this patch can
be dropped.
2023-05-16 16:38:15 +01:00
Andrew Burgess 2a935aa29b Remove gdb-ppc-power7-test.patch
The test added by this patch claims to be a power7 test, however, it
actually appears to test instructions from power7, power8, and power9.

All the instructions tested by this patch are already tested by
upstream tests:

  gdb.arch/powerpc-power7.exp
  gdb.arch/powerpc-power8.exp
  gdb.arch/powerpc-power9.exp

As such this patch is redundant and can be removed.
2023-05-16 15:23:14 +01:00
Alexandra Hájková 7046f4cf6f Remove gdb-rhel5.9-testcase-xlf-var-inside-mod.patch
The patch adds gdb.fortran/xlf-variable.exp test,
the test can only be run on PPC64 machines which
are not supported anymore.
2023-05-06 18:28:28 +02:00
Kevin Buettner 6c805458b5 Restore changes which fix C89-isms in gdb-6.6-buildid-locate-rpm.patch
These changes, originally added to Fedora GDB by Keith Seitz, and
described in the Nov 30 2022 Changelog eentry, were inadvertently lost
during the GDB 13.1 rebase.  Only downstream/local changes were lost -
the remainder of the changes were in the upstream GDB 13.1 sources.
2023-05-04 13:40:32 -07:00
Andrew Burgess e19c0f8fb7 Rewrite (and rename) gdb-libexec-add-index.patch
It has been observed that the changes added by
gdb-libexec-add-index.patch will result in GDB testing hanging when
the tests are being run using an in-tree GDB; that is when using 'make
check'.  One test that is known to fail is gdb.base/with-mf.exp,
though any test that calls the gdb-add-index.sh script will also hang.

The problem is that when the gdb-add-index.sh script is run, the GDB
testsuite passes the GDB command to use within the GDB environment
variable.  For in-tree testing this will be something like:

  GDB="/path/to/gdb -data-directory /path/to/data-directory"

Notice that the environment variable contains both an executable and
an argument.

Our changes to gdb-add-index.sh add this:

  GDB2=/usr/libexec/gdb
  if test -x $GDB2 && ! which $GDB &>/dev/null; then
      GDB=$GDB2
  fi

The problem then is that '-data-directory' is treated as a set of
options to 'which'.  Many of these options are not known to 'which',
but the '-i' option is known.  The documentation of '-i' says:

    --read-alias, -i
        Read aliases from stdin, reporting matching ones on
        stdout. This is useful in combination with using an alias for
        which itself. For example
        alias which=´alias | which -i´.

And here's the problem; this option causes 'which' to read from
stdin.  As the GDB testsuite doesn't send any additional input on
stdin then the which command will never complete, and the test will
hang.

The solution I think is to avoid calling 'which' like this on a user
supplied GDB environment variable.

The changes in the gdb-libexec-add-index.patch were really about what
the _default_ GDB executable should be.  The upstream version of this
script does this:

  GDB=${GDB:=gdb}

That is, the default is just 'gdb'.  However, for RH this is not good
enough.  We want to handle two additional cases, first, when only the
gdb-minimal package is installed, in which case the default should be
/usr/bin/gdb.minimal.  Then we also want to handle the case where the
user doesn't have 'gdb' itself in their $PATH, but does have the 'gdb'
executable installed in /usr/libexec/gdb.

The code as it currently stands also has a problem where, if
gdb.minimal is installed on the machine this will _always_ be used in
preference to the user supplied GDB value (assuming the code worked at
all) this means that when doing in-tree testing we wouldn't actually
be using the in-tree GDB to build the index, which isn't ideal.

So in this commit I propose that we rework our gdb-add-index.sh
changes.  Now, we only use the RH special values in the case that
there is no GDB environment variable set.  I believe this handles all
the required use cases:

  1. When doing in-tree testing GDB environment variable will be set,
  and this will always be used as is, with no special processing,

  2. When gdb-add-index.sh is used and GDB environment variable is not
  set then we will use the first of the following as the default:

    (a) /usr/bin/gdb.minimal if this file exists and is executable,
    (b) The first gdb executable that can be found in the $PATH,
    (c) /usr/libexec/gdb if this file exists and is executable.

While I was changing this patch anyway I've removed the libexec part
of the patch name -- this no longer seemed relevant, I suspect this
related to an older version of this patch.
2023-05-04 15:11:19 +01:00
Kevin Buettner f68e769d70 Backport upstream fix for RHBZ 2192105
Specifically, "Pass const frame_info_ptr reference for
skip_[language_]trampoline". (Mark Wielaard, RHBZ 2192105, build/30413)
2023-05-03 13:32:42 -07:00
Andrew Burgess 7cd90204c9 Remove gdb-opcodes-clflushopt-test.patch
Remove gdb-opcodes-clflushopt-test.patch.  This patch tests that GDB
can disassemble the clflushopt instruction correctly.  Such
disassembly is a feature of libopcode and is covered by the gas
tests i386/x86-64-clflushopt.s and i386/clflushopt.s.  Lets remove
this test from GDB and just rely on the gas tests instead.
2023-05-02 19:15:44 +01:00
Kevin Buettner b1e9fbcc29 Remove gdb-6.7-charsign-test.patch
This patch originally contained some changes to GDB which were
rejected by upstream maintainers.  All that remained was a testcase
which had a number of failures due to the rest of the work not being
present in GDB.
2023-04-29 19:34:05 -07:00
Bruno Larsen 231ea6585a Remove gdb-6.5-bz109921-DW_AT_decl_file-test.patch
This patch only had a test for basic DWARF-2 support, and the test was
already covered by other tests, such as gdb.linespec/linespec.exp
2023-04-25 14:14:49 +02:00
Bruno Larsen d18c2a5bd9 Remove gdb-6.5-last-address-space-byte-test.patch
This patch exercised an edge case for 32-bit systems in
target_xfer_memory, a function that has been removed in 2006.
The test that patch added has been irrelevant for some time.
2023-04-24 15:48:54 +02:00
Alexandra Hájková 9dbae0620d Remove gdb-6.3-bz140532-ppc-unwinding-test.patch.
It adds powerpc-bcl-prologue.exp test which seems
to be a subset of upstream powerpc-prologue.exp
2023-04-13 12:22:36 +02:00
Keith Seitz ff60ea4e26 Backport fix for binutils/29988 2023-04-11 10:32:14 -07:00
Keith Seitz 33590be3ac Backport "Fix crash in inside_main_func"
Resolves: rhbz#2183595
2023-03-31 13:14:15 -07:00
Keith Seitz 8293a5eab7 Use %patch -PNNN
The use of "%patchNNN" to apply patches is deprecated. "%patch -PNNN"
is recommended for maximum compatibility with older versions of `rpm'.

Regenerated all patches and associated files.
2023-03-31 09:53:54 -07:00
Kevin Buettner 45618ff785 Update description and Summary in gdb.spec 2023-03-30 10:01:25 -07:00
Alexandra Hájková 5b461b9481 Update gdb-6.6-buildid-locate.patch to fix RHBZ 2181221. 2023-03-30 16:20:10 +02:00
Andrew Burgess 240ac8eb89 Set distro name using --with-pkgconfig configure option
Instead of placing the distro name (e.g. 'Fedora Linux') into the
version.in file, use the --with-pkgconfig configure option to set the
disto name.

This does change GDB's version output slightly.   Prior to this commit
we might expect to see something like this:

  $ gdb --version
  GNU gdb (GDB) Fedora Linux 13.1-1-fc38
  ...

Now we'll see this:

  $ gdb --version
  GNU gdb (Fedora Linux) 13.1-1-fc38
  ...

Notice that 'Fedora Linux' moved inside the parenthesis.

There are other benefits to this change, the Python gdb.VERSION
string will now contain '13.1-1-fc38' instead of 'Fedora Linux
13.1-1-fc38', this was reported as an issue in this bug:

  https://bugzilla.redhat.com/show_bug.cgi?id=2179554

I've also removed the change to gdb.gdb/selftest.exp as I don't
believe that this was ever being used -- when this test was run we
should have hit an earlier case.

I have added a brand new test that checks our version string.  I've
placed this new test into a separate file, so we should (hopefully)
not have any issues maintaining this as an out of tree test.

For implementation, by default we make use of the %dist_name macro,
however, this is not defined on RHEL 9 or earlier, so to support
reusing this commit on RHEL systems, I also detect the %rhel macro,
and in that case use a hard-coded string.
2023-03-29 16:30:04 +01:00
Kevin Buettner 7403afbaf9 Backport fix for RHBZ 2177655. (Luis Machado) 2023-03-24 19:22:09 -04:00
Bruno Larsen 50c864895c Remove gdb-rhbz1350436-type-printers-error.patch since it is upstreamed.
The test introduced by that patch is now available on upstream commit
83b755117d7a13e75877c3f166dfef1d8b69ec75, and will probably be
backported soon.
2023-03-20 10:18:06 +01:00
Kevin Buettner 92d162c371 Rebase to FSF GDB 13.1
Update gdb-6.3-rh-testversion-20041202.patch.
Update gdb-6.3-bz140532-ppc-unwinding-test.patch.
Update gdb-6.6-buildid-locate.patch.
Update gdb-6.6-buildid-locate-rpm.patch.
Remove 'Recommends: ' line for gcc-gdb-plugin for BZ2149246.
Add 'define _lto_cflags ' to avoid ODR violations.
Add -Wno-stringop-overflow to --enable-gdb-build-warnings to work around
  gcc problem.
2023-03-08 21:42:55 -07:00
Andrew Burgess 17914b3d53 Remove gdb-test-ivy-bridge.patch
The patch 'gdb-test-ivy-bridge.patch' adds some disassembly tests for
various i386/x86-64 instructions.  In fact, the tests added by this
patch are copied directly from gas and should all be covered by
gas/testsuite/gas/i386/i386.exp.

I guess historically, when support for these instructions was first
added, it made sense to have these tests in both GDB and binutils.
But today I think that the testing in binutils is sufficient; if we
really want to validate libopcodes we'd be better off building and
testing gas/binutils as well as GDB.

I propose that we just drop 'gdb-test-ivy-bridge.patch' from the
Fedora GDB tree.
2023-02-12 06:04:03 +00:00
Andrew Burgess d7818464ae Remove gdb-6.5-readline-long-line-crash-test.patch
Remove gdb-6.5-readline-long-line-crash-test.patch, this test is now
upstream in commit:

  commit bb146a79c7d65e2b578e8c3f652cb118c63741e5
  Date:   Thu Feb 9 10:52:47 2023 +0000

      gdb: add test for readline handling very long commands

As this is only a test, I don't see any point in backporting the
upstream commit, we'll pick this up with a later rebase.
2023-02-11 17:21:20 +00:00
Andrew Burgess 7fd1c9cb3f Remove gdb-6.8-bz442765-threaded-exec-test.patch
Following on from the previous commit, this commit remove
gdb-6.8-bz442765-threaded-exec-test.patch.

Like the previous commit, this patch was a testsuite only patch that
extended the test originally added in the previous commit, in order to
do some additional threads/exec related testing.

The issue exposed by this test (Bug bz442765) was present on Fedora 9,
with GDB 6.8-1.fc9.  I have setup a Fedora 9 VM and recreated the
failure with the test in the patch I'm deleting here.

The test does a number of exec's, in each iteration the test binary
runs in a different mode.  However, the failure is triggered when we
have a main thread that spawns a worker thread and then called exec
from the main thread.

Just like the previous commit, this situation already exists in the
upstream test gdb.threads/execl.exp, and, if I copy this upstream test
to my Fedora 9 VM, I can reproduce the failure using this upstream
test.

The test being deleted here does do a number of other permutations of
threading and execing, for example it tests calling exec in a
non-threaded inferior, but this is also tested upstream with things
like gdb.base/foll-exec.exp.

In summary, I don't believe there is anything new added by this test
that is not already covered with existing upstream tests, as such, I
think we should drop this patch.
2023-02-10 15:39:01 +00:00
Andrew Burgess 89f20beb5e Remove gdb-6.3-bz202689-exec-from-pthread-test.patch
Remove gdb-6.3-bz202689-exec-from-pthread-test.patch.  The test
included in this patch is covered by the already upstream test
gdb/testsuite/gdb.threads/execl.exp which was added with this commit:

  commit 49fd4a422bb6152043b2b41a1f734694056dbf3b
  Date:   Thu Jun 5 21:03:59 2008 +0000

Unfortunately, the situation is not as simple as just removing this
patch file.  The later patch gdb-6.8-bz442765-threaded-exec-test.patch
builds on the earlier test to cover additional cases.

So, what I've actually done is remove the first patch, but merged the
test entirely into the second patch.  I think this is a better
reflection of the current situation; the first patch is
redundant (it's test is already covered upstream), while the second
patch has not yet been reviewed, so it _might_ contain a useful test.

To confirm that the upstream test quoted above actually covers this
test case I did the following:

  - Setup a Fedora 3 virtual machine,

  - Built the test from the first patch and confirmed that it failed
    as described in bug bz202689,

  - Copied the upstream execl.exp sources to the virtual machine, and
    built the test binary,

  - Manually ran the test binary just as the .exp script does, and
    confirmed that it failed in the same way as the test from the
    original patch.
2023-02-10 12:33:43 +00:00
Andrew Burgess ad65e1854b Remove gdb-6.6-bz230000-power6-disassembly-test.patch
Remove gdb-6.6-bz230000-power6-disassembly-test.patch as this is now
covered by upstream tests.  This patch added some tests of the Power6
disassembler.  Disassembler tests are better carried in the gas tree.

Upstream commit:

  commit 0fcf99b8ab5ccbde30fa7d36742e670cd4df48ef
  Date:   Mon Jan 30 11:47:31 2023 +0000

      gas/ppc: Additional tests for DFP instructions

Added some new assembler/disassembler tests to the gas tree that
covered all the instructions that were covered by our local patch.
2023-01-31 09:38:56 +00:00
Kevin Buettner 00fe7519d4 Update gdb-6.3-rh-testversion-20041202.patch
...so that $_gdb_major and $_gdb_minor will be obtained correctly.

Also, change define of 'use_guile' from empty (which rpmbuild
complained about) to a value of 1.  I encountered this problem
while attempting to build on F37.
2023-01-27 12:02:27 -07:00
Andrew Burgess a5f9e28701 Remove gdb-6.3-focus-cmd-prev-test.patch this test is now upstream
This upstream commit:

  commit 24f3aded1d42f515527e2de7e8e9e26f0b77c932
  Date:   Tue Dec 20 15:01:29 2022 +0000

      gdb/testsuite/tui: more testing of the 'focus' command

replaces the tests added in gdb-6.3-focus-cmd-prev-test.patch.  As
this patch was only adding a test I see no need to back-port the
upstream commit, we'll pick this up in a later rebase.
2023-01-26 14:50:06 +00:00
Bruno Larsen 6de2f1fd32 Remove gdb-rhbz1398387-tab-crash-test.patch as that test didn't work anymore 2023-01-26 12:40:53 +01:00
Keith Seitz 06da7ee788 NVR bump for failed infra on -14 build. 2023-01-24 10:03:00 -08:00
Kevin Buettner 8d8fb49148 More tweaks to gdb-6.6-buildid-locate-rpm.patch
...in which rpmTag is replaced with rpmDbiTagVal.
2023-01-23 20:12:05 -07:00
Keith Seitz e2df45df10 Backport of backtrace/29374
(Simon Marchi, sw backtrace/29374)
2023-01-23 04:26:24 -08:00
Kevin Buettner b443fb3970 Fixes to get GDB to build again with GCC 13 and Python 3.12
- Backport fix for problems associated with GCC 13's self-move warning.
- Tweak gdb-6.6-buildid-locate-rpm.patch so that running GDB's configure
  script will not error out due to GCC 13's warnings.
- Backport replace deprecated distutils.sysconfig in python-config.
2023-01-20 17:14:37 -07:00
Alexandra Hájková ed2e95dc63 Backport replace deprecated distutils.sysconfig in python-config.
(Lancelot SIX)
2023-01-19 19:33:30 +01:00
Fedora Release Engineering 8e9d3a4cf8 Rebuilt for https://fedoraproject.org/wiki/Fedora_38_Mass_Rebuild
Signed-off-by: Fedora Release Engineering <releng@fedoraproject.org>
2023-01-19 04:29:26 +00:00
Andrew Burgess 69f0c792d6 Back-port fix for RHBZ 2152431
Fixes RHBZ 2152431, an issue where reading a label symbol's value
would cause GDB to crash.  This pulls in two upstream commits
38665d717a3 and c3efaf0afd9 both of which should be in GDB 13 when it
is released.
2022-12-19 17:01:56 +00:00
Keith Seitz 0f5a6ebc3c Remove more unneeded tests and patches
Changes in this commit:
- Remove gdb-bz601887-dwarf4-rh-test.patch
  This adds a very simple test to check whether DWARF4
  is implemented. GDB has been using DWARF4 for several
  years, and the testsuite coverage supercedes this patch.
- Remove gdb-6.6-buildid-locate-rpm-scl.patch
  This patch is applicable only on RHEL6 where .gdb_index
  version 5 is used. In recent GDBs, i.e., all DTS releases,
  this version could only be read with the option
  "use-deprecated-index-sections". RHEL7+ use .gdb_index version 8.
  Since RHEL6 is no longer supported, this is unnecessary.
  Also remove GDB_INDEX_VERIFY_VENDOR references/code from
  gdb-6.6-buildid-locate.patch and gdb.spec
2022-12-16 09:14:19 -08:00
Michal Kolar 4896bb074a plans/ci.fmf: fix deprecated fmf plan attribute 2022-12-15 12:42:14 +00:00
Andrew Burgess b3008271fb remove gdb-fortran-frame-string.patch file
Remove the 'gdb-fortran-frame-string.patch' patch from Fedora GDB.  I
have pushed an upstream test that covers everything that this test
covered, see upstream GDB commit:

  commit 1c01b23603766fbca4ed4dd12fdd710860e6038e
  Date:   Fri Nov 4 14:51:11 2022 +0000

      gdb/fortran/testsuite: print values and types of string variables

As this is just a testsuite patch, I'm not going to backport this to
Fedora GDB, but when we next rebase, we will pick up this test.
2022-12-09 19:14:01 +00:00
Andrew Burgess 056260a609 remove gdb-bfd-aliasing.patch file
The patch 'gdb-bfd-aliasing.patch' is no longer applied as part of the
Fedora GDB build, since this commit to the Fedora GDB repository:

  commit c0cbb1aae4
  Date:   Sat Mar 19 21:26:41 2016 +0100

      .spec cleanup: Drop strict-aliasing GCC bug workaround (from RH BZ 1315191).

I propose that we remove this file from the repository.
2022-12-09 19:12:35 +00:00
Andrew Burgess 47989c5833 gdb-entryval-crash-*.patch files
The three patches:

  gdb-entryval-crash-1of3.patch
  gdb-entryval-crash-2of3.patch
  gdb-entryval-crash-3of3.patch

are not being applied to the Fedora build of GDB, since this commit to
the Fedora GDB repository:

  commit 902c8e5abc
  Date:   Thu Jul 24 20:04:47 2014 +0200

      Rebase to FSF GDB 7.7.91.20140724 (pre-7.8 snapshot).

The contents of the first two were reverting an upstream commit,
which, based on the dialog in the patch files, was done to mask a bug
in a different part of GDB, which I assume is now fixed.

The third patch adds a couple of tests, which are now all upstream,
and passing, I assume these tests covered the issue that was causing
the problem with the first two patches.

Given these patches are not being applied, and the relevant work seems
to be in upstream GDB, I propose we drop these three files from the
repository.
2022-12-09 19:12:35 +00:00
Keith Seitz c09759de79 Disable Guile support on F38+
Resolves: rhbz#2151328
2022-12-07 12:03:23 -08:00
Keith Seitz 7e69ec9711 Remove several unnecessary test patches
- gdb-physname-pr11734-test.patch
- gdb-physname-pr12273-test.patch
These two tests were merged upstream under a different file name.

- gdb-runtest-pie-override.patch
This patch appears unnecessary today. I have tested on all supported
host architectures and detected no regressions. I presume this was
fixed in a different manner through the years.

- gdb-test-expr-cumulative-archer.patch
The patch contains two tests. Both are upstream already.
While one is a little more involved than what landed upstream,
both tests are equivalent. The other test, gdb.cp/namespace-no-imports.exp,
is identical to upstream's gdb.cp/nsnoimports.exp with whitespace
and other trivial changes.
2022-12-05 14:51:32 -08:00
Kevin Buettner 7ca61ebe91 Remove gdb-6.3-threaded-watchpoints2-20050225.patch
The test added by this patch from 2005 is a tweaked verion of the upstream
test gdb.threads/watchthreads.exp from 2004.  (The current version of
gdb.threads/watchthreads.exp has changed somewhat since 2004.)

The tweaks added to the circa 2004 upstream test consist of setting
a breakpoint on thread_function and then continuing to it.  At
that point, initial / runtime values of args[2] and args[3] are
fetched and saved in some TCL variables (which are renamed versions
of args_0 and args_1 in watchthreads.exp).  The rest of the changes
to the tweaked script are mostly related to the renaming related to
args_0 and args_1.  The other major difference is that watchthreads.exp
places hardware watchpoints on args[0] and args[1] whereas the
tweaked test instead watches args[2] and args[3].  However, all
of these initialized to 0.  In the tweaked test, fetching the
initial values when the thread function is first hit should result
in zero values being fetched for args[2] and args[3].

So, in conclusion, the tweaked version of the test doesn't actually
test anything new.  I took a look at old posts / threads from the
gdb-patches mailing list, but I couldn't find a post where Jeff
Johnston included this patch (and an explanation of what it does over
the other patch.)

Since this test doesn't offer anything new/better over what's already
upstream, I'm deleting it.
2022-12-01 19:20:12 -07:00
Andrew Burgess e1f49fc494 disable more features when using 'git format-patch'
In my .gitconfig I have this:

  [format]
          useAutoBase = true
          thread = shallow

As a consequence, when I run generate-patches-from-git-repo.sh I see
two problems, first, I see lots of errors like this:

  fatal: failed to get upstream, if you want to record base commit automatically,
  please use git branch --set-upstream-to to track a remote branch.
  Or you could specify base commit by --base=<base-commit-id> manually

These are caused by the use of the useAutoBase option.

If I disable useAutoBase, and regenerate the patches, I see that every
patch changes, with the addition of a line like this:

  Message-Id: <some message id string here...>

This is caused by the use of the thread option.

Rather than forcing me to not have these settings in my .gitconfig, I
propose that we add --no-base and --no-thread to our invocation of
'git format-patch' in generate-patches-from-git-repo.sh, this fixes
both of the above problems.

With these new options the 'git format-patch' line was getting pretty
long, so I've wrapped it to make it more readable.
2022-12-01 14:13:48 +00:00
Bruno Larsen 46e82ad3b5 Remove gdb-rhbz1325795-framefilters-test.patch. This test doesn't
pass in the curret state, and the code that introduced the original
problem has been changed beyong recognition at this point.
2022-12-01 09:17:51 +01:00
Keith Seitz 910689b88d Updates for "ModernC" initiative
Resolves: rhbz#2143992
2022-11-29 14:19:51 -08:00
Kevin Buettner 3d614802ea Remove gdb-6.3-inheritancetest-20050726.patch. Upstream testcase
gdb.cp/impl-this.exp tests the printing of an instance variable from
an inherited class in the "print c" test.
2022-11-23 14:05:18 -07:00
Kevin Buettner 7de4cb0e83 Remove gdb-6.3-test-movedir-20050125.patch
Upstream test gdb.base/fullname.exp provides coverage for this case
and more.
2022-11-18 12:25:59 -07:00
Keith Seitz 73953d59d4 Constify target_desc and enable LTO
This patch backports the upstream commit to constify
target_desc. This eliminates the problems preventing us
from enabling LTO.
2022-11-03 06:40:16 -07:00
Bruno Larsen eff447ffe1 backport fix to gdb.base/break-main-file-remove-fail 2022-10-18 12:10:01 +02:00
Bruno Larsen 89341dc865 remove gdb-6.3-test-dtor-fix, since it was upstreamed. 2022-10-18 10:46:33 +02:00
Alexandra Hájková d6591abf53 Bump the release number. 2022-10-13 18:04:14 +02:00
Alexandra Hájková e599c1296e gdb.spec: Fix the wrong date in a changelog. 2022-10-11 15:34:49 +02:00
Alexandra Hájková c5ab349836 Backport upstream patch "Add support for readline 8.2". (Andreas Schwab) 2022-10-11 14:58:12 +02:00
Alexandra Hájková 267b55ff0e Update gdb-6.6-buildid-locate.patch to fix RHBZ 2122947. 2022-10-10 15:39:48 +02:00
71 changed files with 1721 additions and 8055 deletions

3
.gitignore vendored
View File

@ -1,4 +1,5 @@
/new-fedora-release
/gdb-libstdc++-v3-python-8.1.1-20180626.tar.xz
/gdb-12.1.tar.xz
/v2.0.5.tar.gz
/gdb-13.1.tar.xz
/gdb-13.2.tar.xz

View File

@ -1,5 +1,4 @@
# Match the Fedora's version info.
#=fedora
# Check distro name is included in the version output.
Patch001: gdb-6.3-rh-testversion-20041202.patch
# Add a wrapper script to GDB that implements pstack using the
@ -7,306 +6,208 @@ Patch001: gdb-6.3-rh-testversion-20041202.patch
#=push
Patch002: gdb-6.3-gstack-20050411.patch
# Test support of multiple destructors just like multiple constructors
#=fedoratest
Patch003: gdb-6.3-test-dtorfix-20050121.patch
# Fix to support executable moving
#=fedoratest
Patch004: gdb-6.3-test-movedir-20050125.patch
# Test sibling threads to set threaded watchpoints for x86 and x86-64
#=fedoratest
Patch005: gdb-6.3-threaded-watchpoints2-20050225.patch
# Verify printing of inherited members test
#=fedoratest
Patch006: 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.
Patch007: 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.
Patch008: gdb-6.5-sharedlibrary-path.patch
Patch003: gdb-6.5-bz185337-resolve-tls-without-debuginfo-v2.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.
Patch009: gdb-6.5-BEA-testsuite.patch
# Testcase for deadlocking on last address space byte; for corrupted backtraces.
#=fedoratest
Patch010: gdb-6.5-last-address-space-byte-test.patch
# Fix readline segfault on excessively long hand-typed lines.
#=fedoratest
Patch011: gdb-6.5-readline-long-line-crash-test.patch
Patch004: gdb-6.5-BEA-testsuite.patch
# Test sideeffects of skipping ppc .so libs trampolines (BZ 218379).
#=fedoratest
Patch012: gdb-6.5-bz218379-ppc-solib-trampoline-test.patch
# Find symbols properly at their original (included) file (BZ 109921).
#=fedoratest
Patch013: gdb-6.5-bz109921-DW_AT_decl_file-test.patch
# Update PPC unwinding patches to their upstream variants (BZ 140532).
#=fedoratest
Patch014: gdb-6.3-bz140532-ppc-unwinding-test.patch
# Testcase for exec() from threaded program (BZ 202689).
#=fedoratest
Patch015: gdb-6.3-bz202689-exec-from-pthread-test.patch
# Testcase for PPC Power6/DFP instructions disassembly (BZ 230000).
#=fedoratest
Patch016: gdb-6.6-bz230000-power6-disassembly-test.patch
Patch005: gdb-6.5-bz218379-ppc-solib-trampoline-test.patch
# Allow running `/usr/bin/gcore' with provided but inaccessible tty (BZ 229517).
#=fedoratest
Patch017: gdb-6.6-bz229517-gcore-without-terminal.patch
Patch006: gdb-6.6-bz229517-gcore-without-terminal.patch
# Avoid too long timeouts on failing cases of "annota1.exp annota3.exp".
#=fedoratest
Patch018: gdb-6.6-testsuite-timeouts.patch
Patch007: gdb-6.6-testsuite-timeouts.patch
# Support for stepping over PPC atomic instruction sequences (BZ 237572).
#=fedoratest
Patch019: gdb-6.6-bz237572-ppc-atomic-sequence-test.patch
Patch008: gdb-6.6-bz237572-ppc-atomic-sequence-test.patch
# Test kernel VDSO decoding while attaching to an i386 process.
#=fedoratest
Patch020: gdb-6.3-attach-see-vdso-test.patch
Patch009: gdb-6.3-attach-see-vdso-test.patch
# Test leftover zombie process (BZ 243845).
#=fedoratest
Patch021: gdb-6.5-bz243845-stale-testing-zombie-test.patch
Patch010: gdb-6.5-bz243845-stale-testing-zombie-test.patch
# New locating of the matching binaries from the pure core file (build-id).
#=push+jan
Patch022: gdb-6.6-buildid-locate.patch
Patch011: 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
Patch023: gdb-6.6-buildid-locate-solib-missing-ids.patch
Patch012: gdb-6.6-buildid-locate-solib-missing-ids.patch
#=push+jan
Patch024: 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.
Patch025: gdb-6.7-charsign-test.patch
Patch013: gdb-6.6-buildid-locate-rpm.patch
# Test PPC hiding of call-volatile parameter register.
#=fedoratest
Patch026: gdb-6.7-ppc-clobbered-registers-O2-test.patch
# Testsuite fixes for more stable/comparable results.
#=fedoratest
Patch027: gdb-6.7-testsuite-stable-results.patch
Patch014: gdb-6.7-ppc-clobbered-registers-O2-test.patch
# Test ia64 memory leaks of the code using libunwind.
#=fedoratest
Patch028: gdb-6.5-ia64-libunwind-leak-test.patch
Patch015: gdb-6.5-ia64-libunwind-leak-test.patch
# Test hiding unexpected breakpoints on intentional step commands.
#=fedoratest
Patch029: gdb-6.5-missed-trap-on-step-test.patch
Patch016: gdb-6.5-missed-trap-on-step-test.patch
# Test gcore memory and time requirements for large inferiors.
#=fedoratest
Patch030: gdb-6.5-gcore-buffer-limit-test.patch
Patch017: gdb-6.5-gcore-buffer-limit-test.patch
# Test GCORE for shmid 0 shared memory mappings.
#=fedoratest: But it is broken anyway, sometimes the case being tested is not reproducible.
Patch031: gdb-6.3-mapping-zero-inode-test.patch
# Test a crash on `focus cmd', `focus prev' commands.
#=fedoratest
Patch032: gdb-6.3-focus-cmd-prev-test.patch
# Test various forms of threads tracking across exec() (BZ 442765).
#=fedoratest
Patch033: gdb-6.8-bz442765-threaded-exec-test.patch
Patch018: gdb-6.3-mapping-zero-inode-test.patch
# Test a crash on libraries missing the .text section.
#=fedoratest
Patch034: gdb-6.5-section-num-fixup-test.patch
Patch019: gdb-6.5-section-num-fixup-test.patch
# Fix resolving of variables at locations lists in prelinked libs (BZ 466901).
#=fedoratest
Patch035: gdb-6.8-bz466901-backtrace-full-prelinked.patch
Patch020: gdb-6.8-bz466901-backtrace-full-prelinked.patch
# New test for step-resume breakpoint placed in multiple threads at once.
#=fedoratest
Patch036: gdb-simultaneous-step-resume-breakpoint-test.patch
Patch021: 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@.*>
Patch037: gdb-core-open-vdso-warning.patch
# Workaround ccache making lineno non-zero for command-line definitions.
#=fedoratest: ccache is rarely used and it is even fixed now.
Patch038: gdb-ccache-workaround.patch
# Testcase for "Do not make up line information" fix by Daniel Jacobowitz.
#=fedoratest
Patch039: gdb-lineno-makeup-test.patch
# Test power7 ppc disassembly.
#=fedoratest
Patch040: gdb-ppc-power7-test.patch
Patch022: gdb-core-open-vdso-warning.patch
# Fix follow-exec for C++ programs (bugreported by Martin Stransky).
#=fedoratest
Patch041: gdb-archer-next-over-throw-cxx-exec.patch
# Backport DWARF-4 support (BZ 601887, Tom Tromey).
#=fedoratest
Patch042: gdb-bz601887-dwarf4-rh-test.patch
Patch023: gdb-archer-next-over-throw-cxx-exec.patch
# Workaround librpm BZ 643031 due to its unexpected exit() calls (BZ 642879).
#=push+jan
Patch043: gdb-6.6-buildid-locate-rpm-librpm-workaround.patch
Patch024: gdb-6.6-buildid-locate-rpm-librpm-workaround.patch
# [delayed-symfile] Test a backtrace regression on CFIs without DIE (BZ 614604).
#=fedoratest
Patch044: gdb-test-bt-cfi-without-die.patch
Patch025: gdb-test-bt-cfi-without-die.patch
# Verify GDB Python built-in function gdb.solib_address exists (BZ # 634108).
#=fedoratest
Patch045: gdb-bz634108-solib_address.patch
# New test gdb.arch/x86_64-pid0-core.exp for kernel PID 0 cores (BZ 611435).
#=fedoratest
Patch046: gdb-test-pid0-core.patch
Patch026: gdb-bz634108-solib_address.patch
# [archer-tromey-delayed-symfile] New test gdb.dwarf2/dw2-aranges.exp.
#=fedoratest
Patch047: gdb-test-dw2-aranges.patch
# [archer-keiths-expr-cumulative+upstream] Import C++ testcases.
#=fedoratest
Patch048: gdb-test-expr-cumulative-archer.patch
# Fix regressions on C++ names resolving (PR 11734, PR 12273, Keith Seitz).
#=fedoratest
Patch049: gdb-physname-pr11734-test.patch
# Fix regressions on C++ names resolving (PR 11734, PR 12273, Keith Seitz).
#=fedoratest
Patch050: gdb-physname-pr12273-test.patch
# Test GDB opcodes/ disassembly of Intel Ivy Bridge instructions (BZ 696890).
#=fedoratest
Patch051: gdb-test-ivy-bridge.patch
# Hack for proper PIE run of the testsuite.
#=fedoratest
Patch052: gdb-runtest-pie-override.patch
Patch027: gdb-test-dw2-aranges.patch
# Workaround PR libc/14166 for inferior calls of strstr.
#=fedoratest: Compatibility with RHELs (unchecked which ones).
Patch053: gdb-glibc-strstr-workaround.patch
# Include testcase for `Unable to see a variable inside a module (XLF)' (BZ 823789).
#=fedoratest
Patch054: gdb-rhel5.9-testcase-xlf-var-inside-mod.patch
Patch028: gdb-glibc-strstr-workaround.patch
# Testcase for `Setting solib-absolute-prefix breaks vDSO' (BZ 818343).
#=fedoratest
Patch055: gdb-rhbz-818343-set-solib-absolute-prefix-testcase.patch
Patch029: 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
Patch056: gdb-rhbz947564-findvar-assertion-frame-failed-testcase.patch
Patch030: gdb-rhbz947564-findvar-assertion-frame-failed-testcase.patch
# Fix 'memory leak in infpy_read_memory()' (RH BZ 1007614)
#=fedoratest
Patch057: gdb-rhbz1007614-memleak-infpy_read_memory-test.patch
Patch031: 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
Patch058: gdb-6.6-buildid-locate-misleading-warning-missing-debuginfo-rhbz981154.patch
# Display Fortran strings in backtraces.
#=fedoratest
Patch059: gdb-fortran-frame-string.patch
Patch032: gdb-6.6-buildid-locate-misleading-warning-missing-debuginfo-rhbz981154.patch
# Testcase for '[SAP] Recursive dlopen causes SAP HANA installer to
# crash.' (RH BZ 1156192).
#=fedoratest
Patch060: gdb-rhbz1156192-recursive-dlopen-test.patch
Patch033: gdb-rhbz1156192-recursive-dlopen-test.patch
# Fix '`catch syscall' doesn't work for parent after `fork' is called'
# (Philippe Waroquiers, RH BZ 1149205).
#=fedoratest
Patch061: 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
Patch062: gdb-rhbz1186476-internal-error-unqualified-name-re-set-test.patch
# Test 'info type-printers' Python error (RH BZ 1350436).
#=fedoratest
Patch063: gdb-rhbz1350436-type-printers-error.patch
Patch034: gdb-rhbz1149205-catch-syscall-after-fork-test.patch
# Fix '[ppc64] and [s390x] wrong prologue skip on -O2 -g code' (Jan
# Kratochvil, RH BZ 1084404).
#=fedoratest
Patch064: gdb-rhbz1084404-ppc64-s390x-wrong-prologue-skip-O2-g-3of3.patch
Patch035: gdb-rhbz1084404-ppc64-s390x-wrong-prologue-skip-O2-g-3of3.patch
# Force libncursesw over libncurses to match the includes (RH BZ 1270534).
#=push+jan
Patch065: gdb-fedora-libncursesw.patch
# Test clflushopt instruction decode (for RH BZ 1262471).
#=fedoratest
Patch066: gdb-opcodes-clflushopt-test.patch
# [SCL] Skip deprecated .gdb_index warning for Red Hat built files (BZ 953585).
#=push+jan
Patch067: gdb-6.6-buildid-locate-rpm-scl.patch
Patch036: gdb-fedora-libncursesw.patch
# [aarch64] Fix hardware watchpoints (RH BZ 1261564).
#=fedoratest
Patch068: gdb-rhbz1261564-aarch64-hw-watchpoint-test.patch
Patch037: gdb-rhbz1261564-aarch64-hw-watchpoint-test.patch
# Add messages suggesting more recent RHEL gdbserver (RH BZ 1321114).
#=fedora
Patch069: gdb-container-rh-pkg.patch
# New test for Python "Cannot locate object file for block" (for RH BZ 1325795).
#=fedoratest
Patch070: gdb-rhbz1325795-framefilters-test.patch
Patch038: gdb-container-rh-pkg.patch
# [dts+el7] [x86*] Bundle linux_perf.h for libipt (RH BZ 1256513).
#=fedora
Patch071: gdb-linux_perf-bundle.patch
Patch039: gdb-linux_perf-bundle.patch
# Fix gdb-headless /usr/bin/ executables (BZ 1390251).
# Update gdb-add-index.sh such that, when the GDB environment
# variable is not set, the script is smarter than just looking for
# 'gdb' in the $PATH.
#
# Also, make /usr/bin/gdb.minimal be the default GDB used, if it's
# present. For rationale, see:
# The actual search order is now: /usr/bin/gdb.minimal, gdb (in the
# $PATH), then /usr/libexec/gdb.
#
# For the rationale of looking for gdb.minimal see:
#
# https://fedoraproject.org/wiki/Changes/Minimal_GDB_in_buildroot
#
#=fedora
Patch072: gdb-libexec-add-index.patch
Patch040: gdb-add-index.patch
# New testcase for: Fix <tab>-completion crash (Gary Benson, RH BZ 1398387).
#=fedoratest
Patch073: gdb-rhbz1398387-tab-crash-test.patch
# Backport "Fix a potential illegal memory access in the BFD library..."
# (Nick Clifton, binutils/29988)
Patch041: gdb-binutils29988-read_indexed_address.patch
# [s390x] Backport arch12 instructions decoding (RH BZ 1553104).
# =fedoratest
Patch074: gdb-rhbz1553104-s390x-arch12-test.patch
# Backport upstream patch fixing a "dangling pointer" build problem
# first seen when building with GCC 13.1.1 20230426 (Red Hat ;; 13.1.1-1).
Patch042: gdb-rhbz2192105-ftbs-dangling-pointer
# Backport two commits, 0ad504dd464 and ea70f941f9b, from Lancelot SIX
# which prevent repeated warnings from being printed while loading a
# core file. (RH BZ 2160211)
Patch043: gdb-rhbz2160211-excessive-core-file-warnings.patch
# Backport upstream commit f3eee5861743d635 to fix a crash triggered
# when debuginfod makes use of particular openssl settings.
Patch044: gdb-bz2196395-debuginfod-legacy-openssl-crash.patch
# Backport upstream commit f96328accde1e63 to fix a potential double
# free issue in the debuginfod code.
Patch045: gdb-bz2237515-debuginfod-double-free.patch
# Backport upstream commit 54392c4df604f20 to fix an incorrect
# obstack allocation that wold lead to memory corruption.
Patch046: gdb-bz2237392-dwarf-obstack-allocation.patch
# Backport PR29922, SHT_NOBITS section
# avoids section size sanity check.
Patch047: gdb-rhbz2233961-CVE-2022-4806.patch
# Backport PR29925, Memory leak in find_abstract_instance
Patch048: gdb-rhbz2233965-memory-leak.patch
# Backport upstream patch which prevents internal error when
# generating a gdb-index file (RH BZ 1773651).
Patch049: gdb-rhbz1773651-gdb-index-internal-error.patch

View File

@ -1,74 +1,49 @@
%patch001 -p1
%patch002 -p1
%patch003 -p1
%patch004 -p1
%patch005 -p1
%patch006 -p1
%patch007 -p1
%patch008 -p1
%patch009 -p1
%patch010 -p1
%patch011 -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
%patch027 -p1
%patch028 -p1
%patch029 -p1
%patch030 -p1
%patch031 -p1
%patch032 -p1
%patch033 -p1
%patch034 -p1
%patch035 -p1
%patch036 -p1
%patch037 -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
%patch -p1 -P001
%patch -p1 -P002
%patch -p1 -P003
%patch -p1 -P004
%patch -p1 -P005
%patch -p1 -P006
%patch -p1 -P007
%patch -p1 -P008
%patch -p1 -P009
%patch -p1 -P010
%patch -p1 -P011
%patch -p1 -P012
%patch -p1 -P013
%patch -p1 -P014
%patch -p1 -P015
%patch -p1 -P016
%patch -p1 -P017
%patch -p1 -P018
%patch -p1 -P019
%patch -p1 -P020
%patch -p1 -P021
%patch -p1 -P022
%patch -p1 -P023
%patch -p1 -P024
%patch -p1 -P025
%patch -p1 -P026
%patch -p1 -P027
%patch -p1 -P028
%patch -p1 -P029
%patch -p1 -P030
%patch -p1 -P031
%patch -p1 -P032
%patch -p1 -P033
%patch -p1 -P034
%patch -p1 -P035
%patch -p1 -P036
%patch -p1 -P037
%patch -p1 -P038
%patch -p1 -P039
%patch -p1 -P040
%patch -p1 -P041
%patch -p1 -P042
%patch -p1 -P043
%patch -p1 -P044
%patch -p1 -P045
%patch -p1 -P046
%patch -p1 -P047
%patch -p1 -P048
%patch -p1 -P049

View File

@ -1 +1 @@
e53a8e8685685c97588f8319d993ea6cd5635e47
662243de0e14a4945555a480dca33c0e677976eb

View File

@ -1,19 +1,8 @@
gdb-6.3-rh-testversion-20041202.patch
gdb-6.3-gstack-20050411.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-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-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
@ -22,53 +11,39 @@ 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-ccache-workaround.patch
gdb-lineno-makeup-test.patch
gdb-ppc-power7-test.patch
gdb-archer-next-over-throw-cxx-exec.patch
gdb-bz601887-dwarf4-rh-test.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-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-rhbz1007614-memleak-infpy_read_memory-test.patch
gdb-6.6-buildid-locate-misleading-warning-missing-debuginfo-rhbz981154.patch
gdb-fortran-frame-string.patch
gdb-rhbz1156192-recursive-dlopen-test.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-fedora-libncursesw.patch
gdb-opcodes-clflushopt-test.patch
gdb-6.6-buildid-locate-rpm-scl.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-rhbz1553104-s390x-arch12-test.patch
gdb-add-index.patch
gdb-binutils29988-read_indexed_address.patch
gdb-rhbz2192105-ftbs-dangling-pointer
gdb-rhbz2160211-excessive-core-file-warnings.patch
gdb-bz2196395-debuginfod-legacy-openssl-crash.patch
gdb-bz2237515-debuginfod-double-free.patch
gdb-bz2237392-dwarf-obstack-allocation.patch
gdb-rhbz2233961-CVE-2022-4806.patch
gdb-rhbz2233965-memory-leak.patch
gdb-rhbz1773651-gdb-index-internal-error.patch

View File

@ -1,320 +0,0 @@
From FEDORA_PATCHES Mon Sep 17 00:00:00 2001
From: Fedora GDB patches <invalid@email.com>
Date: Fri, 27 Oct 2017 21:07:50 +0200
Subject: gdb-6.3-bz140532-ppc-unwinding-test.patch
;; Update PPC unwinding patches to their upstream variants (BZ 140532).
;;=fedoratest
diff --git a/gdb/testsuite/gdb.arch/powerpc-bcl-prologue-asm32.S b/gdb/testsuite/gdb.arch/powerpc-bcl-prologue-asm32.S
new file mode 100644
--- /dev/null
+++ b/gdb/testsuite/gdb.arch/powerpc-bcl-prologue-asm32.S
@@ -0,0 +1,78 @@
+/* This testcase is part of GDB, the GNU debugger.
+
+ Copyright 2007 Free Software Foundation, Inc.
+
+ This program is free software; you can redistribute it and/or modify
+ it under the terms of the GNU General Public License as published by
+ the Free Software Foundation; either version 2 of the License, or
+ (at your option) any later version.
+
+ This program is distributed in the hope that it will be useful,
+ but WITHOUT ANY WARRANTY; without even the implied warranty of
+ MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
+ GNU General Public License for more details.
+
+ You should have received a copy of the GNU General Public License
+ along with this program; if not, write to the Free Software
+ Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA. */
+
+ .section ".text"
+ .align 2
+ .globl func0
+ .type func0, @function
+func0:
+ stwu 1,-16(1)
+ mflr 0
+ stw 31,12(1)
+ stw 0,20(1)
+ mr 31,1
+ bl abort
+ .size func0, .-func0
+ .align 2
+ .globl func1
+ .type func1, @function
+func1:
+ stwu 1,-16(1)
+ mflr 0
+/* 20 = BO = branch always
+ 31 = BI = CR bit (ignored) */
+ bcl 20,31,.Lpie
+.Lpie: stw 31,12(1)
+ stw 0,20(1)
+ mr 31,1
+ bl func0
+ mr 0,3
+ lis 9,var@ha
+ lwz 9,var@l(9)
+ add 0,0,9
+ mr 3,0
+ lwz 11,0(1)
+ lwz 0,4(11)
+ mtlr 0
+ lwz 31,-4(11)
+ mr 1,11
+ blr
+ .size func1, .-func1
+ .section .note.GNU-stack,"",@progbits
+ .ident "GCC: (GNU) 3.4.6 20060404 (Red Hat 3.4.6-8)"
+
+/* Original source file:
+
+#include <stdlib.h>
+
+extern volatile int var;
+
+int func0 (void) __attribute__((__noinline__));
+int func0 (void)
+{
+ abort ();
+ return var;
+}
+
+int func1 (void) __attribute__((__noinline__));
+int func1 (void)
+{
+ return func0 () + var;
+}
+
+*/
diff --git a/gdb/testsuite/gdb.arch/powerpc-bcl-prologue-asm64.S b/gdb/testsuite/gdb.arch/powerpc-bcl-prologue-asm64.S
new file mode 100644
--- /dev/null
+++ b/gdb/testsuite/gdb.arch/powerpc-bcl-prologue-asm64.S
@@ -0,0 +1,98 @@
+/* This testcase is part of GDB, the GNU debugger.
+
+ Copyright 2007 Free Software Foundation, Inc.
+
+ This program is free software; you can redistribute it and/or modify
+ it under the terms of the GNU General Public License as published by
+ the Free Software Foundation; either version 2 of the License, or
+ (at your option) any later version.
+
+ This program is distributed in the hope that it will be useful,
+ but WITHOUT ANY WARRANTY; without even the implied warranty of
+ MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
+ GNU General Public License for more details.
+
+ You should have received a copy of the GNU General Public License
+ along with this program; if not, write to the Free Software
+ Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA. */
+
+ .section ".toc","aw"
+ .section ".text"
+ .align 2
+ .globl func0
+ .section ".opd","aw"
+ .align 3
+func0:
+ .quad .L.func0,.TOC.@tocbase
+ .previous
+ .type func0, @function
+.L.func0:
+ mflr 0
+ std 31,-8(1)
+ std 0,16(1)
+ stdu 1,-128(1)
+ mr 31,1
+ bl abort
+ nop
+ .long 0
+ .byte 0,0,0,1,128,1,0,1
+ .size func0,.-.L.func0
+ .section ".toc","aw"
+.LC1:
+ .tc var[TC],var
+ .section ".text"
+ .align 2
+ .globl func1
+ .section ".opd","aw"
+ .align 3
+func1:
+ .quad .L.func1,.TOC.@tocbase
+ .previous
+ .type func1, @function
+.L.func1:
+ mflr 0
+/* 20 = BO = branch always
+ 31 = BI = CR bit (ignored) */
+ bcl 20,31,.Lpie
+.Lpie: std 31,-8(1)
+ std 0,16(1)
+ stdu 1,-128(1)
+ mr 31,1
+ bl func0
+ mr 11,3
+ ld 9,.LC1@toc(2)
+ lwz 0,0(9)
+ add 0,11,0
+ extsw 0,0
+ mr 3,0
+ ld 1,0(1)
+ ld 0,16(1)
+ mtlr 0
+ ld 31,-8(1)
+ blr
+ .long 0
+ .byte 0,0,0,1,128,1,0,1
+ .size func1,.-.L.func1
+ .section .note.GNU-stack,"",@progbits
+ .ident "GCC: (GNU) 3.4.6 20060404 (Red Hat 3.4.6-8)"
+
+/* Original source file:
+
+#include <stdlib.h>
+
+extern volatile int var;
+
+int func0 (void) __attribute__((__noinline__));
+int func0 (void)
+{
+ abort ();
+ return var;
+}
+
+int func1 (void) __attribute__((__noinline__));
+int func1 (void)
+{
+ return func0 () + var;
+}
+
+*/
diff --git a/gdb/testsuite/gdb.arch/powerpc-bcl-prologue.c b/gdb/testsuite/gdb.arch/powerpc-bcl-prologue.c
new file mode 100644
--- /dev/null
+++ b/gdb/testsuite/gdb.arch/powerpc-bcl-prologue.c
@@ -0,0 +1,29 @@
+/* This testcase is part of GDB, the GNU debugger.
+
+ Copyright 2007 Free Software Foundation, Inc.
+
+ This program is free software; you can redistribute it and/or modify
+ it under the terms of the GNU General Public License as published by
+ the Free Software Foundation; either version 2 of the License, or
+ (at your option) any later version.
+
+ This program is distributed in the hope that it will be useful,
+ but WITHOUT ANY WARRANTY; without even the implied warranty of
+ MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
+ GNU General Public License for more details.
+
+ You should have received a copy of the GNU General Public License
+ along with this program; if not, write to the Free Software
+ Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA. */
+
+/* Force `-fpie' double jump bl->blrl. */
+/* No longer used. */
+volatile int var;
+
+extern int func1 (void);
+
+int main (void)
+{
+ func1 ();
+ return 0;
+}
diff --git a/gdb/testsuite/gdb.arch/powerpc-bcl-prologue.exp b/gdb/testsuite/gdb.arch/powerpc-bcl-prologue.exp
new file mode 100644
--- /dev/null
+++ b/gdb/testsuite/gdb.arch/powerpc-bcl-prologue.exp
@@ -0,0 +1,72 @@
+# Copyright 2006, 2007 Free Software Foundation, Inc.
+
+# This program is free software; you can redistribute it and/or modify
+# it under the terms of the GNU General Public License as published by
+# the Free Software Foundation; either version 2 of the License, or
+# (at your option) any later version.
+#
+# This program is distributed in the hope that it will be useful,
+# but WITHOUT ANY WARRANTY; without even the implied warranty of
+# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
+# GNU General Public License for more details.
+#
+# You should have received a copy of the GNU General Public License
+# along with this program; if not, write to the Free Software
+# Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA.
+
+# Test unwinding fixes of the PPC platform, specifically on the coping with BCL
+# jump of the PIE code.
+
+if ![istarget "powerpc*-*-linux*"] then {
+ verbose "Skipping powerpc-linux prologue tests."
+ return
+}
+
+set testfile "powerpc-bcl-prologue"
+set srcfile1 ${testfile}.c
+set flags "debug"
+if [istarget "powerpc-*"] then {
+ set srcfile2 ${testfile}-asm32.S
+ set flags "$flags additional_flags=-m32"
+} elseif [istarget "powerpc64-*"] then {
+ set srcfile2 ${testfile}-asm64.S
+ set flags "$flags additional_flags=-m64"
+} else {
+ fail "powerpc arch test"
+ return
+}
+set objfile2 [standard_output_file ${testfile}-asm.o]
+set binfile [standard_output_file ${testfile}]
+
+if { [gdb_compile "${srcdir}/${subdir}/${srcfile1} ${srcdir}/${subdir}/${srcfile2}" ${binfile} executable $flags] != ""} {
+ return -1
+}
+
+gdb_exit
+gdb_start
+gdb_reinitialize_dir $srcdir/$subdir
+gdb_load ${binfile}
+
+# We should stop in abort(3).
+
+gdb_run_cmd
+
+gdb_test_multiple {} "continue to abort()" {
+ -re ".*Program received signal SIGABRT,.*$gdb_prompt $" {
+ pass "continue to abort()"
+ }
+}
+
+# Check backtrace:
+# #3 0x0804835f in func0 ()
+# #4 0x0804836a in func1 ()
+# #5 0x0804838c in main ()
+# (gdb)
+# `\\.?' prefixes are needed for ppc64 without `debug' (another bug).
+
+set test "matching unwind"
+gdb_test_multiple "backtrace" $test {
+ -re "\r\n#\[0-9\]\[^\r\n\]* in \\.?func0 \\(\[^\r\n\]*\r\n#\[0-9\]\[^\r\n\]* in \\.?func1 \\(\[^\r\n\]*\r\n#\[0-9\]\[^\r\n\]* in \\.?main \\(\[^\r\n\]*\r\n$gdb_prompt $" {
+ pass $test
+ }
+}
diff --git a/gdb/testsuite/gdb.arch/powerpc-prologue.exp b/gdb/testsuite/gdb.arch/powerpc-prologue.exp
--- a/gdb/testsuite/gdb.arch/powerpc-prologue.exp
+++ b/gdb/testsuite/gdb.arch/powerpc-prologue.exp
@@ -16,8 +16,9 @@
# Test PowerPC prologue analyzer.
# Do not run on AIX (where we won't be able to build the tests without
-# some surgery) or on PowerPC64 (ditto, dot symbols).
-if {[istarget *-*-aix*] || ![istarget "powerpc-*-*"]} then {
+# some surgery). PowerPC64 target would break due to dot symbols but we build
+# there PowerPC32 inferior.
+if {[istarget *-*-aix*] || ![istarget "powerpc*-*-*"]} then {
verbose "Skipping PowerPC prologue tests."
return
}

View File

@ -1,109 +0,0 @@
From FEDORA_PATCHES Mon Sep 17 00:00:00 2001
From: Jan Kratochvil <jan.kratochvil@redhat.com>
Date: Fri, 27 Oct 2017 21:07:50 +0200
Subject: gdb-6.3-bz202689-exec-from-pthread-test.patch
;; Testcase for exec() from threaded program (BZ 202689).
;;=fedoratest
2007-01-17 Jan Kratochvil <jan.kratochvil@redhat.com>
* gdb.threads/threaded-exec.exp, gdb.threads/threaded-exec.c: New files.
diff --git a/gdb/testsuite/gdb.threads/threaded-exec.c b/gdb/testsuite/gdb.threads/threaded-exec.c
new file mode 100644
--- /dev/null
+++ b/gdb/testsuite/gdb.threads/threaded-exec.c
@@ -0,0 +1,46 @@
+/* This testcase is part of GDB, the GNU debugger.
+
+ Copyright 2007 Free Software Foundation, Inc.
+
+ This program is free software; you can redistribute it and/or modify
+ it under the terms of the GNU General Public License as published by
+ the Free Software Foundation; either version 2 of the License, or
+ (at your option) any later version.
+
+ This program is distributed in the hope that it will be useful,
+ but WITHOUT ANY WARRANTY; without even the implied warranty of
+ MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
+ GNU General Public License for more details.
+
+ You should have received a copy of the GNU General Public License
+ along with this program; if not, write to the Free Software
+ Foundation, Inc., 59 Temple Place - Suite 330,
+ Boston, MA 02111-1307, USA. */
+
+#include <stddef.h>
+#include <pthread.h>
+#include <assert.h>
+#include <stdlib.h>
+#include <unistd.h>
+
+
+static void *
+threader (void *arg)
+{
+ return NULL;
+}
+
+int
+main (void)
+{
+ pthread_t t1;
+ int i;
+
+ i = pthread_create (&t1, NULL, threader, (void *) NULL);
+ assert (i == 0);
+ i = pthread_join (t1, NULL);
+ assert (i == 0);
+
+ execl ("/bin/true", "/bin/true", NULL);
+ abort ();
+}
diff --git a/gdb/testsuite/gdb.threads/threaded-exec.exp b/gdb/testsuite/gdb.threads/threaded-exec.exp
new file mode 100644
--- /dev/null
+++ b/gdb/testsuite/gdb.threads/threaded-exec.exp
@@ -0,0 +1,41 @@
+# threaded-exec.exp -- Check reset of the tracked threads on exec*(2)
+# Copyright (C) 2007 Free Software Foundation, Inc.
+
+# This program is free software; you can redistribute it and/or modify
+# it under the terms of the GNU General Public License as published by
+# the Free Software Foundation; either version 2 of the License, or
+# (at your option) any later version.
+#
+# This program is distributed in the hope that it will be useful,
+# but WITHOUT ANY WARRANTY; without even the implied warranty of
+# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
+# GNU General Public License for more details.
+#
+# You should have received a copy of the GNU General Public License
+# along with this program; if not, write to the Free Software
+# Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA.
+
+# Please email any bugs, comments, and/or additions to this file to:
+# bug-gdb@prep.ai.mit.edu
+
+set testfile threaded-exec
+set srcfile ${testfile}.c
+set binfile [standard_output_file ${testfile}]
+
+if {[gdb_compile_pthreads "${srcdir}/${subdir}/${srcfile}" "${binfile}" executable []] != "" } {
+ return -1
+}
+
+gdb_exit
+gdb_start
+gdb_reinitialize_dir $srcdir/$subdir
+
+gdb_load ${binfile}
+
+gdb_run_cmd
+
+gdb_test_multiple {} "Program exited" {
+ -re "\r\n\\\[Inferior .* exited normally\\\]\r\n$gdb_prompt $" {
+ pass "Program exited"
+ }
+}

View File

@ -1,53 +0,0 @@
From FEDORA_PATCHES Mon Sep 17 00:00:00 2001
From: Fedora GDB patches <invalid@email.com>
Date: Fri, 27 Oct 2017 21:07:50 +0200
Subject: gdb-6.3-focus-cmd-prev-test.patch
;; Test a crash on `focus cmd', `focus prev' commands.
;;=fedoratest
diff --git a/gdb/testsuite/gdb.base/focus-cmd-prev.exp b/gdb/testsuite/gdb.base/focus-cmd-prev.exp
new file mode 100644
--- /dev/null
+++ b/gdb/testsuite/gdb.base/focus-cmd-prev.exp
@@ -0,0 +1,40 @@
+# Copyright 2008 Free Software Foundation, Inc.
+
+# This program is free software; you can redistribute it and/or modify
+# it under the terms of the GNU General Public License as published by
+# the Free Software Foundation; either version 2 of the License, or
+# (at your option) any later version.
+#
+# This program is distributed in the hope that it will be useful,
+# but WITHOUT ANY WARRANTY; without even the implied warranty of
+# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
+# GNU General Public License for more details.
+#
+# You should have received a copy of the GNU General Public License
+# along with this program; if not, write to the Free Software
+# Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA.
+
+if $tracelevel then {
+ strace $tracelevel
+}
+
+gdb_exit
+gdb_start
+
+# Do not use gdb_test or \r\n there since:
+# commit d7e747318f4d04af033f16325f9b6d74f67079ec
+# Eliminate make_cleanup_ui_file_delete / make ui_file a class hierarchy
+
+set test "focus cmd"
+gdb_test_multiple $test $test {
+ -re "$gdb_prompt $" {
+ pass $test
+ }
+}
+
+set test "focus prev"
+gdb_test_multiple $test $test {
+ -re "$gdb_prompt $" {
+ pass $test
+ }
+}

View File

@ -16,7 +16,7 @@ Subject: gdb-6.3-gstack-20050411.patch
diff --git a/gdb/Makefile.in b/gdb/Makefile.in
--- a/gdb/Makefile.in
+++ b/gdb/Makefile.in
@@ -1767,7 +1767,7 @@ info install-info clean-info dvi pdf install-pdf html install-html: force
@@ -2011,7 +2011,7 @@ info install-info clean-info dvi pdf install-pdf html install-html: force
install: all
@$(MAKE) $(FLAGS_TO_PASS) install-only
@ -25,7 +25,7 @@ diff --git a/gdb/Makefile.in b/gdb/Makefile.in
transformed_name=`t='$(program_transform_name)'; \
echo gdb | sed -e "$$t"` ; \
if test "x$$transformed_name" = x; then \
@@ -1816,7 +1816,25 @@ install-guile:
@@ -2061,7 +2061,25 @@ install-guile:
install-python:
$(SHELL) $(srcdir)/../mkinstalldirs $(DESTDIR)$(GDB_DATADIR)/python/gdb
@ -52,7 +52,7 @@ diff --git a/gdb/Makefile.in b/gdb/Makefile.in
transformed_name=`t='$(program_transform_name)'; \
echo gdb | sed -e $$t` ; \
if test "x$$transformed_name" = x; then \
@@ -1847,6 +1865,18 @@ uninstall: force $(CONFIG_UNINSTALL)
@@ -2092,6 +2110,18 @@ uninstall: force $(CONFIG_UNINSTALL)
rm -f $(DESTDIR)$(bindir)/$$transformed_name
@$(MAKE) DO=uninstall "DODIRS=$(SUBDIRS)" $(FLAGS_TO_PASS) subdir_do

View File

@ -1,160 +0,0 @@
From FEDORA_PATCHES Mon Sep 17 00:00:00 2001
From: Jeff Johnston <jjohnstn@redhat.com>
Date: Fri, 27 Oct 2017 21:07:50 +0200
Subject: gdb-6.3-inheritancetest-20050726.patch
;; Verify printing of inherited members test
;;=fedoratest
2005-07-26 Jeff Johnston <jjohnstn@redhat.com>
* gdb.cp/b146835.exp: New testcase.
* gdb.cp/b146835.cc: Ditto.
* gdb.cp/b146835b.cc: Ditto.
* gdb.cp/b146835.h: Ditto.
diff --git a/gdb/testsuite/gdb.cp/b146835.cc b/gdb/testsuite/gdb.cp/b146835.cc
new file mode 100644
--- /dev/null
+++ b/gdb/testsuite/gdb.cp/b146835.cc
@@ -0,0 +1,31 @@
+#include "b146835.h"
+#include <iostream>
+
+class F : public C {
+
+protected:
+
+ virtual void funcA (unsigned long a, B *b);
+ virtual void funcB (E *e);
+ virtual void funcC (unsigned long x, bool y);
+
+ char *s1, *s2;
+ bool b1;
+ int k;
+
+public:
+ void foo() {
+ std::cout << "foo" << std::endl;
+ }
+};
+
+
+void F::funcA (unsigned long a, B *b) {}
+void F::funcB (E *e) {}
+void F::funcC (unsigned long x, bool y) {}
+
+int main()
+{
+ F f;
+ f.foo();
+}
diff --git a/gdb/testsuite/gdb.cp/b146835.exp b/gdb/testsuite/gdb.cp/b146835.exp
new file mode 100644
--- /dev/null
+++ b/gdb/testsuite/gdb.cp/b146835.exp
@@ -0,0 +1,47 @@
+# This testcase is part of GDB, the GNU debugger.
+
+# Copyright 2005 Free Software Foundation, Inc.
+
+# This program is free software; you can redistribute it and/or modify
+# it under the terms of the GNU General Public License as published by
+# the Free Software Foundation; either version 2 of the License, or
+# (at your option) any later version.
+#
+# This program is distributed in the hope that it will be useful,
+# but WITHOUT ANY WARRANTY; without even the implied warranty of
+# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
+# GNU General Public License for more details.
+#
+# You should have received a copy of the GNU General Public License
+# along with this program; if not, write to the Free Software
+# Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA.
+
+# Check that GDB can properly print an inherited member variable
+# (Bugzilla 146835)
+
+set testfile "b146835"
+set srcfile ${testfile}.cc
+set srcfile2 ${testfile}b.cc
+set binfile [standard_output_file ${testfile}]
+if {[gdb_compile "${srcdir}/${subdir}/${srcfile} ${srcdir}/${subdir}/${srcfile2}" "${binfile}" executable {debug c++}] != "" } {
+ return -1
+}
+
+gdb_exit
+gdb_start
+gdb_reinitialize_dir $srcdir/$subdir
+gdb_load ${binfile}
+
+#
+# Run to `main' where we begin our tests.
+#
+
+if ![runto_main] then {
+ gdb_suppress_tests
+}
+
+gdb_test "break 'F::foo()'" ""
+gdb_continue_to_breakpoint "First line foo"
+
+# Verify that we can access the inherited member d
+gdb_test "p d" " = \\(D \\*\\) *0x0" "Verify inherited member d accessible"
diff --git a/gdb/testsuite/gdb.cp/b146835.h b/gdb/testsuite/gdb.cp/b146835.h
new file mode 100644
--- /dev/null
+++ b/gdb/testsuite/gdb.cp/b146835.h
@@ -0,0 +1,36 @@
+
+class A {
+
+protected:
+
+ virtual void funcA (unsigned long a, class B *b) = 0;
+ virtual void funcB (class E *e) = 0;
+ virtual void funcC (unsigned long x, bool y) = 0;
+
+ void funcD (class E *e, class D* d);
+ virtual void funcE (E *e, D *d);
+ virtual void funcF (unsigned long x, D *d);
+};
+
+
+class C : public A {
+
+protected:
+
+ int x;
+ class K *k;
+ class H *h;
+
+ D *d;
+
+ class W *w;
+ class N *n;
+ class L *l;
+ unsigned long *r;
+
+public:
+
+ C();
+ int z (char *s);
+ virtual ~C();
+};
diff --git a/gdb/testsuite/gdb.cp/b146835b.cc b/gdb/testsuite/gdb.cp/b146835b.cc
new file mode 100644
--- /dev/null
+++ b/gdb/testsuite/gdb.cp/b146835b.cc
@@ -0,0 +1,11 @@
+#include "b146835.h"
+
+C::C() { d = 0; x = 3; }
+
+int C::z (char *s) { return 0; }
+
+C::~C() {}
+
+void A::funcD (class E *e, class D *d) {}
+void A::funcE (E *e, D *d) {}
+void A::funcF (unsigned long x, D *d) {}

View File

@ -1,38 +1,34 @@
From FEDORA_PATCHES Mon Sep 17 00:00:00 2001
From: Elena Zannoni <ezannoni@redhat.com>
From: Andrew Burgess <aburgess@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
;; Check distro name is included in the version output.
2003-02-24 Elena Zannoni <ezannoni@redhat.com>
* gdb.gdb/selftest.exp: Add matching on specific Red Hat only version
string.
diff --git a/gdb/testsuite/gdb.gdb/selftest.exp b/gdb/testsuite/gdb.gdb/selftest.exp
--- a/gdb/testsuite/gdb.gdb/selftest.exp
+++ b/gdb/testsuite/gdb.gdb/selftest.exp
@@ -53,6 +53,9 @@ proc test_with_self { } {
-re ".\[0-9\]+ = +.+ +0x.*\[0-9.\]+.*$gdb_prompt $" {
pass "printed version with cast"
}
+ -re ".\[0-9\]+ = .(Fedora|Red Hat Enterprise Linux) \[\\(\\)0-9.a-z\\-\]+.*$gdb_prompt $" {
+ pass "printed version Fedora or Red Hat Enterprise Linux only"
+ }
}
# start the "xgdb" process
diff --git a/gdb/top.c b/gdb/top.c
--- a/gdb/top.c
+++ b/gdb/top.c
@@ -2234,7 +2234,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));
}
diff --git a/gdb/testsuite/gdb.base/fedora-version.exp b/gdb/testsuite/gdb.base/fedora-version.exp
new file mode 100644
--- /dev/null
+++ b/gdb/testsuite/gdb.base/fedora-version.exp
@@ -0,0 +1,22 @@
+# Copyright 2023 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/>.
+
+# Start with a fresh gdb
+clean_restart
+
+# Check the version string contains either the Fedora or RHEL distro
+# name, and that the version number looks roughly correct in format.
+gdb_test "show version" \
+ "GNU gdb \\((Fedora Linux|Red Hat Enterprise Linux)\\) \[0-9\]+\\.\[0-9\]+-\[0-9\]+.*"

View File

@ -1,247 +0,0 @@
From FEDORA_PATCHES Mon Sep 17 00:00:00 2001
From: Fedora GDB patches <invalid@email.com>
Date: Fri, 27 Oct 2017 21:07:50 +0200
Subject: gdb-6.3-test-dtorfix-20050121.patch
;; Test support of multiple destructors just like multiple constructors
;;=fedoratest
diff --git a/gdb/testsuite/gdb.cp/constructortest.cc b/gdb/testsuite/gdb.cp/constructortest.cc
new file mode 100644
--- /dev/null
+++ b/gdb/testsuite/gdb.cp/constructortest.cc
@@ -0,0 +1,99 @@
+/* This testcase is part of GDB, the GNU debugger.
+
+ Copyright 2005 Free Software Foundation, Inc.
+
+ This program is free software; you can redistribute it and/or modify
+ it under the terms of the GNU General Public License as published by
+ the Free Software Foundation; either version 2 of the License, or
+ (at your option) any later version.
+
+ This program is distributed in the hope that it will be useful,
+ but WITHOUT ANY WARRANTY; without even the implied warranty of
+ MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
+ GNU General Public License for more details.
+
+ You should have received a copy of the GNU General Public License
+ along with this program; if not, write to the Free Software
+ Foundation, Inc., 59 Temple Place - Suite 330,
+ Boston, MA 02111-1307, USA. */
+
+class A
+{
+ public:
+ A();
+ ~A();
+ int k;
+ private:
+ int x;
+};
+
+class B: public A
+{
+ public:
+ B();
+ private:
+ int y;
+};
+
+/* C and D are for the $delete destructor. */
+
+class C
+{
+ public:
+ C();
+ virtual ~C();
+ private:
+ int x;
+};
+
+class D: public C
+{
+ public:
+ D();
+ private:
+ int y;
+};
+
+int main(int argc, char *argv[])
+{
+ A* a = new A;
+ B* b = new B;
+ D* d = new D;
+ delete a;
+ delete b;
+ delete d;
+ return 0;
+}
+
+A::A() /* Constructor A */
+{
+ x = 1; /* First line A */
+ k = 4; /* Second line A */
+}
+
+A::~A() /* Destructor A */
+{
+ x = 3; /* First line ~A */
+ k = 6; /* Second line ~A */
+}
+
+B::B()
+{
+ y = 2; /* First line B */
+ k = 5;
+}
+
+C::C() /* Constructor C */
+{
+ x = 1; /* First line C */
+}
+
+C::~C() /* Destructor C */
+{
+ x = 3; /* First line ~C */
+}
+
+D::D()
+{
+ y = 2; /* First line D */
+}
diff --git a/gdb/testsuite/gdb.cp/constructortest.exp b/gdb/testsuite/gdb.cp/constructortest.exp
new file mode 100644
--- /dev/null
+++ b/gdb/testsuite/gdb.cp/constructortest.exp
@@ -0,0 +1,130 @@
+# This testcase is part of GDB, the GNU debugger.
+
+# Copyright 2005, 2007 Free Software Foundation, Inc.
+
+# This program is free software; you can redistribute it and/or modify
+# it under the terms of the GNU General Public License as published by
+# the Free Software Foundation; either version 2 of the License, or
+# (at your option) any later version.
+#
+# This program is distributed in the hope that it will be useful,
+# but WITHOUT ANY WARRANTY; without even the implied warranty of
+# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
+# GNU General Public License for more details.
+#
+# You should have received a copy of the GNU General Public License
+# along with this program; if not, write to the Free Software
+# Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA.
+
+# Check that GDB can break at multiple forms of constructors.
+
+set testfile "constructortest"
+set srcfile ${testfile}.cc
+set binfile [standard_output_file ${testfile}]
+# PIE is required for testing proper BREAKPOINT_RE_SET of the multiple-PC
+# breakpoints.
+if {[gdb_compile "${srcdir}/${subdir}/${srcfile}" "${binfile}" executable {debug c++ "additional_flags=-fpie -pie"}] != "" } {
+ return -1
+}
+
+gdb_exit
+gdb_start
+gdb_reinitialize_dir $srcdir/$subdir
+gdb_load ${binfile}
+
+#
+# Run to `main' where we begin our tests.
+#
+
+if ![runto_main] then {
+ gdb_suppress_tests
+}
+
+# Break on the various forms of the A::A constructor.
+# " (2 locations)" is displayed depending on G++ version.
+gdb_test "break A\:\:A" "Breakpoint 2 at .*" "breaking on A::A"
+
+# Verify that we break for the A constructor two times
+# Once for new A and once for new B
+gdb_continue_to_breakpoint "First line A"
+gdb_test "bt" "#0.*A.*#1.*main.*" "Verify in in-charge A::A"
+gdb_continue_to_breakpoint "First line A"
+gdb_test "bt" "#0.*A.*#1.*B.*#2.*main.*" "Verify in not-in-charge A::A"
+
+# Now do the same for destructors
+gdb_test "break 'A::~A()'" ""
+
+# Verify that we break for the A destructor two times
+# Once for delete a and once for delete b
+gdb_continue_to_breakpoint "First line ~A"
+gdb_test "bt" "#0.*~A.*#1.*main.*" "Verify in in-charge A::~A"
+gdb_continue_to_breakpoint "First line ~A"
+gdb_test "bt" "#0.*~A.*#1.*~B.*#2.*main.*" "Verify in not-in-charge A::~A"
+
+
+# Verify that we can break by line number in a constructor and find
+# both occurrences
+runto_main
+gdb_test "break 'A::A()'" "" "break in constructor A 2"
+gdb_continue_to_breakpoint "First line A"
+set second_line [gdb_get_line_number "Second line A"]
+# " (2 locations)" is displayed depending on G++ version.
+gdb_test "break $second_line" "Breakpoint .*, line $second_line\\..*" "break by line in constructor"
+gdb_continue_to_breakpoint "Second line A"
+gdb_test "bt" "#0.*A.*#1.*main.*" "Verify in in-charge A::A second line"
+gdb_continue_to_breakpoint "Second line A"
+gdb_test "bt" "#0.*A.*#1.*B.*#2.*main.*" "Verify in not-in-charge A::A second line"
+
+# Verify that we can break by line number in a destructor and find
+# both occurrences
+gdb_test "break 'A::~A()'" "" "break in constructor ~A 2"
+gdb_continue_to_breakpoint "First line ~A"
+set second_line_dtor [gdb_get_line_number "Second line ~A"]
+# " (2 locations)" is displayed depending on G++ version.
+gdb_test "break $second_line_dtor" "Breakpoint .*, line $second_line_dtor\\..*" "break by line in destructor"
+gdb_continue_to_breakpoint "Second line ~A"
+gdb_test "bt" "#0.*A.*#1.*main.*" "Verify in in-charge A::~A second line"
+# FIXME: Analyse this case better.
+gdb_continue_to_breakpoint "Second line ~A"
+gdb_test "bt" "#0.*A.*#1.*main.*" "Verify in A::~A second line #2"
+gdb_continue_to_breakpoint "Second line ~A"
+gdb_test "bt" "#0.*A.*#1.*B.*#2.*main.*" "Verify in not-in-charge A::~A second line"
+
+
+# Test now the $delete destructors.
+
+gdb_load ${binfile}
+runto_main
+
+set first_line_dtor [gdb_get_line_number "First line ~C"]
+set define_line_dtor [gdb_get_line_number "Destructor C"]
+# Break on the various forms of the C::~C destructor
+# " ([23] locations)" is displayed depending on G++ version.
+gdb_test "break C\:\:~C" "Breakpoint .*: C::~C\\. \\(2 locations\\)" "breaking on C::~C"
+gdb_continue_to_breakpoint "First line ~C"
+
+# Verify that we can break by line number in a destructor and find
+# the $delete occurence
+
+gdb_load ${binfile}
+delete_breakpoints
+
+# " (3 locations)" is displayed depending on G++ version.
+gdb_test "break $first_line_dtor" "Breakpoint .*, line $first_line_dtor\\..*" "break by line in destructor"
+
+# Run to `main' where we begin our tests.
+# Set the breakpoints first to test PIE multiple-PC BREAKPOINT_RE_SET.
+# RUNTO_MAIN or RUNTO MAIN are not usable here as it runs DELETE_BREAKPOINTS.
+
+if ![gdb_breakpoint main] {
+ gdb_suppress_tests
+}
+gdb_run_cmd
+set test "running to main"
+gdb_test_multiple "" $test {
+ -re "Breakpoint \[0-9\]*, main .*$gdb_prompt $" {
+ pass $test
+ }
+}
+
+gdb_continue_to_breakpoint "First line ~C"

View File

@ -1,101 +0,0 @@
From FEDORA_PATCHES Mon Sep 17 00:00:00 2001
From: Elena Zannoni <ezannoni@redhat.com>
Date: Fri, 27 Oct 2017 21:07:50 +0200
Subject: gdb-6.3-test-movedir-20050125.patch
;; Fix to support executable moving
;;=fedoratest
2005-01-25 Elena Zannoni <ezannoni@redhat.com>
* gdb.base/move-dir.exp: New test.
* gdb.base/move-dir.c: Ditto.
* gdb.base/move-dir.h: Ditto.
diff --git a/gdb/testsuite/gdb.base/move-dir.c b/gdb/testsuite/gdb.base/move-dir.c
new file mode 100644
--- /dev/null
+++ b/gdb/testsuite/gdb.base/move-dir.c
@@ -0,0 +1,9 @@
+#include <stdio.h>
+#include <stdlib.h>
+#include "move-dir.h"
+
+int main() {
+ const char* hw = "hello world.";
+ printf ("%s\n", hw);;
+ other();
+}
diff --git a/gdb/testsuite/gdb.base/move-dir.exp b/gdb/testsuite/gdb.base/move-dir.exp
new file mode 100644
--- /dev/null
+++ b/gdb/testsuite/gdb.base/move-dir.exp
@@ -0,0 +1,57 @@
+# Copyright 2005
+# Free Software Foundation, Inc.
+
+# This program is free software; you can redistribute it and/or modify
+# it under the terms of the GNU General Public License as published by
+# the Free Software Foundation; either version 2 of the License, or
+# (at your option) any later version.
+#
+# This program is distributed in the hope that it will be useful,
+# but WITHOUT ANY WARRANTY; without even the implied warranty of
+# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
+# GNU General Public License for more details.
+#
+# You should have received a copy of the GNU General Public License
+# along with this program; if not, write to the Free Software
+# Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA.
+
+set testfile "move-dir"
+set srcfile ${testfile}.c
+set incfile ${testfile}.h
+set binfile [standard_output_file ${testfile}]
+
+set testdir [standard_output_file incdir]
+
+remote_exec build "mkdir $testdir"
+remote_exec build "cp ${srcdir}/${subdir}/${srcfile} [standard_output_file ${srcfile}]"
+remote_exec build "cp ${srcdir}/${subdir}/${incfile} [standard_output_file ${incfile}]"
+
+set additional_flags "additional_flags=-I${subdir}/incdir"
+
+if { [gdb_compile [standard_output_file ${srcfile}] "${binfile}" executable [list debug $additional_flags]] != "" } {
+ gdb_suppress_entire_file "Testcase compile failed, so all tests in this file will automatically fail."
+}
+
+# Create and source the file that provides information about the compiler
+# used to compile the test case.
+
+if [get_compiler_info ${binfile}] {
+ return -1;
+}
+
+
+set oldtimeout $timeout
+set timeout [expr "$timeout + 60"]
+
+# Start with a fresh gdb.
+
+gdb_exit
+gdb_start
+gdb_test "cd ../.." "" ""
+gdb_load ${binfile}
+gdb_test "list main" ".*hw.*other.*" "found main"
+gdb_test "list other" ".*ostring.*" "found include file"
+
+
+set timeout $oldtimeout
+return 0
diff --git a/gdb/testsuite/gdb.base/move-dir.h b/gdb/testsuite/gdb.base/move-dir.h
new file mode 100644
--- /dev/null
+++ b/gdb/testsuite/gdb.base/move-dir.h
@@ -0,0 +1,6 @@
+#include <stdlib.h>
+
+void other() {
+ const char* ostring = "other";
+ printf ("%s\n", ostring);;
+}

View File

@ -1,253 +0,0 @@
From FEDORA_PATCHES Mon Sep 17 00:00:00 2001
From: Jeff Johnston <jjohnstn@redhat.com>
Date: Fri, 27 Oct 2017 21:07:50 +0200
Subject: gdb-6.3-threaded-watchpoints2-20050225.patch
;; Test sibling threads to set threaded watchpoints for x86 and x86-64
;;=fedoratest
2005-02-28 Jeff Johnston <jjohnstn@redhat.com>
* config/i386/nm-linux.h: Change dr register routines to
accept a ptid_t first argument. Change all calling macros
to default the inferior_ptid for the first argument.
(i386_linux_insert_watchpoint): New prototype.
(i386_linux_remove_watchpoint, i386_linux_insert_hw_breakpoint): Ditto.
(i386_linux_remove_hw_breakpoint): Ditto.
(target_insert_watchpoint, target_remove_watchpoint): Undef and
override.
(target_insert_hw_breakpoint, target_remove_hw_breakpoint): Ditto.
* config/i386/nm-linux64.h: Ditto except add amd64 versions of
the watchpoint/hw-breakpoint insert/remove routines.
* i386-nat.c: Include "inferior.h" to define inferior_ptid.
* i386-linux-nat.c: Change all dr get/set routines to accept
ptid_t as first argument and to use this argument to determine
the tid for PTRACE.
(i386_linux_set_debug_regs_for_thread): New function.
(i386_linux_sync_debug_registers_callback): Ditto.
(i386_linux_sync_debug_registers_across_threads): Ditto.
(i386_linux_insert_watchpoint, i386_linux_remove_watchpoint): Ditto.
(i386_linux_hw_breakpoint, i386_linux_remove_hw_breakpoint): Ditto.
(i386_linux_new_thread): Ditto.
(_initialize_i386_linux_nat): Ditto.
* amd64-linux-nat.c: Change all dr get/set routines to accept
ptid_t as first argument and to use this argument to determine
the tid for PTRACE.
(amd64_linux_set_debug_regs_for_thread): New function.
(amd64_linux_sync_debug_registers_callback): Ditto.
(amd64_linux_sync_debug_registers_across_threads): Ditto.
(amd64_linux_insert_watchpoint, amd64_linux_remove_watchpoint): Ditto.
(amd64_linux_hw_breakpoint, amd64_linux_remove_hw_breakpoint): Ditto.
(amd64_linux_new_thread): Ditto.
(_initialize_amd64_linux_nat): Register linux new thread observer.
* testsuite/gdb.threads/watchthreads-threaded.c: New test case.
* testsuite/gdb.threads/watchthreads-threaded.exp: Ditto.
[ With recent upstream GDB (6.8) reduced only to the testcase. ]
[ It was called watchthreads2.{exp,c} before but it conflicted with FSF GDB new
testcase of the same name. ]
FIXME: The testcase does not expects multiple watchpoints hits per one stop.
diff --git a/gdb/testsuite/gdb.threads/watchthreads-threaded.c b/gdb/testsuite/gdb.threads/watchthreads-threaded.c
new file mode 100644
--- /dev/null
+++ b/gdb/testsuite/gdb.threads/watchthreads-threaded.c
@@ -0,0 +1,65 @@
+/* This testcase is part of GDB, the GNU debugger.
+
+ Copyright 2002, 2003, 2004, 2005 Free Software Foundation, Inc.
+
+ This program is free software; you can redistribute it and/or modify
+ it under the terms of the GNU General Public License as published by
+ the Free Software Foundation; either version 2 of the License, or
+ (at your option) any later version.
+
+ This program is distributed in the hope that it will be useful,
+ but WITHOUT ANY WARRANTY; without even the implied warranty of
+ MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
+ GNU General Public License for more details.
+
+ You should have received a copy of the GNU General Public License
+ along with this program; if not, write to the Free Software
+ Foundation, Inc., 59 Temple Place - Suite 330,
+ Boston, MA 02111-1307, USA.
+
+ This file is copied from schedlock.c. */
+
+#include <stdio.h>
+#include <unistd.h>
+#include <stdlib.h>
+#include <pthread.h>
+
+void *thread_function(void *arg); /* Pointer to function executed by each thread */
+
+#define NUM 5
+
+unsigned int args[NUM+1];
+
+int main() {
+ int res;
+ pthread_t threads[NUM];
+ void *thread_result;
+ long i;
+
+ for (i = 0; i < NUM; i++)
+ {
+ args[i] = 1; /* Init value. */
+ res = pthread_create(&threads[i],
+ NULL,
+ thread_function,
+ (void *) i);
+ }
+
+ args[i] = 1;
+ thread_function ((void *) i);
+
+ exit(EXIT_SUCCESS);
+}
+
+void *thread_function(void *arg) {
+ int my_number = (long) arg;
+ int *myp = (int *) &args[my_number];
+
+ /* Don't run forever. Run just short of it :) */
+ while (*myp > 0)
+ {
+ (*myp) ++; usleep (1); /* Loop increment. */
+ }
+
+ pthread_exit(NULL);
+}
diff --git a/gdb/testsuite/gdb.threads/watchthreads-threaded.exp b/gdb/testsuite/gdb.threads/watchthreads-threaded.exp
new file mode 100644
--- /dev/null
+++ b/gdb/testsuite/gdb.threads/watchthreads-threaded.exp
@@ -0,0 +1,126 @@
+# This testcase is part of GDB, the GNU debugger.
+
+# Copyright 2005 Free Software Foundation, Inc.
+
+# This program is free software; you can redistribute it and/or modify
+# it under the terms of the GNU General Public License as published by
+# the Free Software Foundation; either version 2 of the License, or
+# (at your option) any later version.
+#
+# This program is distributed in the hope that it will be useful,
+# but WITHOUT ANY WARRANTY; without even the implied warranty of
+# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
+# GNU General Public License for more details.
+#
+# You should have received a copy of the GNU General Public License
+# along with this program; if not, write to the Free Software
+# Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA.
+
+# Check that GDB can support multiple watchpoints across threads.
+
+# This test verifies that a watchpoint is detected in the proper thread
+# so the test is only meaningful on a system with hardware watchpoints.
+if [target_info exists gdb,no_hardware_watchpoints] {
+ return 0;
+}
+
+set testfile "watchthreads-threaded"
+set srcfile ${testfile}.c
+set binfile [standard_output_file ${testfile}]
+if {[gdb_compile_pthreads "${srcdir}/${subdir}/${srcfile}" "${binfile}" executable [list debug "incdir=${objdir}"]] != "" } {
+ return -1
+}
+
+gdb_exit
+gdb_start
+gdb_reinitialize_dir $srcdir/$subdir
+gdb_load ${binfile}
+
+gdb_test "set can-use-hw-watchpoints 1" "" ""
+
+#
+# Run to `main' where we begin our tests.
+#
+
+if ![runto_main] then {
+ gdb_suppress_tests
+}
+
+set args_2 0
+set args_3 0
+
+gdb_breakpoint "thread_function"
+gdb_continue_to_breakpoint "thread_function"
+gdb_test "disable 2" ""
+
+gdb_test_multiple "p args\[2\]" "get initial args2" {
+ -re "\\\$\[0-9\]* = (.*)$gdb_prompt $" {
+ set init_args_2 $expect_out(1,string)
+ pass "get initial args2"
+ }
+}
+
+gdb_test_multiple "p args\[3\]" "get initial args3" {
+ -re "\\\$\[0-9\]* = (.*)$gdb_prompt $" {
+ set init_args_3 $expect_out(1,string)
+ pass "get initial args3"
+ }
+}
+
+set args_2 $init_args_2
+set args_3 $init_args_3
+
+# Watch values that will be modified by distinct threads.
+gdb_test "watch args\[2\]" "Hardware watchpoint 3: args\\\[2\\\]"
+gdb_test "watch args\[3\]" "Hardware watchpoint 4: args\\\[3\\\]"
+
+set init_line [expr [gdb_get_line_number "Init value"]+1]
+set inc_line [gdb_get_line_number "Loop increment"]
+
+# Loop and continue to allow both watchpoints to be triggered.
+for {set i 0} {$i < 30} {incr i} {
+ set test_flag 0
+ gdb_test_multiple "continue" "threaded watch loop" {
+ -re "Hardware watchpoint 3: args\\\[2\\\].*Old value = 0.*New value = 1.*main \\\(\\\) at .*watchthreads-threaded.c:$init_line.*$gdb_prompt $"
+ { set args_2 1; set test_flag 1 }
+ -re "Hardware watchpoint 4: args\\\[3\\\].*Old value = 0.*New value = 1.*main \\\(\\\) at .*watchthreads-threaded.c:$init_line.*$gdb_prompt $"
+ { set args_3 1; set test_flag 1 }
+ -re "Hardware watchpoint 3: args\\\[2\\\].*Old value = $args_2.*New value = [expr $args_2+1].*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].*thread_function \\\(arg=0x3\\\) at .*watchthreads-threaded.c:$inc_line.*$gdb_prompt $"
+ { set args_3 [expr $args_3+1]; set test_flag 1 }
+ }
+ # If we fail above, don't bother continuing loop
+ if { $test_flag == 0 } {
+ set i 30;
+ }
+}
+
+# Print success message if loop succeeded.
+if { $test_flag == 1 } {
+ pass "threaded watch loop"
+}
+
+# Verify that we hit first watchpoint in child thread.
+set message "watchpoint on args\[2\] hit in thread"
+if { $args_2 > 1 } {
+ pass $message
+} else {
+ fail $message
+}
+
+# Verify that we hit second watchpoint in child thread.
+set message "watchpoint on args\[3\] hit in thread"
+if { $args_3 > 1 } {
+ pass $message
+} else {
+ fail $message
+}
+
+# Verify that all watchpoint hits are accounted for.
+set message "combination of threaded watchpoints = 30 + initial values"
+if { [expr $args_2+$args_3] == [expr [expr 30+$init_args_2]+$init_args_3] } {
+ pass $message
+} else {
+ fail $message
+}

View File

@ -1,134 +0,0 @@
From FEDORA_PATCHES Mon Sep 17 00:00:00 2001
From: Jan Kratochvil <jan.kratochvil@redhat.com>
Date: Fri, 27 Oct 2017 21:07:50 +0200
Subject: gdb-6.5-bz109921-DW_AT_decl_file-test.patch
;; Find symbols properly at their original (included) file (BZ 109921).
;;=fedoratest
https://bugzilla.redhat.com/bugzilla/show_bug.cgi?id=109921
It is duplicite to its upstream variant:
http://sourceware.org/ml/gdb-cvs/2007-01/msg00157.html
http://sourceware.org/ml/gdb-patches/2007-01/msg00434.html
2007-01-21 Jan Kratochvil <jan.kratochvil@redhat.com>
Daniel Jacobowitz <dan@codesourcery.com>
* gdb.base/included.c, gdb.base/included.exp,
gdb.base/included.h: New files.
------------------------------------------------------------------------------
2007-01-09 Jan Kratochvil <jan.kratochvil@redhat.com>
* gdb.dwarf2/dw2-included.exp, gdb.dwarf2/dw2-included.c,
gdb.dwarf2/dw2-included.h: New files.
diff --git a/gdb/testsuite/gdb.dwarf2/dw2-included.c b/gdb/testsuite/gdb.dwarf2/dw2-included.c
new file mode 100644
--- /dev/null
+++ b/gdb/testsuite/gdb.dwarf2/dw2-included.c
@@ -0,0 +1,26 @@
+/* This testcase is part of GDB, the GNU debugger.
+
+ Copyright 2006 Free Software Foundation, Inc.
+
+ This program is free software; you can redistribute it and/or modify
+ it under the terms of the GNU General Public License as published by
+ the Free Software Foundation; either version 2 of the License, or
+ (at your option) any later version.
+
+ This program is distributed in the hope that it will be useful,
+ but WITHOUT ANY WARRANTY; without even the implied warranty of
+ MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
+ GNU General Public License for more details.
+
+ You should have received a copy of the GNU General Public License
+ along with this program; if not, write to the Free Software
+ Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307,
+ USA. */
+
+#include "dw2-included.h"
+
+int
+main()
+{
+ return 0;
+}
diff --git a/gdb/testsuite/gdb.dwarf2/dw2-included.exp b/gdb/testsuite/gdb.dwarf2/dw2-included.exp
new file mode 100644
--- /dev/null
+++ b/gdb/testsuite/gdb.dwarf2/dw2-included.exp
@@ -0,0 +1,47 @@
+# Copyright 2006 Free Software Foundation, Inc.
+
+# This program is free software; you can redistribute it and/or modify
+# it under the terms of the GNU General Public License as published by
+# the Free Software Foundation; either version 2 of the License, or
+# (at your option) any later version.
+#
+# This program is distributed in the hope that it will be useful,
+# but WITHOUT ANY WARRANTY; without even the implied warranty of
+# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
+# GNU General Public License for more details.
+#
+# You should have received a copy of the GNU General Public License
+# along with this program; if not, write to the Free Software
+# Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA.
+
+# Minimal DWARF-2 unit test
+
+# This test can only be run on targets which support DWARF-2.
+# For now pick a sampling of likely targets.
+if {![istarget *-*-linux*]
+ && ![istarget *-*-gnu*]
+ && ![istarget *-*-elf*]
+ && ![istarget *-*-openbsd*]
+ && ![istarget arm-*-eabi*]
+ && ![istarget powerpc-*-eabi*]} {
+ return 0
+}
+
+set testfile "dw2-included"
+set srcfile ${testfile}.c
+set binfile [standard_output_file ${testfile}]
+
+if { [gdb_compile "${srcdir}/${subdir}/${srcfile}" "${binfile}" executable {debug}] != "" } {
+ return -1
+}
+
+gdb_exit
+gdb_start
+gdb_reinitialize_dir $srcdir/$subdir
+gdb_load ${binfile}
+
+gdb_test "set listsize 1" ""
+gdb_test "list integer" "int integer;\r"
+gdb_test "ptype integer" "type = int\r"
+# Path varies depending on the build location.
+gdb_test "info variables integer" "\r\nFile \[^\r\n\]*/gdb.dwarf2/dw2-included.h:\r\n${decimal}:.*int integer;\r"
diff --git a/gdb/testsuite/gdb.dwarf2/dw2-included.h b/gdb/testsuite/gdb.dwarf2/dw2-included.h
new file mode 100644
--- /dev/null
+++ b/gdb/testsuite/gdb.dwarf2/dw2-included.h
@@ -0,0 +1,20 @@
+/* This testcase is part of GDB, the GNU debugger.
+
+ Copyright 2006 Free Software Foundation, Inc.
+
+ This program is free software; you can redistribute it and/or modify
+ it under the terms of the GNU General Public License as published by
+ the Free Software Foundation; either version 2 of the License, or
+ (at your option) any later version.
+
+ This program is distributed in the hope that it will be useful,
+ but WITHOUT ANY WARRANTY; without even the implied warranty of
+ MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
+ GNU General Public License for more details.
+
+ You should have received a copy of the GNU General Public License
+ along with this program; if not, write to the Free Software
+ Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307,
+ USA. */
+
+int integer;

View File

@ -44,7 +44,7 @@ glibc-debuginfo-2.7-2.x86_64: /usr/lib/debug/lib64/libc.so.6.debug:
diff --git a/gdb/printcmd.c b/gdb/printcmd.c
--- a/gdb/printcmd.c
+++ b/gdb/printcmd.c
@@ -1301,6 +1301,10 @@ process_print_command_args (const char *args, value_print_options *print_opts,
@@ -1300,6 +1300,10 @@ process_print_command_args (const char *args, value_print_options *print_opts,
if (exp != nullptr && *exp)
{

View File

@ -1,62 +0,0 @@
From FEDORA_PATCHES Mon Sep 17 00:00:00 2001
From: Fedora GDB patches <invalid@email.com>
Date: Fri, 27 Oct 2017 21:07:50 +0200
Subject: gdb-6.5-last-address-space-byte-test.patch
;; Testcase for deadlocking on last address space byte; for corrupted backtraces.
;;=fedoratest
diff --git a/gdb/testsuite/gdb.base/largecore-last-address-lock.exp b/gdb/testsuite/gdb.base/largecore-last-address-lock.exp
new file mode 100644
--- /dev/null
+++ b/gdb/testsuite/gdb.base/largecore-last-address-lock.exp
@@ -0,0 +1,49 @@
+# Copyright 2006 Free Software Foundation, Inc.
+
+# This program is free software; you can redistribute it and/or modify
+# it under the terms of the GNU General Public License as published by
+# the Free Software Foundation; either version 2 of the License, or
+# (at your option) any later version.
+#
+# This program is distributed in the hope that it will be useful,
+# but WITHOUT ANY WARRANTY; without even the implied warranty of
+# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
+# GNU General Public License for more details.
+#
+# You should have received a copy of the GNU General Public License
+# along with this program; if not, write to the Free Software
+# Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA.
+
+if $tracelevel then {
+ strace $tracelevel
+}
+
+# Get things started.
+
+gdb_exit
+gdb_start
+
+# i386 (32-bit) only: gdb with Red Hat largecore patch did lock up:
+# https://enterprise.redhat.com/issue-tracker/?module=issues&action=view&tid=103263
+# https://bugzilla.redhat.com/bugzilla/show_bug.cgi?id=210614
+
+# i386: Bug exists when the `target_xfer_memory' condition
+# `(memaddr + len < region->hi)' operates on 64-bit operands on
+# largecore-patched with 32-bit addresses and so it can get `false' with
+# arbitrary `len'.
+
+# x86_64: The bug is not present as the operands and calculations have the same
+# bit size. Would would still need to pass there the highest address
+# (`memaddr == 0xffffffffffffffff') but we would need to pass `len == 0'
+# to make the condition `(memaddr + len < region->hi)' false.
+# `len == 0' would get caught eariler.
+
+# Error in the success case is immediate.
+set timeoutold ${timeout}
+set timeout 10
+
+gdb_test "x/xb 0xffffffff" \
+ "Cannot access memory at address 0xffffffff" \
+ "Read the last address space byte"
+
+set timeout ${timeoutold}

View File

@ -1,111 +0,0 @@
From FEDORA_PATCHES Mon Sep 17 00:00:00 2001
From: Fedora GDB patches <invalid@email.com>
Date: Fri, 27 Oct 2017 21:07:50 +0200
Subject: gdb-6.5-readline-long-line-crash-test.patch
;; Fix readline segfault on excessively long hand-typed lines.
;;=fedoratest
https://bugzilla.redhat.com/bugzilla/show_bug.cgi?id=214196
diff --git a/gdb/testsuite/gdb.base/readline-overflow.exp b/gdb/testsuite/gdb.base/readline-overflow.exp
new file mode 100644
--- /dev/null
+++ b/gdb/testsuite/gdb.base/readline-overflow.exp
@@ -0,0 +1,96 @@
+# Copyright 2006 Free Software Foundation, Inc.
+
+# This program is free software; you can redistribute it and/or modify
+# it under the terms of the GNU General Public License as published by
+# the Free Software Foundation; either version 2 of the License, or
+# (at your option) any later version.
+#
+# This program is distributed in the hope that it will be useful,
+# but WITHOUT ANY WARRANTY; without even the implied warranty of
+# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
+# GNU General Public License for more details.
+#
+# You should have received a copy of the GNU General Public License
+# along with this program; if not, write to the Free Software
+# Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA.
+
+# Please email any bugs, comments, and/or additions to this file to:
+# bug-gdb@prep.ai.mit.edu
+
+# This file was written by Jan Kratochvil <jan.kratochvil@redhat.com>
+
+# This file is part of the gdb testsuite.
+
+#
+# Tests for readline buffer overflow.
+#
+
+if $tracelevel {
+ strace $tracelevel
+}
+
+global env
+
+save_vars { env(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
+
+ set timeout 600
+
+ set env(GDBHISTFILE) "${srcdir}/${subdir}/gdb_history"
+ set env(HISTSIZE) "10"
+
+ gdb_exit
+ gdb_start
+ gdb_reinitialize_dir $srcdir/$subdir
+
+
+ set width 11
+ gdb_test "set width $width" \
+ "" \
+ "Setting width to $width."
+ #gdb_test "set height 1" \
+ # "" \
+ # "Setting height to 1."
+ send_gdb "run X"
+ set i 0
+ # It crashes using `set width 7' on `set total 3560'.
+ # Sometimes it corrupts screen on `set width 7'.
+ # Bugreport used `set total 130001':
+ # https://bugzilla.redhat.com/bugzilla/show_bug.cgi?id=214196
+ # Check also `timeout' above.
+ set total 4200
+ gdb_expect {
+ -re X {
+ incr i
+ if {$i <= $total} {
+ send_gdb "X"
+ exp_continue
+ }
+ }
+ -re "\[ \b\r\n\]" {
+ exp_continue
+ }
+ eof {
+ fail "gdb sending total $total characters"
+ note "Failed after sending $i characters, reason: EOF"
+ gdb_clear_suppressed
+ }
+ timeout {
+ fail "gdb sending total $total characters"
+ note "Failed after sending $i characters (timeout $timeout), reason: TIMEOUT"
+ gdb_clear_suppressed
+ }
+ default {
+ fail "gdb sending total $total characters"
+ note "Failed after sending $i characters, reason: 0=\[$expect_out(0,string)\] buffer=\[$expect_out(buffer)\]"
+ gdb_clear_suppressed
+ }
+ }
+ send_gdb "\r"
+ gdb_test "" \
+ "No executable file specified..*" \
+ "All the characters transferred"
+}

View File

@ -1,193 +0,0 @@
From FEDORA_PATCHES Mon Sep 17 00:00:00 2001
From: Jan Kratochvil <jan.kratochvil@redhat.com>
Date: Fri, 27 Oct 2017 21:07:50 +0200
Subject: gdb-6.5-sharedlibrary-path.patch
;; Fix TLS symbols resolving for shared libraries with a relative pathname.
;; The testsuite needs `gdb-6.5-tls-of-separate-debuginfo.patch'.
;;=fedoratest: One should recheck if it is really fixed upstream.
If you provided some relative path to the shared library, such as with
export LD_LIBRARY_PATH=.
then gdb would fail to match the shared library name during the TLS lookup.
Dropped the workaround/fix for gdb-6.8.50.20081128 - is it still needed?
The testsuite needs `gdb-6.3-bz146810-solib_absolute_prefix_is_empty.patch'.
The testsuite needs `gdb-6.5-tls-of-separate-debuginfo.patch'.
2006-09-01 Jan Kratochvil <jan.kratochvil@redhat.com>
* solib-svr4.c (svr4_fetch_objfile_link_map): Match even absolute
requested pathnames to the internal loaded relative pathnames.
2007-10-16 Jan Kratochvil <jan.kratochvil@redhat.com>
Port to GDB-6.7.
2008-02-27 Jan Kratochvil <jan.kratochvil@redhat.com>
Port to gdb-6.7.50.20080227.
diff --git a/gdb/testsuite/gdb.threads/tls-sepdebug-main.c b/gdb/testsuite/gdb.threads/tls-sepdebug-main.c
new file mode 100644
--- /dev/null
+++ b/gdb/testsuite/gdb.threads/tls-sepdebug-main.c
@@ -0,0 +1,31 @@
+/* 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 <pthread.h>
+
+extern __thread int var;
+
+int main()
+{
+ /* Ensure we link against pthreads even with --as-needed. */
+ pthread_testcancel();
+ return var;
+}
diff --git a/gdb/testsuite/gdb.threads/tls-sepdebug-shared.c b/gdb/testsuite/gdb.threads/tls-sepdebug-shared.c
new file mode 100644
--- /dev/null
+++ b/gdb/testsuite/gdb.threads/tls-sepdebug-shared.c
@@ -0,0 +1,22 @@
+/* This testcase is part of GDB, the GNU debugger.
+
+ Copyright 2006 Free Software Foundation, Inc.
+
+ This program is free software; you can redistribute it and/or modify
+ it under the terms of the GNU General Public License as published by
+ the Free Software Foundation; either version 2 of the License, or
+ (at your option) any later version.
+
+ This program is distributed in the hope that it will be useful,
+ but WITHOUT ANY WARRANTY; without even the implied warranty of
+ MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
+ GNU General Public License for more details.
+
+ You should have received a copy of the GNU General Public License
+ along with this program; if not, write to the Free Software
+ Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA.
+
+ Please email any bugs, comments, and/or additions to this file to:
+ bug-gdb@prep.ai.mit.edu */
+
+__thread int var = 42;
diff --git a/gdb/testsuite/gdb.threads/tls-sepdebug.exp b/gdb/testsuite/gdb.threads/tls-sepdebug.exp
new file mode 100644
--- /dev/null
+++ b/gdb/testsuite/gdb.threads/tls-sepdebug.exp
@@ -0,0 +1,94 @@
+# Copyright 2006 Free Software Foundation, Inc.
+
+# This program is free software; you can redistribute it and/or modify
+# it under the terms of the GNU General Public License as published by
+# the Free Software Foundation; either version 2 of the License, or
+# (at your option) any later version.
+#
+# This program is distributed in the hope that it will be useful,
+# but WITHOUT ANY WARRANTY; without even the implied warranty of
+# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
+# GNU General Public License for more details.
+#
+# You should have received a copy of the GNU General Public License
+# along with this program; if not, write to the Free Software
+# Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA.
+
+# This test uses gdb_exit and gdb_start, which are not supported
+# on non-extended-remote sessions.
+if {[use_gdb_stub]} {
+ untested "skipping test because of stub"
+ return 0
+}
+
+if $tracelevel then {
+ strace $tracelevel
+}
+
+set testfile tls-sepdebug
+set srcmainfile ${testfile}-main.c
+set srcsharedfile ${testfile}-shared.c
+
+set binmainfile [standard_output_file ${testfile}-main]
+set binsharedbase ${testfile}-shared.so
+set binsharedfile [standard_output_file ${binsharedbase}]
+set binshareddebugfile [standard_output_file ${binsharedbase}.debug]
+
+# Use explicit -soname as otherwise the full path to the library would get
+# encoded into ${binmainfile} making LD_LIBRARY_PATH tests useless.
+
+# FIXME: gcc dependency (-Wl,-soname).
+
+if { [gdb_compile_shlib "${srcdir}/${subdir}/${srcsharedfile}" "${binsharedfile}" [list debug additional_flags=-Wl,-soname=${binsharedbase}]] != "" } {
+ untested "Couldn't compile test library"
+ return -1
+}
+
+# eu-strip(1) works fine but it is a part of `elfutils', not `binutils'.
+if 0 then {
+ remote_exec build "eu-strip -f ${binshareddebugfile} ${binsharedfile}"
+} else {
+ remote_exec build "objcopy --only-keep-debug ${binsharedfile} ${binshareddebugfile}"
+ remote_exec build "objcopy --strip-debug ${binsharedfile}"
+ remote_exec build "objcopy --add-gnu-debuglink=${binshareddebugfile} ${binsharedfile}"
+}
+
+# Do not use `shlib=' as it will automatically add also -rpath for gcc.
+
+if { [gdb_compile_pthreads "${srcdir}/${subdir}/${srcmainfile} ${binsharedfile}" "${binmainfile}" executable {debug}] != "" } {
+ untested "Couldn't compile test program"
+ return -1
+}
+
+# Get things started.
+
+# Test also the proper resolving of relative library names to absolute ones.
+# \$PWD is easy - it is the absolute way
+# ${subdir} would fail on "print var"
+
+set absdir [file dirname [standard_output_file ${binsharedbase}]]
+foreach ld_library_path [list $absdir [relative_filename [pwd] $absdir]] name { absolute relative } {
+
+ gdb_exit
+ gdb_start
+ ###gdb_reinitialize_dir $srcdir/$subdir
+
+ gdb_test "set env LD_LIBRARY_PATH=$ld_library_path" \
+ "" \
+ "set env LD_LIBRARY_PATH is $name"
+
+ gdb_load ${binmainfile}
+
+ # For C programs, "start" should stop in main().
+
+ gdb_test "start" \
+ "main \\(\\) at .*${srcmainfile}.*" \
+ "start"
+
+ # Check for: Cannot find shared library `/usr/lib/debug/lib/libc-2.4.90.so.debug' in dynamic linker's load module list
+ # as happens with TLS variables and `separate_debug_objfile_backlink'.
+
+ gdb_test "print var" \
+ "\\\$1 = \[0-9\].*" \
+ "print TLS variable from a shared library with $name-directory separate debug info file"
+}

View File

@ -1,42 +0,0 @@
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/dwarf2/read.c b/gdb/dwarf2/read.c
--- a/gdb/dwarf2/read.c
+++ b/gdb/dwarf2/read.c
@@ -2797,6 +2797,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)
{
@@ -2808,6 +2818,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),

View File

@ -1,6 +1,6 @@
From FEDORA_PATCHES Mon Sep 17 00:00:00 2001
From: Fedora GDB patches <invalid@email.com>
Date: Fri, 27 Oct 2017 21:07:50 +0200
From: Kevin Buettner <kevinb@redhat.com>
Date: Wed, 22 Feb 2023 22:30:40 -0700
Subject: gdb-6.6-buildid-locate-rpm.patch
;;=push+jan
@ -232,6 +232,40 @@ diff --git a/gdb/aclocal.m4 b/gdb/aclocal.m4
# AM_AUX_DIR_EXPAND -*- Autoconf -*-
# Copyright (C) 2001-2017 Free Software Foundation, Inc.
diff --git a/gdb/build-id.c b/gdb/build-id.c
--- a/gdb/build-id.c
+++ b/gdb/build-id.c
@@ -771,10 +771,10 @@ missing_rpm_enlist_1 (const char *filename, int verify_vendor)
static rpmts (*rpmtsCreate_p) (void);
extern rpmts rpmtsFree(rpmts ts);
static rpmts (*rpmtsFree_p) (rpmts ts);
- extern rpmdbMatchIterator rpmtsInitIterator(const rpmts ts, rpmTag rpmtag,
+ extern rpmdbMatchIterator rpmtsInitIterator(const rpmts ts, rpmDbiTagVal rpmtag,
const void * keyp, size_t keylen);
static rpmdbMatchIterator (*rpmtsInitIterator_p) (const rpmts ts,
- rpmTag rpmtag,
+ rpmDbiTagVal rpmtag,
const void *keyp,
size_t keylen);
#else /* !DLOPEN_LIBRPM */
@@ -829,7 +829,7 @@ missing_rpm_enlist_1 (const char *filename, int verify_vendor)
&& (rpmdbNextIterator_p = (Header (*) (rpmdbMatchIterator mi)) dlsym (h, "rpmdbNextIterator"))
&& (rpmtsCreate_p = (rpmts (*) (void)) dlsym (h, "rpmtsCreate"))
&& (rpmtsFree_p = (rpmts (*) (rpmts ts)) dlsym (h, "rpmtsFree"))
- && (rpmtsInitIterator_p = (rpmdbMatchIterator (*) (const rpmts ts, rpmTag rpmtag, const void *keyp, size_t keylen)) dlsym (h, "rpmtsInitIterator"))))
+ && (rpmtsInitIterator_p = (rpmdbMatchIterator (*) (const rpmts ts, rpmDbiTagVal rpmtag, const void *keyp, size_t keylen)) dlsym (h, "rpmtsInitIterator"))))
{
warning (_("Opened library \"%s\" is incompatible (%s), "
"missing debuginfos notifications will not be displayed"),
@@ -917,7 +917,7 @@ missing_rpm_enlist_1 (const char *filename, int verify_vendor)
/* RPMDBI_PACKAGES requires keylen == sizeof (int). */
/* RPMDBI_LABEL is an interface for NVR-based dbiFindByLabel(). */
- mi_debuginfo = rpmtsInitIterator_p (ts, (rpmTag) RPMDBI_LABEL, debuginfo, 0);
+ mi_debuginfo = rpmtsInitIterator_p (ts, (rpmDbiTagVal) RPMDBI_LABEL, debuginfo, 0);
xfree (debuginfo);
if (mi_debuginfo)
{
diff --git a/gdb/config.in b/gdb/config.in
--- a/gdb/config.in
+++ b/gdb/config.in
@ -258,7 +292,7 @@ diff --git a/gdb/config.in b/gdb/config.in
diff --git a/gdb/configure b/gdb/configure
--- a/gdb/configure
+++ b/gdb/configure
@@ -775,6 +775,11 @@ TARGET_OBS
@@ -783,6 +783,11 @@ TARGET_OBS
ENABLE_BFD_64_BIT_FALSE
ENABLE_BFD_64_BIT_TRUE
subdirs
@ -270,7 +304,7 @@ diff --git a/gdb/configure b/gdb/configure
GDB_DATADIR
DEBUGDIR
MAKEINFO_EXTRA_FLAGS
@@ -880,6 +885,7 @@ with_gdb_datadir
@@ -912,6 +917,7 @@ with_gdb_datadir
with_relocated_sources
with_auto_load_dir
with_auto_load_safe_path
@ -278,7 +312,7 @@ diff --git a/gdb/configure b/gdb/configure
enable_targets
enable_64_bit_bfd
enable_gdbmi
@@ -959,6 +965,8 @@ PKG_CONFIG_PATH
@@ -992,6 +998,8 @@ PKG_CONFIG_PATH
PKG_CONFIG_LIBDIR
DEBUGINFOD_CFLAGS
DEBUGINFOD_LIBS
@ -286,8 +320,8 @@ diff --git a/gdb/configure b/gdb/configure
+RPM_LIBS
YACC
YFLAGS
XMKMF'
@@ -1635,6 +1643,8 @@ Optional Packages:
ZSTD_CFLAGS
@@ -1678,6 +1686,8 @@ Optional Packages:
do not restrict auto-loaded files locations
--with-debuginfod Enable debuginfo lookups with debuginfod
(auto/yes/no)
@ -296,7 +330,7 @@ diff --git a/gdb/configure b/gdb/configure
--with-libunwind-ia64 use libunwind frame unwinding for ia64 targets
--with-curses use the curses library instead of the termcap
library
@@ -1715,6 +1725,8 @@ Some influential environment variables:
@@ -1761,6 +1771,8 @@ Some influential environment variables:
C compiler flags for DEBUGINFOD, overriding pkg-config
DEBUGINFOD_LIBS
linker flags for DEBUGINFOD, overriding pkg-config
@ -305,7 +339,7 @@ diff --git a/gdb/configure b/gdb/configure
YACC The `Yet Another Compiler Compiler' implementation to use.
Defaults to the first program found out of: `bison -y', `byacc',
`yacc'.
@@ -6634,6 +6646,494 @@ _ACEOF
@@ -17848,6 +17860,495 @@ _ACEOF
{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $with_auto_load_safe_path" >&5
$as_echo "$with_auto_load_safe_path" >&6; }
@ -369,6 +403,7 @@ diff --git a/gdb/configure b/gdb/configure
+#include <rpm/rpmlib.h>
+#include <dlfcn.h>
+#include <errno.h>
+#include <string.h>
+
+int
+main ()
@ -485,7 +520,7 @@ diff --git a/gdb/configure b/gdb/configure
+extern Header rpmdbNextIterator(rpmdbMatchIterator mi);
+extern rpmts rpmtsCreate(void);
+extern rpmts rpmtsFree(rpmts ts);
+extern rpmdbMatchIterator rpmtsInitIterator(const rpmts ts, rpmTag rpmtag,
+extern rpmdbMatchIterator rpmtsInitIterator(const rpmts ts, rpmDbiTagVal rpmtag,
+ const void * keyp, size_t keylen);
+
+int
@ -747,7 +782,7 @@ diff --git a/gdb/configure b/gdb/configure
+extern Header rpmdbNextIterator(rpmdbMatchIterator mi);
+extern rpmts rpmtsCreate(void);
+extern rpmts rpmtsFree(rpmts ts);
+extern rpmdbMatchIterator rpmtsInitIterator(const rpmts ts, rpmTag rpmtag,
+extern rpmdbMatchIterator rpmtsInitIterator(const rpmts ts, rpmDbiTagVal rpmtag,
+ const void * keyp, size_t keylen);
+
+int
@ -803,7 +838,7 @@ diff --git a/gdb/configure b/gdb/configure
diff --git a/gdb/configure.ac b/gdb/configure.ac
--- a/gdb/configure.ac
+++ b/gdb/configure.ac
@@ -153,6 +153,199 @@ AC_DEFINE_DIR(AUTO_LOAD_SAFE_PATH, escape_dir,
@@ -160,6 +160,200 @@ AC_DEFINE_DIR(AUTO_LOAD_SAFE_PATH, escape_dir,
[Directories safe to hold auto-loaded files.])
AC_MSG_RESULT([$with_auto_load_safe_path])
@ -853,6 +888,7 @@ diff --git a/gdb/configure.ac b/gdb/configure.ac
+#include <rpm/rpmlib.h>
+#include <dlfcn.h>
+#include <errno.h>
+#include <string.h>
+ ]], [[
+ void *h;
+ const char *const *rpmverp;
@ -947,7 +983,7 @@ diff --git a/gdb/configure.ac b/gdb/configure.ac
+extern Header rpmdbNextIterator(rpmdbMatchIterator mi);
+extern rpmts rpmtsCreate(void);
+extern rpmts rpmtsFree(rpmts ts);
+extern rpmdbMatchIterator rpmtsInitIterator(const rpmts ts, rpmTag rpmtag,
+extern rpmdbMatchIterator rpmtsInitIterator(const rpmts ts, rpmDbiTagVal rpmtag,
+ const void * keyp, size_t keylen);
+ ]]), [
+ LIBRPM_COMPAT=true
@ -1006,15 +1042,15 @@ diff --git a/gdb/configure.ac b/gdb/configure.ac
diff --git a/gdb/event-top.c b/gdb/event-top.c
--- a/gdb/event-top.c
+++ b/gdb/event-top.c
@@ -42,6 +42,7 @@
#include "gdbsupport/gdb-sigmask.h"
@@ -43,6 +43,7 @@
#include "async-event.h"
#include "bt-utils.h"
#include "pager.h"
+#include "symfile.h"
/* readline include files. */
#include "readline/readline.h"
@@ -374,6 +375,8 @@ display_gdb_prompt (const char *new_prompt)
@@ -391,6 +392,8 @@ display_gdb_prompt (const char *new_prompt)
/* Reset the nesting depth used when trace-commands is set. */
reset_command_nest_depth ();
@ -1023,7 +1059,7 @@ diff --git a/gdb/event-top.c b/gdb/event-top.c
/* Do not call the python hook on an explicit prompt change as
passed to this function, as this forms a secondary/local prompt,
IE, displayed but not set. */
@@ -800,7 +803,10 @@ command_line_handler (gdb::unique_xmalloc_ptr<char> &&rl)
@@ -852,7 +855,10 @@ command_line_handler (gdb::unique_xmalloc_ptr<char> &&rl)
command_handler (cmd);
if (ui->prompt_state != PROMPTED)
@ -1038,7 +1074,7 @@ diff --git a/gdb/event-top.c b/gdb/event-top.c
diff --git a/gdb/symfile.h b/gdb/symfile.h
--- a/gdb/symfile.h
+++ b/gdb/symfile.h
@@ -342,6 +342,7 @@ extern void generic_load (const char *args, int from_tty);
@@ -352,6 +352,7 @@ extern void generic_load (const char *args, int from_tty);
/* build-id support. */
extern struct bfd_build_id *build_id_addr_get (CORE_ADDR addr);
extern void debug_print_missing (const char *binary, const char *debug);

View File

@ -14,7 +14,7 @@ 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
@@ -1250,14 +1250,28 @@ svr4_read_so_list (svr4_info *info, CORE_ADDR lm, CORE_ADDR prev_lm,
@@ -1321,14 +1321,28 @@ svr4_read_so_list (svr4_info *info, CORE_ADDR lm, CORE_ADDR prev_lm,
}
{
@ -45,7 +45,7 @@ diff --git a/gdb/solib-svr4.c b/gdb/solib-svr4.c
if (build_id != NULL)
{
char *name, *build_id_filename;
@@ -1272,23 +1286,7 @@ svr4_read_so_list (svr4_info *info, CORE_ADDR lm, CORE_ADDR prev_lm,
@@ -1343,23 +1357,7 @@ svr4_read_so_list (svr4_info *info, CORE_ADDR lm, CORE_ADDR prev_lm,
xfree (name);
}
else

View File

@ -21,7 +21,7 @@ diff --git a/bfd/libbfd-in.h b/bfd/libbfd-in.h
diff --git a/bfd/libbfd.h b/bfd/libbfd.h
--- a/bfd/libbfd.h
+++ b/bfd/libbfd.h
@@ -120,7 +120,7 @@ static inline char *
@@ -121,7 +121,7 @@ static inline char *
bfd_strdup (const char *str)
{
size_t len = strlen (str) + 1;
@ -59,8 +59,8 @@ diff --git a/gdb/build-id.c b/gdb/build-id.c
+show_build_id_verbose (struct ui_file *file, int from_tty,
+ struct cmd_list_element *c, const char *value)
+{
+ fprintf_filtered (file, _("Verbosity level of the build-id locator is %s.\n"),
+ value);
+ gdb_printf (file, _("Verbosity level of the build-id locator is %s.\n"),
+ value);
+}
+/* Locate NT_GNU_BUILD_ID and return its matching debug filename.
+ FIXME: NOTE decoding should be unified with the BFD core notes decoding. */
@ -517,9 +517,9 @@ diff --git a/gdb/build-id.c b/gdb/build-id.c
+
if (separate_debug_file_debug)
{
- fprintf_unfiltered (gdb_stdlog, _(" Trying %s..."), link.c_str ());
- gdb_printf (gdb_stdlog, _(" Trying %s..."), link.c_str ());
- gdb_flush (gdb_stdlog);
+ fprintf_unfiltered (gdb_stdlog, _(" Trying %s..."), orig_link.c_str ());
+ gdb_printf (gdb_stdlog, _(" Trying %s..."), orig_link.c_str ());
+ gdb_flush (gdb_stdout);
}
@ -539,8 +539,8 @@ diff --git a/gdb/build-id.c b/gdb/build-id.c
- if (filename == NULL)
- {
- if (separate_debug_file_debug)
- fprintf_unfiltered (gdb_stdlog,
- _(" no, unable to compute real path\n"));
- gdb_printf (gdb_stdlog,
- _(" no, unable to compute real path\n"));
+ if (seqno > 0)
+ {
+ /* There can be multiple build-id symlinks pointing to real files
@ -559,9 +559,10 @@ diff --git a/gdb/build-id.c b/gdb/build-id.c
- if (debug_bfd == NULL)
- {
- if (separate_debug_file_debug)
- fprintf_unfiltered (gdb_stdlog, _(" no, unable to open.\n"));
- gdb_printf (gdb_stdlog, _(" no, unable to open.\n"));
+ struct stat statbuf_trash;
+
- return {};
+ /* `access' automatically dereferences LINK. */
+ if (lstat (link.c_str (), &statbuf_trash) != 0)
+ {
@ -583,7 +584,7 @@ diff --git a/gdb/build-id.c b/gdb/build-id.c
+ if (filename == NULL)
+ {
+ if (separate_debug_file_debug)
+ fprintf_unfiltered (gdb_stdlog,
+ gdb_printf (gdb_stdlog,
+ _(" no, unable to compute real path\n"));
+
+ continue;
@ -595,17 +596,16 @@ diff --git a/gdb/build-id.c b/gdb/build-id.c
+ if (debug_bfd == NULL)
+ {
+ if (separate_debug_file_debug)
+ fprintf_unfiltered (gdb_stdlog, _(" no, unable to open.\n"));
- return {};
+ gdb_printf (gdb_stdlog, _(" no, unable to open.\n"));
+
+ continue;
+ }
+
+ if (!build_id_verify (debug_bfd.get(), build_id_len, build_id))
+ {
+ if (separate_debug_file_debug)
+ fprintf_unfiltered (gdb_stdlog,
+ _(" no, build-id does not match.\n"));
+ gdb_printf (gdb_stdlog,
+ _(" no, build-id does not match.\n"));
+
+ continue;
+ }
@ -620,21 +620,21 @@ diff --git a/gdb/build-id.c b/gdb/build-id.c
+ if (ret_bfd != NULL)
{
if (separate_debug_file_debug)
- fprintf_unfiltered (gdb_stdlog, _(" no, build-id does not match.\n"));
+ fprintf_unfiltered (gdb_stdlog, _(" yes!\n"));
- gdb_printf (gdb_stdlog, _(" no, build-id does not match.\n"));
+ gdb_printf (gdb_stdlog, _(" yes!\n"));
+ }
+ else
+ {
+ /* If none of the real files is found report as missing file
+ always the non-.%u-suffixed file. */
+ std::string link0 = orig_link;
- return {};
+
+ /* If the symlink has target request to install the target.
+ BASE-debuginfo.rpm contains the symlink but BASE.rpm may be missing.
+ https://bugzilla.redhat.com/show_bug.cgi?id=981154 */
+ std::string link0_resolved (link_resolve (link0.c_str (), 0));
+
- return {};
+ if (link_all.empty ())
+ link_all = link0_resolved;
+ else
@ -646,7 +646,7 @@ diff --git a/gdb/build-id.c b/gdb/build-id.c
}
- if (separate_debug_file_debug)
- fprintf_unfiltered (gdb_stdlog, _(" yes!\n"));
- gdb_printf (gdb_stdlog, _(" yes!\n"));
+ if (link_return != NULL)
+ {
+ if (ret_bfd != NULL)
@ -694,17 +694,16 @@ diff --git a/gdb/build-id.c b/gdb/build-id.c
if (debug_bfd != NULL)
return debug_bfd;
@@ -174,7 +678,8 @@ build_id_to_bfd_suffix (size_t build_id_len, const bfd_byte *build_id,
@@ -174,7 +678,7 @@ build_id_to_bfd_suffix (size_t build_id_len, const bfd_byte *build_id,
if (!gdb_sysroot.empty ())
{
link = gdb_sysroot + link;
- debug_bfd = build_id_to_debug_bfd_1 (link, build_id_len, build_id);
+ debug_bfd = build_id_to_debug_bfd_1 (link, build_id_len, build_id,
+ link_return);
+ debug_bfd = build_id_to_debug_bfd_1 (link, build_id_len, build_id, NULL);
if (debug_bfd != NULL)
return debug_bfd;
}
@@ -183,30 +688,649 @@ build_id_to_bfd_suffix (size_t build_id_len, const bfd_byte *build_id,
@@ -183,30 +687,660 @@ build_id_to_bfd_suffix (size_t build_id_len, const bfd_byte *build_id,
return {};
}
@ -1095,20 +1094,26 @@ diff --git a/gdb/build-id.c b/gdb/build-id.c
+ debug_flush_missing -> missing_rpm_list_print ...
+
+ For this reason, we make sure MISSING_RPM_LIST_ENTRIES is zero
+ *before* calling any print function. */
+ *before* calling any print function.
+
+ Note: kevinb/2023-02-22: The code below used to call
+ puts_unfiltered() and printf_unfiltered(), but calls to these
+ functions have been replaced by calls to gdb_printf(). The call
+ chain shown above (probably) used to be the case at one time and
+ hopefully something similar is still the case now that
+ gdb_printf() is being used instead. */
+ missing_rpm_list_entries = 0;
+
+ printf_unfiltered (_("Missing separate debuginfos, use: %s"),
+ gdb_printf (_("Missing separate debuginfos, use: %s"),
+#ifdef DNF_DEBUGINFO_INSTALL
+ "dnf "
+#endif
+ "debuginfo-install");
+ for (const char *el : array)
+ {
+ puts_unfiltered (" ");
+ puts_unfiltered (el);
+ gdb_printf (" %s", el);
+ }
+ puts_unfiltered ("\n");
+ gdb_printf ("\n");
+
+ while (missing_rpm_list != NULL)
+ {
@ -1307,16 +1312,21 @@ diff --git a/gdb/build-id.c b/gdb/build-id.c
+ /* We do not collect and flush these messages as each such message
+ already requires its own separate lines. */
+
+ fprintf_unfiltered (gdb_stdlog,
+ _("Missing separate debuginfo for %s\n"), binary);
+ if (debug != NULL)
+ fprintf_unfiltered (gdb_stdlog, _("Try: %s %s\n"),
+ gdb_printf (gdb_stdlog,
+ _("Missing separate debuginfo for %s.\n"), binary);
+ if (debug != NULL)
+ {
+ if (access (debug, F_OK) == 0) {
+ gdb_printf (gdb_stdlog, _("Try: %s %s\n"),
+#ifdef DNF_DEBUGINFO_INSTALL
+ "dnf"
+ "dnf"
+#else
+ "yum"
+ "yum"
+#endif
+ " --enablerepo='*debug*' install", debug);
+ " --enablerepo='*debug*' install", debug);
+ } else
+ gdb_printf (gdb_stdlog, _("The debuginfo package for this file is probably broken.\n"));
+ }
+ }
+}
+
@ -1352,17 +1362,17 @@ diff --git a/gdb/build-id.c b/gdb/build-id.c
{
const struct bfd_build_id *build_id;
- build_id = build_id_bfd_get (objfile->obfd);
- build_id = build_id_bfd_get (objfile->obfd.get ());
+ if (build_id_filename_return)
+ *build_id_filename_return = NULL;
+
+ build_id = build_id_bfd_shdr_get (objfile->obfd);
+ build_id = build_id_bfd_shdr_get (objfile->obfd.get ());
if (build_id != NULL)
{
if (separate_debug_file_debug)
@@ -214,8 +1338,21 @@ find_separate_debug_file_by_buildid (struct objfile *objfile)
_("\nLooking for separate debug info (build-id) for "
"%s\n"), objfile_name (objfile));
@@ -214,8 +1348,21 @@ find_separate_debug_file_by_buildid (struct objfile *objfile)
_("\nLooking for separate debug info (build-id) for "
"%s\n"), objfile_name (objfile));
+ char *build_id_filename_cstr = NULL;
gdb_bfd_ref_ptr abfd (build_id_to_debug_bfd (build_id->size,
@ -1383,7 +1393,7 @@ diff --git a/gdb/build-id.c b/gdb/build-id.c
/* Prevent looping on a stripped .debug file. */
if (abfd != NULL
&& filename_cmp (bfd_get_filename (abfd.get ()),
@@ -228,3 +1365,22 @@ find_separate_debug_file_by_buildid (struct objfile *objfile)
@@ -228,3 +1375,22 @@ find_separate_debug_file_by_buildid (struct objfile *objfile)
return std::string ();
}
@ -1456,7 +1466,7 @@ diff --git a/gdb/build-id.h b/gdb/build-id.h
diff --git a/gdb/coffread.c b/gdb/coffread.c
--- a/gdb/coffread.c
+++ b/gdb/coffread.c
@@ -710,7 +710,8 @@ coff_symfile_read (struct objfile *objfile, symfile_add_flags symfile_flags)
@@ -734,7 +734,8 @@ coff_symfile_read (struct objfile *objfile, symfile_add_flags symfile_flags)
/* Try to add separate debug file if no symbols table found. */
if (!objfile->has_partial_symbols ())
{
@ -1480,7 +1490,7 @@ diff --git a/gdb/corelow.c b/gdb/corelow.c
#include "inferior.h"
#include "infrun.h"
#include "symtab.h"
@@ -356,6 +360,8 @@ add_to_thread_list (asection *asect, asection *reg_sect)
@@ -391,6 +395,8 @@ add_to_thread_list (asection *asect, asection *reg_sect)
switch_to_thread (thr); /* Yes, make it current. */
}
@ -1489,7 +1499,7 @@ diff --git a/gdb/corelow.c b/gdb/corelow.c
/* Issue a message saying we have no core to debug, if FROM_TTY. */
static void
@@ -392,19 +398,26 @@ core_file_command (const char *filename, int from_tty)
@@ -427,12 +433,14 @@ core_file_command (const char *filename, int from_tty)
static void
locate_exec_from_corefile_build_id (bfd *abfd, int from_tty)
{
@ -1504,8 +1514,9 @@ diff --git a/gdb/corelow.c b/gdb/corelow.c
+ = build_id_to_exec_bfd (build_id->size, build_id->data,
+ &build_id_filename);
if (execbfd != nullptr)
if (execbfd == nullptr)
{
@@ -460,7 +468,12 @@ locate_exec_from_corefile_build_id (bfd *abfd, int from_tty)
exec_file_attach (bfd_get_filename (execbfd.get ()), from_tty);
symbol_file_add_main (bfd_get_filename (execbfd.get ()),
symfile_add_flag (from_tty ? SYMFILE_VERBOSE : 0));
@ -1518,7 +1529,7 @@ diff --git a/gdb/corelow.c b/gdb/corelow.c
}
/* See gdbcore.h. */
@@ -1209,4 +1222,11 @@ _initialize_corelow ()
@@ -1325,4 +1338,11 @@ _initialize_corelow ()
maintenance_print_core_file_backed_mappings,
_("Print core file's file-backed mappings."),
&maintenanceprintlist);
@ -1533,7 +1544,7 @@ diff --git a/gdb/corelow.c b/gdb/corelow.c
diff --git a/gdb/doc/gdb.texinfo b/gdb/doc/gdb.texinfo
--- a/gdb/doc/gdb.texinfo
+++ b/gdb/doc/gdb.texinfo
@@ -21524,6 +21524,27 @@ information files.
@@ -22037,6 +22037,27 @@ information files.
@end table
@ -1564,16 +1575,16 @@ diff --git a/gdb/doc/gdb.texinfo b/gdb/doc/gdb.texinfo
diff --git a/gdb/dwarf2/index-cache.c b/gdb/dwarf2/index-cache.c
--- a/gdb/dwarf2/index-cache.c
+++ b/gdb/dwarf2/index-cache.c
@@ -97,7 +97,7 @@ index_cache::store (dwarf2_per_objfile *per_objfile)
@@ -101,7 +101,7 @@ index_cache::store (dwarf2_per_objfile *per_objfile)
return;
/* Get build id of objfile. */
- const bfd_build_id *build_id = build_id_bfd_get (obj->obfd);
+ const bfd_build_id *build_id = build_id_bfd_shdr_get (obj->obfd);
- const bfd_build_id *build_id = build_id_bfd_get (obj->obfd.get ());
+ const bfd_build_id *build_id = build_id_bfd_shdr_get (obj->obfd.get ());
if (build_id == nullptr)
{
index_cache_debug ("objfile %s has no build id",
@@ -114,7 +114,8 @@ index_cache::store (dwarf2_per_objfile *per_objfile)
@@ -118,7 +118,8 @@ index_cache::store (dwarf2_per_objfile *per_objfile)
if (dwz != nullptr)
{
@ -1586,16 +1597,16 @@ diff --git a/gdb/dwarf2/index-cache.c b/gdb/dwarf2/index-cache.c
diff --git a/gdb/dwarf2/read.c b/gdb/dwarf2/read.c
--- a/gdb/dwarf2/read.c
+++ b/gdb/dwarf2/read.c
@@ -5476,7 +5476,7 @@ get_gdb_index_contents_from_section (objfile *obj, T *section_owner)
@@ -5328,7 +5328,7 @@ get_gdb_index_contents_from_section (objfile *obj, T *section_owner)
static gdb::array_view<const gdb_byte>
get_gdb_index_contents_from_cache (objfile *obj, dwarf2_per_bfd *dwarf2_per_bfd)
{
- const bfd_build_id *build_id = build_id_bfd_get (obj->obfd);
+ const bfd_build_id *build_id = build_id_bfd_shdr_get (obj->obfd);
- const bfd_build_id *build_id = build_id_bfd_get (obj->obfd.get ());
+ const bfd_build_id *build_id = build_id_bfd_shdr_get (obj->obfd.get ());
if (build_id == nullptr)
return {};
@@ -5489,7 +5489,7 @@ get_gdb_index_contents_from_cache (objfile *obj, dwarf2_per_bfd *dwarf2_per_bfd)
@@ -5341,7 +5341,7 @@ get_gdb_index_contents_from_cache (objfile *obj, dwarf2_per_bfd *dwarf2_per_bfd)
static gdb::array_view<const gdb_byte>
get_gdb_index_contents_from_cache_dwz (objfile *obj, dwz_file *dwz)
{
@ -1607,7 +1618,7 @@ diff --git a/gdb/dwarf2/read.c b/gdb/dwarf2/read.c
diff --git a/gdb/elfread.c b/gdb/elfread.c
--- a/gdb/elfread.c
+++ b/gdb/elfread.c
@@ -1270,7 +1270,9 @@ elf_symfile_read (struct objfile *objfile, symfile_add_flags symfile_flags)
@@ -1213,7 +1213,9 @@ elf_symfile_read_dwarf2 (struct objfile *objfile,
&& objfile->separate_debug_objfile == NULL
&& objfile->separate_debug_objfile_backlink == NULL)
{
@ -1618,21 +1629,22 @@ diff --git a/gdb/elfread.c b/gdb/elfread.c
if (debugfile.empty ())
debugfile = find_separate_debug_file_by_debuglink (objfile);
@@ -1285,7 +1287,7 @@ elf_symfile_read (struct objfile *objfile, symfile_add_flags symfile_flags)
else
@@ -1229,7 +1231,7 @@ elf_symfile_read_dwarf2 (struct objfile *objfile,
{
has_dwarf2 = false;
- const struct bfd_build_id *build_id = build_id_bfd_get (objfile->obfd);
+ const struct bfd_build_id *build_id = build_id_bfd_shdr_get (objfile->obfd);
const struct bfd_build_id *build_id
- = build_id_bfd_get (objfile->obfd.get ());
+ = build_id_bfd_shdr_get (objfile->obfd.get ());
const char *filename = bfd_get_filename (objfile->obfd.get ());
if (build_id != nullptr)
{
@@ -1310,6 +1312,10 @@ elf_symfile_read (struct objfile *objfile, symfile_add_flags symfile_flags)
@@ -1256,6 +1258,11 @@ elf_symfile_read_dwarf2 (struct objfile *objfile,
has_dwarf2 = true;
}
}
+ /* Check if any separate debug info has been extracted out. */
+ else if (bfd_get_section_by_name (objfile->obfd, ".gnu_debuglink")
+ else if (bfd_get_section_by_name (objfile->obfd.get (),
+ ".gnu_debuglink")
+ != NULL)
+ debug_print_missing (objfile_name (objfile), build_id_filename.get ());
}
@ -1641,7 +1653,7 @@ diff --git a/gdb/elfread.c b/gdb/elfread.c
diff --git a/gdb/exec.c b/gdb/exec.c
--- a/gdb/exec.c
+++ b/gdb/exec.c
@@ -238,7 +238,7 @@ validate_exec_file (int from_tty)
@@ -237,7 +237,7 @@ validate_exec_file (int from_tty)
current_exec_file = get_exec_file (0);
const bfd_build_id *exec_file_build_id
@ -1650,7 +1662,7 @@ diff --git a/gdb/exec.c b/gdb/exec.c
if (exec_file_build_id != nullptr)
{
/* Prepend the target prefix, to force gdb_bfd_open to open the
@@ -251,7 +251,7 @@ validate_exec_file (int from_tty)
@@ -250,7 +250,7 @@ validate_exec_file (int from_tty)
if (abfd != nullptr)
{
const bfd_build_id *target_exec_file_build_id
@ -1662,7 +1674,7 @@ diff --git a/gdb/exec.c b/gdb/exec.c
diff --git a/gdb/objfiles.h b/gdb/objfiles.h
--- a/gdb/objfiles.h
+++ b/gdb/objfiles.h
@@ -769,6 +769,10 @@ struct objfile
@@ -786,6 +786,10 @@ struct objfile
bool skip_jit_symbol_lookup = false;
};
@ -1676,24 +1688,24 @@ diff --git a/gdb/objfiles.h b/gdb/objfiles.h
diff --git a/gdb/python/py-objfile.c b/gdb/python/py-objfile.c
--- a/gdb/python/py-objfile.c
+++ b/gdb/python/py-objfile.c
@@ -132,7 +132,7 @@ objfpy_get_build_id (PyObject *self, void *closure)
@@ -158,7 +158,7 @@ objfpy_get_build_id (PyObject *self, void *closure)
try
{
- build_id = build_id_bfd_get (objfile->obfd);
+ build_id = build_id_bfd_shdr_get (objfile->obfd);
- build_id = build_id_bfd_get (objfile->obfd.get ());
+ build_id = build_id_bfd_shdr_get (objfile->obfd.get ());
}
catch (const gdb_exception &except)
{
@@ -600,7 +600,7 @@ objfpy_lookup_objfile_by_build_id (const char *build_id)
/* Don't return separate debug files. */
if (objfile->separate_debug_objfile_backlink != NULL)
continue;
- obfd_build_id = build_id_bfd_get (objfile->obfd);
+ obfd_build_id = build_id_bfd_shdr_get (objfile->obfd);
if (obfd_build_id == NULL)
continue;
if (objfpy_build_id_matches (obfd_build_id, build_id))
@@ -629,7 +629,7 @@ gdbpy_lookup_objfile (PyObject *self, PyObject *args, PyObject *kw)
if (obfd == nullptr)
return 0;
- const bfd_build_id *obfd_build_id = build_id_bfd_get (obfd);
+ const bfd_build_id *obfd_build_id = build_id_bfd_shdr_get (obfd);
if (obfd_build_id == nullptr)
return 0;
diff --git a/gdb/solib-svr4.c b/gdb/solib-svr4.c
--- a/gdb/solib-svr4.c
+++ b/gdb/solib-svr4.c
@ -1703,9 +1715,9 @@ diff --git a/gdb/solib-svr4.c b/gdb/solib-svr4.c
#include "probe.h"
+#include "build-id.h"
static struct link_map_offsets *svr4_fetch_link_map_offsets (void);
static int svr4_have_link_map_offsets (void);
@@ -1248,9 +1249,51 @@ svr4_read_so_list (svr4_info *info, CORE_ADDR lm, CORE_ADDR prev_lm,
#include <map>
@@ -1319,9 +1320,51 @@ svr4_read_so_list (svr4_info *info, CORE_ADDR lm, CORE_ADDR prev_lm,
continue;
}
@ -1763,19 +1775,19 @@ diff --git a/gdb/solib-svr4.c b/gdb/solib-svr4.c
diff --git a/gdb/source.c b/gdb/source.c
--- a/gdb/source.c
+++ b/gdb/source.c
@@ -1199,7 +1199,7 @@ open_source_file (struct symtab *s)
srcpath += s->filename;
@@ -1196,7 +1196,7 @@ open_source_file (struct symtab *s)
}
- const struct bfd_build_id *build_id = build_id_bfd_get (ofp->obfd);
+ const struct bfd_build_id *build_id = build_id_bfd_shdr_get (ofp->obfd);
const struct bfd_build_id *build_id
- = build_id_bfd_get (ofp->obfd.get ());
+ = build_id_bfd_shdr_get (ofp->obfd.get ());
/* Query debuginfod for the source file. */
if (build_id != nullptr && !srcpath.empty ())
diff --git a/gdb/symfile.h b/gdb/symfile.h
--- a/gdb/symfile.h
+++ b/gdb/symfile.h
@@ -332,12 +332,18 @@ bool expand_symtabs_matching
@@ -342,12 +342,18 @@ bool expand_symtabs_matching
void map_symbol_filenames (gdb::function_view<symbol_filename_ftype> fun,
bool need_fullname);
@ -1797,7 +1809,7 @@ diff --git a/gdb/symfile.h b/gdb/symfile.h
diff --git a/gdb/testsuite/gdb.base/corefile.exp b/gdb/testsuite/gdb.base/corefile.exp
--- a/gdb/testsuite/gdb.base/corefile.exp
+++ b/gdb/testsuite/gdb.base/corefile.exp
@@ -343,3 +343,33 @@ gdb_test_multiple "core-file $corefile" $test {
@@ -349,3 +349,33 @@ gdb_test_multiple "core-file $corefile" $test {
pass $test
}
}
@ -1858,17 +1870,17 @@ diff --git a/gdb/testsuite/gdb.base/new-ui-pending-input.exp b/gdb/testsuite/gdb
diff --git a/gdb/testsuite/lib/gdb.exp b/gdb/testsuite/lib/gdb.exp
--- a/gdb/testsuite/lib/gdb.exp
+++ b/gdb/testsuite/lib/gdb.exp
@@ -141,7 +141,8 @@ if ![info exists INTERNAL_GDBFLAGS] {
@@ -217,7 +217,8 @@ if ![info exists INTERNAL_GDBFLAGS] {
"-nw" \
"-nx" \
"-data-directory $BUILD_DATA_DIRECTORY" \
{-iex "set height 0"} \
- {-iex "set width 0"}]]
+ {-iex "set width 0"} \
+ {-iex "set build-id-verbose 0"}]]
}
# The variable gdb_prompt is a regexp which matches the gdb prompt.
@@ -2200,6 +2201,17 @@ proc default_gdb_start { } {
set INTERNAL_GDBFLAGS [append_gdb_data_directory_option $INTERNAL_GDBFLAGS]
}
@@ -2349,6 +2350,17 @@ proc default_gdb_start { } {
}
}
@ -1889,7 +1901,7 @@ diff --git a/gdb/testsuite/lib/gdb.exp b/gdb/testsuite/lib/gdb.exp
diff --git a/gdb/testsuite/lib/mi-support.exp b/gdb/testsuite/lib/mi-support.exp
--- a/gdb/testsuite/lib/mi-support.exp
+++ b/gdb/testsuite/lib/mi-support.exp
@@ -322,6 +322,16 @@ proc default_mi_gdb_start { args } {
@@ -330,6 +330,16 @@ proc default_mi_gdb_start { { flags {} } } {
warning "Couldn't set the width to 0."
}
}

View File

@ -1,94 +0,0 @@
From FEDORA_PATCHES Mon Sep 17 00:00:00 2001
From: Fedora GDB patches <invalid@email.com>
Date: Fri, 27 Oct 2017 21:07:50 +0200
Subject: gdb-6.6-bz230000-power6-disassembly-test.patch
;; Testcase for PPC Power6/DFP instructions disassembly (BZ 230000).
;;=fedoratest
https://bugzilla.redhat.com/bugzilla/show_bug.cgi?id=230000
The original testcase
https://bugzilla.redhat.com/bugzilla/show_bug.cgi?id=230000#c1
requires too recent GCC.
diff --git a/gdb/testsuite/gdb.arch/powerpc-power6.exp b/gdb/testsuite/gdb.arch/powerpc-power6.exp
new file mode 100644
--- /dev/null
+++ b/gdb/testsuite/gdb.arch/powerpc-power6.exp
@@ -0,0 +1,54 @@
+# Copyright 2007 Free Software Foundation, Inc.
+
+# This program is free software; you can redistribute it and/or modify
+# it under the terms of the GNU General Public License as published by
+# the Free Software Foundation; either version 2 of the License, or
+# (at your option) any later version.
+#
+# This program is distributed in the hope that it will be useful,
+# but WITHOUT ANY WARRANTY; without even the implied warranty of
+# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
+# GNU General Public License for more details.
+#
+# You should have received a copy of the GNU General Public License
+# along with this program; if not, write to the Free Software
+# Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA.
+
+# Test PowerPC Power6 instructions disassembly.
+
+if {![istarget "powerpc*-*-*"]} then {
+ verbose "Skipping PowerPC Power6 instructions disassembly."
+ return
+}
+
+set testfile "powerpc-power6"
+set srcfile ${testfile}.s
+set objfile [standard_output_file ${testfile}.o]
+
+if { [gdb_compile "${srcdir}/${subdir}/${srcfile}" "${objfile}" object {debug}] != "" } {
+ untested "PowerPC prologue tests"
+ return -1
+}
+
+
+gdb_exit
+gdb_start
+gdb_reinitialize_dir $srcdir/$subdir
+gdb_load ${objfile}
+
+# Disassemble the function.
+
+gdb_test "disass func" ":\tblr\r\n.*" "Basic disassembly"
+
+gdb_test "disass func" ":\tdcbzl *r8,r9\r\n.*" "Power5 disassembly dcbzl"
+gdb_test "disass func" ":\tfrsqrtes *f10,f11\r\n.*" "Power5 disassembly frsqrtes"
+gdb_test "disass func" ":\tdadd *f1,f2,f1\r\n.*" "Power6 disassembly dadd"
+gdb_test "disass func" ":\tdaddq *f0,f2,f0\r\n.*" "Power6 disassembly daddq"
+gdb_test "disass func" ":\tdsub *f1,f2,f1\r\n.*" "Power6 disassembly dsub"
+gdb_test "disass func" ":\tdsubq *f0,f2,f0\r\n.*" "Power6 disassembly dsubq"
+gdb_test "disass func" ":\tdmul *f1,f2,f1\r\n.*" "Power6 disassembly dmul"
+gdb_test "disass func" ":\tdmulq *f0,f2,f0\r\n.*" "Power6 disassembly dmulq"
+gdb_test "disass func" ":\tddiv *f1,f2,f1\r\n.*" "Power6 disassembly ddiv"
+gdb_test "disass func" ":\tddivq *f0,f2,f0\r\n.*" "Power6 disassembly ddivq"
+gdb_test "disass func" ":\tdcmpu *cr1,f2,f1\r\n.*" "Power6 disassembly dcmpu"
+gdb_test "disass func" ":\tdcmpuq *cr1,f2,f0\r\n.*" "Power6 disassembly dcmpuq"
diff --git a/gdb/testsuite/gdb.arch/powerpc-power6.s b/gdb/testsuite/gdb.arch/powerpc-power6.s
new file mode 100644
--- /dev/null
+++ b/gdb/testsuite/gdb.arch/powerpc-power6.s
@@ -0,0 +1,16 @@
+ .text
+ .globl func
+func:
+ blr
+ .long 0x7c284fec /* dcbzl r8,r9 */
+ .long 0xed405834 /* frsqrtes f10,f11 */
+ .long 0xec220804 /* dadd f1,f2,f1 */
+ .long 0xfc020004 /* daddq f0,f2,f0 */
+ .long 0xec220c04 /* dsub f1,f2,f1 */
+ .long 0xfc020404 /* dsubq f0,f2,f0 */
+ .long 0xec220844 /* dmul f1,f2,f1 */
+ .long 0xfc020044 /* dmulq f0,f2,f0 */
+ .long 0xec220c44 /* ddiv f1,f2,f1 */
+ .long 0xfc020444 /* ddivq f0,f2,f0 */
+ .long 0xec820d04 /* dcmpu cr1,f2,f1 */
+ .long 0xfc820504 /* dcmpuq cr1,f2,f0 */

View File

@ -1,130 +0,0 @@
From FEDORA_PATCHES Mon Sep 17 00:00:00 2001
From: Jan Kratochvil <jan.kratochvil@redhat.com>
Date: Fri, 27 Oct 2017 21:07:50 +0200
Subject: gdb-6.7-charsign-test.patch
;; Fix displaying of numeric char arrays as strings (BZ 224128).
;;=fedoratest: But it is failing anyway, one should check the behavior more.
https://bugzilla.redhat.com/bugzilla/show_bug.cgi?id=224128
2007-01-25 Jan Kratochvil <jan.kratochvil@redhat.com>
* gdb.base/charsign.exp, gdb.base/charsign.c: New files.
[ stripped ]
2007-10-19 Jan Kratochvil <jan.kratochvil@redhat.com>
Port to GDB-6.7 - only the testcase left, patch has been reverted,
char-vectors restricted.
diff --git a/gdb/testsuite/gdb.base/charsign.c b/gdb/testsuite/gdb.base/charsign.c
new file mode 100644
--- /dev/null
+++ b/gdb/testsuite/gdb.base/charsign.c
@@ -0,0 +1,37 @@
+/* This testcase is part of GDB, the GNU debugger.
+
+ Copyright 2007 Free Software Foundation, Inc.
+
+ This program is free software; you can redistribute it and/or modify
+ it under the terms of the GNU General Public License as published by
+ the Free Software Foundation; either version 2 of the License, or
+ (at your option) any later version.
+
+ This program is distributed in the hope that it will be useful,
+ but WITHOUT ANY WARRANTY; without even the implied warranty of
+ MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
+ GNU General Public License for more details.
+
+ You should have received a copy of the GNU General Public License
+ along with this program; if not, write to the Free Software
+ Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA.
+
+ Please email any bugs, comments, and/or additions to this file to:
+ bug-gdb@prep.ai.mit.edu */
+
+int main()
+{
+ return 0;
+}
+
+char n[]="A";
+signed char s[]="A";
+unsigned char u[]="A";
+
+typedef char char_n;
+typedef signed char char_s;
+typedef unsigned char char_u;
+
+char_n n_typed[]="A";
+char_s s_typed[]="A";
+char_u u_typed[]="A";
diff --git a/gdb/testsuite/gdb.base/charsign.exp b/gdb/testsuite/gdb.base/charsign.exp
new file mode 100644
--- /dev/null
+++ b/gdb/testsuite/gdb.base/charsign.exp
@@ -0,0 +1,63 @@
+# Copyright 2007 Free Software Foundation, Inc.
+
+# This program is free software; you can redistribute it and/or modify
+# it under the terms of the GNU General Public License as published by
+# the Free Software Foundation; either version 2 of the License, or
+# (at your option) any later version.
+#
+# This program is distributed in the hope that it will be useful,
+# but WITHOUT ANY WARRANTY; without even the implied warranty of
+# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
+# GNU General Public License for more details.
+#
+# You should have received a copy of the GNU General Public License
+# along with this program; if not, write to the Free Software
+# Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA.
+
+set testfile charsign
+set srcfile ${testfile}.c
+set binfile [standard_output_file ${testfile}]
+
+proc do_test { cflags } {
+ global srcdir
+ global binfile
+ global subdir
+ global srcfile
+ global gdb_prompt
+
+ if { [gdb_compile "${srcdir}/${subdir}/${srcfile}" "${binfile}" executable [list debug additional_flags=$cflags]] != "" } {
+ untested "Couldn't compile test program"
+ return -1
+ }
+
+ # Get things started.
+
+ gdb_exit
+ gdb_start
+ gdb_reinitialize_dir $srcdir/$subdir
+ gdb_load ${binfile}
+
+ # For C programs, "start" should stop in main().
+
+ gdb_test "p n" \
+ "= \"A\""
+ gdb_test "p s" \
+ "= \\{65 'A', 0 '\\\\0'\\}"
+ gdb_test "p u" \
+ "= \\{65 'A', 0 '\\\\0'\\}"
+ gdb_test "p n_typed" \
+ "= \"A\""
+ gdb_test "p s_typed" \
+ "= \\{65 'A', 0 '\\\\0'\\}"
+ gdb_test "p u_typed" \
+ "= \\{65 'A', 0 '\\\\0'\\}"
+}
+
+# The string identification works despite the compiler flags below due to
+# gdbtypes.c:
+# if (name && strcmp (name, "char") == 0)
+# TYPE_FLAGS (type) |= TYPE_FLAG_NOSIGN;
+
+do_test {}
+do_test {-fsigned-char}
+do_test {-funsigned-char}

View File

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

View File

@ -1,181 +0,0 @@
From FEDORA_PATCHES Mon Sep 17 00:00:00 2001
From: Fedora GDB patches <invalid@email.com>
Date: Fri, 27 Oct 2017 21:07:50 +0200
Subject: gdb-6.8-bz442765-threaded-exec-test.patch
;; Test various forms of threads tracking across exec() (BZ 442765).
;;=fedoratest
Test various forms of threads tracking across exec(2).
diff --git a/gdb/testsuite/gdb.threads/threaded-exec.c b/gdb/testsuite/gdb.threads/threaded-exec.c
--- a/gdb/testsuite/gdb.threads/threaded-exec.c
+++ b/gdb/testsuite/gdb.threads/threaded-exec.c
@@ -18,21 +18,95 @@
Boston, MA 02111-1307, USA. */
#include <stddef.h>
-#include <pthread.h>
#include <assert.h>
#include <stdlib.h>
#include <unistd.h>
+#include <stdio.h>
+#ifdef THREADS
+
+# include <pthread.h>
static void *
threader (void *arg)
{
- return NULL;
+ return NULL;
}
+#endif
+
int
-main (void)
+main (int argc, char **argv)
{
+ char *exec_nothreads, *exec_threads, *cmd;
+ int phase;
+ char phase_s[8];
+
+ setbuf (stdout, NULL);
+
+ if (argc != 4)
+ {
+ fprintf (stderr, "%s <non-threaded> <threaded> <phase>\n", argv[0]);
+ return 1;
+ }
+
+#ifdef THREADS
+ puts ("THREADS: Y");
+#else
+ puts ("THREADS: N");
+#endif
+ exec_nothreads = argv[1];
+ printf ("exec_nothreads: %s\n", exec_nothreads);
+ exec_threads = argv[2];
+ printf ("exec_threads: %s\n", exec_threads);
+ phase = atoi (argv[3]);
+ printf ("phase: %d\n", phase);
+
+ /* Phases: threading
+ 0: N -> N
+ 1: N -> Y
+ 2: Y -> Y
+ 3: Y -> N
+ 4: N -> exit */
+
+ cmd = NULL;
+
+#ifndef THREADS
+ switch (phase)
+ {
+ case 0:
+ cmd = exec_nothreads;
+ break;
+ case 1:
+ cmd = exec_threads;
+ break;
+ case 2:
+ fprintf (stderr, "%s: We should have threads for phase %d!\n", argv[0],
+ phase);
+ return 1;
+ case 3:
+ fprintf (stderr, "%s: We should have threads for phase %d!\n", argv[0],
+ phase);
+ return 1;
+ case 4:
+ return 0;
+ default:
+ assert (0);
+ }
+#else /* THREADS */
+ switch (phase)
+ {
+ case 0:
+ fprintf (stderr, "%s: We should not have threads for phase %d!\n",
+ argv[0], phase);
+ return 1;
+ case 1:
+ fprintf (stderr, "%s: We should not have threads for phase %d!\n",
+ argv[0], phase);
+ return 1;
+ case 2:
+ cmd = exec_threads;
+ {
pthread_t t1;
int i;
@@ -40,7 +114,34 @@ main (void)
assert (i == 0);
i = pthread_join (t1, NULL);
assert (i == 0);
+ }
+ break;
+ case 3:
+ cmd = exec_nothreads;
+ {
+ pthread_t t1;
+ int i;
+
+ i = pthread_create (&t1, NULL, threader, (void *) NULL);
+ assert (i == 0);
+ i = pthread_join (t1, NULL);
+ assert (i == 0);
+ }
+ break;
+ case 4:
+ fprintf (stderr, "%s: We should not have threads for phase %d!\n",
+ argv[0], phase);
+ return 1;
+ default:
+ assert (0);
+ }
+#endif /* THREADS */
+
+ assert (cmd != NULL);
+
+ phase++;
+ snprintf (phase_s, sizeof phase_s, "%d", phase);
- execl ("/bin/true", "/bin/true", NULL);
- abort ();
+ execl (cmd, cmd, exec_nothreads, exec_threads, phase_s, NULL);
+ assert (0);
}
diff --git a/gdb/testsuite/gdb.threads/threaded-exec.exp b/gdb/testsuite/gdb.threads/threaded-exec.exp
--- a/gdb/testsuite/gdb.threads/threaded-exec.exp
+++ b/gdb/testsuite/gdb.threads/threaded-exec.exp
@@ -20,9 +20,14 @@
set testfile threaded-exec
set srcfile ${testfile}.c
-set binfile [standard_output_file ${testfile}]
+set binfile_nothreads [standard_output_file ${testfile}N]
+set binfile_threads [standard_output_file ${testfile}Y]
-if {[gdb_compile_pthreads "${srcdir}/${subdir}/${srcfile}" "${binfile}" executable []] != "" } {
+if {[gdb_compile "${srcdir}/${subdir}/${srcfile}" "${binfile_nothreads}" executable {additional_flags=-UTHREADS}] != "" } {
+ return -1
+}
+
+if {[gdb_compile_pthreads "${srcdir}/${subdir}/${srcfile}" "${binfile_threads}" executable {additional_flags=-DTHREADS}] != "" } {
return -1
}
@@ -30,9 +35,9 @@ gdb_exit
gdb_start
gdb_reinitialize_dir $srcdir/$subdir
-gdb_load ${binfile}
+gdb_load ${binfile_nothreads}
-gdb_run_cmd
+gdb_run_cmd [list ${binfile_nothreads} ${binfile_threads} 0]
gdb_test_multiple {} "Program exited" {
-re "\r\n\\\[Inferior .* exited normally\\\]\r\n$gdb_prompt $" {

77
gdb-add-index.patch Normal file
View File

@ -0,0 +1,77 @@
From FEDORA_PATCHES Mon Sep 17 00:00:00 2001
From: Fedora GDB patches <invalid@email.com>
Date: Fri, 27 Oct 2017 21:07:50 +0200
Subject: gdb-add-index.patch
;; Update gdb-add-index.sh such that, when the GDB environment
;; variable is not set, the script is smarter than just looking for
;; 'gdb' in the $PATH.
;;
;; The actual search order is now: /usr/bin/gdb.minimal, gdb (in the
;; $PATH), then /usr/libexec/gdb.
;;
;; For the rationale of looking for gdb.minimal see:
;;
;; https://fedoraproject.org/wiki/Changes/Minimal_GDB_in_buildroot
;;
;;=fedora
diff --git a/gdb/contrib/gdb-add-index.sh b/gdb/contrib/gdb-add-index.sh
--- a/gdb/contrib/gdb-add-index.sh
+++ b/gdb/contrib/gdb-add-index.sh
@@ -16,14 +16,52 @@
# You should have received a copy of the GNU General Public License
# along with this program. If not, see <http://www.gnu.org/licenses/>.
-# This program assumes gdb and objcopy are in $PATH.
-# If not, or you want others, pass the following in the environment
-GDB=${GDB:=gdb}
+# This program assumes objcopy and readelf are in $PATH. If not, or
+# you want others, pass the following in the environment
OBJCOPY=${OBJCOPY:=objcopy}
READELF=${READELF:=readelf}
myname="${0##*/}"
+# For GDB itself we need to be a little smarter. If GDB is set in the
+# environment then we will use that. But if GDB is not set in the
+# environment then we have a couple of options that we need to check
+# through.
+#
+# Our default choice is for /usr/bin/gdb.minimal. For an explanation
+# of why this is chosen, check out:
+# https://bugzilla.redhat.com/show_bug.cgi?id=1695015
+# https://fedoraproject.org/wiki/Changes/Minimal_GDB_in_buildroot
+#
+# If gdb.minimal is not found then we look for a 'gdb' executable on
+# the path.
+#
+# And finally, we check for /usr/libexec/gdb.
+#
+# If none of those result in a useable GDB then we give an error and
+# exit.
+if test -z "$GDB"; then
+ for possible_gdb in /usr/bin/gdb.minimal gdb /usr/libexec/gdb; do
+ if ! which "$possible_gdb" >/dev/null 2>&1; then
+ continue
+ fi
+
+ possible_gdb=$(which "$possible_gdb")
+
+ if ! test -x "$possible_gdb"; then
+ continue
+ fi
+
+ GDB="$possible_gdb"
+ break
+ done
+
+ if test -z "$GDB"; then
+ echo "$myname: Failed to find a useable GDB binary" 1>&2
+ exit 1
+ fi
+fi
+
dwarf5=""
if [ "$1" = "-dwarf-5" ]; then
dwarf5="$1"

View File

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

View File

@ -0,0 +1,24 @@
From FEDORA_PATCHES Mon Sep 17 00:00:00 2001
From: Nick Clifton <nickc@redhat.com>
Date: Wed, 11 Jan 2023 12:13:46 +0000
Subject: gdb-binutils29988-read_indexed_address.patch
;; Backport "Fix a potential illegal memory access in the BFD library..."
;; (Nick Clifton, binutils/29988)
PR 29988
* dwarf2.c (read_indexed_address): Fix check for an out of range
offset.
diff --git a/bfd/dwarf2.c b/bfd/dwarf2.c
--- a/bfd/dwarf2.c
+++ b/bfd/dwarf2.c
@@ -1412,7 +1412,7 @@ read_indexed_address (uint64_t idx, struct comp_unit *unit)
offset += unit->dwarf_addr_offset;
if (offset < unit->dwarf_addr_offset
|| offset > file->dwarf_addr_size
- || file->dwarf_addr_size - offset < unit->offset_size)
+ || file->dwarf_addr_size - offset < unit->addr_size)
return 0;
info_ptr = file->dwarf_addr_buffer + offset;

View File

@ -0,0 +1,188 @@
From FEDORA_PATCHES Mon Sep 17 00:00:00 2001
From: Andrew Burgess <aburgess@redhat.com>
Date: Tue, 20 Jun 2023 09:46:35 +0100
Subject: gdb-bz2196395-debuginfod-legacy-openssl-crash.patch
;; Backport upstream commit f3eee5861743d635 to fix a crash triggered
;; when debuginfod makes use of particular openssl settings.
gdb/debuginfod: cleanup debuginfod earlier
A GDB crash was discovered on Fedora GDB that was tracked back to an
issue with the way that debuginfod is cleaned up.
The bug was reported on Fedora 37, 38, and 39. Here are the steps to
reproduce:
1. The file /etc/ssl/openssl.cnf contains the following lines:
[provider_sect]
default = default_sect
##legacy = legacy_sect
##
[default_sect]
activate = 1
##[legacy_sect]
##activate = 1
The bug will occur when the '##' characters are removed so that the
lines in question look like this:
[provider_sect]
default = default_sect
legacy = legacy_sect
[default_sect]
activate = 1
[legacy_sect]
activate = 1
2. Clean up any existing debuginfod cache data:
> rm -rf $HOME/.cache/debuginfod_client
3. Run GDB:
> gdb -nx -q -iex 'set trace-commands on' \
-iex 'set debuginfod enabled on' \
-iex 'set confirm off' \
-ex 'start' -ex 'quit' /bin/ls
+set debuginfod enabled on
+set confirm off
Reading symbols from /bin/ls...
Downloading separate debug info for /usr/bin/ls
... snip ...
Temporary breakpoint 1, main (argc=1, argv=0x7fffffffde38) at ../src/ls.c:1646
1646 {
+quit
Fatal signal: Segmentation fault
----- Backtrace -----
... snip ...
So GDB ends up crashing during exit.
What's happening is that when debuginfod is initialised
debuginfod_begin is called (this is in the debuginfod library), this
in turn sets up libcurl, which makes use of openssl. Somewhere during
this setup process an at_exit function is registered to cleanup some
state.
Back in GDB the debuginfod_client object is managed using this code:
/* Deleter for a debuginfod_client. */
struct debuginfod_client_deleter
{
void operator() (debuginfod_client *c)
{
debuginfod_end (c);
}
};
using debuginfod_client_up
= std::unique_ptr<debuginfod_client, debuginfod_client_deleter>;
And then a global debuginfod_client_up is created to hold a pointer to
the debuginfod_client object. As a global this will be cleaned up
using the standard C++ global object destructor mechanism, which is
run after the at_exit handlers.
However, it is expected that when debuginfod_end is called the
debuginfod_client object will still be in a usable state, that is, we
don't expect the at_exit handlers to have run and started cleaning up
the library state.
To fix this issue we need to ensure that debuginfod_end is called
before the at_exit handlers have a chance to run.
This commit removes the debuginfod_client_up type, and instead has GDB
hold a raw pointer to the debuginfod_client object. We then make use
of GDB's make_final_cleanup to register a function that will call
debuginfod_end.
As GDB's final cleanups are called before exit is called, this means
that debuginfod_end will be called before the at_exit handlers are
called, and the crash identified above is resolved.
It's not obvious how this issue can easily be tested for. The bug does
not appear to manifest when using a local debuginfod server, so we'd
need to setup something more involved. For now I'm proposing this
patch without any associated tests.
diff --git a/gdb/debuginfod-support.c b/gdb/debuginfod-support.c
--- a/gdb/debuginfod-support.c
+++ b/gdb/debuginfod-support.c
@@ -96,20 +96,6 @@ struct user_data
ui_out::progress_update progress;
};
-/* Deleter for a debuginfod_client. */
-
-struct debuginfod_client_deleter
-{
- void operator() (debuginfod_client *c)
- {
- debuginfod_end (c);
- }
-};
-
-using debuginfod_client_up
- = std::unique_ptr<debuginfod_client, debuginfod_client_deleter>;
-
-
/* Convert SIZE into a unit suitable for use with progress updates.
SIZE should in given in bytes and will be converted into KB, MB, GB
or remain unchanged. UNIT will be set to "B", "KB", "MB" or "GB"
@@ -180,20 +166,45 @@ progressfn (debuginfod_client *c, long cur, long total)
return 0;
}
+/* Cleanup ARG, which is a debuginfod_client pointer. */
+
+static void
+cleanup_debuginfod_client (void *arg)
+{
+ debuginfod_client *client = static_cast<debuginfod_client *> (arg);
+ debuginfod_end (client);
+}
+
+/* Return a pointer to the single global debuginfod_client, initialising it
+ first if needed. */
+
static debuginfod_client *
get_debuginfod_client ()
{
- static debuginfod_client_up global_client;
+ static debuginfod_client *global_client = nullptr;
if (global_client == nullptr)
{
- global_client.reset (debuginfod_begin ());
+ global_client = debuginfod_begin ();
if (global_client != nullptr)
- debuginfod_set_progressfn (global_client.get (), progressfn);
+ {
+ /* It is important that we cleanup the debuginfod_client object
+ before calling exit. Some of the libraries used by debuginfod
+ make use of at_exit handlers to perform cleanup.
+
+ If we wrapped the debuginfod_client in a unique_ptr and relied
+ on its destructor to cleanup then this would be run as part of
+ the global C++ object destructors, which is after the at_exit
+ handlers, which is too late.
+
+ So instead, we make use of GDB's final cleanup mechanism. */
+ make_final_cleanup (cleanup_debuginfod_client, global_client);
+ debuginfod_set_progressfn (global_client, progressfn);
+ }
}
- return global_client.get ();
+ return global_client;
}
/* Check if debuginfod is enabled. If configured to do so, ask the user

View File

@ -0,0 +1,68 @@
From FEDORA_PATCHES Mon Sep 17 00:00:00 2001
From: Andrew Burgess <aburgess@redhat.com>
Date: Thu, 14 Sep 2023 13:06:26 +0100
Subject: gdb-bz2237392-dwarf-obstack-allocation.patch
;; Backport upstream commit 54392c4df604f20 to fix an incorrect
;; obstack allocation that wold lead to memory corruption.
gdb: fix buffer overflow in DWARF reader
In this commit:
commit 48ac197b0c209ccf1f2de9704eb6cdf7c5c73a8e
Date: Fri Nov 19 10:12:44 2021 -0700
Handle multiple addresses in call_site_target
a buffer overflow bug was introduced when the following code was
added:
CORE_ADDR *saved = XOBNEWVAR (&objfile->objfile_obstack, CORE_ADDR,
addresses.size ());
std::copy (addresses.begin (), addresses.end (), saved);
The definition of XOBNEWVAR is (from libiberty.h):
#define XOBNEWVAR(O, T, S) ((T *) obstack_alloc ((O), (S)))
So 'saved' is going to point to addresses.size () bytes of memory,
however, the std::copy will write addresses.size () number of
CORE_ADDR sized entries to the address pointed to by 'saved', this is
going to result in memory corruption.
The mistake is that we should have used XOBNEWVEC, which allocates a
vector of entries, the definition of XOBNEWVEC is:
#define XOBNEWVEC(O, T, N) \
((T *) obstack_alloc ((O), sizeof (T) * (N)))
Which means we will have set aside enough space to create a copy of
the contents of the addresses vector.
I'm not sure how to create a test for this problem, this issue cropped
up when debugging a particular i686 built binary, which just happened
to trigger a glibc assertion (likely due to random memory corruption),
debugging the same binary built for x86-64 appeared to work just fine.
Using valgrind on the failing GDB binary pointed straight to the cause
of the problem, and with this patch in place there are no longer
valgrind errors in this area.
If anyone has ideas for a test I'm happy to work on something.
Co-Authored-By: Keith Seitz <keiths@redhat.com>
Approved-By: Tom Tromey <tom@tromey.com>
diff --git a/gdb/dwarf2/read.c b/gdb/dwarf2/read.c
--- a/gdb/dwarf2/read.c
+++ b/gdb/dwarf2/read.c
@@ -12506,7 +12506,7 @@ read_call_site_scope (struct die_info *die, struct dwarf2_cu *cu)
std::vector<CORE_ADDR> addresses;
dwarf2_ranges_read_low_addrs (ranges_offset, target_cu,
target_die->tag, addresses);
- CORE_ADDR *saved = XOBNEWVAR (&objfile->objfile_obstack, CORE_ADDR,
+ CORE_ADDR *saved = XOBNEWVEC (&objfile->objfile_obstack, CORE_ADDR,
addresses.size ());
std::copy (addresses.begin (), addresses.end (), saved);
call_site->target.set_loc_array (addresses.size (), saved);

View File

@ -0,0 +1,102 @@
From FEDORA_PATCHES Mon Sep 17 00:00:00 2001
From: Tom Tromey <tromey@adacore.com>
Date: Tue, 6 Dec 2022 12:07:12 -0700
Subject: gdb-bz2237515-debuginfod-double-free.patch
;; Backport upstream commit f96328accde1e63 to fix a potential double
;; free issue in the debuginfod code.
Avoid double-free with debuginfod
PR gdb/29257 points out a possible double free when debuginfod is in
use. Aside from some ugly warts in the symbol code (an ongoing
issue), the underlying issue in this particular case is that elfread.c
seems to assume that symfile_bfd_open will return NULL on error,
whereas in reality it throws an exception. As this code isn't
prepared for an exception, bad things result.
This patch fixes the problem by introducing a non-throwing variant of
symfile_bfd_open and using it in the affected places.
Bug: https://sourceware.org/bugzilla/show_bug.cgi?id=29257
diff --git a/gdb/elfread.c b/gdb/elfread.c
--- a/gdb/elfread.c
+++ b/gdb/elfread.c
@@ -1222,10 +1222,12 @@ elf_symfile_read_dwarf2 (struct objfile *objfile,
if (!debugfile.empty ())
{
- gdb_bfd_ref_ptr debug_bfd (symfile_bfd_open (debugfile.c_str ()));
+ gdb_bfd_ref_ptr debug_bfd
+ (symfile_bfd_open_no_error (debugfile.c_str ()));
- symbol_file_add_separate (debug_bfd, debugfile.c_str (),
- symfile_flags, objfile);
+ if (debug_bfd != nullptr)
+ symbol_file_add_separate (debug_bfd, debugfile.c_str (),
+ symfile_flags, objfile);
}
else
{
@@ -1245,13 +1247,12 @@ elf_symfile_read_dwarf2 (struct objfile *objfile,
if (fd.get () >= 0)
{
/* File successfully retrieved from server. */
- gdb_bfd_ref_ptr debug_bfd (symfile_bfd_open (symfile_path.get ()));
+ gdb_bfd_ref_ptr debug_bfd
+ (symfile_bfd_open_no_error (symfile_path.get ()));
- if (debug_bfd == nullptr)
- warning (_("File \"%s\" from debuginfod cannot be opened as bfd"),
- filename);
- else if (build_id_verify (debug_bfd.get (), build_id->size,
- build_id->data))
+ if (debug_bfd != nullptr
+ && build_id_verify (debug_bfd.get (), build_id->size,
+ build_id->data))
{
symbol_file_add_separate (debug_bfd, symfile_path.get (),
symfile_flags, objfile);
diff --git a/gdb/symfile.c b/gdb/symfile.c
--- a/gdb/symfile.c
+++ b/gdb/symfile.c
@@ -1744,6 +1744,23 @@ symfile_bfd_open (const char *name)
return sym_bfd;
}
+/* See symfile.h. */
+
+gdb_bfd_ref_ptr
+symfile_bfd_open_no_error (const char *name) noexcept
+{
+ try
+ {
+ return symfile_bfd_open (name);
+ }
+ catch (const gdb_exception_error &err)
+ {
+ warning ("%s", err.what ());
+ }
+
+ return nullptr;
+}
+
/* Return the section index for SECTION_NAME on OBJFILE. Return -1 if
the section was not found. */
diff --git a/gdb/symfile.h b/gdb/symfile.h
--- a/gdb/symfile.h
+++ b/gdb/symfile.h
@@ -269,6 +269,11 @@ extern void set_initial_language (void);
extern gdb_bfd_ref_ptr symfile_bfd_open (const char *);
+/* Like symfile_bfd_open, but will not throw an exception on error.
+ Instead, it issues a warning and returns nullptr. */
+
+extern gdb_bfd_ref_ptr symfile_bfd_open_no_error (const char *) noexcept;
+
extern int get_section_index (struct objfile *, const char *);
extern int print_symbol_loading_p (int from_tty, int mainline, int full);

View File

@ -1,254 +0,0 @@
From FEDORA_PATCHES Mon Sep 17 00:00:00 2001
From: Fedora GDB patches <invalid@email.com>
Date: Fri, 27 Oct 2017 21:07:50 +0200
Subject: gdb-bz601887-dwarf4-rh-test.patch
;; Backport DWARF-4 support (BZ 601887, Tom Tromey).
;;=fedoratest
diff --git a/gdb/testsuite/gdb.dwarf2/rh-dwarf4-x86_64.S b/gdb/testsuite/gdb.dwarf2/rh-dwarf4-x86_64.S
new file mode 100644
--- /dev/null
+++ b/gdb/testsuite/gdb.dwarf2/rh-dwarf4-x86_64.S
@@ -0,0 +1,167 @@
+/* This testcase is part of GDB, the GNU debugger.
+
+ Copyright 2010 Free Software Foundation, Inc.
+
+ This program is free software; you can redistribute it and/or modify
+ it under the terms of the GNU General Public License as published by
+ the Free Software Foundation; either version 3 of the License, or
+ (at your option) any later version.
+
+ This program is distributed in the hope that it will be useful,
+ but WITHOUT ANY WARRANTY; without even the implied warranty of
+ MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
+ GNU General Public License for more details.
+
+ You should have received a copy of the GNU General Public License
+ along with this program. If not, see <http://www.gnu.org/licenses/>. */
+
+ .file "rh-dwarf4-x86_64.c"
+ .section .debug_abbrev,"",@progbits
+.Ldebug_abbrev0:
+ .section .debug_info,"",@progbits
+.Ldebug_info0:
+ .section .debug_line,"",@progbits
+.Ldebug_line0:
+ .text
+.Ltext0:
+.globl main
+ .type main, @function
+main:
+.LFB0:
+ .file 1 "gdb.dwarf2/rh-dwarf4-x86_64.c"
+ # gdb.dwarf2/rh-dwarf4-x86_64.c:20
+ .loc 1 20 0
+ .cfi_startproc
+ # basic block 2
+ pushq %rbp
+ .cfi_def_cfa_offset 16
+ movq %rsp, %rbp
+ .cfi_offset 6, -16
+ .cfi_def_cfa_register 6
+ # gdb.dwarf2/rh-dwarf4-x86_64.c:21
+ .loc 1 21 0
+ movl $0, %eax
+ # gdb.dwarf2/rh-dwarf4-x86_64.c:22
+ .loc 1 22 0
+ leave
+ .cfi_def_cfa 7, 8
+ ret
+ .cfi_endproc
+.LFE0:
+ .size main, .-main
+.Letext0:
+ .section .debug_info
+ .long 0x4e # Length of Compilation Unit Info
+ .value 0x4 # DWARF version number
+ .long .Ldebug_abbrev0 # Offset Into Abbrev. Section
+ .byte 0x8 # Pointer Size (in bytes)
+ .uleb128 0x1 # (DIE (0xb) DW_TAG_compile_unit)
+ .long .LASF0 # DW_AT_producer: "GNU C 4.4.4 20100503 (Red Hat 4.4.4-2)"
+ .byte 0x1 # DW_AT_language
+ .long .LASF1 # DW_AT_name: "gdb.dwarf2/rh-dwarf4-x86_64.c"
+ .long .LASF2 # DW_AT_comp_dir
+ .quad .Ltext0 # DW_AT_low_pc
+ .quad .Letext0 # DW_AT_high_pc
+ .long .Ldebug_line0 # DW_AT_stmt_list
+ .uleb128 0x2 # (DIE (0x2d) DW_TAG_subprogram)
+ # DW_AT_external
+ .long .LASF3 # DW_AT_name: "main"
+ .byte 0x1 # DW_AT_decl_file (gdb.dwarf2/rh-dwarf4-x86_64.c)
+ .byte 0x13 # DW_AT_decl_line
+ # DW_AT_prototyped
+ .long 0x4a # DW_AT_type
+ .quad .LFB0 # DW_AT_low_pc
+ .quad .LFE0 # DW_AT_high_pc
+ .uleb128 0x1 # DW_AT_frame_base
+ .byte 0x9c # DW_OP_call_frame_cfa
+ .uleb128 0x3 # (DIE (0x4a) DW_TAG_base_type)
+ .byte 0x4 # DW_AT_byte_size
+ .byte 0x5 # DW_AT_encoding
+ .ascii "int\0" # DW_AT_name
+ .byte 0x0 # end of children of DIE 0xb
+ .section .debug_abbrev
+ .uleb128 0x1 # (abbrev code)
+ .uleb128 0x11 # (TAG: DW_TAG_compile_unit)
+ .byte 0x1 # DW_children_yes
+ .uleb128 0x25 # (DW_AT_producer)
+ .uleb128 0xe # (DW_FORM_strp)
+ .uleb128 0x13 # (DW_AT_language)
+ .uleb128 0xb # (DW_FORM_data1)
+ .uleb128 0x3 # (DW_AT_name)
+ .uleb128 0xe # (DW_FORM_strp)
+ .uleb128 0x1b # (DW_AT_comp_dir)
+ .uleb128 0xe # (DW_FORM_strp)
+ .uleb128 0x11 # (DW_AT_low_pc)
+ .uleb128 0x1 # (DW_FORM_addr)
+ .uleb128 0x12 # (DW_AT_high_pc)
+ .uleb128 0x1 # (DW_FORM_addr)
+ .uleb128 0x10 # (DW_AT_stmt_list)
+ .uleb128 0x17 # (DW_FORM_sec_offset)
+ .byte 0x0
+ .byte 0x0
+ .uleb128 0x2 # (abbrev code)
+ .uleb128 0x2e # (TAG: DW_TAG_subprogram)
+ .byte 0x0 # DW_children_no
+ .uleb128 0x3f # (DW_AT_external)
+ .uleb128 0x19 # (DW_FORM_flag_present)
+ .uleb128 0x3 # (DW_AT_name)
+ .uleb128 0xe # (DW_FORM_strp)
+ .uleb128 0x3a # (DW_AT_decl_file)
+ .uleb128 0xb # (DW_FORM_data1)
+ .uleb128 0x3b # (DW_AT_decl_line)
+ .uleb128 0xb # (DW_FORM_data1)
+ .uleb128 0x27 # (DW_AT_prototyped)
+ .uleb128 0x19 # (DW_FORM_flag_present)
+ .uleb128 0x49 # (DW_AT_type)
+ .uleb128 0x13 # (DW_FORM_ref4)
+ .uleb128 0x11 # (DW_AT_low_pc)
+ .uleb128 0x1 # (DW_FORM_addr)
+ .uleb128 0x12 # (DW_AT_high_pc)
+ .uleb128 0x1 # (DW_FORM_addr)
+ .uleb128 0x40 # (DW_AT_frame_base)
+ .uleb128 0x18 # (DW_FORM_exprloc)
+ .byte 0x0
+ .byte 0x0
+ .uleb128 0x3 # (abbrev code)
+ .uleb128 0x24 # (TAG: DW_TAG_base_type)
+ .byte 0x0 # DW_children_no
+ .uleb128 0xb # (DW_AT_byte_size)
+ .uleb128 0xb # (DW_FORM_data1)
+ .uleb128 0x3e # (DW_AT_encoding)
+ .uleb128 0xb # (DW_FORM_data1)
+ .uleb128 0x3 # (DW_AT_name)
+ .uleb128 0x8 # (DW_FORM_string)
+ .byte 0x0
+ .byte 0x0
+ .byte 0x0
+ .section .debug_pubnames,"",@progbits
+ .long 0x17 # Length of Public Names Info
+ .value 0x2 # DWARF Version
+ .long .Ldebug_info0 # Offset of Compilation Unit Info
+ .long 0x52 # Compilation Unit Length
+ .long 0x2d # DIE offset
+ .ascii "main\0" # external name
+ .long 0x0
+ .section .debug_aranges,"",@progbits
+ .long 0x2c # Length of Address Ranges Info
+ .value 0x2 # DWARF Version
+ .long .Ldebug_info0 # Offset of Compilation Unit Info
+ .byte 0x8 # Size of Address
+ .byte 0x0 # Size of Segment Descriptor
+ .value 0x0 # Pad to 16 byte boundary
+ .value 0x0
+ .quad .Ltext0 # Address
+ .quad .Letext0-.Ltext0 # Length
+ .quad 0x0
+ .quad 0x0
+ .section .debug_str,"MS",@progbits,1
+.LASF2:
+ .string "."
+.LASF0:
+ .string "GNU C 4.4.4 20100503 (Red Hat 4.4.4-2)"
+.LASF1:
+ .string "gdb.dwarf2/rh-dwarf4-x86_64.c"
+.LASF3:
+ .string "main"
+ .ident "GCC: (GNU) 4.4.4 20100503 (Red Hat 4.4.4-2)"
+ .section .note.GNU-stack,"",@progbits
diff --git a/gdb/testsuite/gdb.dwarf2/rh-dwarf4-x86_64.c b/gdb/testsuite/gdb.dwarf2/rh-dwarf4-x86_64.c
new file mode 100644
--- /dev/null
+++ b/gdb/testsuite/gdb.dwarf2/rh-dwarf4-x86_64.c
@@ -0,0 +1,22 @@
+/* This testcase is part of GDB, the GNU debugger.
+
+ Copyright 2010 Free Software Foundation, Inc.
+
+ This program is free software; you can redistribute it and/or modify
+ it under the terms of the GNU General Public License as published by
+ the Free Software Foundation; either version 3 of the License, or
+ (at your option) any later version.
+
+ This program is distributed in the hope that it will be useful,
+ but WITHOUT ANY WARRANTY; without even the implied warranty of
+ MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
+ GNU General Public License for more details.
+
+ You should have received a copy of the GNU General Public License
+ along with this program. If not, see <http://www.gnu.org/licenses/>. */
+
+int
+main (void)
+{
+ return 0;
+}
diff --git a/gdb/testsuite/gdb.dwarf2/rh-dwarf4-x86_64.exp b/gdb/testsuite/gdb.dwarf2/rh-dwarf4-x86_64.exp
new file mode 100644
--- /dev/null
+++ b/gdb/testsuite/gdb.dwarf2/rh-dwarf4-x86_64.exp
@@ -0,0 +1,42 @@
+# Copyright 2010 Free Software Foundation, Inc.
+
+# This program is free software; you can redistribute it and/or modify
+# it under the terms of the GNU General Public License as published by
+# the Free Software Foundation; either version 3 of the License, or
+# (at your option) any later version.
+#
+# This program is distributed in the hope that it will be useful,
+# but WITHOUT ANY WARRANTY; without even the implied warranty of
+# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
+# GNU General Public License for more details.
+#
+# You should have received a copy of the GNU General Public License
+# along with this program. If not, see <http://www.gnu.org/licenses/>.
+
+# This test can only be run on targets which support DWARF-2 and use gas.
+# For now pick a sampling of likely targets.
+if {![istarget *-*-linux*]
+ && ![istarget *-*-gnu*]
+ && ![istarget *-*-elf*]
+ && ![istarget *-*-openbsd*]
+ && ![istarget arm-*-eabi*]
+ && ![istarget powerpc-*-eabi*]} {
+ return 0
+}
+
+if {![istarget x86_64-*]} {
+ return 0
+}
+
+set testfile "rh-dwarf4-x86_64"
+set srcfile ${testfile}.S
+set executable ${testfile}.x
+set binfile [standard_output_file ${executable}]
+
+if { [gdb_compile "${srcdir}/${subdir}/${srcfile}" "${binfile}" object {}] != "" } {
+ return -1
+}
+
+clean_restart $executable
+
+gdb_test "ptype main" {type = int \(void\)}

View File

@ -1,26 +0,0 @@
From FEDORA_PATCHES Mon Sep 17 00:00:00 2001
From: Fedora GDB patches <invalid@email.com>
Date: Fri, 27 Oct 2017 21:07:50 +0200
Subject: gdb-ccache-workaround.patch
;; Workaround ccache making lineno non-zero for command-line definitions.
;;=fedoratest: ccache is rarely used and it is even fixed now.
diff --git a/gdb/testsuite/gdb.base/macscp.exp b/gdb/testsuite/gdb.base/macscp.exp
--- a/gdb/testsuite/gdb.base/macscp.exp
+++ b/gdb/testsuite/gdb.base/macscp.exp
@@ -27,6 +27,14 @@ if { [test_compiler_info "gcc-*"] } {
lappend options additional_flags=-fdebug-macro
}
+# Workaround ccache making lineno non-zero for command-line definitions.
+if {[find_gcc] == "gcc" && [file executable "/usr/bin/gcc"]} {
+ set result [catch "exec which gcc" output]
+ if {$result == 0 && [string first "/ccache/" $output] > -1} {
+ lappend options "compiler=/usr/bin/gcc"
+ }
+}
+
# Generate the intermediate object file. This is required by Darwin to
# have access to the .debug_macinfo section.
if {[gdb_compile "${srcdir}/${subdir}/macscp1.c" "${objfile}" \

View File

@ -9,7 +9,7 @@ Subject: gdb-container-rh-pkg.patch
diff --git a/gdb/remote.c b/gdb/remote.c
--- a/gdb/remote.c
+++ b/gdb/remote.c
@@ -14343,7 +14343,17 @@ remote_target::pid_to_exec_file (int pid)
@@ -14301,7 +14301,17 @@ remote_target::pid_to_exec_file (int pid)
char *annex = NULL;
if (packet_support (PACKET_qXfer_exec_file) != PACKET_ENABLE)

View File

@ -25,9 +25,9 @@ diff --git a/gdb/testsuite/gdb.base/solib-symbol.exp b/gdb/testsuite/gdb.base/so
set bin_flags [list debug shlib=${binfile_lib}]
+set executable ${testfile}
if [get_compiler_info] {
return -1
@@ -70,8 +71,26 @@ gdb_test "br foo2" \
if { [gdb_compile_shlib ${srcfile_lib} ${binfile_lib} $lib_flags] != ""
|| [gdb_compile ${srcfile} ${binfile} executable $bin_flags] != "" } {
@@ -66,8 +67,26 @@ gdb_test "br foo2" \
"Breakpoint.*: foo2. .2 locations..*" \
"foo2 in mdlib"

View File

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

View File

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

File diff suppressed because it is too large Load Diff

View File

@ -12,7 +12,7 @@ https://bugzilla.redhat.com/show_bug.cgi?id=1270534
diff --git a/gdb/configure b/gdb/configure
--- a/gdb/configure
+++ b/gdb/configure
@@ -9567,6 +9567,7 @@ if test x"$prefer_curses" = xyes; then
@@ -20916,6 +20916,7 @@ if test x"$prefer_curses" = xyes; then
# search /usr/local/include, if ncurses is installed in /usr/local. A
# default installation of ncurses on alpha*-dec-osf* will lead to such
# a situation.
@ -20,7 +20,7 @@ diff --git a/gdb/configure b/gdb/configure
{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for library containing waddstr" >&5
$as_echo_n "checking for library containing waddstr... " >&6; }
if ${ac_cv_search_waddstr+:} false; then :
@@ -9591,7 +9592,7 @@ return waddstr ();
@@ -20940,7 +20941,7 @@ return waddstr ();
return 0;
}
_ACEOF
@ -29,7 +29,7 @@ diff --git a/gdb/configure b/gdb/configure
if test -z "$ac_lib"; then
ac_res="none required"
else
@@ -9665,6 +9666,7 @@ case $host_os in
@@ -21014,6 +21015,7 @@ case $host_os in
esac
# These are the libraries checked by Readline.
@ -37,7 +37,7 @@ diff --git a/gdb/configure b/gdb/configure
{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for library containing tgetent" >&5
$as_echo_n "checking for library containing tgetent... " >&6; }
if ${ac_cv_search_tgetent+:} false; then :
@@ -9689,7 +9691,7 @@ return tgetent ();
@@ -21038,7 +21040,7 @@ return tgetent ();
return 0;
}
_ACEOF
@ -49,7 +49,7 @@ diff --git a/gdb/configure b/gdb/configure
diff --git a/gdb/configure.ac b/gdb/configure.ac
--- a/gdb/configure.ac
+++ b/gdb/configure.ac
@@ -713,7 +713,8 @@ if test x"$prefer_curses" = xyes; then
@@ -705,7 +705,8 @@ if test x"$prefer_curses" = xyes; then
# search /usr/local/include, if ncurses is installed in /usr/local. A
# default installation of ncurses on alpha*-dec-osf* will lead to such
# a situation.
@ -59,7 +59,7 @@ diff --git a/gdb/configure.ac b/gdb/configure.ac
if test "$ac_cv_search_waddstr" != no; then
curses_found=yes
@@ -755,7 +756,8 @@ case $host_os in
@@ -747,7 +748,8 @@ case $host_os in
esac
# These are the libraries checked by Readline.

View File

@ -1,104 +0,0 @@
From FEDORA_PATCHES Mon Sep 17 00:00:00 2001
From: Fedora GDB patches <invalid@email.com>
Date: Fri, 27 Oct 2017 21:07:50 +0200
Subject: gdb-fortran-frame-string.patch
;; Display Fortran strings in backtraces.
;;=fedoratest
http://sourceware.org/ml/gdb-patches/2014-07/msg00709.html
Hi,
for Fortran it fixes displaying normal strings also in frames/backtraces:
(gdb) frame
->
The patch is simple and I do not see why it should not be this way.
For C/C++ TYPE_CODE_STRING is not used. I am not aware of Pascal but that
language is currently not really much supported in GDB anyway.
This was a part of my archer/jankratochvil/vla branch but it is not a part of
the Intel VLA patchset as it in fact is completely unrelated to "VLA".
No regressions on {x86_64,x86_64-m32,i686}-fedora22pre-linux-gnu.
Thanks,
Jan
diff --git a/gdb/testsuite/gdb.fortran/fortran-frame-string.exp b/gdb/testsuite/gdb.fortran/fortran-frame-string.exp
new file mode 100644
--- /dev/null
+++ b/gdb/testsuite/gdb.fortran/fortran-frame-string.exp
@@ -0,0 +1,36 @@
+# Copyright 2014 Free Software Foundation, Inc.
+
+# This program is free software; you can redistribute it and/or modify
+# it under the terms of the GNU General Public License as published by
+# the Free Software Foundation; either version 2 of the License, or
+# (at your option) any later version.
+#
+# This program is distributed in the hope that it will be useful,
+# but WITHOUT ANY WARRANTY; without even the implied warranty of
+# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
+# GNU General Public License for more details.
+#
+# You should have received a copy of the GNU General Public License
+# along with this program; if not, write to the Free Software
+# Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA.
+
+standard_testfile .f90
+if { [prepare_for_testing ${testfile}.exp ${testfile} ${srcfile} {debug f90}] } {
+ return -1
+}
+
+if ![runto MAIN__] then {
+ perror "couldn't run to breakpoint MAIN__"
+ continue
+}
+
+gdb_breakpoint [gdb_get_line_number "s = s"]
+gdb_continue_to_breakpoint "s = s"
+
+gdb_test "ptype s" {type = character\*3}
+gdb_test "p s" " = 'foo'"
+
+# Fix rejected upstream:
+# https://sourceware.org/ml/gdb-patches/2014-07/msg00768.html
+setup_kfail "rejected" *-*-*
+gdb_test "frame" { \(s='foo', .*}
diff --git a/gdb/testsuite/gdb.fortran/fortran-frame-string.f90 b/gdb/testsuite/gdb.fortran/fortran-frame-string.f90
new file mode 100644
--- /dev/null
+++ b/gdb/testsuite/gdb.fortran/fortran-frame-string.f90
@@ -0,0 +1,28 @@
+! Copyright 2014 Free Software Foundation, Inc.
+!
+! This program is free software; you can redistribute it and/or modify
+! it under the terms of the GNU General Public License as published by
+! the Free Software Foundation; either version 2 of the License, or
+! (at your option) any later version.
+!
+! This program is distributed in the hope that it will be useful,
+! but WITHOUT ANY WARRANTY; without even the implied warranty of
+! MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
+! GNU General Public License for more details.
+!
+! You should have received a copy of the GNU General Public License
+! along with this program; if not, write to the Free Software
+! Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA.
+!
+! Ihis file is the Fortran source file for dynamic.exp.
+! Original file written by Jakub Jelinek <jakub@redhat.com>.
+! Modified for the GDB testcase by Jan Kratochvil <jan.kratochvil@redhat.com>.
+
+ subroutine f(s)
+ character*3 s
+ s = s
+ end
+
+ program main
+ call f ('foo')
+ end

View File

@ -0,0 +1,43 @@
From FEDORA_PATCHES Mon Sep 17 00:00:00 2001
From: Kevin Buettner <kevinb@redhat.com>
Date: Fri, 20 Jan 2023 15:15:59 -0700
Subject: gdb-gcc-13-backport-self-move-diagnostic-fix
;; gcc 13 fallout: Backport Jan-Benedict Glaw's fix for the self-move
;; warning check
Fix self-move warning check for GCC 13+
GCC 13 got the self-move warning (0abb78dda084a14b3d955757c6431fff71c263f3),
but that warning is only checked for clang, resulting in:
/usr/lib/gcc-snapshot/bin/g++ -x c++ -I. -I. -I./config -DLOCALEDIR="\"/tmp/gdb-m68k-linux/share/locale\"" -DHAVE_CONFIG_H -I./../include/opcode -I./../readline/readline/.. -I./../zlib -I../bfd -I./../bfd -I./../include -I../libdecnumber -I./../libdecnumber -I./../gnulib/import -I../gnulib/import -I./.. -I.. -I./../libbacktrace/ -I../libbacktrace/ -DTUI=1 -I./.. -pthread -Wall -Wpointer-arith -Wno-unused -Wunused-value -Wunused-variable -Wunused-function -Wno-switch -Wno-char-subscripts -Wempty-body -Wunused-but-set-parameter -Wunused-but-set-variable -Wno-sign-compare -Wno-error=maybe-uninitialized -Wno-mismatched-tags -Wsuggest-override -Wimplicit-fallthrough=3 -Wduplicated-cond -Wshadow=local -Wdeprecated-copy -Wdeprecated-copy-dtor -Wredundant-move -Wmissing-declarations -Wstrict-null-sentinel -Wformat -Wformat-nonliteral -Werror -g -O2 -c -o unittests/environ-selftests.o -MT unittests/environ-selftests.o -MMD -MP -MF unittests/.deps/environ-selftests.Tpo unittests/environ-selftests.c
unittests/environ-selftests.c: In function 'void selftests::gdb_environ_tests::test_self_move()':
unittests/environ-selftests.c:228:7: error: moving 'env' of type 'gdb_environ' to itself [-Werror=self-move]
228 | env = std::move (env);
| ~~~~^~~~~~~~~~~~~~~~~
unittests/environ-selftests.c:228:7: note: remove 'std::move' call
cc1plus: all warnings being treated as errors
make[1]: *** [Makefile:1896: unittests/environ-selftests.o] Error 1
make[1]: Leaving directory '/var/lib/laminar/run/gdb-m68k-linux/3/binutils-gdb/gdb'
make: *** [Makefile:13193: all-gdb] Error 2
diff --git a/include/diagnostics.h b/include/diagnostics.h
--- a/include/diagnostics.h
+++ b/include/diagnostics.h
@@ -79,6 +79,15 @@
# define DIAGNOSTIC_IGNORE_FORMAT_NONLITERAL \
DIAGNOSTIC_IGNORE ("-Wformat-nonliteral")
+# if __GNUC__ >= 5
+# define DIAGNOSTIC_IGNORE_UNUSED_BUT_SET_VARIABLE \
+ DIAGNOSTIC_IGNORE ("-Wunused-but-set-variable")
+# endif
+
+# if __GNUC__ >= 13
+# define DIAGNOSTIC_IGNORE_SELF_MOVE DIAGNOSTIC_IGNORE ("-Wself-move")
+# endif
+
/* GCC 4.8's "diagnostic push/pop" seems broken when using this, -Wswitch
remains enabled at the error level even after a pop. Therefore, don't
use it for GCC < 5. */

View File

@ -1,37 +0,0 @@
From FEDORA_PATCHES Mon Sep 17 00:00:00 2001
From: Fedora GDB patches <invalid@email.com>
Date: Fri, 27 Oct 2017 21:07:50 +0200
Subject: gdb-libexec-add-index.patch
;; Fix gdb-headless /usr/bin/ executables (BZ 1390251).
;;
;; Also, make /usr/bin/gdb.minimal be the default GDB used, if it's
;; present. For rationale, see:
;;
;; https://fedoraproject.org/wiki/Changes/Minimal_GDB_in_buildroot
;;=fedora
diff --git a/gdb/contrib/gdb-add-index.sh b/gdb/contrib/gdb-add-index.sh
--- a/gdb/contrib/gdb-add-index.sh
+++ b/gdb/contrib/gdb-add-index.sh
@@ -22,6 +22,20 @@ GDB=${GDB:=gdb}
OBJCOPY=${OBJCOPY:=objcopy}
READELF=${READELF:=readelf}
+GDB2=/usr/libexec/gdb
+if test -x $GDB2 && ! which $GDB &>/dev/null; then
+ GDB=$GDB2
+fi
+
+# We default to using /usr/bin/gdb.minimal if it's present. See
+# https://bugzilla.redhat.com/show_bug.cgi?id=1695015 and
+# https://fedoraproject.org/wiki/Changes/Minimal_GDB_in_buildroot for
+# explanations.
+GDB3=/usr/bin/gdb.minimal
+if test -x $GDB3; then
+ GDB=$GDB3
+fi
+
myname="${0##*/}"
dwarf5=""

View File

@ -1,165 +0,0 @@
From FEDORA_PATCHES Mon Sep 17 00:00:00 2001
From: Fedora GDB patches <invalid@email.com>
Date: Fri, 27 Oct 2017 21:07:50 +0200
Subject: gdb-lineno-makeup-test.patch
;; Testcase for "Do not make up line information" fix by Daniel Jacobowitz.
;;=fedoratest
New testcase for:
https://bugzilla.redhat.com/show_bug.cgi?id=466222
(for the first / customer recommended fix)
and the upstream fix:
http://sourceware.org/ml/gdb-patches/2006-11/msg00253.html
[rfc] Do not make up line information
http://sourceware.org/ml/gdb-cvs/2006-11/msg00127.html
diff --git a/gdb/testsuite/gdb.base/lineno-makeup-func.c b/gdb/testsuite/gdb.base/lineno-makeup-func.c
new file mode 100644
--- /dev/null
+++ b/gdb/testsuite/gdb.base/lineno-makeup-func.c
@@ -0,0 +1,21 @@
+/* This testcase is part of GDB, the GNU debugger.
+
+ Copyright 2009 Free Software Foundation, Inc.
+
+ This program is free software; you can redistribute it and/or modify
+ it under the terms of the GNU General Public License as published by
+ the Free Software Foundation; either version 3 of the License, or
+ (at your option) any later version.
+
+ This program is distributed in the hope that it will be useful,
+ but WITHOUT ANY WARRANTY; without even the implied warranty of
+ MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
+ GNU General Public License for more details.
+
+ You should have received a copy of the GNU General Public License
+ along with this program. If not, see <http://www.gnu.org/licenses/>. */
+
+void
+func (void)
+{
+}
diff --git a/gdb/testsuite/gdb.base/lineno-makeup.c b/gdb/testsuite/gdb.base/lineno-makeup.c
new file mode 100644
--- /dev/null
+++ b/gdb/testsuite/gdb.base/lineno-makeup.c
@@ -0,0 +1,35 @@
+/* This testcase is part of GDB, the GNU debugger.
+
+ Copyright 2009 Free Software Foundation, Inc.
+
+ This program is free software; you can redistribute it and/or modify
+ it under the terms of the GNU General Public License as published by
+ the Free Software Foundation; either version 3 of the License, or
+ (at your option) any later version.
+
+ This program is distributed in the hope that it will be useful,
+ but WITHOUT ANY WARRANTY; without even the implied warranty of
+ MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
+ GNU General Public License for more details.
+
+ You should have received a copy of the GNU General Public License
+ along with this program. If not, see <http://www.gnu.org/licenses/>. */
+
+/* DW_AT_low_pc-DW_AT_high_pc should cover the function without line number
+ information (.debug_line) so we cannot use an external object file.
+
+ It must not be just a label as it would alias on the next function even for
+ correct GDB. Therefore some stub data must be placed there.
+
+ We need to provide a real stub function body as at least s390
+ (s390_analyze_prologue) would skip the whole body till reaching `main'. */
+
+extern void func (void);
+asm ("func: .incbin \"" BINFILENAME "\"");
+
+int
+main (void)
+{
+ func ();
+ return 0;
+}
diff --git a/gdb/testsuite/gdb.base/lineno-makeup.exp b/gdb/testsuite/gdb.base/lineno-makeup.exp
new file mode 100644
--- /dev/null
+++ b/gdb/testsuite/gdb.base/lineno-makeup.exp
@@ -0,0 +1,78 @@
+# Copyright 2009 Free Software Foundation, Inc.
+
+# This program is free software; you can redistribute it and/or modify
+# it under the terms of the GNU General Public License as published by
+# the Free Software Foundation; either version 3 of the License, or
+# (at your option) any later version.
+#
+# This program is distributed in the hope that it will be useful,
+# but WITHOUT ANY WARRANTY; without even the implied warranty of
+# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
+# GNU General Public License for more details.
+#
+# You should have received a copy of the GNU General Public License
+# along with this program. If not, see <http://www.gnu.org/licenses/>.
+
+set testfile "lineno-makeup"
+set srcfuncfile ${testfile}-func.c
+set srcfile ${testfile}.c
+set objfuncfile [standard_output_file ${testfile}-func.o]
+set binfuncfile [standard_output_file ${testfile}-func.bin]
+set binfile [standard_output_file ${testfile}]
+
+if { [gdb_compile "${srcdir}/${subdir}/${srcfuncfile}" "${objfuncfile}" object {}] != "" } {
+ gdb_suppress_entire_file "Testcase compile failed, so all tests in this file will automatically fail."
+}
+
+set objcopy [catch "exec objcopy -O binary --only-section .text ${objfuncfile} ${binfuncfile}" output]
+verbose -log "objcopy=$objcopy: $output"
+if { $objcopy != 0 } {
+ gdb_suppress_entire_file "Testcase compile failed, so all tests in this file will automatically fail."
+}
+set binfuncfilesize [file size $binfuncfile]
+verbose -log "file size $binfuncfile = $binfuncfilesize"
+
+if { [gdb_compile "${srcdir}/${subdir}/${srcfile}" "${binfile}" executable [list debug additional_flags=-DBINFILENAME=\"$binfuncfile\"]] != "" } {
+ gdb_suppress_entire_file "Testcase compile failed, so all tests in this file will automatically fail."
+}
+
+gdb_exit
+gdb_start
+gdb_reinitialize_dir $srcdir/$subdir
+gdb_load ${binfile}
+
+set b_addr ""
+set test "break func"
+gdb_test_multiple $test $test {
+ -re "Breakpoint \[0-9\]+ at (0x\[0-9a-f\]+)\r\n$gdb_prompt $" {
+ set b_addr $expect_out(1,string)
+ pass $test
+ }
+ -re "Breakpoint \[0-9\]+ at (0x\[0-9a-f\]+): .*\r\n$gdb_prompt $" {
+ set b_addr $expect_out(1,string)
+ fail $test
+ }
+}
+verbose -log "b_addr=<$b_addr>"
+
+set p_addr ""
+set test "print func"
+gdb_test_multiple $test $test {
+ -re "\\$\[0-9\]+ = {<text variable, no debug info>} (0x\[0-9a-f\]+) <func>\r\n$gdb_prompt $" {
+ set p_addr $expect_out(1,string)
+ pass $test
+ }
+}
+verbose -log "p_addr=<$p_addr>"
+
+set test "break address belongs to func"
+if {$b_addr == $p_addr} {
+ pass "$test (exact match)"
+} else {
+ set skip [expr $b_addr - $p_addr]
+ if {$skip > 0 && $skip < $binfuncfilesize} {
+ pass "$test (prologue skip by $skip bytes)"
+ } else {
+ fail $test
+ }
+}

View File

@ -213,7 +213,7 @@ diff --git a/gdb/nat/linux-btrace.h b/gdb/nat/linux-btrace.h
diff --git a/gdbsupport/common.m4 b/gdbsupport/common.m4
--- a/gdbsupport/common.m4
+++ b/gdbsupport/common.m4
@@ -156,7 +156,7 @@ AC_DEFUN([GDB_AC_COMMON], [
@@ -166,7 +166,7 @@ AC_DEFUN([GDB_AC_COMMON], [
AC_PREPROC_IFELSE([AC_LANG_SOURCE([[
#include <linux/perf_event.h>
#ifndef PERF_ATTR_SIZE_VER5

View File

@ -1,62 +0,0 @@
From FEDORA_PATCHES Mon Sep 17 00:00:00 2001
From: Fedora GDB patches <invalid@email.com>
Date: Fri, 27 Oct 2017 21:07:50 +0200
Subject: gdb-opcodes-clflushopt-test.patch
;; Test clflushopt instruction decode (for RH BZ 1262471).
;;=fedoratest
diff --git a/gdb/testsuite/gdb.arch/amd64-clflushopt.S b/gdb/testsuite/gdb.arch/amd64-clflushopt.S
new file mode 100644
--- /dev/null
+++ b/gdb/testsuite/gdb.arch/amd64-clflushopt.S
@@ -0,0 +1,19 @@
+/* Copyright 2016 Free Software Foundation, Inc.
+
+ This program is free software; you can redistribute it and/or modify
+ it under the terms of the GNU General Public License as published by
+ the Free Software Foundation; either version 3 of the License, or
+ (at your option) any later version.
+
+ This program is distributed in the hope that it will be useful,
+ but WITHOUT ANY WARRANTY; without even the implied warranty of
+ MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
+ GNU General Public License for more details.
+
+ You should have received a copy of the GNU General Public License
+ along with this program. If not, see <http://www.gnu.org/licenses/>.
+
+ This file is part of the gdb testsuite. */
+
+_start: .globl _start
+ clflushopt (%edi)
diff --git a/gdb/testsuite/gdb.arch/amd64-clflushopt.exp b/gdb/testsuite/gdb.arch/amd64-clflushopt.exp
new file mode 100644
--- /dev/null
+++ b/gdb/testsuite/gdb.arch/amd64-clflushopt.exp
@@ -0,0 +1,25 @@
+# Copyright 2016 Free Software Foundation, Inc.
+
+# This program is free software; you can redistribute it and/or modify
+# it under the terms of the GNU General Public License as published by
+# the Free Software Foundation; either version 3 of the License, or
+# (at your option) any later version.
+#
+# This program is distributed in the hope that it will be useful,
+# but WITHOUT ANY WARRANTY; without even the implied warranty of
+# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
+# GNU General Public License for more details.
+#
+# You should have received a copy of the GNU General Public License
+# along with this program. If not, see <http://www.gnu.org/licenses/>.
+
+if { ![istarget "x86_64-*-*"] && ![istarget "i?86-*-*"] } then {
+ verbose "Skipping amd64 clflushopt test."
+ return
+}
+
+if [prepare_for_testing amd64-clflushopt.exp amd64-clflushopt amd64-clflushopt.S [list debug "additional_flags=-nostdlib"]] {
+ return -1
+}
+
+gdb_test "disas _start" "Dump of assembler code for function _start:\r\n *0x\[0-9a-f\]+ <\[+\]0>:\tclflushopt \\(%edi\\)\r\nEnd of assembler dump\\." "clflushopt"

View File

@ -1,229 +0,0 @@
From FEDORA_PATCHES Mon Sep 17 00:00:00 2001
From: Fedora GDB patches <invalid@email.com>
Date: Fri, 27 Oct 2017 21:07:50 +0200
Subject: gdb-physname-pr11734-test.patch
;; Fix regressions on C++ names resolving (PR 11734, PR 12273, Keith Seitz).
;;=fedoratest
http://sourceware.org/ml/gdb-patches/2010-12/msg00263.html
diff --git a/gdb/testsuite/gdb.cp/pr11734-1.cc b/gdb/testsuite/gdb.cp/pr11734-1.cc
new file mode 100644
--- /dev/null
+++ b/gdb/testsuite/gdb.cp/pr11734-1.cc
@@ -0,0 +1,29 @@
+/* This testcase is part of GDB, the GNU debugger.
+
+ Copyright 2010 Free Software Foundation, Inc.
+
+ This program is free software; you can redistribute it and/or modify
+ it under the terms of the GNU General Public License as published by
+ the Free Software Foundation; either version 3 of the License, or
+ (at your option) any later version.
+
+ This program is distributed in the hope that it will be useful,
+ but WITHOUT ANY WARRANTY; without even the implied warranty of
+ MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
+ GNU General Public License for more details.
+
+ You should have received a copy of the GNU General Public License
+ along with this program. If not, see <http://www.gnu.org/licenses/>.
+
+ Please email any bugs, comments, and/or additions to this file to:
+ bug-gdb@gnu.org */
+
+#include "pr11734.h"
+
+int
+main ()
+{
+ pr11734 *p = new pr11734;
+ p->foo ();
+ return 0;
+}
diff --git a/gdb/testsuite/gdb.cp/pr11734-2.cc b/gdb/testsuite/gdb.cp/pr11734-2.cc
new file mode 100644
--- /dev/null
+++ b/gdb/testsuite/gdb.cp/pr11734-2.cc
@@ -0,0 +1,26 @@
+/* This testcase is part of GDB, the GNU debugger.
+
+ Copyright 2010 Free Software Foundation, Inc.
+
+ This program is free software; you can redistribute it and/or modify
+ it under the terms of the GNU General Public License as published by
+ the Free Software Foundation; either version 3 of the License, or
+ (at your option) any later version.
+
+ This program is distributed in the hope that it will be useful,
+ but WITHOUT ANY WARRANTY; without even the implied warranty of
+ MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
+ GNU General Public License for more details.
+
+ You should have received a copy of the GNU General Public License
+ along with this program. If not, see <http://www.gnu.org/licenses/>.
+
+ Please email any bugs, comments, and/or additions to this file to:
+ bug-gdb@gnu.org */
+
+#include "pr11734.h"
+
+void
+pr11734::foo(void)
+{
+}
diff --git a/gdb/testsuite/gdb.cp/pr11734-3.cc b/gdb/testsuite/gdb.cp/pr11734-3.cc
new file mode 100644
--- /dev/null
+++ b/gdb/testsuite/gdb.cp/pr11734-3.cc
@@ -0,0 +1,26 @@
+/* This testcase is part of GDB, the GNU debugger.
+
+ Copyright 2010 Free Software Foundation, Inc.
+
+ This program is free software; you can redistribute it and/or modify
+ it under the terms of the GNU General Public License as published by
+ the Free Software Foundation; either version 3 of the License, or
+ (at your option) any later version.
+
+ This program is distributed in the hope that it will be useful,
+ but WITHOUT ANY WARRANTY; without even the implied warranty of
+ MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
+ GNU General Public License for more details.
+
+ You should have received a copy of the GNU General Public License
+ along with this program. If not, see <http://www.gnu.org/licenses/>.
+
+ Please email any bugs, comments, and/or additions to this file to:
+ bug-gdb@gnu.org */
+
+#include "pr11734.h"
+
+void
+pr11734::foo (int a)
+{
+}
diff --git a/gdb/testsuite/gdb.cp/pr11734-4.cc b/gdb/testsuite/gdb.cp/pr11734-4.cc
new file mode 100644
--- /dev/null
+++ b/gdb/testsuite/gdb.cp/pr11734-4.cc
@@ -0,0 +1,26 @@
+/* This testcase is part of GDB, the GNU debugger.
+
+ Copyright 2010 Free Software Foundation, Inc.
+
+ This program is free software; you can redistribute it and/or modify
+ it under the terms of the GNU General Public License as published by
+ the Free Software Foundation; either version 3 of the License, or
+ (at your option) any later version.
+
+ This program is distributed in the hope that it will be useful,
+ but WITHOUT ANY WARRANTY; without even the implied warranty of
+ MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
+ GNU General Public License for more details.
+
+ You should have received a copy of the GNU General Public License
+ along with this program. If not, see <http://www.gnu.org/licenses/>.
+
+ Please email any bugs, comments, and/or additions to this file to:
+ bug-gdb@gnu.org */
+
+#include "pr11734.h"
+
+void
+pr11734::foo (char *a)
+{
+}
diff --git a/gdb/testsuite/gdb.cp/pr11734.exp b/gdb/testsuite/gdb.cp/pr11734.exp
new file mode 100644
--- /dev/null
+++ b/gdb/testsuite/gdb.cp/pr11734.exp
@@ -0,0 +1,55 @@
+# Copyright 2010 Free Software Foundation, Inc.
+#
+# Contributed by Red Hat, originally written by Keith Seitz.
+#
+# This program is free software; you can redistribute it and/or modify
+# it under the terms of the GNU General Public License as published by
+# the Free Software Foundation; either version 3 of the License, or
+# (at your option) any later version.
+#
+# This program is distributed in the hope that it will be useful,
+# but WITHOUT ANY WARRANTY; without even the implied warranty of
+# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
+# GNU General Public License for more details.
+#
+# You should have received a copy of the GNU General Public License
+# along with this program. If not, see <http://www.gnu.org/licenses/>.
+
+# This file is part of the gdb testsuite.
+
+if { [skip_cplus_tests] } { continue }
+
+set testfile "pr11734"
+set class $testfile
+
+set srcfiles {}
+for {set i 1} {$i < 5} {incr i} {
+ lappend srcfiles $testfile-$i.cc
+}
+
+prepare_for_testing pr11734 $testfile $srcfiles {c++ debug}
+
+if {![runto_main]} {
+ perror "couldn't run to breakpoint"
+ continue
+}
+
+# An array holding the overload types for the method pr11734::foo. The
+# first element is the overloaded method parameter. The second element
+# is the expected source file number, e.g. "pr11734-?.cc".
+array set tests {
+ "char*" 4
+ "int" 3
+ "" 2
+}
+
+# Test each overload instance twice: once quoted, once unquoted
+foreach ovld [array names tests] {
+ set method "${class}::foo\($ovld\)"
+ set result "Breakpoint (\[0-9\]).*file .*/$class-$tests($ovld).*"
+ gdb_test "break $method" $result
+ gdb_test "break '$method'" $result
+}
+
+gdb_exit
+return 0
diff --git a/gdb/testsuite/gdb.cp/pr11734.h b/gdb/testsuite/gdb.cp/pr11734.h
new file mode 100644
--- /dev/null
+++ b/gdb/testsuite/gdb.cp/pr11734.h
@@ -0,0 +1,27 @@
+/* This testcase is part of GDB, the GNU debugger.
+
+ Copyright 2010 Free Software Foundation, Inc.
+
+ This program is free software; you can redistribute it and/or modify
+ it under the terms of the GNU General Public License as published by
+ the Free Software Foundation; either version 3 of the License, or
+ (at your option) any later version.
+
+ This program is distributed in the hope that it will be useful,
+ but WITHOUT ANY WARRANTY; without even the implied warranty of
+ MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
+ GNU General Public License for more details.
+
+ You should have received a copy of the GNU General Public License
+ along with this program. If not, see <http://www.gnu.org/licenses/>.
+
+ Please email any bugs, comments, and/or additions to this file to:
+ bug-gdb@gnu.org */
+
+class pr11734
+{
+ public:
+ void foo ();
+ void foo (int);
+ void foo (char *);
+};

View File

@ -1,103 +0,0 @@
From FEDORA_PATCHES Mon Sep 17 00:00:00 2001
From: Fedora GDB patches <invalid@email.com>
Date: Fri, 27 Oct 2017 21:07:50 +0200
Subject: gdb-physname-pr12273-test.patch
;; Fix regressions on C++ names resolving (PR 11734, PR 12273, Keith Seitz).
;;=fedoratest
http://sourceware.org/ml/gdb-patches/2010-12/msg00264.html
diff --git a/gdb/testsuite/gdb.cp/pr12273.cc b/gdb/testsuite/gdb.cp/pr12273.cc
new file mode 100644
--- /dev/null
+++ b/gdb/testsuite/gdb.cp/pr12273.cc
@@ -0,0 +1,37 @@
+/* This test case is part of GDB, the GNU debugger.
+
+ Copyright 2010 Free Software Foundation, Inc.
+
+ This program is free software; you can redistribute it and/or modify
+ it under the terms of the GNU General Public License as published by
+ the Free Software Foundation; either version 3 of the License, or
+ (at your option) any later version.
+
+ This program is distributed in the hope that it will be useful,
+ but WITHOUT ANY WARRANTY; without even the implied warranty of
+ MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
+ GNU General Public License for more details.
+
+ You should have received a copy of the GNU General Public License
+ along with this program. If not, see <http://www.gnu.org/licenses/>. */
+
+template <typename T>
+class GDB
+{
+ public:
+ static int simple (void) { return 0; }
+ static int harder (T a) { return 1; }
+ template <typename X>
+ static X even_harder (T a) { return static_cast<X> (a); }
+ int operator == (GDB const& other)
+ { return 1; }
+};
+
+int main(int argc, char **argv)
+{
+ GDB<int> a, b;
+ if (a == b)
+ return GDB<char>::harder('a') + GDB<int>::harder(3)
+ + GDB<char>::even_harder<int> ('a');
+ return GDB<int>::simple ();
+}
diff --git a/gdb/testsuite/gdb.cp/pr12273.exp b/gdb/testsuite/gdb.cp/pr12273.exp
new file mode 100644
--- /dev/null
+++ b/gdb/testsuite/gdb.cp/pr12273.exp
@@ -0,0 +1,46 @@
+# Copyright 2010 Free Software Foundation, Inc.
+#
+# Contributed by Red Hat, originally written by Keith Seitz.
+#
+# This program is free software; you can redistribute it and/or modify
+# it under the terms of the GNU General Public License as published by
+# the Free Software Foundation; either version 3 of the License, or
+# (at your option) any later version.
+#
+# This program is distributed in the hope that it will be useful,
+# but WITHOUT ANY WARRANTY; without even the implied warranty of
+# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
+# GNU General Public License for more details.
+#
+# You should have received a copy of the GNU General Public License
+# along with this program. If not, see <http://www.gnu.org/licenses/>.
+
+# This file is part of the gdb testsuite.
+
+if {[skip_cplus_tests]} { continue }
+
+set testfile "pr12273"
+# Do NOT compile with debug flag.
+prepare_for_testing pr12273 $testfile $testfile.cc {c++}
+
+gdb_test_no_output "set language c++"
+
+# A list of minimal symbol names to check.
+# Note that GDB<char>::even_harder<int>(char) is quoted and includes
+# the return type. This is necessary because this is the demangled name
+# of the minimal symbol.
+set min_syms [list \
+ "GDB<int>::operator ==" \
+ "GDB<int>::operator==(GDB<int> const&)" \
+ "GDB<char>::harder(char)" \
+ "GDB<int>::harder(int)" \
+ {"int GDB<char>::even_harder<int>(char)"} \
+ "GDB<int>::simple()"]
+
+foreach sym $min_syms {
+ if {[gdb_breakpoint $sym]} {
+ pass "setting breakpoint at $sym"
+ }
+}
+
+gdb_exit

View File

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

View File

@ -1,135 +0,0 @@
From FEDORA_PATCHES Mon Sep 17 00:00:00 2001
From: Fedora GDB patches <invalid@email.com>
Date: Fri, 27 Oct 2017 21:07:50 +0200
Subject: gdb-rhbz1186476-internal-error-unqualified-name-re-set-test.patch
;; Fix 'backport GDB 7.4 fix to RHEL 6.6 GDB' [Original Sourceware bug
;; description: 'C++ (and objc): Internal error on unqualified name
;; re-set', PR 11657] (RH BZ 1186476).
;;=fedoratest
Comments from Sergio Durigan Junior:
The "proper" fix for this whole problem would be to backport the
"ambiguous linespec" patch series. However, it is really not
recommended to do that for RHEL GDB, because the patch series is too
big and could introduce unwanted regressions. Instead, what we
chose to do was to replace the gdb_assert call by a warning (which
allows the user to continue the debugging session), and tell the
user that, although more than one location was found for his/her
breakpoint, only one will be used.
diff --git a/gdb/testsuite/gdb.cp/gdb-rhbz1186476-internal-error-unqualified-name-re-set-main.cc b/gdb/testsuite/gdb.cp/gdb-rhbz1186476-internal-error-unqualified-name-re-set-main.cc
new file mode 100644
--- /dev/null
+++ b/gdb/testsuite/gdb.cp/gdb-rhbz1186476-internal-error-unqualified-name-re-set-main.cc
@@ -0,0 +1,22 @@
+/* This testcase is part of GDB, the GNU debugger.
+
+ Copyright 2015 Free Software Foundation, Inc.
+
+ This program is free software; you can redistribute it and/or modify
+ it under the terms of the GNU General Public License as published by
+ the Free Software Foundation; either version 3 of the License, or
+ (at your option) any later version.
+
+ This program is distributed in the hope that it will be useful,
+ but WITHOUT ANY WARRANTY; without even the implied warranty of
+ MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
+ GNU General Public License for more details.
+
+ You should have received a copy of the GNU General Public License
+ along with this program. If not, see <http://www.gnu.org/licenses/>. */
+
+int
+main (int argc, char *argv[])
+{
+ return 0;
+}
diff --git a/gdb/testsuite/gdb.cp/gdb-rhbz1186476-internal-error-unqualified-name-re-set.cc b/gdb/testsuite/gdb.cp/gdb-rhbz1186476-internal-error-unqualified-name-re-set.cc
new file mode 100644
--- /dev/null
+++ b/gdb/testsuite/gdb.cp/gdb-rhbz1186476-internal-error-unqualified-name-re-set.cc
@@ -0,0 +1,26 @@
+/* This testcase is part of GDB, the GNU debugger.
+
+ Copyright 2015 Free Software Foundation, Inc.
+
+ This program is free software; you can redistribute it and/or modify
+ it under the terms of the GNU General Public License as published by
+ the Free Software Foundation; either version 3 of the License, or
+ (at your option) any later version.
+
+ This program is distributed in the hope that it will be useful,
+ but WITHOUT ANY WARRANTY; without even the implied warranty of
+ MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
+ GNU General Public License for more details.
+
+ You should have received a copy of the GNU General Public License
+ along with this program. If not, see <http://www.gnu.org/licenses/>. */
+
+class C
+ {
+ public:
+ C () {}
+ C (int x) {}
+ };
+
+C a;
+C b (1);
diff --git a/gdb/testsuite/gdb.cp/gdb-rhbz1186476-internal-error-unqualified-name-re-set.exp b/gdb/testsuite/gdb.cp/gdb-rhbz1186476-internal-error-unqualified-name-re-set.exp
new file mode 100644
--- /dev/null
+++ b/gdb/testsuite/gdb.cp/gdb-rhbz1186476-internal-error-unqualified-name-re-set.exp
@@ -0,0 +1,51 @@
+# Copyright 2015 Free Software Foundation, Inc.
+
+# This program is free software; you can redistribute it and/or modify
+# it under the terms of the GNU General Public License as published by
+# the Free Software Foundation; either version 3 of the License, or
+# (at your option) any later version.
+#
+# This program is distributed in the hope that it will be useful,
+# but WITHOUT ANY WARRANTY; without even the implied warranty of
+# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
+# GNU General Public License for more details.
+#
+# You should have received a copy of the GNU General Public License
+# along with this program. If not, see <http://www.gnu.org/licenses/>.
+
+if { [skip_cplus_tests] } { continue }
+if { [skip_shlib_tests] } { continue }
+if { [is_remote target] } { continue }
+if { [target_info exists use_gdb_stub] } { continue }
+
+set testfile gdb-rhbz1186476-internal-error-unqualified-name-re-set-main
+set srcfile $testfile.cc
+set executable $testfile
+set binfile [standard_output_file $executable]
+
+set libtestfile gdb-rhbz1186476-internal-error-unqualified-name-re-set
+set libsrcfile $libtestfile.cc
+set sofile [standard_output_file lib$libtestfile.so]
+
+# Create and source the file that provides information about the compiler
+# used to compile the test case.
+if [get_compiler_info "c++"] {
+ return -1
+}
+
+if { [gdb_compile_shlib $srcdir/$subdir/$libsrcfile $sofile {debug c++ "additional_flags=-fPIC"}] != ""
+ || [gdb_compile $srcdir/$subdir/$srcfile $binfile executable [list additional_flags=-Wl,-rpath,[file dirname ${sofile}] "c++" shlib=${sofile} ]] != ""} {
+ untested $libtestfile.exp
+ return -1
+}
+
+clean_restart $executable
+
+gdb_test_no_output "set breakpoint pending on"
+# gdb_breakpoint would print a failure because of some warning messages
+gdb_test "break C::C" "Breakpoint $decimal \\(C::C\\) pending."
+
+#gdb_test "run" "warning: Found more than one location for breakpoint #$decimal; only the first location will be used.(\r\n)+Breakpoint $decimal, C::C.*"
+gdb_test "run"
+
+gdb_test "info break" " in C::C\\(\\) at .* in C::C\\(int\\) at .*"

View File

@ -1,176 +0,0 @@
From FEDORA_PATCHES Mon Sep 17 00:00:00 2001
From: Fedora GDB patches <invalid@email.com>
Date: Fri, 27 Oct 2017 21:07:50 +0200
Subject: gdb-rhbz1325795-framefilters-test.patch
;; New test for Python "Cannot locate object file for block" (for RH BZ 1325795).
;;=fedoratest
diff --git a/gdb/testsuite/gdb.python/py-framefilter-thread.c b/gdb/testsuite/gdb.python/py-framefilter-thread.c
new file mode 100644
--- /dev/null
+++ b/gdb/testsuite/gdb.python/py-framefilter-thread.c
@@ -0,0 +1,39 @@
+/* This testcase is part of GDB, the GNU debugger.
+
+ Copyright 2016 Free Software Foundation, Inc.
+
+ This program is free software; you can redistribute it and/or modify
+ it under the terms of the GNU General Public License as published by
+ the Free Software Foundation; either version 3 of the License, or
+ (at your option) any later version.
+
+ This program is distributed in the hope that it will be useful,
+ but WITHOUT ANY WARRANTY; without even the implied warranty of
+ MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
+ GNU General Public License for more details.
+
+ You should have received a copy of the GNU General Public License
+ along with this program. If not, see <http://www.gnu.org/licenses/>. */
+
+#include <pthread.h>
+#include <assert.h>
+
+static void *
+start (void *arg)
+{
+ return arg; /* Backtrace end breakpoint */
+}
+
+int
+main (void)
+{
+ pthread_t thread1;
+ int i;
+
+ i = pthread_create (&thread1, NULL, start, NULL);
+ assert (i == 0);
+ i = pthread_join (thread1, NULL);
+ assert (i == 0);
+
+ return 0;
+}
diff --git a/gdb/testsuite/gdb.python/py-framefilter-thread.exp b/gdb/testsuite/gdb.python/py-framefilter-thread.exp
new file mode 100644
--- /dev/null
+++ b/gdb/testsuite/gdb.python/py-framefilter-thread.exp
@@ -0,0 +1,54 @@
+# Copyright (C) 2016 Free Software Foundation, Inc.
+
+# This program is free software; you can redistribute it and/or modify
+# it under the terms of the GNU General Public License as published by
+# the Free Software Foundation; either version 3 of the License, or
+# (at your option) any later version.
+#
+# This program is distributed in the hope that it will be useful,
+# but WITHOUT ANY WARRANTY; without even the implied warranty of
+# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
+# GNU General Public License for more details.
+#
+# You should have received a copy of the GNU General Public License
+# along with this program. If not, see <http://www.gnu.org/licenses/>.
+
+load_lib gdb-python.exp
+
+standard_testfile
+
+if {[prepare_for_testing $testfile.exp $testfile $srcfile {debug pthreads}]} {
+ return -1
+}
+
+# Skip all tests if Python scripting is not enabled.
+if { [skip_python_tests] } { continue }
+
+if ![runto_main] then {
+ return
+}
+gdb_test_no_output "set python print-stack full" \
+ "Set python print-stack to full"
+
+# Load global frame-filters
+set remote_python_file [remote_download host ${srcdir}/${subdir}/${testfile}.py]
+gdb_test_no_output "python exec (open ('${remote_python_file}').read ())" \
+ "Load python file"
+
+gdb_breakpoint [gdb_get_line_number "Backtrace end breakpoint"]
+gdb_continue_to_breakpoint "Backtrace end breakpoint"
+
+# #2 0x00007ffff75f228d in clone () at ../sysdeps/unix/sysv/linux/x86_64/clone.S:113^M
+gdb_test "bt no-filters" " in (\\.?_*clone|thread_start) \[^\r\n\]*" "bt no-filters"
+
+# #2 0x00007ffff75f228d in 941595343737041 () at ../sysdeps/unix/sysv/linux/x86_64/clone.S:113^M
+# vs.
+# #2 0x00007ffff75f228d in 941595343737041Traceback (most recent call last):
+# File "/home/jkratoch/redhat/rhel/gdb/rhel-7.3/gdb-7.6.1/gdb/testsuite/../data-directory/python/gdb/FrameDecorator.py", line 145, in frame_args
+# return self._base.frame_args()
+# File "/home/jkratoch/redhat/rhel/gdb/rhel-7.3/gdb-7.6.1/gdb/testsuite/../data-directory/python/gdb/FrameDecorator.py", line 152, in frame_args
+# return args.fetch_frame_args()
+# File "/home/jkratoch/redhat/rhel/gdb/rhel-7.3/gdb-7.6.1/gdb/testsuite/../data-directory/python/gdb/FrameDecorator.py", line 276, in fetch_frame_args
+# block = self.frame.block()
+# RuntimeError: Cannot locate object file for block.
+gdb_test "bt" " in \[0-9\]+ \[^\r\n\]*" "bt with filters"
diff --git a/gdb/testsuite/gdb.python/py-framefilter-thread.py b/gdb/testsuite/gdb.python/py-framefilter-thread.py
new file mode 100644
--- /dev/null
+++ b/gdb/testsuite/gdb.python/py-framefilter-thread.py
@@ -0,0 +1,60 @@
+# Copyright (C) 2016 Free Software Foundation, Inc.
+
+# This program is free software; you can redistribute it and/or modify
+# it under the terms of the GNU General Public License as published by
+# the Free Software Foundation; either version 3 of the License, or
+# (at your option) any later version.
+#
+# This program is distributed in the hope that it will be useful,
+# but WITHOUT ANY WARRANTY; without even the implied warranty of
+# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
+# GNU General Public License for more details.
+#
+# You should have received a copy of the GNU General Public License
+# along with this program. If not, see <http://www.gnu.org/licenses/>.
+
+# This file is part of the GDB testsuite. It tests Python-based
+# frame-filters.
+
+# This test is specifically crafted for RH BZ 1197665.
+
+import gdb
+import itertools
+from gdb.FrameDecorator import FrameDecorator
+import copy
+
+class Reverse_Function (FrameDecorator):
+
+ def __init__(self, fobj):
+ super(Reverse_Function, self).__init__(fobj)
+ self.fobj = fobj
+
+ def function (self):
+ # This function call should not fail.
+ gdb.target_charset ()
+
+ fname = str (self.fobj.function())
+ if (fname == None or fname == ""):
+ return None
+ else:
+ fname = fname[::-1]
+ return fname
+
+class FrameFilter ():
+
+ def __init__ (self):
+ self.name = "Reverse"
+ self.priority = 100
+ self.enabled = True
+ gdb.frame_filters [self.name] = self
+
+ def filter (self, frame_iter):
+ # Python 3.x moved the itertools.imap functionality to map(),
+ # so check if it is available.
+ if hasattr(itertools, "imap"):
+ frame_iter = itertools.imap (Reverse_Function, frame_iter)
+ else:
+ frame_iter = map (Reverse_Function, frame_iter)
+ return frame_iter
+
+FrameFilter()

View File

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

View File

@ -1,454 +0,0 @@
From FEDORA_PATCHES Mon Sep 17 00:00:00 2001
From: Fedora GDB patches <invalid@email.com>
Date: Fri, 27 Oct 2017 21:07:50 +0200
Subject: gdb-rhbz1398387-tab-crash-test.patch
;; New testcase for: Fix <tab>-completion crash (Gary Benson, RH BZ 1398387).
;;=fedoratest
diff --git a/gdb/testsuite/gdb.base/tab-crash.bz2.uu b/gdb/testsuite/gdb.base/tab-crash.bz2.uu
new file mode 100644
--- /dev/null
+++ b/gdb/testsuite/gdb.base/tab-crash.bz2.uu
@@ -0,0 +1,393 @@
+begin 644 /tmp/libgcc_s-6.3.1-20161221.so.1-objcopyR.debug.bz2
+M0EIH.3%!6293622@"44`>Q=_____________________________________
+M________X#\<>SD#OM[7/HAP:R]\H#D"=!/";NP7!]OOJG>U[N;WW'KVV?9I
+M[[,[X.\/;%2U``[[NUM7P^T[U617V#12M]6M7W;M7CZU<=!]/8WL[LI=AZZ>
+MJ5XW;QP]W<NQW8Q539B5-[UA8``:HSG=SF*R#=AT#0`'+3D>]DVHY@]/6RS=
+M8[:2][W/<YN3<[=[S=37NY[=X&IH@)H"8$T```3$U-@)@F)B,(TT:-#$T9``
+M`3`!H-`*G^BGB,$--4]E,R-"9JGL4V)J;*>F01Z:GIID,IC$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LIAZ_NK
+MLDN"E,GB8]*I2!;=UH7JBS.6AF88^:>-ZOR=_N7A"M\B,YE=CK<O+*-R,X#L
+MY9<)!(/=I<-GKYE)T>V?B(2%+;-$FTH0P@=0=)7(@D5HIYCOV$EW.MZP_:HB
+M&,OED]W=BZGUITM#NKAC8,`1SO"V/<*,?4Q+AGF/V=O(_QZ9Q08'TG;(.%W>
+M3QI"^R0+9F25\+`V81V6@)V/X&8HAATY-]YTO.V[=I1-2`X6_"5%@0JCBP0?
+M!4@"!(7#-S*G*12#Q7ISP]OR(^?&&48%!EP>;\@B($4F'_XNY(IPH2!)0!**
+`
+end
diff --git a/gdb/testsuite/gdb.base/tab-crash.exp b/gdb/testsuite/gdb.base/tab-crash.exp
new file mode 100644
--- /dev/null
+++ b/gdb/testsuite/gdb.base/tab-crash.exp
@@ -0,0 +1,43 @@
+# This testcase is part of GDB, the GNU debugger.
+
+# Copyright 2017 Free Software Foundation, Inc.
+
+# This program is free software; you can redistribute it and/or modify
+# it under the terms of the GNU General Public License as published by
+# the Free Software Foundation; either version 3 of the License, or
+# (at your option) any later version.
+#
+# This program is distributed in the hope that it will be useful,
+# but WITHOUT ANY WARRANTY; without even the implied warranty of
+# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
+# GNU General Public License for more details.
+#
+# You should have received a copy of the GNU General Public License
+# along with this program. If not, see <http://www.gnu.org/licenses/>.
+
+if { ![istarget x86_64-*-* ] || ![is_lp64_target] } {
+ return
+}
+
+standard_testfile
+
+# gcc-base-debuginfo-6.3.1-1.fc25.x86_64
+# /usr/lib/debug/lib64/libgcc_s-6.3.1-20161221.so.1.debug
+# objcopy -R .debug_loc -R .debug_ranges -R .debug_info -R .debug_abbrev -R .debug_aranges -R .debug_str -R .comment ...
+
+set debugfilebz2uu ${srcdir}/${subdir}/${testfile}.bz2.uu
+set debugfile [standard_output_file ${testfile}]
+
+if {[catch "system \"uudecode -o - ${debugfilebz2uu} | bzip2 -dc >${debugfile}\""] != 0} {
+ untested "failed uudecode or bzip2"
+ return -1
+}
+file stat ${debugfile} debugfilestat
+if {$debugfilestat(size) != 71936} {
+ untested "uudecode or bzip2 produce invalid result"
+ return -1
+}
+
+clean_restart ${debugfile}
+
+gdb_test "complete p si" "complete p si\r\np size_of_encoded_value"

View File

@ -1,81 +0,0 @@
From FEDORA_PATCHES Mon Sep 17 00:00:00 2001
From: Jan Kratochvil <jan.kratochvil@redhat.com>
Date: Fri, 23 Mar 2018 20:42:44 +0100
Subject: gdb-rhbz1553104-s390x-arch12-test.patch
;; [s390x] Backport arch12 instructions decoding (RH BZ 1553104).
;; =fedoratest
diff --git a/gdb/testsuite/gdb.arch/s390x-arch12.S b/gdb/testsuite/gdb.arch/s390x-arch12.S
new file mode 100644
--- /dev/null
+++ b/gdb/testsuite/gdb.arch/s390x-arch12.S
@@ -0,0 +1,4 @@
+.text
+.globl load_guarded
+load_guarded:
+.byte 0xeb,0xbf,0xf0,0x58,0x00,0x24,0xe3,0xf0,0xff,0x50,0xff,0x71,0xb9,0x04,0x00,0xbf,0xe3,0x20,0xb0,0xa0,0x00,0x24,0xe3,0x10,0xb0,0xa0,0x00,0x04,0xe3,0x10,0x10,0x00,0x00,0x4c,0xe3,0x10,0xb0,0xa8,0x00,0x24,0xe3,0x10,0xb0,0xa8,0x00,0x04,0xb9,0x04,0x00,0x21,0xe3,0x40,0xb1,0x20,0x00,0x04,0xeb,0xbf,0xb1,0x08,0x00,0x04,0x07,0xf4
diff --git a/gdb/testsuite/gdb.arch/s390x-arch12.exp b/gdb/testsuite/gdb.arch/s390x-arch12.exp
new file mode 100644
--- /dev/null
+++ b/gdb/testsuite/gdb.arch/s390x-arch12.exp
@@ -0,0 +1,34 @@
+# Copyright 2018 Free Software Foundation, Inc.
+
+# This program is free software; you can redistribute it and/or modify
+# it under the terms of the GNU General Public License as published by
+# the Free Software Foundation; either version 3 of the License, or
+# (at your option) any later version.
+#
+# This program is distributed in the hope that it will be useful,
+# but WITHOUT ANY WARRANTY; without even the implied warranty of
+# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
+# GNU General Public License for more details.
+#
+# You should have received a copy of the GNU General Public License
+# along with this program. If not, see <http://www.gnu.org/licenses/>.
+
+#if { ![istarget s390x-*linux-*] || ![is_lp64_target] } {
+# verbose "Skipping s390x-prologue-skip.exp"
+# return
+#}
+
+set testfile "s390x-arch12"
+set uufile "${srcdir}/${subdir}/${testfile}.o.uu"
+set ofile "${srcdir}/${subdir}/${testfile}.o"
+
+if { [catch "system \"uudecode -o ${ofile} ${uufile}\"" ] != 0 } {
+ untested "failed uudecode"
+ return -1
+}
+
+gdb_exit
+gdb_start
+gdb_load $ofile
+
+gdb_test "disas load_guarded" " <\\+28>:\tlgg\t%r1,0\\(%r1\\)\r\n\[^\r\n\]* <\\+34>:\tstg\t%r1,168\\(%r11\\)\r\n.*"
diff --git a/gdb/testsuite/gdb.arch/s390x-arch12.o.uu b/gdb/testsuite/gdb.arch/s390x-arch12.o.uu
new file mode 100644
--- /dev/null
+++ b/gdb/testsuite/gdb.arch/s390x-arch12.o.uu
@@ -0,0 +1,20 @@
+begin 644 s390x-arch12.o
+M?T5,1@("`0`````````````!`!8````!````````````````````````````
+M``$X``````!```````!```<`!.N_\%@`)./P_U#_<;D$`+_C(+"@`"3C$+"@
+M``3C$!```$SC$+"H`"3C$+"H``2Y!``AXT"Q(``$Z[^Q"``$!_0`+G-Y;71A
+M8@`N<W1R=&%B`"YS:'-T<G1A8@`N=&5X=``N9&%T80`N8G-S````````````
+M`````````````````````````````````P```0``````````````````````
+M`````P```@```````````````````````````P```P``````````````````
+M```````!$````0``````````````````````;&]A9%]G=6%R9&5D````````
+M````````````````````````````````````````````````````````````
+M`````````````````````````!L````!``````````8`````````````````
+M``!``````````$`````````````````````$```````````````A`````0``
+M```````#````````````````````@```````````````````````````````
+M!```````````````)P````@``````````P```````````````````(``````
+M``````````````````````````0``````````````!$````#````````````
+M``````````````````"``````````"P````````````````````!````````
+M```````!`````@``````````````````````````````L`````````!X````
+M!@````0`````````"``````````8````"0````,`````````````````````
+H`````````2@`````````#@````````````````````$`````````````
+`
+end

View File

@ -0,0 +1,105 @@
From FEDORA_PATCHES Mon Sep 17 00:00:00 2001
From: Kevin Buettner <kevinb@redhat.com>
Date: Mon, 2 Oct 2023 15:05:23 -0700
Subject: gdb-rhbz1773651-gdb-index-internal-error.patch
;; Backport upstream patch which prevents internal error when
;; generating a gdb-index file (RH BZ 1773651).
Throw error when creating an overly large gdb-index file
The header in a .gdb_index section uses 32-bit unsigned offsets to
refer to other areas of the section. Thus, there is a size limit of
2^32-1 which is currently unaccounted for by GDB's code for outputting
these sections.
At the moment, when GDB creates an overly large section, it will exit
abnormally due to an internal error, which is caused by a failed
assert in assert_file_size, which in turn is called from
write_gdbindex_1, both of which are in gdb/dwarf2/index-write.c.
This is what happens when that assert fails:
$ gdb -q -nx -iex 'set auto-load no' -iex 'set debuginfod enabled off' -ex file ./libgraph_tool_inference.so -ex "save gdb-index `pwd`/"
Reading symbols from ./libgraph_tool_inference.so...
No executable file now.
Discard symbol table from `libgraph_tool_inference.so'? (y or n) n
Not confirmed.
../../gdb/dwarf2/index-write.c:1069: internal-error: assert_file_size: Assertion `file_size == expected_size' failed.
A problem internal to GDB has been detected,
further debugging may prove unreliable.
----- Backtrace -----
0x55fddb4d78b0 gdb_internal_backtrace_1
../../gdb/bt-utils.c:122
0x55fddb4d78b0 _Z22gdb_internal_backtracev
../../gdb/bt-utils.c:168
0x55fddb98b5d4 internal_vproblem
../../gdb/utils.c:396
0x55fddb98b8de _Z15internal_verrorPKciS0_P13__va_list_tag
../../gdb/utils.c:476
0x55fddbb71654 _Z18internal_error_locPKciS0_z
../../gdbsupport/errors.cc:58
0x55fddb5a0f23 assert_file_size
../../gdb/dwarf2/index-write.c:1069
0x55fddb5a1ee0 assert_file_size
/usr/include/c++/13/bits/stl_iterator.h:1158
0x55fddb5a1ee0 write_gdbindex_1
../../gdb/dwarf2/index-write.c:1119
0x55fddb5a51be write_gdbindex
../../gdb/dwarf2/index-write.c:1273
[...]
---------------------
../../gdb/dwarf2/index-write.c:1069: internal-error: assert_file_size: Assertion `file_size == expected_size' failed.
This problem was encountered while building the python-graph-tool
package on Fedora. The Fedora bugzilla bug can be found here:
https://bugzilla.redhat.com/show_bug.cgi?id=1773651
This commit prevents the internal error from occurring by calling error()
when the file size exceeds 2^32-1.
Using a gdb built with this commit, I now see this behavior instead:
$ gdb -q -nx -iex 'set auto-load no' -iex 'set debuginfod enabled off' -ex file ./libgraph_tool_inference.so -ex "save gdb-index `pwd`/"
Reading symbols from ./libgraph_tool_inference.so...
No executable file now.
Discard symbol table from `/mesquite2/fedora-bugs/1773651/libgraph_tool_inference.so'? (y or n) n
Not confirmed.
Error while writing index for `/mesquite2/fedora-bugs/1773651/libgraph_tool_inference.so': gdb-index maximum file size of 4294967295 exceeded
(gdb)
I wish I could provide a test case, but due to the sizes of both the
input and output files, I think that testing resources would be
strained or exceeded in many environments.
My testing on Fedora 38 shows no regressions.
Approved-by: Tom Tromey <tom@tromey.com>
diff --git a/gdb/dwarf2/index-write.c b/gdb/dwarf2/index-write.c
--- a/gdb/dwarf2/index-write.c
+++ b/gdb/dwarf2/index-write.c
@@ -1082,7 +1082,7 @@ write_gdbindex_1 (FILE *out_file,
{
data_buf contents;
const offset_type size_of_header = 6 * sizeof (offset_type);
- offset_type total_len = size_of_header;
+ size_t total_len = size_of_header;
/* The version number. */
contents.append_offset (8);
@@ -1109,6 +1109,13 @@ write_gdbindex_1 (FILE *out_file,
gdb_assert (contents.size () == size_of_header);
+ /* The maximum size of an index file is limited by the maximum value
+ capable of being represented by 'offset_type'. Throw an error if
+ that length has been exceeded. */
+ size_t max_size = ~(offset_type) 0;
+ if (total_len > max_size)
+ error (_("gdb-index maximum file size of %zu exceeded"), max_size);
+
contents.file_write (out_file);
cu_list.file_write (out_file);
types_cu_list.file_write (out_file);

View File

@ -0,0 +1,108 @@
From FEDORA_PATCHES Mon Sep 17 00:00:00 2001
From: Kevin Buettner <kevinb@redhat.com>
Date: Thu, 29 Jun 2023 18:20:30 -0700
Subject: gdb-rhbz2160211-excessive-core-file-warnings.patch
;; Backport two commits, 0ad504dd464 and ea70f941f9b, from Lancelot SIX
;; which prevent repeated warnings from being printed while loading a
;; core file. (RH BZ 2160211)
gdb/corelow.c: avoid repeated warnings in build_file_mappings
When GDB opens a coredump it tries to locate and then open all files
which were mapped in the process.
If a file is found but cannot be opened with BFD (bfd_open /
bfd_check_format fails), then a warning is printed to the user. If the
same file was mapped multiple times in the process's address space, the
warning is printed once for each time the file was mapped. I find this
un-necessarily noisy.
This patch makes it so the warning message is printed only once per
file.
There was a comment in the code assuming that if the file was found on
the system, opening it (bfd_open + bfd_check_format) should always
succeed. A recent change in BFD (014a602b86f "Don't optimise bfd_seek
to same position") showed that this assumption is not valid. For
example, it is possible to have a core dump of a process which had
mmaped an IO page from a DRI render node (/dev/dri/runderD$NUM). In
such case the core dump does contain the information that portions of
this special file were mapped in the host process, but trying to seek to
position 0 will fail, making bfd_check_format fail. This patch removes
this comment.
Reviewed-By: John Baldwin <jhb@FreeBSD.org>
Approved-By: Andrew Burgess <aburgess@redhat.com>
gdb/corelow.c: do not try to reopen a file if open failed once
In the current implementation, core_target::build_file_mappings will try
to locate and open files which were mapped in the process for which the
core dump was produced. If the file cannot be found or cannot be
opened, GDB will re-try to open it once for each time it was mapped in
the process's address space.
This patch makes it so GDB recognizes that it has already failed to open
a given file once and does not re-try the process for each mapping.
Reviewed-By: John Baldwin <jhb@FreeBSD.org>
Approved-By: Andrew Burgess <aburgess@redhat.com>
diff --git a/gdb/corelow.c b/gdb/corelow.c
--- a/gdb/corelow.c
+++ b/gdb/corelow.c
@@ -237,6 +237,16 @@ core_target::build_file_mappings ()
weed out non-file-backed mappings. */
gdb_assert (filename != nullptr);
+ if (unavailable_paths.find (filename) != unavailable_paths.end ())
+ {
+ /* We have already seen some mapping for FILENAME but failed to
+ find/open the file. There is no point in trying the same
+ thing again so just record that the range [start, end) is
+ unavailable. */
+ m_core_unavailable_mappings.emplace_back (start, end - start);
+ return;
+ }
+
struct bfd *bfd = bfd_map[filename];
if (bfd == nullptr)
{
@@ -254,11 +264,10 @@ core_target::build_file_mappings ()
if (expanded_fname == nullptr)
{
m_core_unavailable_mappings.emplace_back (start, end - start);
- /* Print just one warning per path. */
- if (unavailable_paths.insert (filename).second)
- warning (_("Can't open file %s during file-backed mapping "
- "note processing"),
- filename);
+ unavailable_paths.insert (filename);
+ warning (_("Can't open file %s during file-backed mapping "
+ "note processing"),
+ filename);
return;
}
@@ -268,18 +277,11 @@ core_target::build_file_mappings ()
if (bfd == nullptr || !bfd_check_format (bfd, bfd_object))
{
m_core_unavailable_mappings.emplace_back (start, end - start);
- /* If we get here, there's a good chance that it's due to
- an internal error. We issue a warning instead of an
- internal error because of the possibility that the
- file was removed in between checking for its
- existence during the expansion in exec_file_find()
- and the calls to bfd_openr() / bfd_check_format().
- Output both the path from the core file note along
- with its expansion to make debugging this problem
- easier. */
+ unavailable_paths.insert (filename);
warning (_("Can't open file %s which was expanded to %s "
"during file-backed mapping note processing"),
filename, expanded_fname.get ());
+
if (bfd != nullptr)
bfd_close (bfd);
return;

View File

@ -0,0 +1,107 @@
From FEDORA_PATCHES Mon Sep 17 00:00:00 2001
From: Kevin Buettner <kevinb@redhat.com>
Date: Wed, 3 May 2023 11:28:24 -0700
Subject: gdb-rhbz2192105-ftbs-dangling-pointer
MIME-Version: 1.0
Content-Type: text/plain; charset=UTF-8
Content-Transfer-Encoding: 8bit
;; Backport upstream patch fixing a "dangling pointer" build problem
;; first seen when building with GCC 13.1.1 20230426 (Red Hat ;; 13.1.1-1).
Pass const frame_info_ptr reference for skip_[language_]trampoline
g++ 13.1.1 produces a -Werror=dangling-pointer=
In file included from ../../binutils-gdb/gdb/frame.h:75,
from ../../binutils-gdb/gdb/symtab.h:40,
from ../../binutils-gdb/gdb/language.c:33:
In member function void intrusive_list<T, AsNode>::push_empty(T&) [with T = frame_info_ptr; AsNode = intrusive_base_node<frame_info_ptr>],
inlined from void intrusive_list<T, AsNode>::push_back(reference) [with T = frame_info_ptr; AsNode = intrusive_base_node<frame_info_ptr>] at gdbsupport/intrusive_list.h:332:24,
inlined from frame_info_ptr::frame_info_ptr(const frame_info_ptr&) at gdb/frame.h:241:26,
inlined from CORE_ADDR skip_language_trampoline(frame_info_ptr, CORE_ADDR) at gdb/language.c:530:49:
gdbsupport/intrusive_list.h:415:12: error: storing the address of local variable <anonymous> in frame_info_ptr::frame_list.intrusive_list<frame_info_ptr>::m_back [-Werror=dangling-pointer=]
415 | m_back = &elem;
| ~~~~~~~^~~~~~~
gdb/language.c: In function CORE_ADDR skip_language_trampoline(frame_info_ptr, CORE_ADDR):
gdb/language.c:530:49: note: <anonymous> declared here
530 | CORE_ADDR real_pc = lang->skip_trampoline (frame, pc);
| ~~~~~~~~~~~~~~~~~~~~~~^~~~~~~~~~~
gdb/frame.h:359:41: note: frame_info_ptr::frame_list declared here
359 | static intrusive_list<frame_info_ptr> frame_list;
| ^~~~~~~~~~
Each new frame_info_ptr is being pushed on a static frame list and g++
cannot see why that is safe in case the frame_info_ptr is created and
destroyed immediately when passed as value.
It isn't clear why only in this one place g++ sees the issue (probably
because it can inline enough code in this specific case).
Since passing the frame_info_ptr as const reference is cheaper, use
that as workaround for this warning.
PR build/30413
Bug: https://sourceware.org/bugzilla/show_bug.cgi?id=30413
Tested-by: Kevin Buettner <kevinb@redhat.com>
Reviewed-by: Kevin Buettner <kevinb@redhat.com>
Reviewed-by: Tom Tromey <tom@tromey.com>
diff --git a/gdb/c-lang.c b/gdb/c-lang.c
--- a/gdb/c-lang.c
+++ b/gdb/c-lang.c
@@ -1003,7 +1003,7 @@ class cplus_language : public language_defn
/* See language.h. */
- CORE_ADDR skip_trampoline (frame_info_ptr fi,
+ CORE_ADDR skip_trampoline (const frame_info_ptr &fi,
CORE_ADDR pc) const override
{
return cplus_skip_trampoline (fi, pc);
diff --git a/gdb/language.c b/gdb/language.c
--- a/gdb/language.c
+++ b/gdb/language.c
@@ -528,7 +528,7 @@ add_set_language_command ()
Return the result from the first that returns non-zero, or 0 if all
`fail'. */
CORE_ADDR
-skip_language_trampoline (frame_info_ptr frame, CORE_ADDR pc)
+skip_language_trampoline (const frame_info_ptr &frame, CORE_ADDR pc)
{
for (const auto &lang : language_defn::languages)
{
diff --git a/gdb/language.h b/gdb/language.h
--- a/gdb/language.h
+++ b/gdb/language.h
@@ -471,7 +471,7 @@ struct language_defn
If that PC falls in a trampoline belonging to this language, return
the address of the first pc in the real function, or 0 if it isn't a
language tramp for this language. */
- virtual CORE_ADDR skip_trampoline (frame_info_ptr fi, CORE_ADDR pc) const
+ virtual CORE_ADDR skip_trampoline (const frame_info_ptr &fi, CORE_ADDR pc) const
{
return (CORE_ADDR) 0;
}
@@ -789,7 +789,7 @@ extern const char *language_str (enum language);
/* Check for a language-specific trampoline. */
-extern CORE_ADDR skip_language_trampoline (frame_info_ptr, CORE_ADDR pc);
+extern CORE_ADDR skip_language_trampoline (const frame_info_ptr &, CORE_ADDR pc);
/* Return demangled language symbol, or NULL. */
extern gdb::unique_xmalloc_ptr<char> language_demangle
diff --git a/gdb/objc-lang.c b/gdb/objc-lang.c
--- a/gdb/objc-lang.c
+++ b/gdb/objc-lang.c
@@ -282,7 +282,7 @@ class objc_language : public language_defn
/* See language.h. */
- CORE_ADDR skip_trampoline (frame_info_ptr frame,
+ CORE_ADDR skip_trampoline (const frame_info_ptr &frame,
CORE_ADDR stop_pc) const override
{
struct gdbarch *gdbarch = get_frame_arch (frame);

View File

@ -0,0 +1,50 @@
From FEDORA_PATCHES Mon Sep 17 00:00:00 2001
From: =?UTF-8?q?Alexandra=20H=C3=A1jkov=C3=A1?= <ahajkova@redhat.com>
Date: Sun, 17 Sep 2023 13:36:13 +0200
Subject: gdb-rhbz2233961-CVE-2022-4806.patch
;; Backport PR29922, SHT_NOBITS section
;; avoids section size sanity check.
PR29922, SHT_NOBITS section avoids section size sanity check
PR 29922
* dwarf2.c (find_debug_info): Ignore sections without
SEC_HAS_CONTENTS.
diff --git a/bfd/dwarf2.c b/bfd/dwarf2.c
--- a/bfd/dwarf2.c
+++ b/bfd/dwarf2.c
@@ -4831,16 +4831,19 @@ find_debug_info (bfd *abfd, const struct dwarf_debug_section *debug_sections,
{
look = debug_sections[debug_info].uncompressed_name;
msec = bfd_get_section_by_name (abfd, look);
- if (msec != NULL)
+ /* Testing SEC_HAS_CONTENTS is an anti-fuzzer measure. Of
+ course debug sections always have contents. */
+ if (msec != NULL && (msec->flags & SEC_HAS_CONTENTS) != 0)
return msec;
look = debug_sections[debug_info].compressed_name;
msec = bfd_get_section_by_name (abfd, look);
- if (msec != NULL)
+ if (msec != NULL && (msec->flags & SEC_HAS_CONTENTS) != 0)
return msec;
for (msec = abfd->sections; msec != NULL; msec = msec->next)
- if (startswith (msec->name, GNU_LINKONCE_INFO))
+ if ((msec->flags & SEC_HAS_CONTENTS) != 0
+ && startswith (msec->name, GNU_LINKONCE_INFO))
return msec;
return NULL;
@@ -4848,6 +4851,9 @@ find_debug_info (bfd *abfd, const struct dwarf_debug_section *debug_sections,
for (msec = after_sec->next; msec != NULL; msec = msec->next)
{
+ if ((msec->flags & SEC_HAS_CONTENTS) == 0)
+ continue;
+
look = debug_sections[debug_info].uncompressed_name;
if (strcmp (msec->name, look) == 0)
return msec;

View File

@ -0,0 +1,115 @@
From FEDORA_PATCHES Mon Sep 17 00:00:00 2001
From: =?UTF-8?q?Alexandra=20H=C3=A1jkov=C3=A1?= <ahajkova@redhat.com>
Date: Sun, 1 Oct 2023 10:36:06 +0200
Subject: gdb-rhbz2233965-memory-leak.patch
;; Backport PR29925, Memory leak in find_abstract_instance
PR29925, Memory leak in find_abstract_instance
The testcase in the PR had a variable with both DW_AT_decl_file and
DW_AT_specification, where the DW_AT_specification also specified
DW_AT_decl_file. This leads to a memory leak as the file name is
malloced and duplicates are not expected.
I've also changed find_abstract_instance to not use a temp for "name",
because that can result in a change in behaviour from the usual last
of duplicate attributes wins.
PR 29925
* dwarf2.c (find_abstract_instance): Delete "name" variable.
Free *filename_ptr before assigning new file name.
(scan_unit_for_symbols): Similarly free func->file and
var->file before assigning.
diff --git a/bfd/dwarf2.c b/bfd/dwarf2.c
--- a/bfd/dwarf2.c
+++ b/bfd/dwarf2.c
@@ -3441,7 +3441,6 @@ find_abstract_instance (struct comp_unit *unit,
struct abbrev_info *abbrev;
uint64_t die_ref = attr_ptr->u.val;
struct attribute attr;
- const char *name = NULL;
if (recur_count == 100)
{
@@ -3602,9 +3601,9 @@ find_abstract_instance (struct comp_unit *unit,
case DW_AT_name:
/* Prefer DW_AT_MIPS_linkage_name or DW_AT_linkage_name
over DW_AT_name. */
- if (name == NULL && is_str_form (&attr))
+ if (*pname == NULL && is_str_form (&attr))
{
- name = attr.u.str;
+ *pname = attr.u.str;
if (mangle_style (unit->lang) == 0)
*is_linkage = true;
}
@@ -3612,7 +3611,7 @@ find_abstract_instance (struct comp_unit *unit,
case DW_AT_specification:
if (is_int_form (&attr)
&& !find_abstract_instance (unit, &attr, recur_count + 1,
- &name, is_linkage,
+ pname, is_linkage,
filename_ptr, linenumber_ptr))
return false;
break;
@@ -3622,7 +3621,7 @@ find_abstract_instance (struct comp_unit *unit,
non-string forms into these attributes. */
if (is_str_form (&attr))
{
- name = attr.u.str;
+ *pname = attr.u.str;
*is_linkage = true;
}
break;
@@ -3630,8 +3629,11 @@ find_abstract_instance (struct comp_unit *unit,
if (!comp_unit_maybe_decode_line_info (unit))
return false;
if (is_int_form (&attr))
- *filename_ptr = concat_filename (unit->line_table,
- attr.u.val);
+ {
+ free (*filename_ptr);
+ *filename_ptr = concat_filename (unit->line_table,
+ attr.u.val);
+ }
break;
case DW_AT_decl_line:
if (is_int_form (&attr))
@@ -3643,7 +3645,6 @@ find_abstract_instance (struct comp_unit *unit,
}
}
}
- *pname = name;
return true;
}
@@ -4139,8 +4140,11 @@ scan_unit_for_symbols (struct comp_unit *unit)
case DW_AT_decl_file:
if (is_int_form (&attr))
- func->file = concat_filename (unit->line_table,
- attr.u.val);
+ {
+ free (func->file);
+ func->file = concat_filename (unit->line_table,
+ attr.u.val);
+ }
break;
case DW_AT_decl_line:
@@ -4182,8 +4186,11 @@ scan_unit_for_symbols (struct comp_unit *unit)
case DW_AT_decl_file:
if (is_int_form (&attr))
- var->file = concat_filename (unit->line_table,
- attr.u.val);
+ {
+ free (var->file);
+ var->file = concat_filename (unit->line_table,
+ attr.u.val);
+ }
break;
case DW_AT_decl_line:

View File

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

View File

@ -1,49 +0,0 @@
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-runtest-pie-override.patch
;; Hack for proper PIE run of the testsuite.
;;=fedoratest
make check//unix/-fPIE/-pie RUNTESTFLAGS=solib-display.exp
gcc -fpic -c -fPIE -pie -o x.o x.c
/usr/lib/gcc/x86_64-redhat-linux/4.6.1/../../../../lib64/Scrt1.o: In function `_start':
(.text+0x20): undefined reference to `main'
=> Change the order for overrides.
One has to also use -fPIC rather than -fPIE, -fPIC is stronger.
The correct way would be:
make check//unix RUNTESTFLAGS='CC_FOR_TARGET=gcc\ -fPIC\ -pie CXX_FOR_TARGET=g++\ -fPIC\ -pie solib-display.exp'
But there is a problem with testsuite.unix non-unique subdir name and also
a problem with make -j parallelization of the testsuite.
diff --git a/gdb/testsuite/lib/future.exp b/gdb/testsuite/lib/future.exp
--- a/gdb/testsuite/lib/future.exp
+++ b/gdb/testsuite/lib/future.exp
@@ -197,6 +197,10 @@ proc gdb_default_target_compile_1 {source destfile type options} {
set ldflags ""
set dest [target_info name]
+ if {[board_info $dest exists multilib_flags]} {
+ append add_flags " [board_info $dest multilib_flags]"
+ }
+
if {[info exists CFLAGS_FOR_TARGET]} {
append add_flags " $CFLAGS_FOR_TARGET"
}
@@ -531,10 +535,6 @@ proc gdb_default_target_compile_1 {source destfile type options} {
}
}
- if {[board_info $dest exists multilib_flags]} {
- append add_flags " [board_info $dest multilib_flags]"
- }
-
verbose "doing compile"
set sources ""

View File

@ -1,223 +0,0 @@
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-test-expr-cumulative-archer.patch
;; [archer-keiths-expr-cumulative+upstream] Import C++ testcases.
;;=fedoratest
archer archer-keiths-expr-cumulative
b5a7497340b24199f0c7ba7fdf0d54d4df44d6bc
diff --git a/gdb/testsuite/gdb.cp/namespace-nested-imports.cc b/gdb/testsuite/gdb.cp/namespace-nested-imports.cc
new file mode 100644
--- /dev/null
+++ b/gdb/testsuite/gdb.cp/namespace-nested-imports.cc
@@ -0,0 +1,36 @@
+namespace A
+{
+ namespace B
+ {
+ int ab = 11;
+ }
+}
+
+namespace C
+{
+ namespace D
+ {
+ using namespace A::B;
+
+ int
+ second()
+ {
+ ab;
+ return 0;
+ }
+ }
+
+ int
+ first()
+ {
+ //ab;
+ return D::second();
+ }
+}
+
+int
+main()
+{
+ //ab;
+ return C::first();
+}
diff --git a/gdb/testsuite/gdb.cp/namespace-nested-imports.exp b/gdb/testsuite/gdb.cp/namespace-nested-imports.exp
new file mode 100644
--- /dev/null
+++ b/gdb/testsuite/gdb.cp/namespace-nested-imports.exp
@@ -0,0 +1,50 @@
+# Copyright 2008 Free Software Foundation, Inc.
+
+# This program is free software; you can redistribute it and/or modify
+# it under the terms of the GNU General Public License as published by
+# the Free Software Foundation; either version 3 of the License, or
+# (at your option) any later version.
+#
+# This program is distributed in the hope that it will be useful,
+# but WITHOUT ANY WARRANTY; without even the implied warranty of
+# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
+# GNU General Public License for more details.
+#
+# You should have received a copy of the GNU General Public License
+# along with this program. If not, see <http://www.gnu.org/licenses/>.
+
+set testfile namespace-nested-imports
+set srcfile ${testfile}.cc
+set binfile [standard_output_file ${testfile}]
+if { [gdb_compile "${srcdir}/${subdir}/${srcfile}" "${binfile}" executable {debug c++}] != "" } {
+ untested "Couldn't compile test program"
+ return -1
+}
+
+# Get things started.
+
+gdb_exit
+gdb_start
+gdb_reinitialize_dir $srcdir/$subdir
+gdb_load ${binfile}
+
+############################################
+if ![runto_main] then {
+ perror "couldn't run to breakpoint main"
+ continue
+}
+
+gdb_test "print ab" "No symbol .* in current context."
+
+############################################
+gdb_breakpoint C::first
+gdb_continue_to_breakpoint "C::first"
+
+gdb_test "print ab" "No symbol .* in current context."
+gdb_test "print C::D::ab" "= 11"
+
+############################################
+gdb_breakpoint C::D::second
+gdb_continue_to_breakpoint "C::D::second"
+
+gdb_test "print ab" "= 11"
diff --git a/gdb/testsuite/gdb.cp/namespace-no-imports.cc b/gdb/testsuite/gdb.cp/namespace-no-imports.cc
new file mode 100644
--- /dev/null
+++ b/gdb/testsuite/gdb.cp/namespace-no-imports.cc
@@ -0,0 +1,37 @@
+
+namespace A
+{
+ int _a = 11;
+
+ namespace B{
+
+ int ab = 22;
+
+ namespace C{
+
+ int abc = 33;
+
+ int second(){
+ return 0;
+ }
+
+ }
+
+ int first(){
+ _a;
+ ab;
+ C::abc;
+ return C::second();
+ }
+ }
+}
+
+
+int
+main()
+{
+ A::_a;
+ A::B::ab;
+ A::B::C::abc;
+ return A::B::first();
+}
diff --git a/gdb/testsuite/gdb.cp/namespace-no-imports.exp b/gdb/testsuite/gdb.cp/namespace-no-imports.exp
new file mode 100644
--- /dev/null
+++ b/gdb/testsuite/gdb.cp/namespace-no-imports.exp
@@ -0,0 +1,69 @@
+# Copyright 2008 Free Software Foundation, Inc.
+
+# This program is free software; you can redistribute it and/or modify
+# it under the terms of the GNU General Public License as published by
+# the Free Software Foundation; either version 3 of the License, or
+# (at your option) any later version.
+#
+# This program is distributed in the hope that it will be useful,
+# but WITHOUT ANY WARRANTY; without even the implied warranty of
+# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
+# GNU General Public License for more details.
+#
+# You should have received a copy of the GNU General Public License
+# along with this program. If not, see <http://www.gnu.org/licenses/>.
+
+set testfile namespace-no-imports
+set srcfile ${testfile}.cc
+set binfile [standard_output_file ${testfile}]
+if { [gdb_compile "${srcdir}/${subdir}/${srcfile}" "${binfile}" executable {debug c++}] != "" } {
+ untested "Couldn't compile test program"
+ return -1
+}
+
+# Get things started.
+
+gdb_exit
+gdb_start
+gdb_reinitialize_dir $srcdir/$subdir
+gdb_load ${binfile}
+
+############################################
+if ![runto_main] then {
+ perror "couldn't run to breakpoint main"
+ continue
+}
+
+gdb_test "print A::_a" "= 11"
+gdb_test "print A::B::ab" "= 22"
+gdb_test "print A::B::C::abc" "= 33"
+
+gdb_test "print _a" "No symbol .* in current context."
+gdb_test "print ab" "No symbol .* in current context."
+gdb_test "print abc" "No symbol .* in current context."
+
+############################################
+gdb_breakpoint A::B::first
+gdb_continue_to_breakpoint "A::B::first"
+
+gdb_test "print A::_a" "= 11"
+gdb_test "print A::B::ab" "= 22"
+gdb_test "print A::B::C::abc" "= 33"
+
+gdb_test "print _a" "= 11"
+gdb_test "print ab" "= 22"
+gdb_test "print C::abc" "= 33"
+
+gdb_test "print abc" "No symbol .* in current context."
+
+############################################
+gdb_breakpoint A::B::C::second
+gdb_continue_to_breakpoint "A::B::C::second"
+
+gdb_test "print A::_a" "= 11"
+gdb_test "print A::B::ab" "= 22"
+gdb_test "print A::B::C::abc" "= 33"
+
+gdb_test "print _a" "= 11"
+gdb_test "print ab" "= 22"
+gdb_test "print abc" "= 33"

View File

@ -1,468 +0,0 @@
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-test-ivy-bridge.patch
;; Test GDB opcodes/ disassembly of Intel Ivy Bridge instructions (BZ 696890).
;;=fedoratest
diff --git a/gdb/testsuite/gdb.arch/amd64-ivy-bridge.S b/gdb/testsuite/gdb.arch/amd64-ivy-bridge.S
new file mode 100644
--- /dev/null
+++ b/gdb/testsuite/gdb.arch/amd64-ivy-bridge.S
@@ -0,0 +1,98 @@
+/* Copyright 2011 Free Software Foundation, Inc.
+
+ This program is free software; you can redistribute it and/or modify
+ it under the terms of the GNU General Public License as published by
+ the Free Software Foundation; either version 3 of the License, or
+ (at your option) any later version.
+
+ This program is distributed in the hope that it will be useful,
+ but WITHOUT ANY WARRANTY; without even the implied warranty of
+ MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
+ GNU General Public License for more details.
+
+ You should have received a copy of the GNU General Public License
+ along with this program. If not, see <http://www.gnu.org/licenses/>.
+
+ This file is part of the gdb testsuite. */
+
+ .globl _start
+_start: .text
+
+/* gas/i386/x86-64-rdrnd.s */
+ .att_syntax prefix
+ rdrand %bx
+ rdrand %ebx
+ rdrand %rbx
+ rdrand %r8w
+ rdrand %r8d
+ rdrand %r8
+
+ .intel_syntax noprefix
+ rdrand bx
+ rdrand ebx
+ rdrand rbx
+ rdrand r8w
+ rdrand r8d
+ rdrand r8
+
+/* gas/i386/x86-64-f16c.s */
+ .att_syntax prefix
+ vcvtph2ps %xmm4,%ymm4
+ vcvtph2ps (%r8),%ymm8
+ vcvtph2ps %xmm4,%xmm6
+ vcvtph2ps (%rcx),%xmm4
+ vcvtps2ph $0x2,%ymm4,%xmm4
+ vcvtps2ph $0x2,%ymm8,(%r8)
+ vcvtps2ph $0x2,%xmm4,%xmm4
+ vcvtps2ph $0x2,%xmm4,(%rcx)
+
+ .intel_syntax noprefix
+ vcvtph2ps ymm4,xmm4
+ vcvtph2ps ymm8,XMMWORD PTR [r8]
+ vcvtph2ps ymm4,[rcx]
+ vcvtph2ps xmm6,xmm4
+ vcvtph2ps xmm4,QWORD PTR [rcx]
+ vcvtph2ps xmm4,[rcx]
+ vcvtps2ph xmm4,ymm4,0x2
+ vcvtps2ph XMMWORD PTR [rcx],ymm4,0x2
+ vcvtps2ph [rcx],ymm4,0x2
+ vcvtps2ph xmm4,xmm4,0x2
+ vcvtps2ph QWORD PTR [r8],xmm8,0x2
+ vcvtps2ph [rcx],xmm4,0x2
+
+/* gas/i386/x86-64-fsgs.s */
+ .att_syntax prefix
+ rdfsbase %ebx
+ rdfsbase %rbx
+ rdfsbase %r8d
+ rdfsbase %r8
+ rdgsbase %ebx
+ rdgsbase %rbx
+ rdgsbase %r8d
+ rdgsbase %r8
+ wrfsbase %ebx
+ wrfsbase %rbx
+ wrfsbase %r8d
+ wrfsbase %r8
+ wrgsbase %ebx
+ wrgsbase %rbx
+ wrgsbase %r8d
+ wrgsbase %r8
+
+ .intel_syntax noprefix
+ rdfsbase ebx
+ rdfsbase rbx
+ rdfsbase r8d
+ rdfsbase r8
+ rdgsbase ebx
+ rdgsbase rbx
+ rdgsbase r8d
+ rdgsbase r8
+ wrfsbase ebx
+ wrfsbase rbx
+ wrfsbase r8d
+ wrfsbase r8
+ wrgsbase ebx
+ wrgsbase rbx
+ wrgsbase r8d
+ wrgsbase r8
diff --git a/gdb/testsuite/gdb.arch/amd64-ivy-bridge.exp b/gdb/testsuite/gdb.arch/amd64-ivy-bridge.exp
new file mode 100644
--- /dev/null
+++ b/gdb/testsuite/gdb.arch/amd64-ivy-bridge.exp
@@ -0,0 +1,170 @@
+# Copyright 2011 Free Software Foundation, Inc.
+
+# This program is free software; you can redistribute it and/or modify
+# it under the terms of the GNU General Public License as published by
+# the Free Software Foundation; either version 3 of the License, or
+# (at your option) any later version.
+#
+# This program is distributed in the hope that it will be useful,
+# but WITHOUT ANY WARRANTY; without even the implied warranty of
+# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
+# GNU General Public License for more details.
+#
+# You should have received a copy of the GNU General Public License
+# along with this program. If not, see <http://www.gnu.org/licenses/>.
+
+if {![istarget "x86_64-*-*"]} then {
+ return
+}
+
+set testfile amd64-ivy-bridge
+set test compilation
+if [prepare_for_testing ${testfile}.exp ${testfile}.x ${testfile}.S [list debug "additional_flags=-m64 -nostdlib"]] {
+ unsupported $test
+ return -1
+}
+pass $test
+
+gdb_test_no_output "set disassembly-flavor att"
+# gas/i386/x86-64-rdrnd.d
+# gas/i386/x86-64-f16c.d
+# gas/i386/x86-64-fsgs.d
+gdb_test "disassemble/r _start" "\r
+Dump of assembler code for function _start:\r
+\[^\r\n\]+:\t66 0f c7 f3\t\( \)?rdrand %bx\r
+\[^\r\n\]+:\t0f c7 f3\t\( \)?rdrand %ebx\r
+\[^\r\n\]+:\t48 0f c7 f3\t\( \)?rdrand %rbx\r
+\[^\r\n\]+:\t66 41 0f c7 f0\t\( \)?rdrand %r8w\r
+\[^\r\n\]+:\t41 0f c7 f0\t\( \)?rdrand %r8d\r
+\[^\r\n\]+:\t49 0f c7 f0\t\( \)?rdrand %r8\r
+\[^\r\n\]+:\t66 0f c7 f3\t\( \)?rdrand %bx\r
+\[^\r\n\]+:\t0f c7 f3\t\( \)?rdrand %ebx\r
+\[^\r\n\]+:\t48 0f c7 f3\t\( \)?rdrand %rbx\r
+\[^\r\n\]+:\t66 41 0f c7 f0\t\( \)?rdrand %r8w\r
+\[^\r\n\]+:\t41 0f c7 f0\t\( \)?rdrand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\[^\r\n\]+:\tc4 e3 7d 1d 21 02\t\( \)?vcvtps2ph \\\$0x2,%ymm4,\\(%rcx\\)\r
+\[^\r\n\]+:\tc4 e3 79 1d e4 02\t\( \)?vcvtps2ph \\\$0x2,%xmm4,%xmm4\r
+\[^\r\n\]+:\tc4 43 79 1d 00 02\t\( \)?vcvtps2ph \\\$0x2,%xmm8,\\(%r8\\)\r
+\[^\r\n\]+:\tc4 e3 79 1d 21 02\t\( \)?vcvtps2ph \\\$0x2,%xmm4,\\(%rcx\\)\r
+\[^\r\n\]+:\tf3 0f ae c3\t\( \)?rdfsbase %ebx\r
+\[^\r\n\]+:\tf3 48 0f ae c3\t\( \)?rdfsbase %rbx\r
+\[^\r\n\]+:\tf3 41 0f ae c0\t\( \)?rdfsbase %r8d\r
+\[^\r\n\]+:\tf3 49 0f ae c0\t\( \)?rdfsbase %r8\r
+\[^\r\n\]+:\tf3 0f ae cb\t\( \)?rdgsbase %ebx\r
+\[^\r\n\]+:\tf3 48 0f ae cb\t\( \)?rdgsbase %rbx\r
+\[^\r\n\]+:\tf3 41 0f ae c8\t\( \)?rdgsbase %r8d\r
+\[^\r\n\]+:\tf3 49 0f ae c8\t\( \)?rdgsbase %r8\r
+\[^\r\n\]+:\tf3 0f ae d3\t\( \)?wrfsbase %ebx\r
+\[^\r\n\]+:\tf3 48 0f ae d3\t\( \)?wrfsbase %rbx\r
+\[^\r\n\]+:\tf3 41 0f ae d0\t\( \)?wrfsbase %r8d\r
+\[^\r\n\]+:\tf3 49 0f ae d0\t\( \)?wrfsbase %r8\r
+\[^\r\n\]+:\tf3 0f ae db\t\( \)?wrgsbase %ebx\r
+\[^\r\n\]+:\tf3 48 0f ae db\t\( \)?wrgsbase %rbx\r
+\[^\r\n\]+:\tf3 41 0f ae d8\t\( \)?wrgsbase %r8d\r
+\[^\r\n\]+:\tf3 49 0f ae d8\t\( \)?wrgsbase %r8\r
+\[^\r\n\]+:\tf3 0f ae c3\t\( \)?rdfsbase %ebx\r
+\[^\r\n\]+:\tf3 48 0f ae c3\t\( \)?rdfsbase %rbx\r
+\[^\r\n\]+:\tf3 41 0f ae c0\t\( \)?rdfsbase %r8d\r
+\[^\r\n\]+:\tf3 49 0f ae c0\t\( \)?rdfsbase %r8\r
+\[^\r\n\]+:\tf3 0f ae cb\t\( \)?rdgsbase %ebx\r
+\[^\r\n\]+:\tf3 48 0f ae cb\t\( \)?rdgsbase %rbx\r
+\[^\r\n\]+:\tf3 41 0f ae c8\t\( \)?rdgsbase %r8d\r
+\[^\r\n\]+:\tf3 49 0f ae c8\t\( \)?rdgsbase %r8\r
+\[^\r\n\]+:\tf3 0f ae d3\t\( \)?wrfsbase %ebx\r
+\[^\r\n\]+:\tf3 48 0f ae d3\t\( \)?wrfsbase %rbx\r
+\[^\r\n\]+:\tf3 41 0f ae d0\t\( \)?wrfsbase %r8d\r
+\[^\r\n\]+:\tf3 49 0f ae d0\t\( \)?wrfsbase %r8\r
+\[^\r\n\]+:\tf3 0f ae db\t\( \)?wrgsbase %ebx\r
+\[^\r\n\]+:\tf3 48 0f ae db\t\( \)?wrgsbase %rbx\r
+\[^\r\n\]+:\tf3 41 0f ae d8\t\( \)?wrgsbase %r8d\r
+\[^\r\n\]+:\tf3 49 0f ae d8\t\( \)?wrgsbase %r8\r
+End of assembler dump\\." "att"
+
+gdb_test_no_output "set disassembly-flavor intel"
+# gas/i386/x86-64-rdrnd-intel.d
+# gas/i386/x86-64-f16c-intel.d
+# gas/i386/x86-64-fsgs-intel.d
+gdb_test "disassemble/r _start" "\r
+Dump of assembler code for function _start:\r
+\[^\r\n\]+:\t66 0f c7 f3\t\( \)?rdrand bx\r
+\[^\r\n\]+:\t0f c7 f3\t\( \)?rdrand ebx\r
+\[^\r\n\]+:\t48 0f c7 f3\t\( \)?rdrand rbx\r
+\[^\r\n\]+:\t66 41 0f c7 f0\t\( \)?rdrand r8w\r
+\[^\r\n\]+:\t41 0f c7 f0\t\( \)?rdrand r8d\r
+\[^\r\n\]+:\t49 0f c7 f0\t\( \)?rdrand r8\r
+\[^\r\n\]+:\t66 0f c7 f3\t\( \)?rdrand bx\r
+\[^\r\n\]+:\t0f c7 f3\t\( \)?rdrand ebx\r
+\[^\r\n\]+:\t48 0f c7 f3\t\( \)?rdrand rbx\r
+\[^\r\n\]+:\t66 41 0f c7 f0\t\( \)?rdrand r8w\r
+\[^\r\n\]+:\t41 0f c7 f0\t\( \)?rdrand r8d\r
+\[^\r\n\]+:\t49 0f c7 f0\t\( \)?rdrand r8\r
+\[^\r\n\]+:\tc4 e2 7d 13 e4\t\( \)?vcvtph2ps ymm4,xmm4\r
+\[^\r\n\]+:\tc4 42 7d 13 00\t\( \)?vcvtph2ps ymm8,XMMWORD PTR \\\[r8\\\]\r
+\[^\r\n\]+:\tc4 e2 79 13 f4\t\( \)?vcvtph2ps xmm6,xmm4\r
+\[^\r\n\]+:\tc4 e2 79 13 21\t\( \)?vcvtph2ps xmm4,QWORD PTR \\\[rcx\\\]\r
+\[^\r\n\]+:\tc4 e3 7d 1d e4 02\t\( \)?vcvtps2ph xmm4,ymm4,0x2\r
+\[^\r\n\]+:\tc4 43 7d 1d 00 02\t\( \)?vcvtps2ph XMMWORD PTR \\\[r8\\\],ymm8,0x2\r
+\[^\r\n\]+:\tc4 e3 79 1d e4 02\t\( \)?vcvtps2ph xmm4,xmm4,0x2\r
+\[^\r\n\]+:\tc4 e3 79 1d 21 02\t\( \)?vcvtps2ph QWORD PTR \\\[rcx\\\],xmm4,0x2\r
+\[^\r\n\]+:\tc4 e2 7d 13 e4\t\( \)?vcvtph2ps ymm4,xmm4\r
+\[^\r\n\]+:\tc4 42 7d 13 00\t\( \)?vcvtph2ps ymm8,XMMWORD PTR \\\[r8\\\]\r
+\[^\r\n\]+:\tc4 e2 7d 13 21\t\( \)?vcvtph2ps ymm4,XMMWORD PTR \\\[rcx\\\]\r
+\[^\r\n\]+:\tc4 e2 79 13 f4\t\( \)?vcvtph2ps xmm6,xmm4\r
+\[^\r\n\]+:\tc4 e2 79 13 21\t\( \)?vcvtph2ps xmm4,QWORD PTR \\\[rcx\\\]\r
+\[^\r\n\]+:\tc4 e2 79 13 21\t\( \)?vcvtph2ps xmm4,QWORD PTR \\\[rcx\\\]\r
+\[^\r\n\]+:\tc4 e3 7d 1d e4 02\t\( \)?vcvtps2ph xmm4,ymm4,0x2\r
+\[^\r\n\]+:\tc4 e3 7d 1d 21 02\t\( \)?vcvtps2ph XMMWORD PTR \\\[rcx\\\],ymm4,0x2\r
+\[^\r\n\]+:\tc4 e3 7d 1d 21 02\t\( \)?vcvtps2ph XMMWORD PTR \\\[rcx\\\],ymm4,0x2\r
+\[^\r\n\]+:\tc4 e3 79 1d e4 02\t\( \)?vcvtps2ph xmm4,xmm4,0x2\r
+\[^\r\n\]+:\tc4 43 79 1d 00 02\t\( \)?vcvtps2ph QWORD PTR \\\[r8\\\],xmm8,0x2\r
+\[^\r\n\]+:\tc4 e3 79 1d 21 02\t\( \)?vcvtps2ph QWORD PTR \\\[rcx\\\],xmm4,0x2\r
+\[^\r\n\]+:\tf3 0f ae c3\t\( \)?rdfsbase ebx\r
+\[^\r\n\]+:\tf3 48 0f ae c3\t\( \)?rdfsbase rbx\r
+\[^\r\n\]+:\tf3 41 0f ae c0\t\( \)?rdfsbase r8d\r
+\[^\r\n\]+:\tf3 49 0f ae c0\t\( \)?rdfsbase r8\r
+\[^\r\n\]+:\tf3 0f ae cb\t\( \)?rdgsbase ebx\r
+\[^\r\n\]+:\tf3 48 0f ae cb\t\( \)?rdgsbase rbx\r
+\[^\r\n\]+:\tf3 41 0f ae c8\t\( \)?rdgsbase r8d\r
+\[^\r\n\]+:\tf3 49 0f ae c8\t\( \)?rdgsbase r8\r
+\[^\r\n\]+:\tf3 0f ae d3\t\( \)?wrfsbase ebx\r
+\[^\r\n\]+:\tf3 48 0f ae d3\t\( \)?wrfsbase rbx\r
+\[^\r\n\]+:\tf3 41 0f ae d0\t\( \)?wrfsbase r8d\r
+\[^\r\n\]+:\tf3 49 0f ae d0\t\( \)?wrfsbase r8\r
+\[^\r\n\]+:\tf3 0f ae db\t\( \)?wrgsbase ebx\r
+\[^\r\n\]+:\tf3 48 0f ae db\t\( \)?wrgsbase rbx\r
+\[^\r\n\]+:\tf3 41 0f ae d8\t\( \)?wrgsbase r8d\r
+\[^\r\n\]+:\tf3 49 0f ae d8\t\( \)?wrgsbase r8\r
+\[^\r\n\]+:\tf3 0f ae c3\t\( \)?rdfsbase ebx\r
+\[^\r\n\]+:\tf3 48 0f ae c3\t\( \)?rdfsbase rbx\r
+\[^\r\n\]+:\tf3 41 0f ae c0\t\( \)?rdfsbase r8d\r
+\[^\r\n\]+:\tf3 49 0f ae c0\t\( \)?rdfsbase r8\r
+\[^\r\n\]+:\tf3 0f ae cb\t\( \)?rdgsbase ebx\r
+\[^\r\n\]+:\tf3 48 0f ae cb\t\( \)?rdgsbase rbx\r
+\[^\r\n\]+:\tf3 41 0f ae c8\t\( \)?rdgsbase r8d\r
+\[^\r\n\]+:\tf3 49 0f ae c8\t\( \)?rdgsbase r8\r
+\[^\r\n\]+:\tf3 0f ae d3\t\( \)?wrfsbase ebx\r
+\[^\r\n\]+:\tf3 48 0f ae d3\t\( \)?wrfsbase rbx\r
+\[^\r\n\]+:\tf3 41 0f ae d0\t\( \)?wrfsbase r8d\r
+\[^\r\n\]+:\tf3 49 0f ae d0\t\( \)?wrfsbase r8\r
+\[^\r\n\]+:\tf3 0f ae db\t\( \)?wrgsbase ebx\r
+\[^\r\n\]+:\tf3 48 0f ae db\t\( \)?wrgsbase rbx\r
+\[^\r\n\]+:\tf3 41 0f ae d8\t\( \)?wrgsbase r8d\r
+\[^\r\n\]+:\tf3 49 0f ae d8\t\( \)?wrgsbase r8\r
+End of assembler dump\\." "intel"
diff --git a/gdb/testsuite/gdb.arch/i386-ivy-bridge.S b/gdb/testsuite/gdb.arch/i386-ivy-bridge.S
new file mode 100644
--- /dev/null
+++ b/gdb/testsuite/gdb.arch/i386-ivy-bridge.S
@@ -0,0 +1,66 @@
+/* Copyright 2011 Free Software Foundation, Inc.
+
+ This program is free software; you can redistribute it and/or modify
+ it under the terms of the GNU General Public License as published by
+ the Free Software Foundation; either version 3 of the License, or
+ (at your option) any later version.
+
+ This program is distributed in the hope that it will be useful,
+ but WITHOUT ANY WARRANTY; without even the implied warranty of
+ MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
+ GNU General Public License for more details.
+
+ You should have received a copy of the GNU General Public License
+ along with this program. If not, see <http://www.gnu.org/licenses/>.
+
+ This file is part of the gdb testsuite. */
+
+ .globl _start
+_start: .text
+
+/* gas/i386/rdrnd.s */
+ .att_syntax prefix
+ rdrand %bx
+ rdrand %ebx
+
+ .intel_syntax noprefix
+ rdrand bx
+ rdrand ebx
+
+/* gas/i386/f16c.s */
+ .att_syntax prefix
+ vcvtph2ps %xmm4,%ymm4
+ vcvtph2ps (%ecx),%ymm4
+ vcvtph2ps %xmm4,%xmm6
+ vcvtph2ps (%ecx),%xmm4
+ vcvtps2ph $0x2,%ymm4,%xmm4
+ vcvtps2ph $0x2,%ymm4,(%ecx)
+ vcvtps2ph $0x2,%xmm4,%xmm4
+ vcvtps2ph $0x2,%xmm4,(%ecx)
+
+ .intel_syntax noprefix
+ vcvtph2ps ymm4,xmm4
+ vcvtph2ps ymm4,XMMWORD PTR [ecx]
+ vcvtph2ps ymm4,[ecx]
+ vcvtph2ps xmm6,xmm4
+ vcvtph2ps xmm4,QWORD PTR [ecx]
+ vcvtph2ps xmm4,[ecx]
+ vcvtps2ph xmm4,ymm4,0x2
+ vcvtps2ph XMMWORD PTR [ecx],ymm4,0x2
+ vcvtps2ph [ecx],ymm4,0x2
+ vcvtps2ph xmm4,xmm4,0x2
+ vcvtps2ph QWORD PTR [ecx],xmm4,0x2
+ vcvtps2ph [ecx],xmm4,0x2
+
+/* gas/i386/fsgs.s */
+ .att_syntax prefix
+ rdfsbase %ebx
+ rdgsbase %ebx
+ wrfsbase %ebx
+ wrgsbase %ebx
+
+ .intel_syntax noprefix
+ rdfsbase ebx
+ rdgsbase ebx
+ wrfsbase ebx
+ wrgsbase ebx
diff --git a/gdb/testsuite/gdb.arch/i386-ivy-bridge.exp b/gdb/testsuite/gdb.arch/i386-ivy-bridge.exp
new file mode 100644
--- /dev/null
+++ b/gdb/testsuite/gdb.arch/i386-ivy-bridge.exp
@@ -0,0 +1,106 @@
+# Copyright 2011 Free Software Foundation, Inc.
+
+# This program is free software; you can redistribute it and/or modify
+# it under the terms of the GNU General Public License as published by
+# the Free Software Foundation; either version 3 of the License, or
+# (at your option) any later version.
+#
+# This program is distributed in the hope that it will be useful,
+# but WITHOUT ANY WARRANTY; without even the implied warranty of
+# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
+# GNU General Public License for more details.
+#
+# You should have received a copy of the GNU General Public License
+# along with this program. If not, see <http://www.gnu.org/licenses/>.
+
+if {![istarget "x86_64-*-*"] && ![istarget "i?86-*-*"]} then {
+ return
+}
+
+set testfile i386-ivy-bridge
+set test compilation
+if [prepare_for_testing ${testfile}.exp ${testfile}.x ${testfile}.S [list debug "additional_flags=-m32 -nostdlib"]] {
+ fail $test
+ return -1
+}
+pass $test
+
+gdb_test_no_output "set disassembly-flavor att"
+# gas/i386/rdrnd.d
+# gas/i386/f16c.d
+# gas/i386/fsgs.d
+gdb_test "disassemble/r _start" "\r
+Dump of assembler code for function _start:\r
+\[^\r\n\]+:\t66 0f c7 f3\t\( \)?rdrand %bx\r
+\[^\r\n\]+:\t0f c7 f3\t\( \)?rdrand %ebx\r
+\[^\r\n\]+:\t66 0f c7 f3\t\( \)?rdrand %bx\r
+\[^\r\n\]+:\t0f c7 f3\t\( \)?rdrand %ebx\r
+\[^\r\n\]+:\tc4 e2 7d 13 e4\t\( \)?vcvtph2ps %xmm4,%ymm4\r
+\[^\r\n\]+:\tc4 e2 7d 13 21\t\( \)?vcvtph2ps \\(%ecx\\),%ymm4\r
+\[^\r\n\]+:\tc4 e2 79 13 f4\t\( \)?vcvtph2ps %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x\\)\r
+\[^\r\n\]+:\tc4 e3 79 1d 21 02\t\( \)?vcvtps2ph \\\$0x2,%xmm4,\\(%ecx\\)\r
+\[^\r\n\]+:\tf3 0f ae c3\t\( \)?rdfsbase %ebx\r
+\[^\r\n\]+:\tf3 0f ae cb\t\( \)?rdgsbase %ebx\r
+\[^\r\n\]+:\tf3 0f ae d3\t\( \)?wrfsbase %ebx\r
+\[^\r\n\]+:\tf3 0f ae db\t\( \)?wrgsbase %ebx\r
+\[^\r\n\]+:\tf3 0f ae c3\t\( \)?rdfsbase %ebx\r
+\[^\r\n\]+:\tf3 0f ae cb\t\( \)?rdgsbase %ebx\r
+\[^\r\n\]+:\tf3 0f ae d3\t\( \)?wrfsbase %ebx\r
+\[^\r\n\]+:\tf3 0f ae db\t\( \)?wrgsbase %ebx\r
+End of assembler dump\\." "att"
+
+gdb_test_no_output "set disassembly-flavor intel"
+# gas/i386/rdrnd-intel.d
+# gas/i386/f16c-intel.d
+# gas/i386/fsgs-intel.d
+gdb_test "disassemble/r _start" "\r
+Dump of assembler code for function _start:\r
+\[^\r\n\]+:\t66 0f c7 f3\t\( \)?rdrand bx\r
+\[^\r\n\]+:\t0f c7 f3\t\( \)?rdrand ebx\r
+\[^\r\n\]+:\t66 0f c7 f3\t\( \)?rdrand bx\r
+\[^\r\n\]+:\t0f c7 f3\t\( \)?rdrand ebx\r
+\[^\r\n\]+:\tc4 e2 7d 13 e4\t\( \)?vcvtph2ps ymm4,xmm4\r
+\[^\r\n\]+:\tc4 e2 7d 13 21\t\( \)?vcvtph2ps ymm4,XMMWORD PTR \\\[ecx\\\]\r
+\[^\r\n\]+:\tc4 e2 79 13 f4\t\( \)?vcvtph2ps xmm6,xmm4\r
+\[^\r\n\]+:\tc4 e2 79 13 21\t\( \)?vcvtph2ps xmm4,QWORD PTR \\\[ecx\\\]\r
+\[^\r\n\]+:\tc4 e3 7d 1d e4 02\t\( \)?vcvtps2ph xmm4,ymm4,0x2\r
+\[^\r\n\]+:\tc4 e3 7d 1d 21 02\t\( \)?vcvtps2ph XMMWORD PTR \\\[ecx\\\],ymm4,0x2\r
+\[^\r\n\]+:\tc4 e3 79 1d e4 02\t\( \)?vcvtps2ph xmm4,xmm4,0x2\r
+\[^\r\n\]+:\tc4 e3 79 1d 21 02\t\( \)?vcvtps2ph QWORD PTR \\\[ecx\\\],xmm4,0x2\r
+\[^\r\n\]+:\tc4 e2 7d 13 e4\t\( \)?vcvtph2ps ymm4,xmm4\r
+\[^\r\n\]+:\tc4 e2 7d 13 21\t\( \)?vcvtph2ps ymm4,XMMWORD PTR \\\[ecx\\\]\r
+\[^\r\n\]+:\tc4 e2 7d 13 21\t\( \)?vcvtph2ps ymm4,XMMWORD PTR \\\[ecx\\\]\r
+\[^\r\n\]+:\tc4 e2 79 13 f4\t\( \)?vcvtph2ps xmm6,xmm4\r
+\[^\r\n\]+:\tc4 e2 79 13 21\t\( \)?vcvtph2ps xmm4,QWORD PTR \\\[ecx\\\]\r
+\[^\r\n\]+:\tc4 e2 79 13 21\t\( \)?vcvtph2ps xmm4,QWORD PTR \\\[ecx\\\]\r
+\[^\r\n\]+:\tc4 e3 7d 1d e4 02\t\( \)?vcvtps2ph xmm4,ymm4,0x2\r
+\[^\r\n\]+:\tc4 e3 7d 1d 21 02\t\( \)?vcvtps2ph XMMWORD PTR \\\[ecx\\\],ymm4,0x2\r
+\[^\r\n\]+:\tc4 e3 7d 1d 21 02\t\( \)?vcvtps2ph XMMWORD PTR \\\[ecx\\\],ymm4,0x2\r
+\[^\r\n\]+:\tc4 e3 79 1d e4 02\t\( \)?vcvtps2ph xmm4,xmm4,0x2\r
+\[^\r\n\]+:\tc4 e3 79 1d 21 02\t\( \)?vcvtps2ph QWORD PTR \\\[ecx\\\],xmm4,0x2\r
+\[^\r\n\]+:\tc4 e3 79 1d 21 02\t\( \)?vcvtps2ph QWORD PTR \\\[ecx\\\],xmm4,0x2\r
+\[^\r\n\]+:\tf3 0f ae c3\t\( \)?rdfsbase ebx\r
+\[^\r\n\]+:\tf3 0f ae cb\t\( \)?rdgsbase ebx\r
+\[^\r\n\]+:\tf3 0f ae d3\t\( \)?wrfsbase ebx\r
+\[^\r\n\]+:\tf3 0f ae db\t\( \)?wrgsbase ebx\r
+\[^\r\n\]+:\tf3 0f ae c3\t\( \)?rdfsbase ebx\r
+\[^\r\n\]+:\tf3 0f ae cb\t\( \)?rdgsbase ebx\r
+\[^\r\n\]+:\tf3 0f ae d3\t\( \)?wrfsbase ebx\r
+\[^\r\n\]+:\tf3 0f ae db\t\( \)?wrgsbase ebx\r
+End of assembler dump\\." "intel"

View File

@ -1,92 +0,0 @@
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-test-pid0-core.patch
;; New test gdb.arch/x86_64-pid0-core.exp for kernel PID 0 cores (BZ 611435).
;;=fedoratest
https://bugzilla.redhat.com/show_bug.cgi?id=611435
Fix:
Re: [RFA]corelow.c: Add tid to add_to_thread_list
http://sourceware.org/ml/gdb-patches/2010-08/msg00085.html
http://sourceware.org/ml/gdb-cvs/2010-08/msg00026.html
2e5bcfdef1ec3883d48c3f87a4be5c0dff25e17e
diff --git a/gdb/testsuite/gdb.arch/x86_64-pid0-core.core.bz2.uu b/gdb/testsuite/gdb.arch/x86_64-pid0-core.core.bz2.uu
new file mode 100644
--- /dev/null
+++ b/gdb/testsuite/gdb.arch/x86_64-pid0-core.core.bz2.uu
@@ -0,0 +1,20 @@
+begin 600 x86_64-pid0-core.core.bz2
+M0EIH.3%!629362,CA>P!$/'_____^*#EZ-A!SP36P&_:G0#=14``04A&8,'U
+M2*9`>$$)P`*RN"#*;#4R()IJ8C$TT&FC3$&@`T`#:C1H8C0T,@,FC,D"4T2!
+M"/2CU'B90]31ZAD#U`&AZF@/4:``!HT&F@!H<`#0-`-#0``#3$-&F@```#0R
+M``#")2FD]2>4]0TTT-!HTT--,0,"#$`R!I@AD`#1H,3&GZT.4TO$#H40/`0C
+M2$IRXS,<55!8T,&&,R.Z441"?J9I%G6GUA2!.[]Z"C5S[&19,%VS7E6[3"60
+M@`-*2G)QEQ(;?0Y<=MK]/U?Q)LB%+F37TJ9BI*46)H'*Z@V"`"$"P7]&<Q<?
+M>XZ:JE0E<*:#1M$P3G]>VCI)(A!O$64`5$4`E$$-.``7&(09`8HO`B6K!Q^&
+M562%N)2+0@*HB@%D@5$%!*0!L1&0D4D6\:-$A`)`+<6D82PP*H(J(H!?F;0$
+M%PXB7N!2D4!44`W7"ADEQM6<B]J<B(%1GF'5*0;_00KO55=43LPR0,Q?N72`
+M8"W*_;DV<AN#,XRU]Q-J2FDAFKAQ(9A+ZK$MCY#EI8:W-(15>O9TBO5,_]1)
+M($Q2))#),UE,QQK)E$,3D\W.>!4)QO8A_@^Z_SXS<OEHM*+"M8I1)-C(=DIJ
+MW+@WN)O)YO;3:I9YW-A$)N'2<A`F3),R3"3-'"S3E1;6VE*_95KD<!0050(G
+M,JV"N(Z:@0E#)50BSF)$T6_IN)#"Z8PLQ4UQ9]@Z'+;T]990-:Y:2`P26#!D
+MV+0L6"X@C9`GHAGSY7)%LWOY+E[2/>4;Q8=HV6[:&$@2$@$R29IBW)K%3"O`
+M9^Y0YJ&BXY1U2HTZ5)2H-V\_(.DZHWE+C#WS($(!I"3CUH2#(+(OWUV"*<<9
+MJ%A!J[%O.P&V%GI.`L7<1@0>,^1F\MY=V5UT,&NOG%7TTZ[03!@BHB@&)<A^
+4B.Z!/,0-IZ^W_Q=R13A0D",CA>P`
+`
+end
diff --git a/gdb/testsuite/gdb.arch/x86_64-pid0-core.exp b/gdb/testsuite/gdb.arch/x86_64-pid0-core.exp
new file mode 100644
--- /dev/null
+++ b/gdb/testsuite/gdb.arch/x86_64-pid0-core.exp
@@ -0,0 +1,46 @@
+# This testcase is part of GDB, the GNU debugger.
+#
+# Copyright 2010 Free Software Foundation, Inc.
+#
+# This program is free software; you can redistribute it and/or modify
+# it under the terms of the GNU General Public License as published by
+# the Free Software Foundation; either version 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.
+
+# Some kernel core files have PID 0 - for the idle task.
+
+if ![istarget "x86_64-*-*"] {
+ verbose "Skipping x86_64-pid0-core test."
+ return
+}
+
+set testfile "x86_64-pid0-core"
+set corebz2uufile ${srcdir}/${subdir}/${testfile}.core.bz2.uu
+set corefile [standard_output_file ${testfile}.core]
+
+if {[catch "system \"uudecode -o - ${corebz2uufile} | bzip2 -dc >${corefile}\""] != 0} {
+ untested "failed uudecode or bzip2"
+ return -1
+}
+file stat ${corefile} corestat
+if {$corestat(size) != 8798208} {
+ untested "uudecode or bzip2 produce invalid result"
+ return -1
+}
+
+gdb_exit
+gdb_start
+gdb_reinitialize_dir $srcdir/$subdir
+
+# Former crash was:
+# thread.c:884: internal-error: switch_to_thread: Assertion `inf != NULL' failed.
+gdb_test "core-file ${corefile}" "Program terminated with signal (11|SIGSEGV), Segmentation fault\\.\r\n.*"

View File

@ -1,33 +0,0 @@
diff --git b/gdb/testsuite/gdb.gdb/selftest.exp a/gdb/testsuite/gdb.gdb/selftest.exp
index 7e6a4e1..969797a 100644
--- b/gdb/testsuite/gdb.gdb/selftest.exp
+++ a/gdb/testsuite/gdb.gdb/selftest.exp
@@ -451,25 +451,9 @@ proc test_with_self { executable } {
}
set description "send SIGINT signal to child process"
- gdb_test_multiple "signal SIGINT" "$description" {
- -re "^signal SIGINT\r\nContinuing with signal SIGINT.\r\nQuit\r\n" {
- pass "$description"
- }
- }
-
- set description "send ^C to child process again"
- send_gdb "\003"
- gdb_expect {
- -re "(Thread .*|Program) received signal SIGINT.*$gdb_prompt $" {
- pass "$description"
- }
- -re ".*$gdb_prompt $" {
- fail "$description"
- }
- timeout {
- fail "$description (timeout)"
- }
- }
+ gdb_test "signal SIGINT" \
+ "Continuing with signal SIGINT.*" \
+ "$description"
# Switch back to the GDB thread if Guile support is linked in.
# "signal SIGINT" could also switch the current thread.

414
gdb.spec
View File

@ -41,20 +41,26 @@ ExcludeArch: aarch64
%global _build_minimal 1
%endif
# Include support for Guile? This is enabled on RHEL 8 and
# Fedora < 38.
%if (0%{?fedora:1} && 0%{?fedora} < 38) || (0%{?rhel:1} && 0%{?rhel} == 8)
%define use_guile 1
%endif
Name: %{?scl_prefix}gdb
# Freeze it when GDB gets branched
%global snapsrc 20220501
# See timestamp of source gnulib installed into gnulib/ .
%global snapgnulib 20210105
%global snapgnulib 20220501
%global tarname gdb-%{version}
Version: 12.1
Version: 13.2
# The release always contains a leading reserved number, start it at 1.
# `upstream' is not a part of `name' to stay fully rpm dependencies compatible for the testing.
Release: 5.2.riscv64%{?dist}
Release: 11.1.riscv64%{?dist}
License: GPLv3+ and GPLv3+ with exceptions and GPLv2+ and GPLv2+ with exceptions and GPL+ and LGPLv2+ and LGPLv3+ and BSD and Public Domain and GFDL
License: GPL-3.0-or-later AND BSD-3-clause AND FSFAP AND LGPL-2.1-or-later AND GPL-2.0-or-later AND LGPL-2.0-or-later AND LicenseRef-Fedora-Public-Domain AND GFDL-1.3-or-later AND LGPL-2.0-or-later WITH GCC-exception-2.0 AND GPL-3.0-or-later WITH GCC-exception-3.1 AND GPL-2.0-or-later WITH GNU-compiler-exception
# Do not provide URL for snapshots as the file lasts there only for 2 days.
# ftp://sourceware.org/pub/gdb/releases/FIXME{tarname}.tar.xz
#Source: %{tarname}.tar.xz
@ -73,9 +79,7 @@ URL: https://gnu.org/software/gdb/
%undefine _debuginfo_subpackages
# For DTS RHEL<=7 GDB it is better to use none than a Requires dependency.
# We don't support gcc-gdb-plugin on RHEL anymore.
%if 0%{!?rhel:1}
Recommends: %{?scl_prefix}gcc-gdb-plugin%{?_isa}
Recommends: dnf-command(debuginfo-install)
%endif
@ -86,12 +90,17 @@ Recommends: dnf-command(debuginfo-install)
# below, but it cannot hurt either -- rdieter
Conflicts: gdb-headless < 7.12-29
Summary: A stub package for GNU source-level debugger
Summary: A GNU source-level debugger for C, C++, Fortran, Go and other languages
Requires: gdb-headless%{?_isa} = %{version}-%{release}
%description
'gdb' package is only a stub to install gcc-gdb-plugin for 'compile' commands.
See package 'gdb-headless'.
GDB, the GNU debugger, allows you to debug programs written in C, C++,
Fortran, Go, and other languages, by executing them in a controlled
fashion and printing their data.
If you want to use GDB for development purposes, you should install
the 'gdb' package which will install 'gdb-headless' and possibly other
useful packages too.
%package headless
%endif
@ -153,6 +162,9 @@ Recommends: default-yama-scope
%if 0%{?fedora} >= 31 || 0%{?rhel} >= 9
%global librpmver 9
%endif
%if 0%{?fedora} >= 39 || 0%{?rhel} >= 10
%global librpmver 10
%endif
%endif
%endif
%if 0%{?__isa_bits} == 64
@ -255,14 +267,17 @@ BuildRequires: texlive-collection-latexrecommended
BuildRequires: /usr/bin/pod2man
%if 0%{!?rhel:1} || 0%{?rhel} > 7
BuildRequires: libbabeltrace-devel%{buildisa}
%if 0%{!?rhel:1}
%if %{defined use_guile}
%if 0%{!?rhel:1}
BuildRequires: guile22-devel%{buildisa}
%endif
# Guile is only supported prior to RHEL9, where it was called "guile".
%if 0%{?rhel:1} && 0%{?rhel} < 9
%endif
# Guile is only supported prior to RHEL9, where it was called "guile".
%if 0%{?rhel:1} && 0%{?rhel} < 9
BuildRequires: guile-devel%{buildisa}
%endif
%endif
%endif
%endif
%global have_libipt 0
%if 0%{!?rhel:1} || 0%{?rhel} > 7 || (0%{?rhel} == 7 && 0%{?scl:1})
%ifarch %{ix86} x86_64
@ -449,8 +464,8 @@ Conflicts: %{name}-headless > %{version}-%{release}
%description minimal
GDB, the GNU debugger, allows you to debug programs written in C, C++,
Java, and other languages, by executing them in a controlled fashion
and printing their data.
Fortran, Go, and other languages, by executing them in a controlled
fashion and printing their data.
This package provides a minimal version of GDB, tailored to be used by
the Fedora buildroot. It should probably not be used by end users.
@ -461,8 +476,8 @@ Summary: A standalone server for GDB (the GNU source-level debugger)
%description gdbserver
GDB, the GNU debugger, allows you to debug programs written in C, C++,
Java, and other languages, by executing them in a controlled fashion
and printing their data.
Fortran, Go, and other languages, by executing them in a controlled
fashion and printing their data.
This package provides a program that allows you to run GDB on a different
machine than the one which is running the program being debugged.
@ -514,9 +529,55 @@ find -name "*.info*"|xargs rm -f
find -name "*.orig" | xargs rm -f
! find -name "*.rej" # Should not happen.
# Change the version that gets printed at GDB startup, so it is distro-specific.
# In the past a distro name prefix was added to the version string in
# version.in.
#
# However, placing text at the start of version.in can cause problems;
# GDB will have a version string that starts with text rather than a
# number as is the case with upstream GDB, and for most (all?) other
# distros.
#
# GDB's version string is exposed to users as part of the Python API,
# and it is not uncommon for users to try and grok the version number
# from this string. Having Fedora/RHEL GDB not start with the major
# version number can be unexpected, and might cause tools/script that
# work for other builds of GDB to fail with Fedora/RHEL GDB.
#
# So, we switched to use the more standard --with-pkgversion configure
# option. This ensures the distro name is still included in the 'gdb
# --version' output, but the text is no longer part of the string
# exposed in the Python API.
#
# Unfortunately, for RHEL the dist_name macro is not defined. At
# least not on RHEL 9 or earlier. So, if dist_name is not defined,
# but the rhel macro is, then we use a hard-coded RHEL appropriate
# string.
#
# FIXME: It would be nice to rewrite this using %elif, but this is not
# supported on older (pre 9) RHEL systems.
%if 0%{?dist_name:1}
%global pkgversion_configure_flag --with-pkgversion=%{dist_name}
%else
%if 0%{?fedora:1}
%global pkgversion_configure_flag --with-pkgversion=Fedora Linux
%endif
%if 0%{?rhel:1}
%global pkgversion_configure_flag --with-pkgversion=Red Hat Enterprise Linux
%endif
%endif
# Change the version that gets printed by GDB. The 'version' here is
# usually the same as the original upstream version on which we are
# based. The 'release' is new information we're adding and identifies
# the modifications we've made to upstream.
cat > gdb/version.in << _FOO
%{?dist_name} %{version}-%{release}
%{?version_prefix:%version_prefix }%{version}-%{release}
_FOO
# Remove the info and other generated files added by the FSF release
@ -554,7 +615,7 @@ COMMON_GDB_CONFIGURE_FLAGS="\
--mandir=%{_mandir} \
--infodir=%{_infodir} \
--with-gdb-datadir=%{_datadir}/gdb \
--enable-gdb-build-warnings=,-Wno-unused,-Wno-deprecated-declarations,-Wno-unused-function\
--enable-gdb-build-warnings=,-Wno-unused,-Wno-deprecated-declarations,-Wno-unused-function,-Wno-stringop-overflow\
%ifarch %{ix86}
,-Wno-format-overflow\
%endif
@ -638,6 +699,9 @@ export PKG_CONFIG_PATH=%{_libdir}/pkgconfig
../configure \
${COMMON_GDB_CONFIGURE_FLAGS} \
${GDB_MINIMAL_CONFIGURE_FLAGS} \
%if 0%{?pkgversion_configure_flag:1}
"%{pkgversion_configure_flag}" \
%endif
--with-auto-load-dir='$debugdir:$datadir/auto-load%{?scl::%{_root_datadir}/gdb/auto-load}' \
--with-auto-load-safe-path='$debugdir:$datadir/auto-load%{?scl::%{_root_datadir}/gdb/auto-load}' \
%ifarch sparc sparcv9
@ -667,11 +731,6 @@ export LDFLAGS="%{?__global_ldflags} %{?_with_asan:-fsanitize=address}"
CFLAGS="$CFLAGS -DDNF_DEBUGINFO_INSTALL"
%endif
# Patch833: gdb-6.6-buildid-locate-rpm-scl.patch
%if 0%{?el6:1} && 0%{?scl:1}
CFLAGS="$CFLAGS -DGDB_INDEX_VERIFY_VENDOR"
%endif
%if 0%{have_libipt} && 0%{?el7:1} && 0%{?scl:1}
(
mkdir libipt-%{libipt_version}-root
@ -718,7 +777,7 @@ $(: ppc64 host build crashes on ppc variant of libexpat.so ) \
%else
--without-python \
%endif
%if 0%{!?rhel:1} || 0%{?rhel} == 8
%if %{defined use_guile}
--with-guile \
%else
--without-guile \
@ -743,6 +802,9 @@ $(: ppc64 host build crashes on ppc variant of libexpat.so ) \
../configure \
${COMMON_GDB_CONFIGURE_FLAGS} \
${GDB_FULL_CONFIGURE_FLAGS} \
%if 0%{?pkgversion_configure_flag:1}
"%{pkgversion_configure_flag}" \
%endif
--with-auto-load-dir='$debugdir:$datadir/auto-load%{?scl::%{_root_datadir}/gdb/auto-load}' \
--with-auto-load-safe-path='$debugdir:$datadir/auto-load%{?scl::%{_root_datadir}/gdb/auto-load}' \
%ifarch sparc sparcv9
@ -1038,10 +1100,11 @@ rm -rf $RPM_BUILD_ROOT%{_datadir}/locale/
rm -f $RPM_BUILD_ROOT%{_infodir}/bfd*
rm -f $RPM_BUILD_ROOT%{_infodir}/standard*
rm -f $RPM_BUILD_ROOT%{_infodir}/configure*
rm -f $RPM_BUILD_ROOT%{_infodir}/sframe-spec*
# Just exclude the header files in the top directory, and don't exclude
# the gdb/ directory, as it contains jit-reader.h.
rm -rf $RPM_BUILD_ROOT%{_includedir}/*.h
rm -rf $RPM_BUILD_ROOT/%{_libdir}/lib{bfd*,opcodes*,iberty*,ctf*}
rm -rf $RPM_BUILD_ROOT/%{_libdir}/lib{bfd*,opcodes*,iberty*,ctf*,sframe*}
# pstack obsoletion
@ -1190,19 +1253,296 @@ fi
%endif
%changelog
* Mon Sep 19 2022 David Abdurachmanov <davidlt@rivosinc.com> - 12.1-5.2.riscv64
- Bootstrap for Python 3.11 on riscv
* Tue Oct 17 2023 David Abdurachmanov <davidlt@rivosinc.com> 13.2-11.1.riscv64
- Bootstrap for Python 3.12 riscv64
* Fri Sep 02 2022 David Abdurachmanov <davidlt@rivosinc.com> - 12.1-5.1.riscv64
- Enable debug information
- Rebuild for boost
* Thu Aug 04 2022 David Abdurachmanov <davidlt@rivosinc.com> - 12.1-5.0.riscv64
* Tue Oct 17 2023 David Abdurachmanov <davidlt@rivosinc.com> 13.2-11.0.riscv64
- Add riscv64-linux-gnu to enabled targets
- Disable inprocess agent for riscv64
- Disable debug packages for riscv64
* Thu Jul 28 2022 Amit Shah <amitshah@fedoraproject.org> - 12.1-5
* Wed Oct 11 2022 Guinevere Larsen <blarsen@redhat.com>
- Remove gdb-rhbz1186476-internal-error-unqualified-name-re-set-test.patch
as it was upstreamed back in 2010 with a different test name.
* Mon Oct 2 2023 Kevin Buettner <kevinb@redhat.com> - 13.2-11
- Backport upstream commit which prevents internal error when
generating an overly large gdb-index file. (RHBZ 1773651, Kevin
Buettner.)
* Sun Oct 1 2023 Alexandra Hájková <ahajkova@redhat.com> - 13.2-10
- Backport upstream commit d28fbc7197b which fixes RHBZ 2233965 (
CVE-2022-48065).
* Thu Sep 28 2023 Kevin Buettner <kevinb@redhat.com>
- Remove gdb-6.5-sharedlibrary-path.patch, which was upstreamed in
commit 3ec033fab4a.
* Tue Sep 19 2023 Keith Seitz <keiths@redhat.com>
- Remove gdb-rhbz1553104-s390x-arch12-test.patch, which is more thoroughly tested
by binutils.
* Mon Sep 18 2023 Alexandra Hájková <ahajkova@redhat.com> - 13.2-8
- Bump release to 13.2-9.
* Sun Sep 17 2023 Alexandra Hájková <ahajkova@redhat.com> - 13.2-8
- Backport upstream commit 8f2c64de86b which fixes RHBZ 2233961,
CVE-2022-48064, (Alan Modra).
* Fri Sep 15 2023 Keith Seitz <keiths@redhat.com> - 13.2-8
- migrated to SPDX license
* Fri Sep 15 2023 Andrew Burgess <aburgess@redhat.com>
- Bump release to 13.2-8.
* Thu Sep 14 2023 Andrew Burgess <aburgess@redhat.com>
- Backport upstream commit 54392c4df604f20, which fixes RHBZ 2237392.
* Wed Sep 13 2023 Andrew Burgess <aburgess@redhat.com>
- Backport upstream commit f96328accde1e63, which fixes RHBZ 2237515.
* Wed Aug 9 2023 Guinevere Larsen <blarsen@redhat.com>
- Remove gdb-6.7-testsuite-stable-results.patch, it only made the test
fail more.
* Mon Aug 7 2023 Kevin Buettner <kevinb@redhat.com> - 13.2-7
- Bump release.
* Thu Aug 3 2023 Andrew Burgess <aburgess@redhat.com>
- Backport upstream commit f3eee586174, which fixes RHBZ 2196395.
* Wed Jul 19 2023 Fedora Release Engineering <releng@fedoraproject.org>
- Rebuilt for https://fedoraproject.org/wiki/Fedora_39_Mass_Rebuild
* Fri Jul 07 2023 Python Maint <python-maint@redhat.com>
- Rebuilt for Python 3.12
* Tue Jul 4 2023 Andrew Burgess <aburgess@redhat.com>
- Remove gdb-test-pid0-core.patch. This work has been upstreamed in
commit 8bcead69665.
* Sat Jul 1 2023 Mark Wielaard <mjw@fedoraproject.org> - 13.2-4
- Adjust gdb-add-index.patch to be silent about which gdb.
* Fri Jun 30 2023 Kevin Buettner <kevinb@redhat.com> - 13.2-3
- Backport upstream changes which prevent repeated warnings from being
printed when loading a core file (RHBZ 2160211, Lancelot SIX).
* Wed Jun 28 2023 Python Maint <python-maint@redhat.com> - 13.2-2
- Rebuilt for Python 3.12
* Sun Jun 25 2023 Alexandra Hájková <ahajkova@redhat.com> - 13.2-1
- Rebase to FSF GDB 13.22.
- Remove gdb-rhbz2177655-aarch64-pauth-valid-regcache.patch.
- Remove gdb-rhbz2183595-rustc-inside_main.patch.
* Tue Jun 13 2023 Python Maint <python-maint@redhat.com>
- Rebuilt for Python 3.12
* Tue Jun 13 2023 Python Maint <python-maint@redhat.com>
- Bootstrap for Python 3.12
* Sat May 20 2023 Andrew Burgess <aburgess@redhat.com>
- Remove gdb-lineno-makeup-test.patch. An equivalent test has now
been merged to upstream binutils-gdb in commit ef56b006501.
* Tue May 16 2023 Andrew Burgess <aburgess@redhat.com>
- Remove gdb-ccache-workaround.patch. This patch works around
problems when using older versions of ccache, however, upstream GDB
now disables ccache during testing, see upstream commit 49b4de64242d.
* Tue May 16 2023 Andrew Burgess <aburgess@redhat.com>
- Remove gdb-ppc-power7-test.patch, this patch is already covered by
upstream tests gdb.arch/powerpc-*.exp.
* Sat May 6 2023 Alexandra Hájková <ahajkova@redhat.com>
- Remove gdb-rhel5.9-testcase-xlf-var-inside-mod.patch, the patch adds
gdb.fortran/xlf-variable.exp test, the test can only be run on
PPC64 machines which are not supported anymore.
* Thu May 4 2023 Kevin Buettner <kevinb@redhat.com>
- Fix C89-isms in gdb-6.6-buildid-locate-rpm.patch. (Florian Weimer,
RHBZ 2143992)'. This change merely restores changes introduced by
Keith's Nov 30 2022 commit, but which were inadvertently lost during
the GDB 13.1 backport.
* Thu May 4 2023 Andrew Burgess <aburgess@redhat.com>
- Rewrite the changes to gdb-add-index.sh. If the user has set the
GDB environment variable then use that value, otherwise find a
suitable GDB executable by looking in various places.
* Wed May 3 2023 Kevin Buettner <kevinb@redhat.com> 13.1-5
- Backport "Pass const frame_info_ptr reference for
skip_[language_]trampoline". (Mark Wielaard, RHBZ 2192105, build/30413)
* Tue May 2 2023 Andrew Burgess <aburgess@redhat.com>
- Remove gdb-opcodes-clflushopt-test.patch. This patch tests that GDB
can disassemble the clflushopt instruction correctly. Such
disassembly is a feature of libopcode and is covered by the gas
tests i386/x86-64-clflushopt.s and i386/clflushopt.s. Lets remove
this test from GDB and just rely on the gas tests instead.
* Sat Apr 29 2023 Kevin Buettner <kevinb@redhat.com>
- Remove gdb-6.7-charsign-test.patch. This patch originally contained
some changes to GDB which were rejected by upstream maintainers. All
that remained was a testcase which had a number of failures due to
the rest of the work not being present in GDB.
* Tue Apr 25 2023 Bruno Larsen <blarsen@redhat.com>
- Remove gdb-6.5-bz109921-DW_AT_decl_file-test.patch. That patch was
only a test for basic DWARF-2 support, ensuring that GDB found a
variable in a .h file; tests such as gdb.linespec/linespec.exp already
tests for it.
* Mon Apr 24 2023 Bruno Larsen <blarsen@redhat.com>
- Remove gdb-6.5-last-address-space-byte-test.patch. It was used to
test for a regression in target_xfer_memory, a function that has
been removed from upstream back in 2006.
* Thu Apr 13 2023 Alexandra Hájková <ahajkova@redhat.com>
- Remove gdb-6.3-bz140532-ppc-unwinding-test.patch, it adds
powerpc-bcl-prologue.exp test which seems to be a subset of
upstream powerpc-prologue.exp
* Tue Apr 11 2023 Keith Seitz
- Backport "Fix a potential illegal memory access in the BFD library..."
(Nick Clifton, binutils/29988)
* Fri Mar 31 2023 Keith Seitz <keiths@redhat.com> - 13.1-4
- Backport "Fix crash in inside_main_func"
(Tom Tromey, RHBZ 2183595)
* Thu Mar 30 2023 Alexandra Hájková <ahajkova@redhat.com> - 12.1-3
- Update gdb-6.6-buildid-locate.patch to fix RHBZ 2181221.
* Wed Mar 29 2023 Andrew Burgess <aburgess@redhat.com>
- Used --with-pkgversion to place the distribution name in the version
string rather than placing the string directly into the version.in
file.
* Fri Mar 24 2023 Kevin Buettner <kevinb@redhat.com> - 13.1-2
- Backport fix for RHBZ 2177655. (Luis Machado)
* Mon Mar 20 2023 Bruno Larsen <blarsen@redhat.com>
- Remove gdb-rhbz1350436-type-printers-error.patch since it is upstreamed.
* Wed Mar 8 2023 Kevin Buettner <kevinb@redhat.com> - 13.1-1
- Rebase to FSF GDB 13.1.
- Update gdb-6.3-rh-testversion-20041202.patch.
- Update gdb-6.3-bz140532-ppc-unwinding-test.patch.
- Update gdb-6.6-buildid-locate.patch.
- Update gdb-6.6-buildid-locate-rpm.patch.
- Remove 'Recommends: ' line for gcc-gdb-plugin for BZ2149246.
- Add 'define _lto_cflags %{nil}' to avoid ODR violations.
- Add -Wno-stringop-overflow to --enable-gdb-build-warnings to work around
gcc problem.
* Fri Jan 27 2023 Kevin Buettner <kevinb@redhat.com> - 12.1-16
- Tweak gdb-6.3-rh-testversion-20041202.patch so that $_gdb_major
and $_gdb_minor will be obtained correctly.
* Thu Jan 26 2023 Bruno Larsen <blarsen@redhat.com>
- Remove gdb-rhbz1398387-tab-crash-test.patch as that test didn't
work anymore.
* Tue Jan 24 2023 Keith Seitz <keiths@redhat.com> - 12.1-15
- NVR bump for failed build.
* Mon Jan 23 2023 Kevin Buettner <kevinb@redhat.com>
- More tweaks to gdb-6.6-buildid-locate-rpm.patch, in which rpmTag
is replaced with rpmDbiTagVal.
* Mon Jan 23 2023 Keith Seitz <keiths@redhat.com> - 12.1-14
From Sergey Mende:
- Backport upstream patch "gdb: call check_typedef at beginning of
dwarf_expr_context::fetch_result". (Simon Marchi)
* Fri Jan 20 2023 Kevin Buettner <kevinb@redhat.com> - 12.1-13
- Backport fix for problems associated with GCC 13's self-move warning.
(Jan-Benedict Glaw)
- Tweak gdb-6.6-buildid-locate-rpm.patch so that running GDB's configure
script will not error out due to GCC 13's warnings.
* Thu Jan 19 2023 Alexandra Hájková <ahajkova@redhat.com> - 12.1-12
- Backport replace deprecated distutils.sysconfig in python-config.
(Lancelot SIX)
* Thu Jan 19 2023 Fedora Release Engineering <releng@fedoraproject.org>
- Rebuilt for https://fedoraproject.org/wiki/Fedora_38_Mass_Rebuild
* Mon Dec 19 2022 Andrew Burgess <aburgess@redhat.com>
- Backport upstream commits 38665d717a3 and c3efaf0afd9 to fix RHBZ
2152431.
* Fri Dec 16 2022 Keith Seitz <keiths@redhat.com>
- Remove gdb-6.6-buildid-locate-rpm-scl.patch and
gdb-bz601887-dwarf4-rh-test.patch.
* Fri Dec 9 2022 Andrew Burgess <aburgess@redhat.com>
- Remove gdb-fortran-frame-string.patch, a version of this test has
now been upstreamed.
* Fri Dec 9 2022 Andrew Burgess <aburgess@redhat.com>
- Remove gdb-bfd-aliasing.patch.
* Fri Dec 9 2022 Andrew Burgess <aburgess@redhat.com>
- Remove gdb-entryval-crash-1of3.patch, gdb-entryval-crash-2of3.patch,
and gdb-entryval-crash-3of3.patch.
* Wed Dec 7 2022 Keith Seitz <keiths@redhat.com> - 12.1-10
- Disable Guile support for F38+, RHBZ 2151328.
* Mon Dec 5 2022 Keith Seitz <keiths@redhat.com>
- Remove gdb-physname-pr11734-test.patch,
gdb-physname-pr12273-test.patch, gdb-runtest-pie-override.patch,
gdb-test-expr-cumulative-archer.patch.
* Thu Dec 1 2022 Kevin Buettner <kevinb@redhat.com>
- Remove gdb-6.3-threaded-watchpoints2-20050225.patch. The test in this
patch is a tweaked version of upstream test gdb.threads/watchthreads.exp
from 2004. It doesn't actually test anything new.
* Thu Dec 1 2022 Bruno Larsen <blarsen@redhat.com>
- Remove gdb-rhbz1325795-framefilters-test.patch. This test doesn't
pass in the curret state, and the code that introduced the original
problem has been changed beyong recognition at this point.
* Wed Nov 30 2022 Keith Seitz <keiths@redhat.com>
- Backport "libiberty: Fix C89-isms in configure tests" and do likewise in
gdb-6.6-buildid-locate-rpm.patch.
(Florian Weimer, RHBZ 2143992)
* Wed Nov 23 2022 Kevin Buettner <kevinb@redhat.com>
- Remove gdb-6.3-inheritancetest-20050726.patch. Upstream testcase
gdb.cp/impl-this.exp tests the printing of an instance variable from
an inherited class in the "print c" test.
* Fri Nov 18 2022 Kevin Buettner <kevinb@redhat.com>
- Remove gdb-6.3-test-movedir-20050125.patch. Upstream test
gdb.base/fullname.exp provides coverage for this case and more.
* Thu Nov 3 2022 Keith Seitz <keiths@redhat.com> - 12.1-9
- Add patch to fix ODR violations on powerpc and
enable LTO builds. (Keith Seitz, sw build/23395)
* Tue Oct 18 2022 Bruno Larsen - 12.1-8
- Backport fix to gdb.base/break-main-file-remove-fail.exp
(Tom de Vries)
* Tue Oct 18 2022 Bruno Larsen - 12.1-7
- Remove patch gdb-6.3-test-dtorfix.
Was upstreamed, will be back in the next rebase.
* Thu Oct 13 2022 Alexandra Hájková - 12.1-7
- Bump the release number.
* Tue Oct 11 2022 Alexandra Hájková - 12.1-6
- Backport upstream patch "Add support for readline 8.2". (Andreas Schwab)
* Fri Oct 7 2022 Alexandra Hájková - 12.1-6
- Update gdb-6.6-buildid-locate.patch to fix RHBZ 2122947.
* Thu Jul 28 2022 Amit Shah <amitshah@fedoraproject.org>
- Use the dist_name macro to identify the distribution
* Thu Jul 21 2022 Fedora Release Engineering <releng@fedoraproject.org>

View File

@ -83,14 +83,17 @@ for c in `git rev-list --reverse ${common_ancestor}..HEAD` ; do
# before, even if nothing has changed. This is bad, so we replace
# the commit hash by something constant (the string
# "FEDORA_PATCHES").
git format-patch --no-signature --no-stat --keep-subject -1 --stdout $c | sed -e '1 s/^From [0-9a-f]\+ \(.*\)/From FEDORA_PATCHES \1/' -e '/^index [0-9a-f]\+\.\.[0-9a-f]\+.*$/d' > $orig_dir/$fname
git format-patch --no-base --no-thread --no-signature --no-stat \
--keep-subject -1 --stdout $c \
| sed -e '1 s/^From [0-9a-f]\+ \(.*\)/From FEDORA_PATCHES \1/' \
-e '/^index [0-9a-f]\+\.\.[0-9a-f]\+.*$/d' > $orig_dir/$fname
(cd $orig_dir && git add $fname)
cat >> $temp_PATCH_file <<EOF
`git log -1 --pretty='format:%b' $c | sed -n 's/^;;/#/p'`
EOF
printf "Patch%03d: %s\n\n" $idx $fname >> $temp_PATCH_file
printf "%%patch%03d -p1\n" $idx >> $temp_patch_file
printf "%%patch -p1 -P%03d\n" $idx >> $temp_patch_file
echo $fname >> $temp_patch_order_file
idx=`expr $idx + 1`
done

View File

@ -3,4 +3,4 @@ discover:
how: fmf
directory: tests
execute:
how: beakerlib
how: tmt

View File

@ -1,3 +1,3 @@
SHA512 (gdb-libstdc++-v3-python-8.1.1-20180626.tar.xz) = a8b1c54dd348cfeb37da73f968742896be3dd13a4215f8d8519870c2abea915f5176c3fa6989ddd10f20020a16f0fab20cbae68ee8d58a82234d8778023520f8
SHA512 (v2.0.5.tar.gz) = 2e7ac2aede84671b15597d9c56dbe077a81357bbf44b6684802592246fb7729b4a5743238ddf02f6ea143b4d29872f581408135f9c1ea1ccc99dab905916d98d
SHA512 (gdb-12.1.tar.xz) = 425568d2e84672177d0fb87b1ad7daafdde097648d605e30cf0656970f66adc6a82ca2d83375ea4be583e9683a340e5bfdf5819668ddf66728200141ae50ff2d
SHA512 (gdb-13.2.tar.xz) = 8185d3e11ab60dafff5860a5016577bfe7dd7547ef01ebc867bc247603d82b74ff74c4f29492c7d2aee57076f52be33e289f4c6b414a4b870d4b3004909f4c34

View File

@ -1,13 +0,0 @@
Index: processor-trace-2.0/libipt/src/posix/init.c
===================================================================
--- processor-trace-2.0.orig/libipt/src/posix/init.c
+++ processor-trace-2.0/libipt/src/posix/init.c
@@ -29,7 +29,7 @@
#include "pt_ild.h"
-static void __attribute__((constructor)) init(void)
+void __libipt_init(void)
{
/* Initialize the Intel(R) Processor Trace instruction decoder. */
pt_ild_init();