* allow gdb_test_multiple { -timeout n }
@ 2010-03-12 21:09 Pedro Alves
2010-03-12 21:11 ` Pedro Alves
0 siblings, 1 reply; 2+ messages in thread
From: Pedro Alves @ 2010-03-12 21:09 UTC (permalink / raw)
To: gdb-patches
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 $" { }
}
--
Pedro Alves
^ permalink raw reply [flat|nested] 2+ messages in thread
* Re: allow gdb_test_multiple { -timeout n }
2010-03-12 21:09 allow gdb_test_multiple { -timeout n } Pedro Alves
@ 2010-03-12 21:11 ` Pedro Alves
0 siblings, 0 replies; 2+ messages in thread
From: Pedro Alves @ 2010-03-12 21:11 UTC (permalink / raw)
To: gdb-patches
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
}
^ permalink raw reply [flat|nested] 2+ messages in thread
end of thread, other threads:[~2010-03-12 21:11 UTC | newest]
Thread overview: 2+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2010-03-12 21:09 allow gdb_test_multiple { -timeout n } Pedro Alves
2010-03-12 21:11 ` Pedro Alves
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox