* config/est.exp: Fix copyright and comments. Remove dead code.
[deliverable/binutils-gdb.git] / gdb / testsuite / config / est.exp
1 # Test Framework Driver for GDB driving the EST
2 # Copyright 1995 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 load_lib gdb.exp
19
20 #
21 # gdb_version -- extract and print the version number of gdb
22 #
23 proc gdb_version {} {
24 default_gdb_version
25 }
26
27 #
28 # gdb_target_est
29 # Set gdb to target the monitor
30 #
31 proc gdb_target_est { } {
32 global prompt
33 global exit_status
34 global targetname
35 global serialport
36 global baud
37
38 send "target $targetname $serialport\n"
39 set timeout 60
40 expect {
41 -re "Remote target est connected to.*$prompt $" {
42 verbose "Set target to est"
43 }
44 timeout {
45 perror "Couldn't set target for est."
46 cleanup
47 exit $exit_status
48 }
49 }
50 set timeout 10
51 }
52
53 #
54 # gdb_load -- load a file into the debugger.
55 # return a -1 if anything goes wrong.
56 #
57 proc gdb_load { arg } {
58 global verbose
59 global loadpath
60 global loadfile
61 global GDB
62 global prompt
63
64 if [gdb_file_cmd $arg] then { return -1 }
65
66 gdb_target_est
67
68 send "load\n"
69 set timeout 2400
70 expect {
71 -re ".*$prompt $" {
72 if $verbose>1 then {
73 send_user "Loaded $arg into $GDB\n"
74 }
75 set timeout 30
76 return 1
77 }
78 -re "$prompt $" {
79 if $verbose>1 then {
80 perror "GDB couldn't load."
81 }
82 }
83 timeout {
84 if $verbose>1 then {
85 perror "Timed out trying to load $arg."
86 }
87 }
88 }
89 }
90
91 #
92 # gdb_start -- start GDB running.
93 #
94 proc gdb_start { } {
95 default_gdb_start
96 }
97
98 #
99 # gdb_exit -- exit gdb
100 #
101 proc gdb_exit { } {
102 catch default_gdb_exit
103 }
104
105 gdb_start
This page took 0.032472 seconds and 5 git commands to generate.