This is the mail archive of the gdb-patches@sources.redhat.com mailing list for the GDB project.


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]

Re: [RFA] lib/gdb.exp: use board timeout


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

Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]