public inbox for git-commits@fedoraproject.org
help / color / mirror / Atom feed
* [rpms/gdb] gdb-17.2-rebase-f44: Drop gdb-6.5-bz185337-resolve-tls-without-debuginfo-v2.patch
@ 2026-06-28  0:01 Kevin Buettner
  0 siblings, 0 replies; only message in thread
From: Kevin Buettner @ 2026-06-28  0:01 UTC (permalink / raw)
  To: git-commits

            A new commit has been pushed.

            Repo   : rpms/gdb
            Branch : gdb-17.2-rebase-f44
            Commit : 7b0d0c45cb45c27ce965590acc451bc9779f4621
            Author : Kevin Buettner <kevinb@redhat.com>
            Date   : 2024-03-28T16:28:35-07:00
            Stats  : +62/-324 in 7 file(s)
            URL    : https://src.fedoraproject.org/rpms/gdb/c/7b0d0c45cb45c27ce965590acc451bc9779f4621?branch=gdb-17.2-rebase-f44

            Log:
            Drop gdb-6.5-bz185337-resolve-tls-without-debuginfo-v2.patch

I've rewritten and expanded the test case and have submitted it for
upstream consideration.  The hack which rewrote 'errno' into a
dereference of a call to '__errno_location' does still fix a problem
with printing errno in statically linked binaries.  But it will fail
when attempting to debug a core file.  The original test case
associated with this bug now works correctly due changes to glibc.

---
diff --git a/_gdb.spec.Patch.include b/_gdb.spec.Patch.include
index 25064f6..5e90a41 100644
--- a/_gdb.spec.Patch.include
+++ b/_gdb.spec.Patch.include
@@ -6,129 +6,125 @@ Patch001: gdb-6.3-rh-testversion-20041202.patch
 #=push
 Patch002: gdb-6.3-gstack-20050411.patch
 
-# Support TLS symbols (+`errno' suggestion if no pthread is found) (BZ 185337).
-#=push+jan: It should be replaced by Infinity project.
-Patch003: gdb-6.5-bz185337-resolve-tls-without-debuginfo-v2.patch
-
 # Test sideeffects of skipping ppc .so libs trampolines (BZ 218379).
 #=fedoratest
-Patch004: gdb-6.5-bz218379-ppc-solib-trampoline-test.patch
+Patch003: gdb-6.5-bz218379-ppc-solib-trampoline-test.patch
 
 # Allow running `/usr/bin/gcore' with provided but inaccessible tty (BZ 229517).
 #=fedoratest
-Patch005: gdb-6.6-bz229517-gcore-without-terminal.patch
+Patch004: gdb-6.6-bz229517-gcore-without-terminal.patch
 
 # Avoid too long timeouts on failing cases of "annota1.exp annota3.exp".
 #=fedoratest
-Patch006: gdb-6.6-testsuite-timeouts.patch
+Patch005: gdb-6.6-testsuite-timeouts.patch
 
 # Support for stepping over PPC atomic instruction sequences (BZ 237572).
 #=fedoratest
-Patch007: gdb-6.6-bz237572-ppc-atomic-sequence-test.patch
+Patch006: gdb-6.6-bz237572-ppc-atomic-sequence-test.patch
 
 # Test leftover zombie process (BZ 243845).
 #=fedoratest
-Patch008: gdb-6.5-bz243845-stale-testing-zombie-test.patch
+Patch007: gdb-6.5-bz243845-stale-testing-zombie-test.patch
 
 # New locating of the matching binaries from the pure core file (build-id).
 #=push+jan
-Patch009: gdb-6.6-buildid-locate.patch
+Patch008: 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
-Patch010: gdb-6.6-buildid-locate-solib-missing-ids.patch
+Patch009: gdb-6.6-buildid-locate-solib-missing-ids.patch
 
 # Test PPC hiding of call-volatile parameter register.
 #=fedoratest
-Patch011: gdb-6.7-ppc-clobbered-registers-O2-test.patch
+Patch010: gdb-6.7-ppc-clobbered-registers-O2-test.patch
 
 # Test gcore memory and time requirements for large inferiors.
 #=fedoratest
