From: Carl Love <cel@us.ibm.com>
To: Andrew Burgess <andrew.burgess@embecosm.com>
Cc: gdb@sourceware.org
Subject: RE: Question: gdb.tui/tui-layout-asm.exp
Date: Mon, 19 Jul 2021 15:22:30 -0700 [thread overview]
Message-ID: <d47061b862f47b79a6d4c79100ab95891d80b315.camel@us.ibm.com> (raw)
In-Reply-To: <20210719164804.GC1688065@embecosm.com>
Andrew, gdb developers:
>.... I think
> that for some reason this check is failing:
>
> if {[Term::wait_for $re_line] \
> && [regexp $re_line [Term::get_line 1]]} {
>
> If this was not failing, and you kept scrolling far enough, then a
> blank like would appear.
Yes, that test does appear to be failing. I have added some debug
statements to the gdb.tui/tui-layout-asm.exp test as follows:
set line1 [Term::get_line 1]
puts " "
puts "Carll line1 $line1"
puts "Carll re_line $re_line"
if {([Term::wait_for $re_line] \
&& [regexp $re_line [Term::get_line 1]])} {
puts "Carll true"
# We scrolled successfully.
} else {
puts "Carll false"
fail "$testname (scroll failed)"
Term::dump_screen
break
}
The interesting output is:
Carll line1 | 0x100007a4 <__glink_PLTresolve+44> ld r11,8(r11) |
Carll re_line \|\s+0x100007a8\s+<__glink_PLTresolve\+48>\s+bctr\s+\|
CARLL, timeout, return 1
Carll true
Carll line1 | 0x100007a8 <__glink_PLTresolve+48> bctr |
Carll re_line \|\s+0x100007ac\s+<__libc_start_main@plt>\s+b\s+0x10000778\s+<__glink_PLTres\| <--should match
CARLL, timeout, return 1
Carll true
Carll line1 | 0x100007ac <__libc_start_main@plt> b 0x10000778 <__glink_PLTres| <-- this line but the test fails
Carll re_line \|\s+0x100007b0\s+<__gmon_start__@plt>\s+b\s+0x10000778\s+<__glink_PLTres\|
CARLL, timeout, return 1
Carll false
FAIL: gdb.tui/tui-layout-asm.exp: scroll to end of assembler (scroll failed)
So the if statement is checking to see if line1 matches the re_line
above it. The match statement is
[regexp $re_line [Term::get_line 1]]
The final test fails for some reason? Note this is the first test were
a line had an @ symbol in it. The value of re_line which is
set re_line [string_to_regexp $line]
looks like the generated regular expression of the line should match
the next $line1 string. I am not aware of the @ having any special
meaning in a regular expression that would confuse the regexp command?
Maybe someone else can spot why the two lines don't seem to match?
They look OK to me.
Carl
next parent reply other threads:[~2021-07-19 22:22 UTC|newest]
Thread overview: 5+ messages / expand[flat|nested] mbox.gz Atom feed top
[not found] <c9c9f9f9af7ae99468baa7fd885538af4a694714.camel@us.ibm.com>
[not found] ` <20210719164804.GC1688065@embecosm.com>
2021-07-19 22:22 ` Carl Love [this message]
2021-07-20 8:01 ` Andreas Schwab
2021-07-20 17:41 ` Carl Love
2021-07-20 18:06 ` Carl Love
2021-07-20 18:16 ` Carl Love
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=d47061b862f47b79a6d4c79100ab95891d80b315.camel@us.ibm.com \
--to=cel@us.ibm.com \
--cc=andrew.burgess@embecosm.com \
--cc=gdb@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).