2013-04-22 14:23:49 +00:00
|
|
|
warning: Skipping deprecated .gdb_index section
|
|
|
|
https://bugzilla.redhat.com/show_bug.cgi?id=953585
|
|
|
|
|
2016-01-09 13:46:42 +00:00
|
|
|
diff -dup -rup gdb-7.10.50.20160106-orig/gdb/build-id.c gdb-7.10.50.20160106/gdb/build-id.c
|
|
|
|
--- gdb-7.10.50.20160106-orig/gdb/build-id.c 2016-01-09 14:40:39.420385241 +0100
|
|
|
|
+++ gdb-7.10.50.20160106/gdb/build-id.c 2016-01-09 14:41:05.944549393 +0100
|
|
|
|
@@ -713,7 +713,11 @@ static int missing_rpm_list_entries;
|
2013-04-22 14:23:49 +00:00
|
|
|
/* Returns the count of newly added rpms. */
|
|
|
|
|
|
|
|
static int
|
2016-01-09 13:46:42 +00:00
|
|
|
+#ifndef GDB_INDEX_VERIFY_VENDOR
|
|
|
|
missing_rpm_enlist (const char *filename)
|
|
|
|
+#else
|
2013-04-22 14:23:49 +00:00
|
|
|
+missing_rpm_enlist_1 (const char *filename, int verify_vendor)
|
2016-01-09 13:46:42 +00:00
|
|
|
+#endif
|
2013-04-22 14:23:49 +00:00
|
|
|
{
|
|
|
|
static int rpm_init_done = 0;
|
|
|
|
rpmts ts;
|
2016-01-09 13:46:42 +00:00
|
|
|
@@ -817,7 +821,11 @@ missing_rpm_enlist (const char *filename
|
2013-04-22 14:23:49 +00:00
|
|
|
mi = rpmtsInitIterator_p (ts, RPMTAG_BASENAMES, filename, 0);
|
|
|
|
if (mi != NULL)
|
|
|
|
{
|
2016-01-09 13:46:42 +00:00
|
|
|
+#ifndef GDB_INDEX_VERIFY_VENDOR
|
|
|
|
for (;;)
|
|
|
|
+#else
|
2013-04-22 14:23:49 +00:00
|
|
|
+ if (!verify_vendor) for (;;)
|
2016-01-09 13:46:42 +00:00
|
|
|
+#endif
|
2013-04-22 14:23:49 +00:00
|
|
|
{
|
|
|
|
Header h;
|
|
|
|
char *debuginfo, **slot, *s, *s2;
|
2016-01-09 13:46:42 +00:00
|
|
|
@@ -935,6 +943,37 @@ missing_rpm_enlist (const char *filename
|
2013-04-22 14:23:49 +00:00
|
|
|
xfree (debuginfo);
|
|
|
|
count++;
|
|
|
|
}
|
2016-01-09 13:46:42 +00:00
|
|
|
+#ifdef GDB_INDEX_VERIFY_VENDOR
|
2013-04-22 14:23:49 +00:00
|
|
|
+ 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;
|
|
|
|
+ }
|
2016-01-09 13:46:42 +00:00
|
|
|
+#endif
|
2013-04-22 14:23:49 +00:00
|
|
|
|
|
|
|
rpmdbFreeIterator_p (mi);
|
|
|
|
}
|
2016-01-09 13:46:42 +00:00
|
|
|
@@ -945,6 +984,21 @@ missing_rpm_enlist (const char *filename
|
2013-04-22 14:23:49 +00:00
|
|
|
}
|
|
|
|
|
|
|
|
static int
|
2016-01-09 13:46:42 +00:00
|
|
|
+#ifdef GDB_INDEX_VERIFY_VENDOR
|
2013-04-22 14:23:49 +00:00
|
|
|
+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
|
2016-01-09 13:46:42 +00:00
|
|
|
+#endif
|
2013-04-22 14:23:49 +00:00
|
|
|
missing_rpm_list_compar (const char *const *ap, const char *const *bp)
|
|
|
|
{
|
|
|
|
return strcoll (*ap, *bp);
|
2016-01-09 13:46:42 +00:00
|
|
|
diff -dup -rup gdb-7.10.50.20160106-orig/gdb/dwarf2read.c gdb-7.10.50.20160106/gdb/dwarf2read.c
|
|
|
|
--- gdb-7.10.50.20160106-orig/gdb/dwarf2read.c 2016-01-09 14:40:39.416385216 +0100
|
|
|
|
+++ gdb-7.10.50.20160106/gdb/dwarf2read.c 2016-01-09 14:41:05.942549381 +0100
|
|
|
|
@@ -3111,6 +3111,16 @@ read_index_from_section (struct objfile
|
|
|
|
"set use-deprecated-index-sections on". */
|
|
|
|
if (version < 6 && !deprecated_ok)
|
|
|
|
{
|
|
|
|
+#ifdef GDB_INDEX_VERIFY_VENDOR
|
|
|
|
+ extern int rpm_verify_vendor (const char *filename);
|
|
|
|
+
|
|
|
|
+ /* Red Hat Developer Toolset exception. */
|
|
|
|
+ if (rpm_verify_vendor (filename))
|
|
|
|
+ {}
|
|
|
|
+ else
|
|
|
|
+ {
|
|
|
|
+
|
|
|
|
+#endif
|
|
|
|
static int warning_printed = 0;
|
|
|
|
if (!warning_printed)
|
|
|
|
{
|
|
|
|
@@ -3122,6 +3132,10 @@ to use the section anyway."),
|
|
|
|
warning_printed = 1;
|
|
|
|
}
|
|
|
|
return 0;
|
|
|
|
+#ifdef GDB_INDEX_VERIFY_VENDOR
|
|
|
|
+
|
|
|
|
+ }
|
|
|
|
+#endif
|
|
|
|
}
|
|
|
|
/* Version 7 indices generated by gold refer to the CU for a symbol instead
|
|
|
|
of the TU (for symbols coming from TUs),
|