From mboxrd@z Thu Jan 1 00:00:00 1970 From: Fernando Nasser To: Mark Salter Cc: gdb-patches@sourceware.cygnus.com Subject: Re: another monitor.exp change Date: Thu, 15 Mar 2001 13:11:00 -0000 Message-id: <3AB12F44.8A84C409@redhat.com> References: <200103152036.f2FKaid19274@deneb.localdomain> X-SW-Source: 2001-03/msg00249.html 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 > > * 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