2019-09-30 10:39:25 -04: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
|
2020-07-24 10:59:18 +08:00
|
|
|
@@ -22,6 +22,20 @@ GDB=${GDB:=gdb}
|
2019-09-30 10:39:25 -04:00
|
|
|
OBJCOPY=${OBJCOPY:=objcopy}
|
2020-07-24 10:59:18 +08:00
|
|
|
READELF=${READELF:=readelf}
|
2019-09-30 10:39:25 -04:00
|
|
|
|
|
|
|
|
+GDB2=/usr/libexec/gdb
|
|
|
|
|
+if test -x $GDB2 && ! which $GDB &>/dev/null; then
|
|
|
|
|
+ GDB=$GDB2
|
|
|
|
|
+fi
|
2020-07-24 10:59:18 +08: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
|
2019-09-30 10:39:25 -04:00
|
|
|
+
|
|
|
|
|
myname="${0##*/}"
|
|
|
|
|
|
|
|
|
|
dwarf5=""
|