* config/gdbremote.exp: New file. Testing framework using
[deliverable/binutils-gdb.git] / gdb / testsuite / config / nind-gdb.exp
CommitLineData
19fa4a0a
MW
1# Test Framework Driver
2# Copyright (C) 1988, 1990, 1991, 1992 Free Software Foundation, Inc.
3
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.
8#
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.
13#
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., 675 Mass Ave, Cambridge, MA 02139, USA. */
17
18# Please email any bugs, comments, and/or additions to this file to:
19# DejaGnu@cygnus.com
20
21# This file was written by Rob Savoye. (rob@cygnus.com)
22
23# these need to be initialized only if site.exp doesn't set them
24if ![info exists prompt] then {
25 set prompt "\(gdb\)"
26}
27
28#
29# gdb_version -- extract and print the version number of gdb
30#
31proc gdb_version {} {
32 global GDB
33 global GDBFLAGS
34 global prompt
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"
39}
40
41#
42# gdb_load -- load a file into the debugger.
43#
44proc gdb_load { arg } {
45 global verbose
46 global loadpath
47 global loadfile
48 global prompt
49 global GDB
50 set loadfile [file tail $arg]
51 set loadpath [file dirname $arg]
05a291bb 52 send_user "Not implememted yet\n" ; return -1
19fa4a0a
MW
53}
54
19fa4a0a
MW
55#
56# gdb_start -- start GDB running
57#
58proc gdb_start { } {
59 global GDB
60 global GDBFLAGS
61 global spawn_id
62 global prompt
63 global verbose
64 global targetname
05a291bb 65 send_user "Not implememted yet\n" ; return -1
19fa4a0a
MW
66}
67
68expect_after {
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" }
76}
77
78load_lib gdb.exp
79
80gdb_start
81
82# make sure gdb has actually started, otherwise if the first test
83# timesout, DejaGnu crashes
84send "\n"
85expect {
86 -re "$prompt"
87 }
This page took 0.168543 seconds and 4 git commands to generate.