a8767b3
From FEDORA_PATCHES Mon Sep 17 00:00:00 2001
f524ac5
From: Fedora GDB patches <invalid@email.com>
f524ac5
Date: Fri, 27 Oct 2017 21:07:50 +0200
f524ac5
Subject: gdb-6.6-buildid-locate-rpm-scl.patch
f524ac5
f637971
;; [SCL] Skip deprecated .gdb_index warning for Red Hat built files (BZ 953585).
f637971
;;=push+jan
f637971
Jan Kratochvil 05b22fe
warning: Skipping deprecated .gdb_index section
Jan Kratochvil 05b22fe
https://bugzilla.redhat.com/show_bug.cgi?id=953585
Jan Kratochvil 05b22fe
ed8730b
diff --git a/gdb/dwarf2/read.c b/gdb/dwarf2/read.c
ed8730b
--- a/gdb/dwarf2/read.c
ed8730b
+++ b/gdb/dwarf2/read.c
1f1906c
@@ -2797,6 +2797,16 @@ read_gdb_index_from_buffer (const char *filename,
Jan Kratochvil 46cc044
      "set use-deprecated-index-sections on".  */
Jan Kratochvil 46cc044
   if (version < 6 && !deprecated_ok)
Jan Kratochvil 46cc044
     {
Jan Kratochvil 46cc044
+#ifdef GDB_INDEX_VERIFY_VENDOR
Jan Kratochvil 46cc044
+      extern int rpm_verify_vendor (const char *filename);
Jan Kratochvil 46cc044
+
Jan Kratochvil 46cc044
+      /* Red Hat Developer Toolset exception.  */
Jan Kratochvil 46cc044
+      if (rpm_verify_vendor (filename))
Jan Kratochvil 46cc044
+	{}
Jan Kratochvil 46cc044
+      else
Jan Kratochvil 46cc044
+      {
Jan Kratochvil 46cc044
+
Jan Kratochvil 46cc044
+#endif
Jan Kratochvil 46cc044
       static int warning_printed = 0;
Jan Kratochvil 46cc044
       if (!warning_printed)
Jan Kratochvil 46cc044
 	{
1f1906c
@@ -2808,6 +2818,10 @@ to use the section anyway."),
Jan Kratochvil 46cc044
 	  warning_printed = 1;
Jan Kratochvil 46cc044
 	}
Jan Kratochvil 46cc044
       return 0;
Jan Kratochvil 46cc044
+#ifdef GDB_INDEX_VERIFY_VENDOR
Jan Kratochvil 46cc044
+
Jan Kratochvil 46cc044
+      }
Jan Kratochvil 46cc044
+#endif
Jan Kratochvil 46cc044
     }
Jan Kratochvil 46cc044
   /* Version 7 indices generated by gold refer to the CU for a symbol instead
Jan Kratochvil 46cc044
      of the TU (for symbols coming from TUs),