This is the mail archive of the
gdb-patches@sources.redhat.com
mailing list for the GDB project.
Re: testsuite fix for remote targets
- To: Mark Salter <msalter at redhat dot com>
- Subject: Re: testsuite fix for remote targets
- From: Michael Snyder <msnyder at cygnus dot com>
- Date: Thu, 15 Mar 2001 11:11:33 -0800
- CC: gdb-patches at sourceware dot cygnus dot com
- Organization: Red Hat
- References: <200103151758.f2FHwmO18422@deneb.localdomain>
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;