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