-Patch012: gdb-6.5-gcore-buffer-limit-test.patch
+Patch011: 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.
-Patch013: gdb-6.3-mapping-zero-inode-test.patch
+Patch012: gdb-6.3-mapping-zero-inode-test.patch
 
 # Test a crash on libraries missing the .text section.
 #=fedoratest
-Patch014: gdb-6.5-section-num-fixup-test.patch
+Patch013: gdb-6.5-section-num-fixup-test.patch
 
 # Fix resolving of variables at locations lists in prelinked libs (BZ 466901).
 #=fedoratest
-Patch015: gdb-6.8-bz466901-backtrace-full-prelinked.patch
+Patch014: gdb-6.8-bz466901-backtrace-full-prelinked.patch
 
 # New test for step-resume breakpoint placed in multiple threads at once.
 #=fedoratest
-Patch016: gdb-simultaneous-step-resume-breakpoint-test.patch
+Patch015: 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@.*>
-Patch017: gdb-core-open-vdso-warning.patch
+Patch016: gdb-core-open-vdso-warning.patch
 
 # Fix follow-exec for C++ programs (bugreported by Martin Stransky).
 #=fedoratest
-Patch018: gdb-archer-next-over-throw-cxx-exec.patch
+Patch017: gdb-archer-next-over-throw-cxx-exec.patch
 
 # [delayed-symfile] Test a backtrace regression on CFIs without DIE (BZ 614604).
 #=fedoratest
-Patch019: gdb-test-bt-cfi-without-die.patch
+Patch018: gdb-test-bt-cfi-without-die.patch
 
 # [archer-tromey-delayed-symfile] New test gdb.dwarf2/dw2-aranges.exp.
 #=fedoratest
-Patch020: gdb-test-dw2-aranges.patch
+Patch019: gdb-test-dw2-aranges.patch
 
 # Workaround PR libc/14166 for inferior calls of strstr.
 #=fedoratest: Compatibility with RHELs (unchecked which ones).
-Patch021: gdb-glibc-strstr-workaround.patch
+Patch020: gdb-glibc-strstr-workaround.patch
 
 # Testcase for `Setting solib-absolute-prefix breaks vDSO' (BZ 818343).
 #=fedoratest
-Patch022: gdb-rhbz-818343-set-solib-absolute-prefix-testcase.patch
+Patch021: 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
-Patch023: gdb-rhbz947564-findvar-assertion-frame-failed-testcase.patch
+Patch022: gdb-rhbz947564-findvar-assertion-frame-failed-testcase.patch
 
 # Fix 'memory leak in infpy_read_memory()' (RH BZ 1007614)
 #=fedoratest
-Patch024: gdb-rhbz1007614-memleak-infpy_read_memory-test.patch
+Patch023: 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
-Patch025: gdb-6.6-buildid-locate-misleading-warning-missing-debuginfo-rhbz981154.patch
+Patch024: 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
-Patch026: gdb-rhbz1156192-recursive-dlopen-test.patch
+Patch025: gdb-rhbz1156192-recursive-dlopen-test.patch
 
 # Fix '`catch syscall' doesn't work for parent after `fork' is called'
 # (Philippe Waroquiers, RH BZ 1149205).
 #=fedoratest
-Patch027: gdb-rhbz1149205-catch-syscall-after-fork-test.patch
+Patch026: 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
-Patch028: gdb-rhbz1084404-ppc64-s390x-wrong-prologue-skip-O2-g-3of3.patch
+Patch027: gdb-rhbz1084404-ppc64-s390x-wrong-prologue-skip-O2-g-3of3.patch
 
 # Force libncursesw over libncurses to match the includes (RH BZ 1270534).
 #=push+jan
-Patch029: gdb-fedora-libncursesw.patch
+Patch028: gdb-fedora-libncursesw.patch
 
 # [aarch64] Fix hardware watchpoints (RH BZ 1261564).
 #=fedoratest
-Patch030: gdb-rhbz1261564-aarch64-hw-watchpoint-test.patch
+Patch029: gdb-rhbz1261564-aarch64-hw-watchpoint-test.patch
 
 # [dts+el7] [x86*] Bundle linux_perf.h for libipt (RH BZ 1256513).
 #=fedora
-Patch031: gdb-linux_perf-bundle.patch
+Patch030: gdb-linux_perf-bundle.patch
 
 # Update gdb-add-index.sh such that, when the GDB environment
 # variable is not set, the script is smarter than just looking for
