Go to file
Guinevere Larsen 9388311b2a Fix z17 support backport
Relates: RHEL-92896
2025-05-27 17:17:18 -03:00
plans Initial import of sources 2025-04-17 09:37:10 -03:00
tests/gdb-testsuite-sanity Initial import of sources 2025-04-17 09:37:10 -03:00
_gdb.spec.patch.include Backport amd64 decoding fixes 2025-05-26 10:45:00 -03:00
_gdb.spec.Patch.include Backport amd64 decoding fixes 2025-05-26 10:45:00 -03:00
_git_upstream_commit Rebase to GDB 16.3 2025-05-21 11:05:54 -03:00
_patch_order Backport amd64 decoding fixes 2025-05-26 10:45:00 -03:00
.gitignore Rebase to GDB 16.3 2025-05-21 11:05:54 -03:00
gating.yaml Reconfigure gating trigger 2025-04-25 09:44:05 +00:00
gdb-6.3-mapping-zero-inode-test.patch Initial import of sources 2025-04-17 09:37:10 -03:00
gdb-6.3-rh-testversion-20041202.patch Initial import of sources 2025-04-17 09:37:10 -03:00
gdb-6.5-bz218379-ppc-solib-trampoline-test.patch Initial import of sources 2025-04-17 09:37:10 -03:00
gdb-6.5-gcore-buffer-limit-test.patch Initial import of sources 2025-04-17 09:37:10 -03:00
gdb-6.6-bz237572-ppc-atomic-sequence-test.patch Initial import of sources 2025-04-17 09:37:10 -03:00
gdb-6.8-bz466901-backtrace-full-prelinked.patch Initial import of sources 2025-04-17 09:37:10 -03:00
gdb-add-index.patch Initial import of sources 2025-04-17 09:37:10 -03:00
gdb-add-rpm-suggestion-script.patch Initial import of sources 2025-04-17 09:37:10 -03:00
gdb-archer-next-over-throw-cxx-exec.patch Initial import of sources 2025-04-17 09:37:10 -03:00
gdb-gstack.man Initial import of sources 2025-04-17 09:37:10 -03:00
gdb-orphanripper.c Initial import of sources 2025-04-17 09:37:10 -03:00
gdb-rhbz1084404-ppc64-s390x-wrong-prologue-skip-O2-g-3of3.patch Initial import of sources 2025-04-17 09:37:10 -03:00
gdb-rhbz1149205-catch-syscall-after-fork-test.patch Initial import of sources 2025-04-17 09:37:10 -03:00
gdb-rhbz-818343-set-solib-absolute-prefix-testcase.patch Initial import of sources 2025-04-17 09:37:10 -03:00
gdb-rhel-7329-vandps-clobbers-registers-1-of-13.patch Backport amd64 decoding fixes 2025-05-26 10:45:00 -03:00
gdb-rhel-7329-vandps-clobbers-registers-2-of-13.patch Backport amd64 decoding fixes 2025-05-26 10:45:00 -03:00
gdb-rhel-7329-vandps-clobbers-registers-3-of-13.patch Backport amd64 decoding fixes 2025-05-26 10:45:00 -03:00
gdb-rhel-7329-vandps-clobbers-registers-4-of-13.patch Backport amd64 decoding fixes 2025-05-26 10:45:00 -03:00
gdb-rhel-7329-vandps-clobbers-registers-5-of-13.patch Backport amd64 decoding fixes 2025-05-26 10:45:00 -03:00
gdb-rhel-7329-vandps-clobbers-registers-6-of-13.patch Backport amd64 decoding fixes 2025-05-26 10:45:00 -03:00
gdb-rhel-7329-vandps-clobbers-registers-7-of-13.patch Backport amd64 decoding fixes 2025-05-26 10:45:00 -03:00
gdb-rhel-7329-vandps-clobbers-registers-8-of-13.patch Backport amd64 decoding fixes 2025-05-26 10:45:00 -03:00
gdb-rhel-7329-vandps-clobbers-registers-9-of-13.patch Backport amd64 decoding fixes 2025-05-26 10:45:00 -03:00
gdb-rhel-7329-vandps-clobbers-registers-10-of-13.patch Backport amd64 decoding fixes 2025-05-26 10:45:00 -03:00
gdb-rhel-7329-vandps-clobbers-registers-11-of-13.patch Backport amd64 decoding fixes 2025-05-26 10:45:00 -03:00
gdb-rhel-7329-vandps-clobbers-registers-12-of-13.patch Backport amd64 decoding fixes 2025-05-26 10:45:00 -03:00
gdb-rhel-7329-vandps-clobbers-registers-13-of-13.patch Backport amd64 decoding fixes 2025-05-26 10:45:00 -03:00
gdb-rhel-50069-support-z17.patch Fix z17 support backport 2025-05-27 17:17:18 -03:00
gdb.spec Backport amd64 decoding fixes 2025-05-26 10:45:00 -03:00
gdbinit Initial import of sources 2025-04-17 09:37:10 -03:00
generate-git-repo-from-patches.sh Initial import of sources 2025-04-17 09:37:10 -03:00
generate-patches-from-git-repo.sh Initial import of sources 2025-04-17 09:37:10 -03:00
README.local-patches.md Initial import of sources 2025-04-17 09:37:10 -03:00
sources Rebase to GDB 16.3 2025-05-21 11:05:54 -03:00

