You can not select more than 25 topics
Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.
105 lines
2.8 KiB
105 lines
2.8 KiB
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);
|
|
|