2017-12-10 22:00:49 +00:00
|
|
|
From FEDORA_PATCHES Mon Sep 17 00:00:00 2001
|
2017-12-04 19:24:00 +00:00
|
|
|
From: Fedora GDB patches <invalid@email.com>
|
|
|
|
Date: Fri, 27 Oct 2017 21:07:50 +0200
|
|
|
|
Subject: gdb-libexec-add-index.patch
|
|
|
|
|
2017-12-08 04:31:26 +00:00
|
|
|
;; Fix gdb-headless /usr/bin/ executables (BZ 1390251).
|
2019-04-29 00:46:29 +00:00
|
|
|
;;
|
|
|
|
;; Also, make /usr/bin/gdb.minimal be the default GDB used, if it's
|
|
|
|
;; present. For rationale, see:
|
|
|
|
;;
|
|
|
|
;; https://fedoraproject.org/wiki/Changes/Minimal_GDB_in_buildroot
|
2017-12-08 04:31:26 +00:00
|
|
|
;;=fedora
|
|
|
|
|
2016-10-31 20:08:30 +00:00
|
|
|
diff --git a/gdb/contrib/gdb-add-index.sh b/gdb/contrib/gdb-add-index.sh
|
|
|
|
--- a/gdb/contrib/gdb-add-index.sh
|
|
|
|
+++ b/gdb/contrib/gdb-add-index.sh
|
2019-04-29 00:46:29 +00:00
|
|
|
@@ -21,6 +21,20 @@
|
2016-10-31 20:08:30 +00:00
|
|
|
GDB=${GDB:=gdb}
|
|
|
|
OBJCOPY=${OBJCOPY:=objcopy}
|
|
|
|
|
|
|
|
+GDB2=/usr/libexec/gdb
|
|
|
|
+if test -x $GDB2 && ! which $GDB &>/dev/null; then
|
|
|
|
+ GDB=$GDB2
|
|
|
|
+fi
|
2019-04-29 00:46:29 +00:00
|
|
|
+
|
|
|
|
+# We default to using /usr/bin/gdb.minimal if it's present. See
|
|
|
|
+# https://bugzilla.redhat.com/show_bug.cgi?id=1695015 and
|
|
|
|
+# https://fedoraproject.org/wiki/Changes/Minimal_GDB_in_buildroot for
|
|
|
|
+# explanations.
|
|
|
|
+GDB3=/usr/bin/gdb.minimal
|
|
|
|
+if test -x $GDB3; then
|
|
|
|
+ GDB=$GDB3
|
|
|
|
+fi
|
2016-10-31 20:08:30 +00:00
|
|
|
+
|
|
|
|
myname="${0##*/}"
|
|
|
|
|
2018-07-08 22:48:11 +00:00
|
|
|
dwarf5=""
|