@@ -142,72 +138,72 @@ Patch031: gdb-linux_perf-bundle.patch
 #   https://fedoraproject.org/wiki/Changes/Minimal_GDB_in_buildroot
 #
 #=fedora
-Patch032: gdb-add-index.patch
+Patch031: gdb-add-index.patch
 
 # Back-port upstream commit 1f0fab7ff86 as part of a fix for
 # non-deterministic gdb-index generation (RH BZ 2232086).
-Patch033: gdb-rhbz2232086-refactor-selftest-support.patch
+Patch032: gdb-rhbz2232086-refactor-selftest-support.patch
 
 # Back-port upstream commit aa19bc1d259 as part of a fix for
 # non-deterministic gdb-index generation (RH BZ 2232086).
-Patch034: gdb-rhbz-2232086-reduce-size-of-gdb-index.patch
+Patch033: gdb-rhbz-2232086-reduce-size-of-gdb-index.patch
 
 # Back-port upstream commit acc117b57f7 as part of a fix for
 # non-deterministic gdb-index generation (RH BZ 2232086).
-Patch035: gdb-rhbz-2232086-cpp-ify-mapped-symtab.patch
+Patch034: gdb-rhbz-2232086-cpp-ify-mapped-symtab.patch
 
 # Back-port upstream commit aff250145af as part of a fix for
 # non-deterministic gdb-index generation (RH BZ 2232086).
-Patch036: gdb-rhbz-2232086-generate-gdb-index-consistently.patch
+Patch035: gdb-rhbz-2232086-generate-gdb-index-consistently.patch
 
 # Back-port upstream commit 3644f41dc80 as part of a fix for
 # non-deterministic gdb-index generation (RH BZ 2232086).
-Patch037: gdb-rhbz-2232086-generate-dwarf-5-index-consistently.patch
+Patch036: gdb-rhbz-2232086-generate-dwarf-5-index-consistently.patch
 
 
-Patch038: gdb-rhbz2250652-gdbpy_gil.patch
+Patch037: gdb-rhbz2250652-gdbpy_gil.patch
 
 
-Patch039: gdb-rhbz2250652-avoid-PyOS_ReadlineTState.patch
+Patch038: gdb-rhbz2250652-avoid-PyOS_ReadlineTState.patch
 
 
-Patch040: gdb-ftbs-swapped-calloc-args.patch
+Patch039: gdb-ftbs-swapped-calloc-args.patch
 
 # Backport upstream workaround for GCC 14 problem which cause assertion
 # failures in GDB.
-Patch041: gdb-rhbz2261580-intrusive_list-assertion-fix.patch
+Patch040: gdb-rhbz2261580-intrusive_list-assertion-fix.patch
 
 # Backport upstream commit 7628a997f27.
-Patch042: gdb-sync-coffread-with-elfread.patch
+Patch041: gdb-sync-coffread-with-elfread.patch
 
 # Backport upstream commit 27807da5849.
-Patch043: gdb-merge-debug-symbol-lookup.patch
+Patch042: gdb-merge-debug-symbol-lookup.patch
 
 # Backport upstream commit 6234ba17598.
-Patch044: gdb-refactor-find-and-add-separate-symbol-file.patch
+Patch043: gdb-refactor-find-and-add-separate-symbol-file.patch
 
 # Backport upstream commit 661d98a3331.
-Patch045: gdb-add-missing-debug-ext-lang-hook.patch
+Patch044: gdb-add-missing-debug-ext-lang-hook.patch
 
 # Backport upstream commit 8f6c452b5a4.
-Patch046: gdb-add-missing-debug-info-python-hook.patch
+Patch045: gdb-add-missing-debug-info-python-hook.patch
 
 # Backport upstream commit 7db795bc67a.
-Patch047: gdb-remove-use-of-py-isascii
+Patch046: gdb-remove-use-of-py-isascii
 
 # Backport upstream commit 1146d27749f.
-Patch048: gdb-remove-path-in-test-name.patch
+Patch047: gdb-remove-path-in-test-name.patch
 
 # Backport upstream commit e8c3dafa5f5.
-Patch049: gdb-do-not-import-py-curses-ascii-module.patch
+Patch048: gdb-do-not-import-py-curses-ascii-module.patch
 
 # Backport upstream commit dd5516bf98f.
