/[dejagnu]/dejagnu/config/gdb_stub.exp
ViewVC logotype

Diff of /dejagnu/config/gdb_stub.exp

Parent Directory Parent Directory | Revision Log Revision Log | View Patch Patch

revision 1.5 by bje, Thu Aug 7 03:58:36 2003 UTC revision 1.6 by bje, Sat Aug 16 13:08:57 2003 UTC
# Line 4  Line 4 
4  # it under the terms of the GNU General Public License as published by  # it under the terms of the GNU General Public License as published by
5  # the Free Software Foundation; either version 2 of the License, or  # the Free Software Foundation; either version 2 of the License, or
6  # (at your option) any later version.  # (at your option) any later version.
7  #  #
8  # This program is distributed in the hope that it will be useful,  # This program is distributed in the hope that it will be useful,
9  # but WITHOUT ANY WARRANTY; without even the implied warranty of  # but WITHOUT ANY WARRANTY; without even the implied warranty of
10  # MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the  # MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
11  # GNU General Public License for more details.  # GNU General Public License for more details.
12  #  #
13  # You should have received a copy of the GNU General Public License  # You should have received a copy of the GNU General Public License
14  # along with this program; if not, write to the Free Software  # along with this program; if not, write to the Free Software
15  # Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA.  # Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA.
# Line 188  proc gdb_stub_startup { dest } { Line 188  proc gdb_stub_startup { dest } {
188              }              }
189              -re "Reading symbols from.*done..*$gdb_prompt $" {}              -re "Reading symbols from.*done..*$gdb_prompt $" {}
190              -re "$gdb_prompt $" { warning "GDB couldn't find loader" }              -re "$gdb_prompt $" { warning "GDB couldn't find loader" }
191              timeout {              timeout {
192                  warning "(timeout) read symbol file"                  warning "(timeout) read symbol file"
193                  return -1                  return -1
194              }              }
# Line 203  proc gdb_stub_startup { dest } { Line 203  proc gdb_stub_startup { dest } {
203          remote_expect host 60 {          remote_expect host 60 {
204              -re "appears to be alive.*$gdb_prompt" { }              -re "appears to be alive.*$gdb_prompt" { }
205              -re "Remote target.*connected to.*$gdb_prompt" { }              -re "Remote target.*connected to.*$gdb_prompt" { }
206              -re "$gdb_prompt" {              -re "$gdb_prompt" {
207                  warning "Error reconnecting to stub."                  warning "Error reconnecting to stub."
208                  return -1                  return -1
209              }              }
# Line 262  proc gdb_stub_startup { dest } { Line 262  proc gdb_stub_startup { dest } {
262                      remote_send host "y\n"                      remote_send host "y\n"
263                      exp_continue                      exp_continue
264                  }                  }
265                  -re "Starting program:.*loader.*$" {                  -re "Starting program:.*loader.*$" {
266                      verbose "Starting loader succeeded"                      verbose "Starting loader succeeded"
267                  }                  }
268                  timeout {                  timeout {
269                      warning "(timeout) starting the loader"                      warning "(timeout) starting the loader"
270                      return -1                      return -1
271                  }                  }
272                  default {                  default {
273                      warning "error starting the loader"                      warning "error starting the loader"
# Line 286  proc gdb_stub_startup { dest } { Line 286  proc gdb_stub_startup { dest } {
286                  -re "$gdb_prompt $" {                  -re "$gdb_prompt $" {
287                      verbose "Running loader succeeded"                      verbose "Running loader succeeded"
288                  }                  }
289                  timeout {                  timeout {
290                      warning "(timeout) interrupting the loader"                      warning "(timeout) interrupting the loader"
291                      return -1                      return -1
292                  }                  }
293                  default {                  default {
294                      warning "error interrupting the loader"                      warning "error interrupting the loader"
# Line 369  proc gdb_stub_start { dest } { Line 369  proc gdb_stub_start { dest } {
369      }      }
370      remote_send host "break copyloop\n"      remote_send host "break copyloop\n"
371      remote_expect host 10 {      remote_expect host 10 {
372          -re "Breakpoint.*$gdb_prompt $" {          -re "Breakpoint.*$gdb_prompt $" {
373              set start_comm "continue\n"              set start_comm "continue\n"
374          }          }
375          -re "Function.*not defined.*$gdb_prompt $" { }          -re "Function.*not defined.*$gdb_prompt $" { }
# Line 491  proc gdb_stub_load { dest prog args } { Line 491  proc gdb_stub_load { dest prog args } {
491      set result [remote_wait $dest 120]      set result [remote_wait $dest 120]
492      set status [lindex $result 0]      set status [lindex $result 0]
493      set output [lindex $result 1]      set output [lindex $result 1]
494        
495      if { $status == 0 } {      if { $status == 0 } {
496          return [list "pass" $output]          return [list "pass" $output]
497      } else if { $status > 0 } {      } else if { $status > 0 } {
# Line 546  proc gdb_stub_ld { dest prog } { Line 546  proc gdb_stub_ld { dest prog } {
546              warning "GDB couldn't read file"              warning "GDB couldn't read file"
547              return [gdb_stub_retry_ld "$dest" "$prog"]              return [gdb_stub_retry_ld "$dest" "$prog"]
548          }          }
549          timeout {          timeout {
550              warning "(timeout) read symbol file"              warning "(timeout) read symbol file"
551              return [gdb_stub_retry_ld "$dest" "$prog"]              return [gdb_stub_retry_ld "$dest" "$prog"]
552          }          }
# Line 572  proc gdb_stub_ld { dest prog } { Line 572  proc gdb_stub_ld { dest prog } {
572          -re "$gdb_prompt $"     {          -re "$gdb_prompt $"     {
573              verbose "Set remote target to $serial" 2              verbose "Set remote target to $serial" 2
574          }          }
575          timeout {          timeout {
576              warning "Couldn't set remote target."              warning "Couldn't set remote target."
577              return 0              return 0
578          }          }

Legend:
Removed from v.1.5  
changed lines
  Added in v.1.6

savannah-hackers-public@gnu.org
ViewVC Help
Powered by ViewVC 1.1.26