public inbox for gdb-patches@sourceware.org
 help / color / mirror / Atom feed
From: Aaron Merey <amerey@redhat.com>
To: gdb-patches@sourceware.org
Subject: [PATCH] gdb-add-index: disable debuginfod
Date: Fri, 11 Feb 2022 19:28:47 -0500	[thread overview]
Message-ID: <20220212002847.504539-1-amerey@redhat.com> (raw)

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 | 1 +
 1 file changed, 1 insertion(+)

diff --git a/gdb/contrib/gdb-add-index.sh b/gdb/contrib/gdb-add-index.sh
index 0ff943d506e..591f32bbbbe 100755
--- a/gdb/contrib/gdb-add-index.sh
+++ b/gdb/contrib/gdb-add-index.sh
@@ -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=$?
-- 
2.34.1


             reply	other threads:[~2022-02-12  0:28 UTC|newest]

Thread overview: 3+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2022-02-12  0:28 Aaron Merey [this message]
2022-02-25 19:23 ` Tom Tromey
2022-02-25 22:35   ` Aaron Merey

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=20220212002847.504539-1-amerey@redhat.com \
    --to=amerey@redhat.com \
    --cc=gdb-patches@sourceware.org \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for read-only IMAP folder(s) and NNTP newsgroup(s).