public inbox for gdb-patches@sourceware.org
 help / color / mirror / Atom feed
* [PATCH 1/3] [gdb/testsuite] Mention DEBUGINFOD_VERBOSE in gdb.debuginfod test-cases
@ 2024-05-27 14:18 Tom de Vries
  2024-05-27 14:18 ` [PATCH 2/3] [gdb/symtab] Add debuginfod verbose level 2 Tom de Vries
                   ` (2 more replies)
  0 siblings, 3 replies; 6+ messages in thread
From: Tom de Vries @ 2024-05-27 14:18 UTC (permalink / raw)
  To: gdb-patches

In proc start_debuginfod we start debuginfod with a fair amount of verbosity:
...
	spawn debuginfod -vvvv -d $db -p $port -F $debugdir
...
which gives a lot of information on startup, but none or not much after that.

There's another way to increase verbosity of debuginfod: through the
environment variable DEBUGINFOD_VERBOSE, which gives us the following
additional information (edited for readability):
...
(gdb) file fetch_src_and_symbols^M
 Reading symbols from fetch_src_and_symbols...^M
+debuginfod_find_debuginfo $hex^M
+server urls "http://127.0.0.1:8000"^M
+checking build-id^M
+checking cache dir $client_cache^M
+using timeout 10^M
+init server 0 http://127.0.0.1:8000^M
+url 0 http://127.0.0.1:8000/buildid/$hex/debuginfo^M
+query 1 urls in parallel^M
 Downloading separate debug info for $fetch_src_and_symbols...^M
+server response No error^M
+got file from server^M
+found $client_cache/$hex/debuginfo (fd=18)^M
 Reading symbols from $client_cache/$hex/debuginfo...^M
(gdb)
...

IMO this is too verbose to enable by default, but it's good to at least
mention the option explicitly in the test-cases.

Tested by enabling it in the 3 gdb.debuginfod test-cases.  This generates 2
FAILs, but I don't think it's worthwhile to address these.

Tested on x86_64-linux.
---
 gdb/testsuite/gdb.debuginfod/build-id-no-debug-warning.exp | 3 +++
 gdb/testsuite/gdb.debuginfod/crc_mismatch.exp              | 3 +++
 gdb/testsuite/gdb.debuginfod/fetch_src_and_symbols.exp     | 3 +++
 3 files changed, 9 insertions(+)

diff --git a/gdb/testsuite/gdb.debuginfod/build-id-no-debug-warning.exp b/gdb/testsuite/gdb.debuginfod/build-id-no-debug-warning.exp
index b86622543ef..25d800a378b 100644
--- a/gdb/testsuite/gdb.debuginfod/build-id-no-debug-warning.exp
+++ b/gdb/testsuite/gdb.debuginfod/build-id-no-debug-warning.exp
@@ -127,6 +127,9 @@ prepare_for_debuginfod cache db
 proc_with_prefix local_debuginfod { } {
     global db debuginfod_debugdir cache build_id_debug_file
 
+    # Uncomment to increase verbosity of debuginfod when handling query.
+    #setenv DEBUGINFOD_VERBOSE 1
+
     set url [start_debuginfod $db $debuginfod_debugdir]
     if {$url eq ""} {
 	unresolved "failed to start debuginfod server"
diff --git a/gdb/testsuite/gdb.debuginfod/crc_mismatch.exp b/gdb/testsuite/gdb.debuginfod/crc_mismatch.exp
index 017ef132573..27069b580dc 100644
--- a/gdb/testsuite/gdb.debuginfod/crc_mismatch.exp
+++ b/gdb/testsuite/gdb.debuginfod/crc_mismatch.exp
@@ -99,6 +99,9 @@ proc_with_prefix local_debuginfod { } {
     global binfile db debugdir cache
     set escapedobjdirsubdir [string_to_regexp [standard_output_file {}]]
 
+    # Uncomment to increase verbosity of debuginfod when handling query.
+    #setenv DEBUGINFOD_VERBOSE 1
+
     set url [start_debuginfod $db $debugdir]
     if {$url eq ""} {
 	unresolved "failed to start debuginfod server"
diff --git a/gdb/testsuite/gdb.debuginfod/fetch_src_and_symbols.exp b/gdb/testsuite/gdb.debuginfod/fetch_src_and_symbols.exp
index 401af0df0d2..0fb752ff6bd 100644
--- a/gdb/testsuite/gdb.debuginfod/fetch_src_and_symbols.exp
+++ b/gdb/testsuite/gdb.debuginfod/fetch_src_and_symbols.exp
@@ -209,6 +209,9 @@ proc disable_delete_breakpoints {} {
 proc_with_prefix local_url { } {
     global binfile outputdir debugdir db
 
+    # Uncomment to increase verbosity of debuginfod when handling query.
+    #setenv DEBUGINFOD_VERBOSE 1
+
     set url [start_debuginfod $db $debugdir]
     if { $url == "" } {
 	unresolved "failed to start debuginfod server"

base-commit: 4250085217f2011335257fd3291cb50c939e9746
-- 
2.35.3


^ permalink raw reply	[flat|nested] 6+ messages in thread

end of thread, other threads:[~2024-05-27 21:49 UTC | newest]

Thread overview: 6+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2024-05-27 14:18 [PATCH 1/3] [gdb/testsuite] Mention DEBUGINFOD_VERBOSE in gdb.debuginfod test-cases Tom de Vries
2024-05-27 14:18 ` [PATCH 2/3] [gdb/symtab] Add debuginfod verbose level 2 Tom de Vries
2024-05-27 21:48   ` Andrew Burgess
2024-05-27 14:18 ` [PATCH 3/3] [gdb/symtab] Note success at " Tom de Vries
2024-05-27 21:49   ` Andrew Burgess
2024-05-27 21:40 ` [PATCH 1/3] [gdb/testsuite] Mention DEBUGINFOD_VERBOSE in gdb.debuginfod test-cases Andrew Burgess

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