From: Pedro Alves <pedro@codesourcery.com>
To: gdb-patches@sourceware.org
Subject: Re: allow gdb_test_multiple { -timeout n }
Date: Fri, 12 Mar 2010 21:11:00 -0000 [thread overview]
Message-ID: <201003122111.11222.pedro@codesourcery.com> (raw)
In-Reply-To: <201003122109.02279.pedro@codesourcery.com>
On Friday 12 March 2010 21:09:02, Pedro Alves wrote:
> I've applied this patch of Daniel's. It tweaks gdb_test_multiple
> to be able to forward expect a -timeout switch. E.g.,
> instead of:
>
> set prev_timeout $timeout
> set timeout 10
>
> gdb_test_multiple "" "" {
> -re "$gdb_prompt $" { }
> }
>
> set timeout $prev_timeout
>
> you can simply do:
>
> gdb_test_multiple "" "" {
> -timeout 10
> -re "$gdb_prompt $" { }
> }
This patch.
--
Pedro Alves
2010-03-12 Daniel Jacobowitz <dan@codesourcery.com>
* lib/gdb.exp (gdb_test_multiple): Handle -timeout.
---
gdb/testsuite/lib/gdb.exp | 13 ++++++++++++-
1 file changed, 12 insertions(+), 1 deletion(-)
Index: src/gdb/testsuite/lib/gdb.exp
===================================================================
--- src.orig/gdb/testsuite/lib/gdb.exp 2010-03-12 19:13:56.000000000 +0000
+++ src/gdb/testsuite/lib/gdb.exp 2010-03-12 20:57:56.000000000 +0000
@@ -601,12 +601,23 @@ proc gdb_test_multiple { command message
set processed_code ""
set patterns ""
set expecting_action 0
+ set expecting_arg 0
foreach item $user_code subst_item $subst_code {
if { $item == "-n" || $item == "-notransfer" || $item == "-nocase" } {
lappend processed_code $item
continue
}
- if {$item == "-indices" || $item == "-re" || $item == "-ex"} {
+ if { $item == "-indices" || $item == "-re" || $item == "-ex" } {
+ lappend processed_code $item
+ continue
+ }
+ if { $item == "-timeout" } {
+ set expecting_arg 1
+ lappend processed_code $item
+ continue
+ }
+ if { $expecting_arg } {
+ set expecting_arg 0
lappend processed_code $item
continue
}
prev parent reply other threads:[~2010-03-12 21:11 UTC|newest]
Thread overview: 2+ messages / expand[flat|nested] mbox.gz Atom feed top
2010-03-12 21:09 Pedro Alves
2010-03-12 21:11 ` Pedro Alves [this message]
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=201003122111.11222.pedro@codesourcery.com \
--to=pedro@codesourcery.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