Blame SOURCES/gdb-libexec-add-index.patch

2f9ed3
From FEDORA_PATCHES Mon Sep 17 00:00:00 2001
2f9ed3
From: Fedora GDB patches <invalid@email.com>
2f9ed3
Date: Fri, 27 Oct 2017 21:07:50 +0200
2f9ed3
Subject: gdb-libexec-add-index.patch
2f9ed3
2f9ed3
;; Fix gdb-headless /usr/bin/ executables (BZ 1390251).
2f9ed3
;;=fedora
2f9ed3
2f9ed3
diff --git a/gdb/contrib/gdb-add-index.sh b/gdb/contrib/gdb-add-index.sh
2f9ed3
--- a/gdb/contrib/gdb-add-index.sh
2f9ed3
+++ b/gdb/contrib/gdb-add-index.sh
2f9ed3
@@ -21,6 +21,11 @@
2f9ed3
 GDB=${GDB:=gdb}
2f9ed3
 OBJCOPY=${OBJCOPY:=objcopy}
2f9ed3
 
2f9ed3
+GDB2=/usr/libexec/gdb
2f9ed3
+if test -x $GDB2 && ! which $GDB &>/dev/null; then
2f9ed3
+    GDB=$GDB2
2f9ed3
+fi
2f9ed3
+
2f9ed3
 myname="${0##*/}"
2f9ed3
 
2f9ed3
 dwarf5=""