testsuite fix for remote targets

Michael Snyder msnyder@cygnus.com
Thu Mar 15 11:23:00 GMT 2001


Mark Salter wrote:
> 
> This change:
> 
>         * config/monitor.exp (gdb_target_cmd): Abstracts some of the
>         code from gdb_target_monitor, so it can be used independantly
>         for gdbserver.
> 
> apparently broke some remote targets. I'm not sure how this worked at
> all, but following is a simple patch that fixes the problem I'm seeing.

Speaking as the author of the offending change -- approved.
Please check it in.

> 
> --Mark
> 
> gdb/testsuite/ChangeLog:
> 
> 2001-03-15  Mark Salter  <msalter@redhat.com>
> 
>         * config/monitor.exp (gdb_target_cmd): Add explicit error return.
>         (gdb_target_monitor): Add check of gdb_target_cmd return value.
> 
> Index: gdb/testsuite/config/monitor.exp
> ===================================================================
> RCS file: /cvs/src/src/gdb/testsuite/config/monitor.exp,v
> retrieving revision 1.3
> diff -u -p -5 -r1.3 monitor.exp
> --- gdb/testsuite/config/monitor.exp    2001/03/06 08:21:48     1.3
> +++ gdb/testsuite/config/monitor.exp    2001/03/15 17:41:35
> @@ -65,10 +65,11 @@ proc gdb_target_cmd { targetname serialp
>                 send_gdb "";
>                 break
>             }
>         }
>      }
> +    return 1
>  }
> 
> 
> 
>  #
> @@ -107,11 +108,11 @@ proc gdb_target_monitor { exec_file } {
>      }
> 
>      for {set j 1} {$j <= 2} {incr j} {
>         if [gdb_file_cmd $exec_file] { return -1; }
> 
> -       gdb_target_cmd $targetname $serialport;
> +       if ![gdb_target_cmd $targetname $serialport] { return 0; }
> 
>         gdb_target_exec;
> 
>         if { $j == 1 && ![reboot_target] } {
>             break;



More information about the Gdb-patches mailing list