]> git.ipfire.org Git - thirdparty/binutils-gdb.git/commitdiff
gdb-add-index: disable debuginfod
authorAaron Merey <amerey@redhat.com>
Sat, 12 Feb 2022 00:28:47 +0000 (19:28 -0500)
committerAaron Merey <amerey@redhat.com>
Fri, 25 Feb 2022 22:30:12 +0000 (17:30 -0500)
gdb-add-index may trigger debuginfod's first-use notice.  The notice
is misleading in this case.  It instructs the user to modify .gdbinit
in order to permanently enable/disable debuginfod but gdb-add-index
invokes gdb with -nx which ignores .gdbinit.

Additionally debuginfod is not needed for gdb-add-index since the
symbol file is given as an argument and should already be present
locally.

Fix this by disabling debuginfod when gdb-add-index invokes gdb.

gdb/contrib/gdb-add-index.sh

index 0ff943d506e26dd7b405c70f86b4ae99da054f65..591f32bbbbe5e69a36ea6e570fb44711fea3a9cc 100755 (executable)
@@ -112,6 +112,7 @@ rm -f $tmp_files
 trap "rm -f $tmp_files" 0
 
 $GDB --batch -nx -iex 'set auto-load no' \
+    -iex 'set debuginfod enabled off' \
     -ex "file $file" -ex "save gdb-index $dwarf5 $dir" || {
     # Just in case.
     status=$?