[SCL] Skip deprecated .gdb_index warning for Red Hat built files (BZ 953585).
This commit is contained in:
parent
9dd2140456
commit
05b22fe0aa
105
gdb-6.6-buildid-locate-rpm-scl.patch
Normal file
105
gdb-6.6-buildid-locate-rpm-scl.patch
Normal file
@ -0,0 +1,105 @@
|
||||
warning: Skipping deprecated .gdb_index section
|
||||
https://bugzilla.redhat.com/show_bug.cgi?id=953585
|
||||
|
||||
--- gdb-7.5.91.20130407-orig/gdb/dwarf2read.c 2013-04-22 15:47:18.837806752 +0200
|
||||
+++ gdb-7.5.91.20130407/gdb/dwarf2read.c 2013-04-22 16:12:55.043171881 +0200
|
||||
@@ -2700,6 +2700,14 @@ read_index_from_section (struct objfile
|
||||
"set use-deprecated-index-sections on". */
|
||||
if (version < 6 && !deprecated_ok)
|
||||
{
|
||||
+ extern int rpm_verify_vendor (const char *filename);
|
||||
+
|
||||
+ /* Red Hat Developer Toolset exception. */
|
||||
+ if (rpm_verify_vendor (filename))
|
||||
+ {}
|
||||
+ else
|
||||
+ {
|
||||
+
|
||||
static int warning_printed = 0;
|
||||
if (!warning_printed)
|
||||
{
|
||||
@@ -2711,6 +2719,8 @@ to use the section anyway."),
|
||||
warning_printed = 1;
|
||||
}
|
||||
return 0;
|
||||
+
|
||||
+ }
|
||||
}
|
||||
/* Version 7 indices generated by gold refer to the CU for a symbol instead
|
||||
of the TU (for symbols coming from TUs). It's just a performance bug, and
|
||||
--- gdb-7.5.91.20130407-orig/gdb/elfread.c 2013-04-22 15:47:18.637807200 +0200
|
||||
+++ gdb-7.5.91.20130407/gdb/elfread.c 2013-04-22 16:04:09.259429034 +0200
|
||||
@@ -1674,7 +1674,7 @@ static int missing_rpm_list_entries;
|
||||
/* Returns the count of newly added rpms. */
|
||||
|
||||
static int
|
||||
-missing_rpm_enlist (const char *filename)
|
||||
+missing_rpm_enlist_1 (const char *filename, int verify_vendor)
|
||||
{
|
||||
static int rpm_init_done = 0;
|
||||
rpmts ts;
|
||||
@@ -1778,7 +1778,7 @@ missing_rpm_enlist (const char *filename
|
||||
mi = rpmtsInitIterator_p (ts, RPMTAG_BASENAMES, filename, 0);
|
||||
if (mi != NULL)
|
||||
{
|
||||
- for (;;)
|
||||
+ if (!verify_vendor) for (;;)
|
||||
{
|
||||
Header h;
|
||||
char *debuginfo, **slot, *s, *s2;
|
||||
@@ -1897,6 +1897,35 @@ missing_rpm_enlist (const char *filename
|
||||
xfree (debuginfo);
|
||||
count++;
|
||||
}
|
||||
+ else /* verify_vendor */
|
||||
+ {
|
||||
+ int vendor_pass = 0, vendor_fail = 0;
|
||||
+
|
||||
+ for (;;)
|
||||
+ {
|
||||
+ Header h;
|
||||
+ errmsg_t err;
|
||||
+ char *vendor;
|
||||
+
|
||||
+ h = rpmdbNextIterator_p (mi);
|
||||
+ if (h == NULL)
|
||||
+ break;
|
||||
+
|
||||
+ vendor = headerFormat_p (h, "%{vendor}", &err);
|
||||
+ if (!vendor)
|
||||
+ {
|
||||
+ warning (_("Error querying the rpm file `%s': %s"), filename,
|
||||
+ err);
|
||||
+ continue;
|
||||
+ }
|
||||
+ if (strcmp (vendor, "Red Hat, Inc.") == 0)
|
||||
+ vendor_pass = 1;
|
||||
+ else
|
||||
+ vendor_fail = 1;
|
||||
+ xfree (vendor);
|
||||
+ }
|
||||
+ count = vendor_pass != 0 && vendor_fail == 0;
|
||||
+ }
|
||||
|
||||
rpmdbFreeIterator_p (mi);
|
||||
}
|
||||
@@ -1907,6 +1936,19 @@ missing_rpm_enlist (const char *filename
|
||||
}
|
||||
|
||||
static int
|
||||
+missing_rpm_enlist (const char *filename)
|
||||
+{
|
||||
+ return missing_rpm_enlist_1 (filename, 0);
|
||||
+}
|
||||
+
|
||||
+extern int rpm_verify_vendor (const char *filename);
|
||||
+int
|
||||
+rpm_verify_vendor (const char *filename)
|
||||
+{
|
||||
+ return missing_rpm_enlist_1 (filename, 1);
|
||||
+}
|
||||
+
|
||||
+static int
|
||||
missing_rpm_list_compar (const char *const *ap, const char *const *bp)
|
||||
{
|
||||
return strcoll (*ap, *bp);
|
11
gdb.spec
11
gdb.spec
@ -34,7 +34,7 @@ Version: 7.5.91.%{snap}
|
||||
|
||||
# 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: 19%{?dist}
|
||||
Release: 20%{?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
|
||||
@ -310,6 +310,8 @@ Patch415: gdb-6.6-buildid-locate-core-as-arg.patch
|
||||
# Workaround librpm BZ 643031 due to its unexpected exit() calls (BZ 642879).
|
||||
#=push
|
||||
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
|
||||
|
||||
# Add kernel vDSO workaround (`no loadable ...') on RHEL-5 (kernel BZ 765875).
|
||||
#=push
|
||||
@ -886,6 +888,10 @@ find -name "*.info*"|xargs rm -f
|
||||
%if 0%{!?el5:1} || 0%{?scl:1}
|
||||
%patch393 -p1 -R
|
||||
%endif
|
||||
%patch833 -p1
|
||||
%if 0%{!?el6:1} || 0%{!?scl:1}
|
||||
%patch833 -p1 -R
|
||||
%endif
|
||||
%patch642 -p1
|
||||
%if 0%{?rhel:1} && 0%{?rhel} <= 6
|
||||
%patch642 -p1 -R
|
||||
@ -1380,6 +1386,9 @@ fi
|
||||
%endif # 0%{!?el5:1} || "%{_target_cpu}" == "noarch"
|
||||
|
||||
%changelog
|
||||
* Mon Apr 22 2013 Jan Kratochvil <jan.kratochvil@redhat.com> - 7.5.91.20130407-20.fc19
|
||||
- [SCL] Skip deprecated .gdb_index warning for Red Hat built files (BZ 953585).
|
||||
|
||||
* Mon Apr 22 2013 Sergio Durigan Junior <sergiodj@redhat.com> - 7.5.91.20130407-19.fc19
|
||||
- [RHEL-6] Regression test for RH BZ 947564.
|
||||
|
||||
|
Loading…
Reference in New Issue
Block a user