From: Tom de Vries via Gdb-patches <gdb-patches@sourceware.org>
To: gdb-patches@sourceware.org
Subject: [committed][gdb/testsuite] Handle readnow in ensure_gdb_index
Date: Mon, 11 Oct 2021 12:29:14 +0200 [thread overview]
Message-ID: <20211011102912.GA21648@delia.home> (raw)
Hi,
When running test-case gdb.base/with-mf.exp with target board readnow, I run
into:
...
FAIL: gdb.base/with-mf.exp: check if index present
...
This is since commit 6010fb0c49e "[gdb/testsuite] Fix full buffer in
gdb.rust/dwindex.exp".
Before that commit, the proc ensure_gdb_index would treat the line:
...
.gdb_index: faked for "readnow"^M
...
as proof that an index is already present (which is incorrect).
Now, instead it generates aforementioned FAIL and continues to generate an
index.
Fix this by explicitly handling the readnow case in proc ensure_gdb_index,
such that we bail out instead.
Tested on x86_64-linux.
Committed to trunk.
Thanks,
- Tom
[gdb/testsuite] Handle readnow in ensure_gdb_index
---
gdb/testsuite/lib/gdb.exp | 9 +++++++++
1 file changed, 9 insertions(+)
diff --git a/gdb/testsuite/lib/gdb.exp b/gdb/testsuite/lib/gdb.exp
index 6a5cdc06485..c2e6595f594 100644
--- a/gdb/testsuite/lib/gdb.exp
+++ b/gdb/testsuite/lib/gdb.exp
@@ -7922,6 +7922,7 @@ proc ensure_gdb_index { binfile {style ""} } {
set testfile [file tail $binfile]
set test "check if index present"
set has_index 0
+ set has_readnow 0
gdb_test_multiple "mt print objfiles ${testfile}" $test -lbl {
-re "\r\n\\.gdb_index: version ${decimal}(?=\r\n)" {
set has_index 1
@@ -7934,6 +7935,10 @@ proc ensure_gdb_index { binfile {style ""} } {
-re "\r\nPsymtabs:(?=\r\n)" {
gdb_test_lines "" $gdb_test_name ".*"
}
+ -re ".gdb_index: faked for \"readnow\"" {
+ set has_readnow 1
+ gdb_test_lines "" $gdb_test_name ".*"
+ }
-re -wrap "" {
fail $gdb_test_name
}
@@ -7943,6 +7948,10 @@ proc ensure_gdb_index { binfile {style ""} } {
return 0
}
+ if { $has_readnow } {
+ return -1
+ }
+
if { [add_gdb_index $binfile $style] == "1" } {
return 1
}
reply other threads:[~2021-10-11 10:29 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=20211011102912.GA21648@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