* [PATCH] gdb.trace: Fix unavailable.exp if last register happens to be PC.
@ 2016-02-22 7:35 Marcin Kościelnicki
2016-02-22 17:37 ` Yao Qi
0 siblings, 1 reply; 3+ messages in thread
From: Marcin Kościelnicki @ 2016-02-22 7:35 UTC (permalink / raw)
To: gdb-patches; +Cc: Marcin Kościelnicki
unavailable.exp executes "info registers", expecting to find at least
two instances of "<unavailable>". However, it uses
"<unavailable>.*<unavailable>" as the pattern, which doesn't match
when the last register happens to be available (eg. PC). Change it
to ".*<unavailable>.*<unavailable>.*" instead.
Noticed on s390, no regression on x86_64.
gdb/testsuite/ChangeLog:
* gdb.trace/unavailable.exp (gdb_unavailable_registers_test_1): Fix
info registers pattern.
---
gdb/testsuite/ChangeLog | 5 +++++
gdb/testsuite/gdb.trace/unavailable.exp | 2 +-
2 files changed, 6 insertions(+), 1 deletion(-)
diff --git a/gdb/testsuite/ChangeLog b/gdb/testsuite/ChangeLog
index 5676cac..8acc5c5 100644
--- a/gdb/testsuite/ChangeLog
+++ b/gdb/testsuite/ChangeLog
@@ -1,3 +1,8 @@
+2016-02-22 Marcin KoÅcielnicki <koriakin@0x04.net>
+
+ * gdb.trace/unavailable.exp (gdb_unavailable_registers_test_1): Fix
+ info registers pattern.
+
2016-02-18 Iain Buclaw <ibuclaw@gdcproject.org>
* lib/future.exp: Add D support.
diff --git a/gdb/testsuite/gdb.trace/unavailable.exp b/gdb/testsuite/gdb.trace/unavailable.exp
index e257c2e..343ac64 100644
--- a/gdb/testsuite/gdb.trace/unavailable.exp
+++ b/gdb/testsuite/gdb.trace/unavailable.exp
@@ -330,7 +330,7 @@ proc gdb_unavailable_registers_test_1 { } {
test_register "\$pc"
gdb_test "info registers" \
- "<unavailable>.*<unavailable>" \
+ ".*<unavailable>.*<unavailable>.*" \
"info registers, multiple registers not available"
gdb_test "info registers \$$spreg" \
--
2.7.1
^ permalink raw reply [flat|nested] 3+ messages in thread
* Re: [PATCH] gdb.trace: Fix unavailable.exp if last register happens to be PC.
2016-02-22 7:35 [PATCH] gdb.trace: Fix unavailable.exp if last register happens to be PC Marcin Kościelnicki
@ 2016-02-22 17:37 ` Yao Qi
2016-02-22 17:57 ` Marcin Kościelnicki
0 siblings, 1 reply; 3+ messages in thread
From: Yao Qi @ 2016-02-22 17:37 UTC (permalink / raw)
To: Marcin Kościelnicki; +Cc: gdb-patches
Marcin Kościelnicki <koriakin@0x04.net> writes:
> unavailable.exp executes "info registers", expecting to find at least
> two instances of "<unavailable>". However, it uses
> "<unavailable>.*<unavailable>" as the pattern, which doesn't match
> when the last register happens to be available (eg. PC). Change it
> to ".*<unavailable>.*<unavailable>.*" instead.
>
> Noticed on s390, no regression on x86_64.
>
> gdb/testsuite/ChangeLog:
>
> * gdb.trace/unavailable.exp (gdb_unavailable_registers_test_1): Fix
> info registers pattern.
Patch looks good to me.
--
Yao (齐尧)
^ permalink raw reply [flat|nested] 3+ messages in thread
* Re: [PATCH] gdb.trace: Fix unavailable.exp if last register happens to be PC.
2016-02-22 17:37 ` Yao Qi
@ 2016-02-22 17:57 ` Marcin Kościelnicki
0 siblings, 0 replies; 3+ messages in thread
From: Marcin Kościelnicki @ 2016-02-22 17:57 UTC (permalink / raw)
To: Yao Qi; +Cc: gdb-patches
On 22/02/16 18:37, Yao Qi wrote:
> Marcin KoÅcielnicki <koriakin@0x04.net> writes:
>
>> unavailable.exp executes "info registers", expecting to find at least
>> two instances of "<unavailable>". However, it uses
>> "<unavailable>.*<unavailable>" as the pattern, which doesn't match
>> when the last register happens to be available (eg. PC). Change it
>> to ".*<unavailable>.*<unavailable>.*" instead.
>>
>> Noticed on s390, no regression on x86_64.
>>
>> gdb/testsuite/ChangeLog:
>>
>> * gdb.trace/unavailable.exp (gdb_unavailable_registers_test_1): Fix
>> info registers pattern.
>
> Patch looks good to me.
>
Thanks, pushed.
^ permalink raw reply [flat|nested] 3+ messages in thread
end of thread, other threads:[~2016-02-22 17:57 UTC | newest]
Thread overview: 3+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2016-02-22 7:35 [PATCH] gdb.trace: Fix unavailable.exp if last register happens to be PC Marcin Kościelnicki
2016-02-22 17:37 ` Yao Qi
2016-02-22 17:57 ` Marcin Kościelnicki
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).