]> git.ipfire.org Git - thirdparty/binutils-gdb.git/blob - gdb/testsuite/config/nind-gdb.exp
* elf32-mn10200.c (reloc_type): Add 16bit pc-relative reloc.
[thirdparty/binutils-gdb.git] / gdb / testsuite / config / nind-gdb.exp
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., 59 Temple Place - Suite 330, Boston, MA 02111-1307, 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
24 if ![info exists prompt] then {
25 set prompt "\(gdb\)"
26 }
27
28 #
29 # gdb_version -- extract and print the version number of gdb
30 #
31 proc 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 #
44 proc 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]
52 send_user "Not implememted yet\n" ; return -1
53 }
54
55 #
56 # gdb_start -- start GDB running
57 #
58 proc gdb_start { } {
59 global GDB
60 global GDBFLAGS
61 global spawn_id
62 global prompt
63 global verbose
64 global targetname
65 send_user "Not implememted yet\n" ; return -1
66 }
67
68 expect_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 full_buffer { 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
78 load_lib gdb.exp
79
80 gdb_start
81
82 # make sure gdb has actually started, otherwise if the first test
83 # timesout, DejaGnu crashes
84 send "\n"
85 expect {
86 -re "$prompt"
87 }