-Patch050: gdb-reformat-missing-debug-py-file.patch
+Patch049: gdb-reformat-missing-debug-py-file.patch
 
 # Backport upstream commit 7d21600b31fe.
-Patch051: gdb-handle-no-python-gdb-module.patch
+Patch050: gdb-handle-no-python-gdb-module.patch
 
 # Not a backport.  Add a new script which hooks into GDB and suggests
 # RPMs to install when GDB finds an objfile with no debug info.
-Patch052: gdb-add-rpm-suggestion-script.patch
+Patch051: gdb-add-rpm-suggestion-script.patch
 

diff --git a/_gdb.spec.patch.include b/_gdb.spec.patch.include
index d954063..161654d 100644
--- a/_gdb.spec.patch.include
+++ b/_gdb.spec.patch.include
@@ -49,4 +49,3 @@
 %patch -p1 -P049
 %patch -p1 -P050
 %patch -p1 -P051
-%patch -p1 -P052

diff --git a/_patch_order b/_patch_order
index d7864b9..ed6b637 100644
--- a/_patch_order
+++ b/_patch_order
@@ -1,6 +1,5 @@
 gdb-6.3-rh-testversion-20041202.patch
 gdb-6.3-gstack-20050411.patch
-gdb-6.5-bz185337-resolve-tls-without-debuginfo-v2.patch
 gdb-6.5-bz218379-ppc-solib-trampoline-test.patch
 gdb-6.6-bz229517-gcore-without-terminal.patch
 gdb-6.6-testsuite-timeouts.patch

