public inbox for git-commits@fedoraproject.org
help / color / mirror / Atom feed
From: Sergio Durigan Junior <sergiodj@redhat.com>
To: git-commits@fedoraproject.org
Subject: [rpms/gdb] gdb-17.2-rebase-f44: * Thu Apr 24 2014 Sergio Durigan Junior <sergiodj@redhat.com> - 7.7-5.fc21
Date: Sat, 27 Jun 2026 23:56:29 GMT [thread overview]
Message-ID: <178260458964.1.17549776029058666080.rpms-gdb-fceb2c10d4b1@fedoraproject.org> (raw)
A new commit has been pushed.
Repo : rpms/gdb
Branch : gdb-17.2-rebase-f44
Commit : fceb2c10d4b136abc6f03608ade2e801e8967675
Author : Sergio Durigan Junior <sergiodj@redhat.com>
Date : 2014-04-24T17:31:03-03:00
Stats : +136/-1 in 2 file(s)
URL : https://src.fedoraproject.org/rpms/gdb/c/fceb2c10d4b136abc6f03608ade2e801e8967675?branch=gdb-17.2-rebase-f44
Log:
* Thu Apr 24 2014 Sergio Durigan Junior <sergiodj@redhat.com> - 7.7-5.fc21
- Fix 'gdb gives highly misleading error when debuginfo pkg is present,
but not corresponding binary pkg' (RH BZ 981154).
This is mainly a RHEL-6.6 testcase backport, with a necessary small fix.
---
diff --git a/gdb-6.6-buildid-locate-misleading-warning-missing-debuginfo-rhbz981154.patch b/gdb-6.6-buildid-locate-misleading-warning-missing-debuginfo-rhbz981154.patch
new file mode 100644
index 0000000..b7c47e3
--- /dev/null
+++ b/gdb-6.6-buildid-locate-misleading-warning-missing-debuginfo-rhbz981154.patch
@@ -0,0 +1,127 @@
+Comments by Sergio Durigan Junior <sergiodj@redhat.com>:
+
+ This is the fix for RH BZ #981154
+
+ It is mainly a testcase addition, but a minor fix in the gdb/build-id.c
+ file was also needed.
+
+ gdb/build-id.c was added by:
+
+ commit dc294be54c96414035eed7d53dafdea0a6f31a72
+ Author: Tom Tromey <tromey@redhat.com>
+ Date: Tue Oct 8 19:56:15 2013 +0000
+
+ and had a little thinko there. The variable 'filename' needs to be set to
+ NULL after it is free'd, otherwise the code below thinks that it is still
+ valid and doesn't print the necessary warning ("Try: yum install ...").
+
+Index: gdb-7.7/gdb/testsuite/gdb.base/rhbz981154-misleading-yum-install-warning.exp
+===================================================================
+--- /dev/null
++++ gdb-7.7/gdb/testsuite/gdb.base/rhbz981154-misleading-yum-install-warning.exp
+@@ -0,0 +1,93 @@
++# Copyright (C) 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 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/>.
++
++standard_testfile "normal.c"
++
++if { [prepare_for_testing ${testfile}.exp ${testfile} ${srcfile}] } {
++ return -1
++}
++
++# Get the build-id of the file
++set build_id_debug_file [build_id_debug_filename_get $binfile]
++regsub -all ".debug$" $build_id_debug_file "" build_id_without_debug
++
++# Run to main
++if { ![runto_main] } {
++ return -1
++}
++
++# We first need to generate a corefile
++set escapedfilename [string_to_regexp ${objdir}/${subdir}/gcore.test]
++set core_supported 0
++gdb_test_multiple "gcore ${objdir}/${subdir}/gcore.test" \
++ "save a corefile" \
++{
++ -re "Saved corefile ${escapedfilename}\[\r\n\]+$gdb_prompt $" {
++ pass "save a corefile"
++ global core_supported
++ set core_supported 1
++ }
++ -re "Can't create a corefile\[\r\n\]+$gdb_prompt $" {
++ unsupported "save a corefile"
++ global core_supported
++ set core_supported 0
++ }
++}
++
++if {!$core_supported} {
++ return -1
++}
++
++# Move the binfile to a temporary name
++remote_exec build "mv $binfile ${binfile}.old"
++
++# Reinitialize GDB and see if we get a yum warning
++gdb_exit
++gdb_start
++gdb_reinitialize_dir $srcdir/$subdir
++
++gdb_test "set build-id-verbose 1" "" \
++ "set build-id-verbose"
++
++gdb_test "set debug-file-directory ${objdir}/${subdir}" "" \
++ "set debug-file-directory to ${objdir}/${subdir}"
++
++gdb_test "core-file ${objdir}/${subdir}/gcore.test" \
++ "Missing separate debuginfo for the main executable file\r\nTry: yum --enablerepo='\\*debug\\*' install $objdir/$subdir/$build_id_without_debug\r\n.*" \
++ "test first yum warning to install $objdir/$subdir/$build_id_without_debug"
++
++# Now we define and create our .build-id
++file mkdir [file dirname ${objdir}/${subdir}/${build_id_without_debug}]
++# Cannot use "file link" (from TCL) because it requires the target file to
++# exist.
++remote_exec build "ln -s $binfile ${objdir}/${subdir}/${build_id_without_debug}"
++
++# Reinitialize GDB to get the second yum warning
++gdb_exit
++gdb_start
++gdb_reinitialize_dir $srcdir/$subdir
++
++gdb_test "set build-id-verbose 1" "" \
++ "set build-id-verbose"
++
++gdb_test "set debug-file-directory ${objdir}/${subdir}" "" \
++ "set debug-file-directory to ${objdir}/${subdir}"
++
++gdb_test "core-file ${objdir}/${subdir}/gcore.test" \
++ "Missing separate debuginfo for the main executable file\r\nTry: yum --enablerepo='\\*debug\\*' install $binfile\r\n.*" \
++ "test second yum warning to install $binfile"
++
++# Leaving the link there will cause breakage in the next run.
++remote_exec build "rm -f ${objdir}/${subdir}/${build_id_without_debug}"
+Index: gdb-7.7/gdb/build-id.c
+===================================================================
+--- gdb-7.7.orig/gdb/build-id.c
++++ gdb-7.7/gdb/build-id.c
+@@ -588,6 +588,7 @@ build_id_to_debug_bfd (size_t build_id_l
+ if (abfd == NULL)
+ {
+ xfree (filename);
++ filename = NULL;
+ continue;
+ }
+
diff --git a/gdb.spec b/gdb.spec
index 626a30f..ce83845 100644
--- a/gdb.spec
+++ b/gdb.spec
@@ -39,7 +39,7 @@ Version: 7.7
# 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: 4%{?dist}
+Release: 5%{?dist}
License: GPLv3+ and GPLv3+ with exceptions and GPLv2+ and GPLv2+ with exceptions and GPL+ and LGPLv2+ and BSD and Public Domain
Group: Development/Debuggers
@@ -285,6 +285,9 @@ Patch415: gdb-6.6-buildid-locate-core-as-arg.patch
Patch519: gdb-6.6-buildid-locate-rpm-librpm-workaround.patch
# [SCL] Skip deprecated .gdb_index warning for Red Hat built files (BZ 953585).
Patch833: gdb-6.6-buildid-locate-rpm-scl.patch
+# Fix 'gdb gives highly misleading error when debuginfo pkg is present,
+# but not corresponding binary pkg' (RH BZ 981154).
+Patch863: gdb-6.6-buildid-locate-misleading-warning-missing-debuginfo-rhbz981154.patch
# Add kernel vDSO workaround (`no loadable ...') on RHEL-5 (kernel BZ 765875).
#=push
@@ -837,6 +840,7 @@ find -name "*.info*"|xargs rm -f
%patch850 -p1
%patch851 -p1
%patch852 -p1
+%patch863 -p1
%patch848 -p1
%if 0%{!?el6:1}
@@ -1368,6 +1372,10 @@ fi
%endif # 0%{!?el5:1} || "%{_target_cpu}" == "noarch"
%changelog
+* Thu Apr 24 2014 Sergio Durigan Junior <sergiodj@redhat.com> - 7.7-5.fc21
+- Fix 'gdb gives highly misleading error when debuginfo pkg is present,
+ but not corresponding binary pkg' (RH BZ 981154).
+
* Mon Feb 24 2014 Jan Kratochvil <jan.kratochvil@redhat.com> - 7.7-4.fc21
- Fix crash of -readnow /usr/lib/debug/usr/bin/gnatbind.debug (BZ 1069211).
reply other threads:[~2026-06-27 23:56 UTC|newest]
Thread overview: [no followups] expand[flat|nested] mbox.gz Atom feed
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
Avoid top-posting and favor interleaved quoting:
https://en.wikipedia.org/wiki/Posting_style#Interleaved_style
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=178260458964.1.17549776029058666080.rpms-gdb-fceb2c10d4b1@fedoraproject.org \
--to=sergiodj@redhat.com \
--cc=git-commits@fedoraproject.org \
/path/to/YOUR_REPLY
https://kernel.org/pub/software/scm/git/docs/git-send-email.html
* If your mail client supports setting the In-Reply-To header
via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line
before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox