public inbox for gdb-cvs@sourceware.org
help / color / mirror / Atom feed
* [binutils-gdb] gdb/debuginfod-support.c: Always display debuginfod errors
@ 2022-04-01 20:50 Aaron Merey
  0 siblings, 0 replies; only message in thread
From: Aaron Merey @ 2022-04-01 20:50 UTC (permalink / raw)
  To: gdb-cvs

https://sourceware.org/git/gitweb.cgi?p=binutils-gdb.git;h=e55039d1811f1bac389162a61d6bac25b0d4d43f

commit e55039d1811f1bac389162a61d6bac25b0d4d43f
Author: Aaron Merey <amerey@redhat.com>
Date:   Fri Apr 1 16:39:18 2022 -0400

    gdb/debuginfod-support.c: Always display debuginfod errors
    
    Errors encountered when downloading files from debuginfod servers
    are not displayed if debuginfod verbosity is set to 0 (via
    'set debuginfod verbose 0').
    
    Tom recommended that these errors always be displayed, regardless
    of the verbosity setting [1]. Fix this.
    
    [1] https://sourceware.org/pipermail/gdb-patches/2022-March/186350.html

Diff:
---
 gdb/debuginfod-support.c | 6 +++---
 1 file changed, 3 insertions(+), 3 deletions(-)

diff --git a/gdb/debuginfod-support.c b/gdb/debuginfod-support.c
index 22944ce50bb..6c2d3fb2951 100644
--- a/gdb/debuginfod-support.c
+++ b/gdb/debuginfod-support.c
@@ -254,7 +254,7 @@ debuginfod_source_query (const unsigned char *build_id,
 					&dname));
   debuginfod_set_user_data (c, nullptr);
 
-  if (debuginfod_verbose > 0 && fd.get () < 0 && fd.get () != -ENOENT)
+  if (fd.get () < 0 && fd.get () != -ENOENT)
     gdb_printf (_("Download failed: %s.  Continuing without source file %ps.\n"),
 		safe_strerror (-fd.get ()),
 		styled_string (file_name_style.style (),  srcpath));
@@ -296,7 +296,7 @@ debuginfod_debuginfo_query (const unsigned char *build_id,
 					   &dname));
   debuginfod_set_user_data (c, nullptr);
 
-  if (debuginfod_verbose > 0 && fd.get () < 0 && fd.get () != -ENOENT)
+  if (fd.get () < 0 && fd.get () != -ENOENT)
     gdb_printf (_("Download failed: %s.  Continuing without debug info for %ps.\n"),
 		safe_strerror (-fd.get ()),
 		styled_string (file_name_style.style (),  filename));
@@ -337,7 +337,7 @@ debuginfod_exec_query (const unsigned char *build_id,
   scoped_fd fd (debuginfod_find_executable (c, build_id, build_id_len, &dname));
   debuginfod_set_user_data (c, nullptr);
 
-  if (debuginfod_verbose > 0 && fd.get () < 0 && fd.get () != -ENOENT)
+  if (fd.get () < 0 && fd.get () != -ENOENT)
     gdb_printf (_("Download failed: %s. " \
 		  "Continuing without executable for %ps.\n"),
 		safe_strerror (-fd.get ()),


^ permalink raw reply	[flat|nested] only message in thread

only message in thread, other threads:[~2022-04-01 20:50 UTC | newest]

Thread overview: (only message) (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2022-04-01 20:50 [binutils-gdb] gdb/debuginfod-support.c: Always display debuginfod errors Aaron Merey

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).