diff --git a/gdb-6.5-bz185337-resolve-tls-without-debuginfo-v2.patch b/gdb-6.5-bz185337-resolve-tls-without-debuginfo-v2.patch
deleted file mode 100644
index ab64f7f..0000000
--- a/gdb-6.5-bz185337-resolve-tls-without-debuginfo-v2.patch
+++ /dev/null
@@ -1,265 +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-bz185337-resolve-tls-without-debuginfo-v2.patch
-
-;; Support TLS symbols (+`errno' suggestion if no pthread is found) (BZ 185337).
-;;=push+jan: It should be replaced by Infinity project.
-
-https://bugzilla.redhat.com/bugzilla/show_bug.cgi?id=185337
-
-2008-02-24  Jan Kratochvil  <jan.kratochvil@redhat.com>
-
-	Port to GDB-6.8pre.
-
-currently for trivial nonthreaded helloworld with no debug info up to -ggdb2 you
-will get:
-        (gdb) p errno
-        [some error]
-
-* with -ggdb2 and less "errno" in fact does not exist anywhere as it was
-  compiled to "(*__errno_location ())" and the macro definition is not present.
-  Unfortunately gdb will find the TLS symbol and it will try to access it but
-  as the program has been compiled without -lpthread the TLS base register
-  (%gs on i386) is not setup and it will result in:
-        Cannot access memory at address 0x8
-
-Attached suggestion patch how to deal with the most common "errno" symbol
-for the most common under-ggdb3 compiled programs.
-
-Original patch hooked into target_translate_tls_address.  But its inferior
-call invalidates `struct frame *' in the callers - RH BZ 690908.
-
-https://bugzilla.redhat.com/show_bug.cgi?id=1166549
-
-2007-11-03  Jan Kratochvil  <jan.kratochvil@redhat.com>
-
-	* ./gdb/dwarf2read.c (read_partial_die, dwarf2_linkage_name): Prefer
-	DW_AT_MIPS_linkage_name over DW_AT_name now only for non-C.
-
-glibc-debuginfo-2.7-2.x86_64: /usr/lib/debug/lib64/libc.so.6.debug:
-  <81a2>     DW_AT_name        : (indirect string, offset: 0x280e): __errno_location
-  <81a8>     DW_AT_MIPS_linkage_name: (indirect string, offset: 0x2808): *__GI___errno_location
-
-diff --git a/gdb/printcmd.c b/gdb/printcmd.c
---- a/gdb/printcmd.c
-+++ b/gdb/printcmd.c
-@@ -1308,6 +1308,11 @@ process_print_command_args (const char *args, value_print_options *print_opts,
- 
-   if (exp != nullptr && *exp)
-     {
-+      /* '*((int *(*) (void)) __errno_location) ()' is incompatible with
-+	 function descriptors.  */
-+      if (target_has_execution () && strcmp (exp, "errno") == 0)
-+	exp = "*(*(int *(*)(void)) __errno_location) ()";
-+
-       /* This setting allows large arrays to be printed by limiting the
- 	 number of elements that are loaded into GDB's memory; we only
- 	 need to load as many array elements as we plan to print.  */
-diff --git a/gdb/testsuite/gdb.dwarf2/dw2-errno.c b/gdb/testsuite/gdb.dwarf2/dw2-errno.c
-new file mode 100644
---- /dev/null
-+++ b/gdb/testsuite/gdb.dwarf2/dw2-errno.c
-@@ -0,0 +1,28 @@
-+/* This testcase is part of GDB, the GNU debugger.
-+
-+   Copyright 2005, 2007 Free Software Foundation, Inc.
-+
-+   This program is free software; you can redistribute it and/or modify
-+   it under the terms of the GNU General Public License as published by
-+   the Free Software Foundation; either version 3 of the License, or
-+   (at your option) any later version.
-+
-+   This program is distributed in the hope that it will be useful,
-+   but WITHOUT ANY WARRANTY; without even the implied warranty of
-+   MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
-+   GNU General Public License for more details.
-+
-+   You should have received a copy of the GNU General Public License
-+   along with this program.  If not, see <http://www.gnu.org/licenses/>.
-+
-+   Please email any bugs, comments, and/or additions to this file to:
-+   bug-gdb@prep.ai.mit.edu  */
-+
-+#include <errno.h>
-+
-+int main()
-+{
-+  errno = 42;
-+
-+  return 0;	/* breakpoint */
-+}
-diff --git a/gdb/testsuite/gdb.dwarf2/dw2-errno.exp b/gdb/testsuite/gdb.dwarf2/dw2-errno.exp
-new file mode 100644
---- /dev/null
-+++ b/gdb/testsuite/gdb.dwarf2/dw2-errno.exp
-@@ -0,0 +1,60 @@
-+# Copyright 2007 Free Software Foundation, Inc.
-+
-+# This program is free software; you can redistribute it and/or modify
-+# it under the terms of the GNU General Public License as published by
-+# the Free Software Foundation; either version 3 of the License, or
-+# (at your option) any later version.
-+#
-+# This program is distributed in the hope that it will be useful,
-+# but WITHOUT ANY WARRANTY; without even the implied warranty of
-+# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
-+# GNU General Public License for more details.
-+#
-+# You should have received a copy of the GNU General Public License
-+# along with this program.  If not, see <http://www.gnu.org/licenses/>.
-+
-+set testfile dw2-errno
-+set srcfile ${testfile}.c
-+set binfile [standard_output_file ${testfile}]
-+
-+proc prep {} {
-+    global srcdir subdir binfile
-+    gdb_exit
-+    gdb_start
-+    gdb_reinitialize_dir $srcdir/$subdir
-+    gdb_load ${binfile}
-+
-+    runto_main
-+
-+    gdb_breakpoint [gdb_get_line_number "breakpoint"]
-+    gdb_continue_to_breakpoint "breakpoint"
-+}
-+
-+if  { [gdb_compile "${srcdir}/${subdir}/${srcfile}" "${binfile}" executable "additional_flags=-g2"] != "" } {
-+    untested "Couldn't compile test program"
-+    return -1
-+}
-+prep
-+gdb_test "print errno" ".* = 42" "errno with macros=N threads=N"
-+
-+if  { [gdb_compile "${srcdir}/${subdir}/${srcfile}" "${binfile}" executable "additional_flags=-g3"] != "" } {
-+    untested "Couldn't compile test program"
-+    return -1
-+}
-+prep
-+gdb_test "print errno" ".* = 42" "errno with macros=Y threads=N"
-+
-+if {[gdb_compile_pthreads "${srcdir}/${subdir}/${srcfile}" "${binfile}" executable "additional_flags=-g2"] != "" } {
-+    return -1
-+}
-+prep
-+gdb_test "print errno" ".* = 42" "errno with macros=N threads=Y"
-+
-+if {[gdb_compile_pthreads "${srcdir}/${subdir}/${srcfile}" "${binfile}" executable "additional_flags=-g3"] != "" } {
-+    return -1
-+}
-+prep
-+gdb_test "print errno" ".* = 42" "errno with macros=Y threads=Y"
-+
-+# TODO: Test the error on resolving ERRNO with only libc loaded.
-+# Just how to find the current libc filename?
-diff --git a/gdb/testsuite/gdb.dwarf2/dw2-errno2.c b/gdb/testsuite/gdb.dwarf2/dw2-errno2.c
-new file mode 100644
---- /dev/null
-+++ b/gdb/testsuite/gdb.dwarf2/dw2-errno2.c
-@@ -0,0 +1,28 @@
-+/* This testcase is part of GDB, the GNU debugger.
-+
-+   Copyright 2005, 2007 Free Software Foundation, Inc.
-+
-+   This program is free software; you can redistribute it and/or modify
-+   it under the terms of the GNU General Public License as published by
-+   the Free Software Foundation; either version 3 of the License, or
-+   (at your option) any later version.
-+
-+   This program is distributed in the hope that it will be useful,
-+   but WITHOUT ANY WARRANTY; without even the implied warranty of
-+   MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
-+   GNU General Public License for more details.
-+
-+   You should have received a copy of the GNU General Public License
-+   along with this program.  If not, see <http://www.gnu.org/licenses/>.
-+
-+   Please email any bugs, comments, and/or additions to this file to:
-+   bug-gdb@prep.ai.mit.edu  */
-+
-+#include <errno.h>
-+
-+int main()
-+{
-+  errno = 42;
-+
-+  return 0;	/* breakpoint */
-+}
-diff --git a/gdb/testsuite/gdb.dwarf2/dw2-errno2.exp b/gdb/testsuite/gdb.dwarf2/dw2-errno2.exp
-new file mode 100644
---- /dev/null
-+++ b/gdb/testsuite/gdb.dwarf2/dw2-errno2.exp
-@@ -0,0 +1,71 @@
-+# Copyright 2007 Free Software Foundation, Inc.
-+
-+# This program is free software; you can redistribute it and/or modify
-+# it under the terms of the GNU General Public License as published by
-+# the Free Software Foundation; either version 3 of the License, or
-+# (at your option) any later version.
-+#
-+# This program is distributed in the hope that it will be useful,
-+# but WITHOUT ANY WARRANTY; without even the implied warranty of
-+# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
-+# GNU General Public License for more details.
-+#
-+# You should have received a copy of the GNU General Public License
-+# along with this program.  If not, see <http://www.gnu.org/licenses/>.
-+
-+set testfile dw2-errno2
-+set srcfile ${testfile}.c
-+set binfile [standard_output_file ${testfile}]
-+
-+proc prep { message {do_xfail 0} } { with_test_prefix $message {
-+    global srcdir subdir binfile variant
-+    gdb_exit
-+    gdb_start
-+    gdb_reinitialize_dir $srcdir/$subdir
-+    gdb_load ${binfile}${variant}
-+
-+    runto_main
-+
-+    gdb_breakpoint [gdb_get_line_number "breakpoint"]
-+    gdb_continue_to_breakpoint "breakpoint"
-+
-+    gdb_test "gcore ${binfile}${variant}.core" "\r\nSaved corefile .*" "gcore $variant"
-+
-+    gdb_test "print errno" ".* = 42"
-+
-+    gdb_test "kill" ".*" "kill" {Kill the program being debugged\? \(y or n\) } "y"
-+    gdb_test "core-file ${binfile}${variant}.core" "\r\nCore was generated by .*" "core-file"
-+    if $do_xfail {
-+	setup_xfail "*-*-*"
-+    }
-+    gdb_test "print (int) errno" ".* = 42" "print errno for core"
-+}}
-+
-+set variant g2thrN
-+if  { [gdb_compile "${srcdir}/${subdir}/${srcfile}" "${binfile}${variant}" executable "additional_flags=-g2"] != "" } {
-+    untested "Couldn't compile test program"
-+    return -1
-+}
-+prep "macros=N threads=N" 1
-+
-+set variant g3thrN
-+if  { [gdb_compile "${srcdir}/${subdir}/${srcfile}" "${binfile}${variant}" executable "additional_flags=-g3"] != "" } {
-+    untested "Couldn't compile test program"
-+    return -1
-+}
-+prep "macros=Y threads=N" 1
-+
-+set variant g2thrY
-+if {[gdb_compile_pthreads "${srcdir}/${subdir}/${srcfile}" "${binfile}${variant}" executable "additional_flags=-g2"] != "" } {
-+    return -1
-+}
-+prep "macros=N threads=Y"
-+
-+set variant g3thrY
-+if {[gdb_compile_pthreads "${srcdir}/${subdir}/${srcfile}" "${binfile}${variant}" executable "additional_flags=-g3"] != "" } {
-+    return -1
-+}
-+prep "macros=Y threads=Y" 1
-+
-+# TODO: Test the error on resolving ERRNO with only libc loaded.
-+# Just how to find the current libc filename?

diff --git a/gdb-6.6-buildid-locate.patch b/gdb-6.6-buildid-locate.patch
index c4e6ff9..074c623 100644
--- a/gdb-6.6-buildid-locate.patch
+++ b/gdb-6.6-buildid-locate.patch
@@ -963,7 +963,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
-@@ -22296,6 +22296,27 @@
+@@ -22296,6 +22296,27 @@ information files.
  
  @end table
  

diff --git a/gdb-add-missing-debug-info-python-hook.patch b/gdb-add-missing-debug-info-python-hook.patch
index 6617bf8..c954d27 100644
--- a/gdb-add-missing-debug-info-python-hook.patch
+++ b/gdb-add-missing-debug-info-python-hook.patch
@@ -107,7 +107,7 @@ diff --git a/gdb/data-directory/Makefile.in b/gdb/data-directory/Makefile.in
 diff --git a/gdb/doc/python.texi b/gdb/doc/python.texi
 --- a/gdb/doc/python.texi
 +++ b/gdb/doc/python.texi
-@@ -229,6 +229,7 @@
+@@ -229,6 +229,7 @@ optional arguments while skipping others.  Example:
  * Connections In Python::       Python representation of connections.
  * TUI Windows In Python::       Implementing new TUI windows.
  * Disassembly In Python::       Instruction Disassembly In Python
@@ -115,7 +115,7 @@ diff --git a/gdb/doc/python.texi b/gdb/doc/python.texi
  @end menu
  
  @node Basic Python
-@@ -5191,6 +5192,12 @@
+@@ -5191,6 +5192,12 @@ The @code{frame_filters} attribute is a dictionary of frame filter
  objects.  @xref{Frame Filter API}, for more information.
  @end defvar
  
@@ -128,7 +128,7 @@ diff --git a/gdb/doc/python.texi b/gdb/doc/python.texi
  A program space has the following methods:
  
  @defun Progspace.block_for_pc (pc)
-@@ -7770,6 +7777,139 @@
+@@ -7770,6 +7777,139 @@ class NibbleSwapDisassembler(gdb.disassembler.Disassembler):
  gdb.disassembler.register_disassembler(NibbleSwapDisassembler())
  @end smallexample
  

diff --git a/gdb.spec b/gdb.spec
index cc94a59..7eae269 100644
--- a/gdb.spec
+++ b/gdb.spec
@@ -1250,6 +1250,15 @@ fi
 %endif
 
 %changelog
+* Thu Mar 28 2024 Kevin Buettner <kevinb@redhat.com>
+- Drop gdb-6.5-bz185337-resolve-tls-without-debuginfo-v2.patch.  I've
+  rewritten and expanded the test case and have submitted it for
+  upstream consideration.  The hack which rewrote 'errno' into a
+  dereference of a call to '__errno_location' does still fix a problem
+  with printing errno in statically linked binaries.  But it will fail
+  when attempting to debug a core file.  The original test case
+  associated with this bug now works correctly due changes to glibc.
+
 * Tue Mar 19 2024 Andrew Burgess <aburgess@redhat.com>
 - Drop gdb-bz634108-solib_address.patch.  This is a test only patch.
   I've pushed upstream commit 52ca06e807b which covers this test case,

^ permalink raw reply related	[flat|nested] only message in thread

only message in thread, other threads:[~2026-06-28  0:01 UTC | newest]

Thread overview: (only message) (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2026-06-28  0:01 [rpms/gdb] gdb-17.2-rebase-f44: Drop gdb-6.5-bz185337-resolve-tls-without-debuginfo-v2.patch Kevin Buettner

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox