1 # Test Framework Driver
2 # Copyright (C) 1988, 1990, 1991, 1992 Free Software Foundation, Inc.
4 # This program is free software; you can redistribute it and/or modify
5 # it under the terms of the GNU General Public License as published by
6 # the Free Software Foundation; either version 2 of the License, or
7 # (at your option) any later version.
9 # This program is distributed in the hope that it will be useful,
10 # but WITHOUT ANY WARRANTY; without even the implied warranty of
11 # MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
12 # GNU General Public License for more details.
14 # You should have received a copy of the GNU General Public License
15 # along with this program; if not, write to the Free Software
16 # Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA. */
18 # Please email any bugs, comments, and/or additions to this file to:
21 # This file was written by Rob Savoye. (rob@cygnus.com)
23 # these need to be initialized only if site.exp doesn't set them
24 if ![info exists prompt] then {
29 # gdb_version -- extract and print the version number of gdb
35 set tmp [exec echo "q" | $GDB]
36 set version [lindex $tmp [lsearch $tmp "\[0-9\]*"]]
37 set version [string range $version 0 [expr [string length $version]-2]]
38 clone_output "[which $GDB] version $version $GDBFLAGS\n"
42 # gdb_load -- load a file into the debugger.
44 proc gdb_load { arg } {
50 set loadfile [file tail $arg]
51 set loadpath [file dirname $arg]
52 send_user "Not implememted yet\n" ; return -1
56 # gdb_start -- start GDB running
65 send_user "Not implememted yet\n" ; return -1
69 "<return>" { send "\n"; clone_output "ERROR: Window too small" }
70 -re "\(y or n\) " { send "n\n"; clone_output "ERROR: Got interactive prompt" }
71 buffer_full { clone_output "ERROR: internal buffer is full" }
72 eof { clone_output "ERROR: eof -- pty is hosed" }
73 timeout { clone_output "ERROR: timeout" }
74 "virtual memory exhausted" { clone_output "ERROR: virtual memory exhausted" }
75 "Undefined command" { clone_output "ERROR: send string probably wrong" }
82 # make sure gdb has actually started, otherwise if the first test
83 # timesout, DejaGnu crashes