Fedora GDB local patches policy

In order to make things easier for the Fedora GDB maintainer, we choose to auto-generate the local patches by making use of an upstream git repository. Below you can find a few instructions on how to work using this method.

You need to run the following commands from the directory that contains the "gdb.spec" file.

Importing the GDB patches into a git repository

  1. The local patches (*.patch) need to be imported into an upstream git repository. For example, let's assume you cloned the repository by doing:

$ git clone git://sourceware.org/git/binutils-gdb.git

TIP: if you already have the repository cloned somewhere in your system, you can pass a "--reference

" to the "git clone" command and it will use your local repository as much as possible to make the clone, speeding up things.

  1. After cloning the upstream repository, you can import your patches by using the script "generate-git-repo-from-patches.sh":

$ sh generate-git-repo-from-patches.sh <REPOSITORY_DIR>

The script will basically cd into the repository, checkout the revision specified in the file _git_upstream_commit, iterate through the file _patch_order and "git-am" every patch in that order. This operation should complete without errors; if you find a problem with git-am, it probably means that the revision specified in the file _git_upstream_commit is wrong.

Rebasing the patches against a newer version/release

  1. First, cd into the upstream repository. All you have to do is choose the revision against which you plan to rebase the patches, and git rebase <REVISION>. git will do the rest, and you will be able to perform conflict resolution by git's algorithm, which is smarter.

Creating new patches

  1. Create the new patch on top of the the others, as usual. Note that you can use git rebase whenever you want to reorder patch order, or even to delete a patch.

  2. When writing the commit log, you must obey a few rules. The subject line must be the filename of the patch. This line will be used when exporting the patches from the git repository, and (obviously) it gives the filename that should be used for this specific patch.

  3. You can also add comments that will go into the auto-generated Patch: file (see below). To do that, use the special marker ;; at the beginning of the line. This way, a commit log that says:

  test-patch.patch

  ;; This is a test patch
  ;; Second line

Will generate the following entry in the auto-generated Patch: file:

  # This is a test patch
  # Second line
  PatchXYZ: test-patch.patch

Exporting the GDB patches from the git repository

  1. When you're done working with the patches, go back to the directory that contains the gdb.spec file, and from there you run:

$ sh generate-patches-from-git-repo.sh <REPOSITORY_DIR>

This will regenerate all of the *.patch files (excluding the ones that were also excluded from the git repository), and also regenerate a few control files. These control files are:

  • _gdb.spec.Patch.include: This file contains the Patch: directives.

  • _gdb.spec.patch.include: This file contains the %patch directives.

  • _patch_order: This file contains the patches, in the exact order that they must be applied. It is used when importing the patches into the git repository.

  • _git_upstream_commit: This file contains the last upstream commit against which the patches were rebased. It is used when importing the patches into the git repository.

NOTE: If you did a rebase against a newer upstream version, you need to specify the commit/tag/branch against which you rebased:

$ sh generate-patches-from-git-repo.sh <REPOSITORY_DIR> <COMMIT_OR_TAG_OR_BRANCH>

For example, if you rebased against gdb-8.1-release:

$ sh generate-patches-from-git-repo.sh <REPOSITORY_DIR> gdb-8.1-release