Commit Graph

1174 Commits

Author SHA1 Message Date
David Abdurachmanov 9bbdd8c6d1
Merge remote-tracking branch 'up/f38' into f38-riscv64
Signed-off-by: David Abdurachmanov <davidlt@rivosinc.com>
2023-07-04 17:23:54 +03:00
Kevin Buettner ef8cdc2db8 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 17:58:51 -07:00
Alexandra Hájková b00a04230b Rebase to FSF GDB 13.2.
Update gdb-6.3-rh-testversion-20041202.patch.
Remove gdb-rhbz2177655-aarch64-pauth-valid-regcache.patch.
Remove gdb-rhbz2183595-rustc-inside_main.patch.
2023-06-22 19:30:36 +02:00
David Abdurachmanov 4ca353674f
Merge commit 'b62692054516d4e94e9bdcc9c641e0d8df070919' into f38-riscv64
Signed-off-by: David Abdurachmanov <davidlt@rivosinc.com>
2023-05-12 17:12:09 +03:00
Andrew Burgess dd4bbfd655 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 14:34:23 -07:00
Kevin Buettner b626920545 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:27:40 -07:00
Keith Seitz fc4e284a6d Backport "Fix a potential illegal memory access in the BFD library..."
(Nick Clifton, binutils/29988)
2023-04-11 10:47:14 -07:00
Keith Seitz 9b284f749c Backport "Fix crash in inside_main_func"
Resolves: rhbz#2183595
2023-03-31 14:09:01 -07:00
Kevin Buettner b752f3a714 Backport fix for RHBZ 2177655. (Luis Machado) 2023-03-24 16:18:00 -07:00
David Abdurachmanov 719dfc5e05
Merge remote-tracking branch 'up/f38' into f38-riscv64
Signed-off-by: David Abdurachmanov <davidlt@rivosinc.com>
2023-03-08 16:40:28 +02:00
Kevin Buettner a246e1e4e3 Remove files which were inadvertently added back during F38 rebase 2023-03-06 15:05:14 -07:00
Kevin Buettner a65cdc2ca4 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.
2023-03-03 16:07:29 -07:00
David Abdurachmanov 09d80e320f
Enable riscv64
Enable riscv64 support.

Signed-off-by: David Abdurachmanov <davidlt@rivosinc.com>
2023-03-01 09:41:41 +02: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
Keith Seitz a6e7b2b18f Disable -minimal RPM on RHEL9 GTS.
This patch disables the gdb-minimal package on GTS for RHEL9. Since
the -minimal package only exists to shrink the buildroot size and
we don't use GTS in the buildroot, there's no reason to build it.
2022-07-29 13:39:24 -07:00
Keith Seitz fbba720a74 Fix s390x dependencies
Fedora doesn't build 32-bit s390x images.
There is no `fpc' package available for s390x, either.
2022-07-29 12:42:05 -07:00
Amit Shah ddf8291871 Switch to using the dist_name macro for distribution
The new dist_vendor macro[1] in fedora-release helps simplify spec files
by removing the conditionals for populating the distro.

[1] https://src.fedoraproject.org/rpms/fedora-release/pull-request/223
2022-07-28 06:54:17 +00:00
Keith Seitz b8b001a927 Use system elfutils for all GTS releases (rhel8+). 2022-07-26 18:13:53 +00:00
Keith Seitz 45e744e200 Add 'tests' definition.
Defining this option will iimit the tests performed with the "--with testsuite"
option:

$ rpmbuild -bb --with testsuite --define 'tests "gdb.base/break.exp gdb.dwarf2/*.exp"' \
   gdb.spec

The above will build the RPM with testing, but it will only test the listed tests
(just as if they were passed to TESTS="gdb.base/break.exp gdb.dwarf2/*.exp").
2022-07-26 18:08:52 +00:00
Fedora Release Engineering 0803f3fa54 Rebuilt for https://fedoraproject.org/wiki/Fedora_37_Mass_Rebuild
Signed-off-by: Fedora Release Engineering <releng@fedoraproject.org>
2022-07-21 04:14:36 +00:00