This is the mail archive of the
gdb-patches@sources.redhat.com
mailing list for the GDB project.
Re: [RFA] lib/gdb.exp: use board timeout
- To: Nick Duffek <nsd at redhat dot com>
- Subject: Re: [RFA] lib/gdb.exp: use board timeout
- From: Fernando Nasser <fnasser at cygnus dot com>
- Date: Fri, 17 Nov 2000 16:22:05 +0000
- CC: gdb-patches at sources dot redhat dot com
- Organization: Red Hat Canada Ltd. - Toronto
- References: <200011170634.eAH6YOE14209@rtl.cygnus.com>
Nick Duffek wrote:
>
> The appended patch causes gdb_test to use the [target_info gdb,timeout] if
> it exists, just like gdb_expect does. This makes board description
> statements like the following more effective:
>
> set board_info($board,gdb,timeout) 240
>
> There are no regressions on i686-pc-linux-gnu or sparc-sun-solaris2.5.1.
> Okay to apply?
>
Yes, nice to have the board timeout checked first.
Thanks.
Fernando
P.S.: That was an ugly one to understand in this format.
Please send me context diffs. I am more used to them and I spend much
less time processing it. I know it is a question of personal preference --
but I am of the "-c" type ;-)
> ChangeLog:
>
> * lib/gdb.exp (gdb_test): Override timeout with board info.
>
> Nick
>
> Index: gdb/testsuite/lib/gdb.exp
> ===================================================================
> diff -up gdb/testsuite/lib/gdb.exp gdb/testsuite/lib/gdb.exp
> --- gdb/testsuite/lib/gdb.exp Thu Nov 16 19:29:03 2000
> +++ gdb/testsuite/lib/gdb.exp Thu Nov 16 19:28:53 2000
> @@ -447,14 +447,18 @@ proc gdb_test { args } {
> }
> }
>
> - if [info exists timeout] {
> - set tmt $timeout;
> + if [target_info exists gdb,timeout] {
> + set tmt [target_info gdb,timeout];
> } else {
> - global timeout;
> if [info exists timeout] {
> set tmt $timeout;
> } else {
> - set tmt 60;
> + global timeout;
> + if [info exists timeout] {
> + set tmt $timeout;
> + } else {
> + set tmt 60;
> + }
> }
> }
> gdb_expect $tmt {
--
Fernando Nasser
Red Hat Canada Ltd. E-Mail: fnasser@redhat.com
2323 Yonge Street, Suite #300
Toronto, Ontario M4P 2C9