From: Andrew Burgess <aburgess@redhat.com>
To: Tom de Vries <tdevries@suse.de>, gdb-patches@sourceware.org
Subject: Re: [PATCH 1/3] [gdb/testsuite] Mention DEBUGINFOD_VERBOSE in gdb.debuginfod test-cases
Date: Mon, 27 May 2024 22:40:51 +0100 [thread overview]
Message-ID: <87o78r9bmk.fsf@redhat.com> (raw)
In-Reply-To: <20240527141808.31563-1-tdevries@suse.de>
Tom de Vries <tdevries@suse.de> writes:
> 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
> +
I'm not a huge fan of leaving comment out code like this. I have some
patches pending that add more debuginfod tests. Am I expected to add
this same commented out code before every call to start_debuginfod?
Some alternative suggestions:
- Add this comment to start_debuginfod's comment, as in: "If
additional debugging is required try 'setenv DEBUGINFOD_VERBOSE 1'."
- We could document this in testsuite/README as a hint for debugging
debuginfod tests.
- We could add an 'args' list argument to start_debuginfod, and accept
a 'verbose=1' argument within args.
Hopefully you might find one of these an acceptable alternative...
thanks,
Andrew
> 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
prev parent reply other threads:[~2024-05-27 21:40 UTC|newest]
Thread overview: 6+ messages / expand[flat|nested] mbox.gz Atom feed top
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
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 ` Andrew Burgess [this message]
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=87o78r9bmk.fsf@redhat.com \
--to=aburgess@redhat.com \
--cc=gdb-patches@sourceware.org \
--cc=tdevries@suse.de \
/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).