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
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.
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.
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).
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.
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.
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.
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.
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.
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.
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.
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.
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.
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.
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.
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.
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.
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.
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.
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.
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.
...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.
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.
- 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.