From: Tom de Vries via Gdb-patches <gdb-patches@sourceware.org>
To: gdb-patches@sourceware.org
Subject: [committed][gdb/testsuite] Fix gdb.base/info_sources_2.exp with check-read1
Date: Fri, 8 Oct 2021 14:17:28 +0200 [thread overview]
Message-ID: <20211008121726.GA4106@delia.home> (raw)
Hi,
When running test-case gdb.base/info_sources_2.exp with check-read1, I run
into:
...
FAIL: gdb.base/info_sources_2.exp: args: : info sources (timeout)
...
Fix this by consuming a "$src1, $src2, ..., $srcn: line bit by bit rather than
as one whole line.
Also add the missing handling of "Objfile has no debug information".
Tested on x86_64-linux.
Committed to trunk.
Thanks,
- Tom
[gdb/testsuite] Fix gdb.base/info_sources_2.exp with check-read1
---
gdb/testsuite/gdb.base/info_sources_2.exp | 16 ++++++++++++----
1 file changed, 12 insertions(+), 4 deletions(-)
diff --git a/gdb/testsuite/gdb.base/info_sources_2.exp b/gdb/testsuite/gdb.base/info_sources_2.exp
index 3aed25b07ac..186b21c2ed8 100644
--- a/gdb/testsuite/gdb.base/info_sources_2.exp
+++ b/gdb/testsuite/gdb.base/info_sources_2.exp
@@ -68,6 +68,7 @@ proc run_info_sources { extra_args args } {
# Run the command and extract the results into INFO_SOURCES.
set objfile_name ""
set source_files {}
+ set files {}
gdb_test_multiple $cmd "" {
-re "${command_regex}\r\n" {
exp_continue
@@ -81,6 +82,9 @@ proc run_info_sources { extra_args args } {
-re "^\\(Full debug information has not yet been read for this file\\.\\)\r\n" {
exp_continue
}
+ -re "^\\(Objfile has no debug information\\.\\)\r\n" {
+ exp_continue
+ }
-re "^\r\n" {
exp_continue
@@ -90,18 +94,22 @@ proc run_info_sources { extra_args args } {
pass $gdb_test_name
}
+ -re "^(\[^,\r\n\]+), " {
+ set f $expect_out(1,string)
+ lappend files $f
+ exp_continue
+ }
-re "^(\[^\r\n\]+)\r\n" {
if { $objfile_name == "" } {
fail "${gdb_test_name} (no objfile name)"
return
}
- set files {}
- foreach f [split $expect_out(1,string) ,] {
- lappend files [string trim $f]
- }
+ set f $expect_out(1,string)
+ lappend files $f
set info_sources($objfile_name) $files
set $objfile_name ""
+ set files {}
exp_continue
}
}
reply other threads:[~2021-10-08 12:17 UTC|newest]
Thread overview: [no followups] expand[flat|nested] mbox.gz Atom feed
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=20211008121726.GA4106@delia.home \
--to=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