From: Jan Vrany <jan.vrany@labware.com>
To: gdb-patches@sourceware.org
Cc: Jan Vrany <jan.vrany@labware.com>
Subject: [PATCH v2 12/13] gdb/testsuite: fix few tests after change in readnow_functions
Date: Mon, 24 Nov 2025 19:55:34 +0000 [thread overview]
Message-ID: <20251124195535.2116845-13-jan.vrany@labware.com> (raw)
In-Reply-To: <20251124195535.2116845-1-jan.vrany@labware.com>
When loading a file with -readnow, GDB prints message like:
Reading symbols from some_program...
Expanding full symbols from some_program...
Commit "gdb: implement readnow_functions::expand_all_symtabs" caused
slight in output when there are any "complaints" - since after this
change, CUs are instantiated before call to expand_all_symtabs and
therefore "complaits" are printed before "Expanding full symbols...",
breaking dw2-zero-range.exp, build-id-no-debug-warning.exp and
crc_mismatch.exp
This commit fixes the issue by allowing "complaint" occur either in
between "Reading ..." and "Expanding ..." messages (currently the case
of DWARF and -readnow) or after "Expanding ..." message (the case without
-readnow).
---
.../gdb.debuginfod/build-id-no-debug-warning.exp | 10 ++++++----
gdb/testsuite/gdb.debuginfod/crc_mismatch.exp | 10 ++++++----
gdb/testsuite/gdb.dwarf2/dw2-zero-range.exp | 10 ++++++++++
3 files changed, 22 insertions(+), 8 deletions(-)
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 7a0cfda627c..e56538f721d 100644
--- a/gdb/testsuite/gdb.debuginfod/build-id-no-debug-warning.exp
+++ b/gdb/testsuite/gdb.debuginfod/build-id-no-debug-warning.exp
@@ -79,10 +79,11 @@ gdb_test_no_output "set debug-file-directory ${debug_file_directory}" \
# Now load the file into GDB, and look for the warning.
set debug_file_re [string_to_regexp $build_id_debug_file]
+set expanding_re "\r\nExpanding full symbols from $debug_file_re\\.\\.\\."
gdb_test "file ${build_id_debug_file}" \
[multi_line \
- "Reading symbols from $debug_file_re\\.\\.\\." \
- "warning: \"$debug_file_re\": separate debug info file has no debug info" \
+ "Reading symbols from $debug_file_re\\.\\.\\.($expanding_re)?" \
+ "warning: \"$debug_file_re\": separate debug info file has no debug info($expanding_re)?" \
"\\(No debugging symbols found in \[^\r\n\]+\\)"] \
"load test file, expect a warning"
@@ -97,11 +98,12 @@ with_test_prefix "check styling" {
# Now load the file into GDB, and look for the warning.
set debug_file_re [style [string_to_regexp $build_id_debug_file] file]
+ set expanding_re "\r\nExpanding full symbols from $debug_file_re\\.\\.\\."
gdb_test "file ${build_id_debug_file}" \
[multi_line \
- "Reading symbols from $debug_file_re\\.\\.\\." \
- "warning: \"$debug_file_re\": separate debug info file has no debug info" \
+ "Reading symbols from $debug_file_re\\.\\.\\.($expanding_re)?" \
+ "warning: \"$debug_file_re\": separate debug info file has no debug info($expanding_re)?" \
"\\(No debugging symbols found in \[^\r\n\]+\\)"] \
"load test file, expect a warning"
}
diff --git a/gdb/testsuite/gdb.debuginfod/crc_mismatch.exp b/gdb/testsuite/gdb.debuginfod/crc_mismatch.exp
index e44748f8205..2771d333d46 100644
--- a/gdb/testsuite/gdb.debuginfod/crc_mismatch.exp
+++ b/gdb/testsuite/gdb.debuginfod/crc_mismatch.exp
@@ -47,6 +47,8 @@ remote_exec build "mkdir $debugdir"
remote_exec build "mkdir -p [file dirname $debugfile]"
remote_exec build "mv -f [standard_output_file ${testfile}.debug] $debugfile"
+set expanding_re "\r\nExpanding full symbols from .+\\.\\.\\."
+
# Test CRC mismatch is reported.
if {[build_executable crc_mismatch.exp crc_mismatch-2 crc_mismatch-2.c debug] != -1
&& ![gdb_gnu_strip_debug [standard_output_file crc_mismatch-2]]} {
@@ -63,8 +65,8 @@ if {[build_executable crc_mismatch.exp crc_mismatch-2 crc_mismatch-2.c debug] !=
set escapedobjdirsubdir [string_to_regexp [standard_output_file {}]]
gdb_test "file [standard_output_file crc_mismatch-2]" \
[multi_line \
- "Reading symbols from ${escapedobjdirsubdir}/crc_mismatch-2\\.\\.\\." \
- "warning: the debug information found in \"${escapedobjdirsubdir}/crc_mismatch-2\\.debug\" does not match \"${escapedobjdirsubdir}/crc_mismatch-2\" \\(CRC mismatch\\)\\." \
+ "Reading symbols from ${escapedobjdirsubdir}/crc_mismatch-2\\.\\.\\.($expanding_re)?" \
+ "warning: the debug information found in \"${escapedobjdirsubdir}/crc_mismatch-2\\.debug\" does not match \"${escapedobjdirsubdir}/crc_mismatch-2\" \\(CRC mismatch\\)\\.($expanding_re)?" \
"\\(No debugging symbols found in .*\\)"] \
"CRC mismatch is reported"
@@ -79,8 +81,8 @@ if {[build_executable crc_mismatch.exp crc_mismatch-2 crc_mismatch-2.c debug] !=
gdb_test "file [standard_output_file crc_mismatch-2]" \
[multi_line \
- "Reading symbols from ${exe_file_re}\\.\\.\\." \
- "warning: the debug information found in \"${debug_file_re}\" does not match \"${exe_file_re}\" \\(CRC mismatch\\)\\." \
+ "Reading symbols from ${exe_file_re}\\.\\.\\.($expanding_re)?" \
+ "warning: the debug information found in \"${debug_file_re}\" does not match \"${exe_file_re}\" \\(CRC mismatch\\)\\.($expanding_re)?" \
"\\(No debugging symbols found in \[^\r\n\]+\\)"] \
"CRC mismatch is reported"
}
diff --git a/gdb/testsuite/gdb.dwarf2/dw2-zero-range.exp b/gdb/testsuite/gdb.dwarf2/dw2-zero-range.exp
index d5faf6f74d0..79e48b24af1 100644
--- a/gdb/testsuite/gdb.dwarf2/dw2-zero-range.exp
+++ b/gdb/testsuite/gdb.dwarf2/dw2-zero-range.exp
@@ -164,6 +164,16 @@ foreach_with_prefix ranges_sect {ranges rnglists} {
set complaint_re ".debug_${ranges_sect} entry has start address of zero"
set complaint_re \
"During symbol reading: $complaint_re \\\[in module \[^\r\n\]*\\\]"
+ # Complaints may be printed before or after message
+ #
+ # Expanding full symbols from ...
+ #
+ # or
+ #
+ # Expanded full symbols from ...
+ #
+ set complaint_re \
+ "${complaint_re}(\r\nExpanding full .*)?"
set readnow_p [readnow]
--
2.51.0
next prev parent reply other threads:[~2025-11-24 20:05 UTC|newest]
Thread overview: 22+ messages / expand[flat|nested] mbox.gz Atom feed top
2025-11-24 19:55 [PATCH v2 00/13] reimplement readnow_functions Jan Vrany
2025-11-24 19:55 ` [PATCH v2 01/13] gdb: reimplement readnow_functions::search Jan Vrany
2025-12-02 17:25 ` Tom Tromey
2025-11-24 19:55 ` [PATCH v2 02/13] gdb: implement readnow_functions::has_symbols Jan Vrany
2025-11-24 19:55 ` [PATCH v2 03/13] gdb: implement readnow_functions::has_unexpanded_symtabs Jan Vrany
2025-11-24 19:55 ` [PATCH v2 04/13] gdb: implement readnow_functions::find_last_source_symtab Jan Vrany
2025-11-24 19:55 ` [PATCH v2 05/13] gdb: implement readnow_functions::forget_cached_source_info Jan Vrany
2025-11-24 19:55 ` [PATCH v2 06/13] gdb: implement readnow_functions::lookup_global_symbol_language Jan Vrany
2025-11-24 19:55 ` [PATCH v2 07/13] gdb: implement readnow_functions::print_stats Jan Vrany
2025-11-24 19:55 ` [PATCH v2 08/13] gdb: implement readnow_functions::expand_all_symtabs Jan Vrany
2025-11-24 19:55 ` [PATCH v2 09/13] gdb: implement readnow_functions::find_pc_sect_compunit_symtab Jan Vrany
2025-11-24 19:55 ` [PATCH v2 10/13] gdb: implement readnow_functions::map_symbol_filenames Jan Vrany
2025-11-24 19:55 ` [PATCH v2 11/13] gdb: make readnow_functions to inherit from quick_symbol_functions Jan Vrany
2025-11-24 19:55 ` Jan Vrany [this message]
2025-12-02 17:26 ` [PATCH v2 12/13] gdb/testsuite: fix few tests after change in readnow_functions Tom Tromey
2025-11-24 19:55 ` [PATCH v2 13/13] gdb: update message in symbol_file_add_with_addrs after changes " Jan Vrany
2025-12-02 17:29 ` Tom Tromey
2025-12-02 18:48 ` Jan Vraný
2025-12-02 18:57 ` Tom Tromey
2025-12-02 19:03 ` Tom Tromey
2025-12-03 17:46 ` Jan Vraný
2025-12-02 13:39 ` [PATCH v2 00/13] reimplement readnow_functions Jan Vraný
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=20251124195535.2116845-13-jan.vrany@labware.com \
--to=jan.vrany@labware.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