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

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