From: Tom de Vries <tdevries@suse.de>
To: gdb-patches@sourceware.org
Subject: [PATCH 3/3] [gdb/symtab] Note success at debuginfod verbose level 2
Date: Mon, 27 May 2024 16:18:08 +0200 [thread overview]
Message-ID: <20240527141808.31563-3-tdevries@suse.de> (raw)
In-Reply-To: <20240527141808.31563-1-tdevries@suse.de>
Expand debuginfod verbose level 2 by also mentioning download successes:
...
Downloading separate debug info for crc_mismatch-2...^M
Download succeeded: separate debug info for crc_mismatch-2.^M
Reading symbols from $client_cache/$hex/debuginfo...^M
...
Tested on x86_64-linux.
---
gdb/debuginfod-support.c | 8 ++++++++
.../gdb.debuginfod/build-id-no-debug-warning.exp | 2 ++
gdb/testsuite/gdb.debuginfod/crc_mismatch.exp | 10 +++++++---
3 files changed, 17 insertions(+), 3 deletions(-)
diff --git a/gdb/debuginfod-support.c b/gdb/debuginfod-support.c
index e65afb7523f..fe735756f72 100644
--- a/gdb/debuginfod-support.c
+++ b/gdb/debuginfod-support.c
@@ -297,6 +297,14 @@ print_outcome (int fd, const char *desc, const char *fname)
desc,
styled_string (file_name_style.style (), fname));
}
+ if (fd >= 0 && debuginfod_verbose >= 2)
+ {
+ ui_file *outstream = get_unbuffered (gdb_stdout);
+ gdb_printf (outstream,
+ _("Download succeeded: %s %ps.\n"),
+ desc,
+ styled_string (file_name_style.style (), fname));
+ }
}
/* See debuginfod-support.h */
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 d63957ac05c..1f80dee9e33 100644
--- a/gdb/testsuite/gdb.debuginfod/build-id-no-debug-warning.exp
+++ b/gdb/testsuite/gdb.debuginfod/build-id-no-debug-warning.exp
@@ -156,6 +156,8 @@ proc_with_prefix local_debuginfod { } {
[multi_line \
"Reading symbols from ${build_id_debug_file}\\.\\.\\." \
"Downloading separate debug info for ${build_id_debug_file}\\.\\.\\." \
+ [string_to_regexp \
+ "Download succeeded: separate debug info for ${build_id_debug_file}."] \
"Reading symbols from ${cache}/\[^\r\n\]+\\.\\.\\.(?:\r\nExpanding full symbols from \[^\r\n\]+)*"] \
"debuginfod running, info downloaded, no warnings"
}
diff --git a/gdb/testsuite/gdb.debuginfod/crc_mismatch.exp b/gdb/testsuite/gdb.debuginfod/crc_mismatch.exp
index 6dcabf60357..8391e8f4a01 100644
--- a/gdb/testsuite/gdb.debuginfod/crc_mismatch.exp
+++ b/gdb/testsuite/gdb.debuginfod/crc_mismatch.exp
@@ -126,10 +126,14 @@ proc_with_prefix local_debuginfod { } {
# CRC mismatch should not be reported now because the correct debuginfo
# should be fetched from debuginfod.
- gdb_test "file [standard_output_file crc_mismatch-2]" \
+ set binfile2 [standard_output_file crc_mismatch-2]
+ gdb_test "file $binfile2" \
[multi_line \
- "Reading symbols from ${escapedobjdirsubdir}/crc_mismatch-2\\.\\.\\." \
- "Downloading.*separate debug info for ${escapedobjdirsubdir}/crc_mismatch-2\\.\\.\\." \
+ [string_to_regexp "Reading symbols from $binfile2..."] \
+ [string_to_regexp \
+ "Downloading separate debug info for $binfile2..."] \
+ [string_to_regexp \
+ "Download succeeded: separate debug info for $binfile2."] \
"Reading symbols from ${cache}/\[^\r\n\]+\\.\\.\\.(?:\r\nExpanding full symbols from \[^\r\n\]+)*"] \
"debuginfod running, info downloaded, no CRC mismatch"
}
--
2.35.3
next prev parent reply other threads:[~2024-05-27 14:18 UTC|newest]
Thread overview: 6+ messages / expand[flat|nested] mbox.gz Atom feed top
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 ` Tom de Vries [this message]
2024-05-27 21:49 ` [PATCH 3/3] [gdb/symtab] Note success at " Andrew Burgess
2024-05-27 21:40 ` [PATCH 1/3] [gdb/testsuite] Mention DEBUGINFOD_VERBOSE in gdb.debuginfod test-cases Andrew Burgess
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=20240527141808.31563-3-tdevries@suse.de \
--to=tdevries@suse.de \
--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).