Mirror of the gdb-patches mailing list
 help / color / mirror / Atom feed
* another monitor.exp change
@ 2001-03-15 12:35 Mark Salter
  2001-03-15 13:11 ` Fernando Nasser
  0 siblings, 1 reply; 2+ messages in thread
From: Mark Salter @ 2001-03-15 12:35 UTC (permalink / raw)
  To: gdb-patches

Here's another simple patch to monitor.exp which allows me to run the
testsuites on a very slow remote target. I have to work with a fixed baud
rate serial line which is overrun by the download packets, so I added
gdb_download_size which if defined will be used to set download-write-size.
Also, this hardware is slooow. It takes ~50 minutes to download a 40KB
application. So, I added a gdb_load_timeout to override the default 26 minute
timeout on loads.

--Mark


gdb/testsuite/ChangeLog:

 2001-03-15  Mark Salter  <msalter@redhat.com>

    * config/monitor.exp (gdb_load): Add support for additional
    target_info: gdb_download_size and gdb_load_timeout.


Index: gdb/testsuite/config/monitor.exp
===================================================================
RCS file: /cvs/src/src/gdb/testsuite/config/monitor.exp,v
retrieving revision 1.4
diff -u -p -5 -r1.4 monitor.exp
--- gdb/testsuite/config/monitor.exp	2001/03/15 18:51:25	1.4
+++ gdb/testsuite/config/monitor.exp	2001/03/15 20:21:22
@@ -138,10 +138,21 @@ proc gdb_load { arg } {
     global GDB
     global gdb_prompt
     global timeout
     global last_gdb_file;
 
+    if [target_info exists gdb_download_size] {
+	send_gdb "set download-write-size [target_info gdb_download_size]\n";
+	gdb_expect 30 {
+	    -re "$gdb_prompt $" { }
+	    default {
+		perror "Setting download-write-size for target failed";
+		return -1;
+	    }
+	}
+    }
+
     if { $arg == "" } {
 	if [info exists last_gdb_file] {
 	    set arg $last_gdb_file;
 	} else {
 	    send_gdb "info files\n";
@@ -219,12 +230,18 @@ proc gdb_load { arg } {
 	    if [target_info exists gdb_load_offset] {
 		set command "load $farg [target_info gdb_load_offset]\n";
 	    } else {
 		set command "load $farg\n";
 	    }
+	    if [target_info exists gdb_load_timeout] {
+		set loadtimeout [target_info gdb_load_timeout]
+	    } else {
+		set loadtimeout 1600
+	    }
+
 	    send_gdb $command;
-	    gdb_expect 1600 {
+	    gdb_expect $loadtimeout {
 		-re "\[Ff\]ailed.*$gdb_prompt $" {
 		    verbose "load failed";
 		}
 		-re "Timeout reading from remote.*$gdb_prompt" {
 		}


^ permalink raw reply	[flat|nested] 2+ messages in thread

* Re: another monitor.exp change
  2001-03-15 12:35 another monitor.exp change Mark Salter
@ 2001-03-15 13:11 ` Fernando Nasser
  0 siblings, 0 replies; 2+ messages in thread
From: Fernando Nasser @ 2001-03-15 13:11 UTC (permalink / raw)
  To: Mark Salter; +Cc: gdb-patches

This is certainly an improvement.

Please check it in.

Fernando

Mark Salter wrote:
> 
> Here's another simple patch to monitor.exp which allows me to run the
> testsuites on a very slow remote target. I have to work with a fixed baud
> rate serial line which is overrun by the download packets, so I added
> gdb_download_size which if defined will be used to set download-write-size.
> Also, this hardware is slooow. It takes ~50 minutes to download a 40KB
> application. So, I added a gdb_load_timeout to override the default 26 minute
> timeout on loads.
> 
> --Mark
> 
> gdb/testsuite/ChangeLog:
> 
>  2001-03-15  Mark Salter  <msalter@redhat.com>
> 
>     * config/monitor.exp (gdb_load): Add support for additional
>     target_info: gdb_download_size and gdb_load_timeout.
> 
> Index: gdb/testsuite/config/monitor.exp
> ===================================================================
> RCS file: /cvs/src/src/gdb/testsuite/config/monitor.exp,v
> retrieving revision 1.4
> diff -u -p -5 -r1.4 monitor.exp
> --- gdb/testsuite/config/monitor.exp    2001/03/15 18:51:25     1.4
> +++ gdb/testsuite/config/monitor.exp    2001/03/15 20:21:22
> @@ -138,10 +138,21 @@ proc gdb_load { arg } {
>      global GDB
>      global gdb_prompt
>      global timeout
>      global last_gdb_file;
> 
> +    if [target_info exists gdb_download_size] {
> +       send_gdb "set download-write-size [target_info gdb_download_size]\n";
> +       gdb_expect 30 {
> +           -re "$gdb_prompt $" { }
> +           default {
> +               perror "Setting download-write-size for target failed";
> +               return -1;
> +           }
> +       }
> +    }
> +
>      if { $arg == "" } {
>         if [info exists last_gdb_file] {
>             set arg $last_gdb_file;
>         } else {
>             send_gdb "info files\n";
> @@ -219,12 +230,18 @@ proc gdb_load { arg } {
>             if [target_info exists gdb_load_offset] {
>                 set command "load $farg [target_info gdb_load_offset]\n";
>             } else {
>                 set command "load $farg\n";
>             }
> +           if [target_info exists gdb_load_timeout] {
> +               set loadtimeout [target_info gdb_load_timeout]
> +           } else {
> +               set loadtimeout 1600
> +           }
> +
>             send_gdb $command;
> -           gdb_expect 1600 {
> +           gdb_expect $loadtimeout {
>                 -re "\[Ff\]ailed.*$gdb_prompt $" {
>                     verbose "load failed";
>                 }
>                 -re "Timeout reading from remote.*$gdb_prompt" {
>                 }

-- 
Fernando Nasser
Red Hat Canada Ltd.                     E-Mail:  fnasser@redhat.com
2323 Yonge Street, Suite #300
Toronto, Ontario   M4P 2C9


^ permalink raw reply	[flat|nested] 2+ messages in thread

end of thread, other threads:[~2001-03-15 13:11 UTC | newest]

Thread overview: 2+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2001-03-15 12:35 another monitor.exp change Mark Salter
2001-03-15 13:11 ` Fernando Nasser

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox