1 # Test Framework Driver for GDB driving a builtin simulator
2 # Copyright 1994 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. */
21 # gdb_version -- extract and print the version number of gdb
29 # Set gdb to target the simulator
31 proc gdb_target_sim { } {
37 # force the height to "unlimited", so no pagers get used
39 expect -re ".*$prompt $" {}
40 # force the width to "unlimited", so no wraparound occurs
42 expect -re ".*$prompt $" {}
47 -re "Connected to the simulator.*$prompt $" {
48 verbose "Set target to sim"
51 perror "Couldn't set target for simulator."
60 # gdb_load -- load a file into the debugger.
61 # return a -1 if anything goes wrong.
63 proc gdb_load { arg } {
70 if [gdb_file_cmd $arg] then { return -1 }
79 send_user "Loaded $arg into $GDB\n"
86 perror "GDB couldn't load."
91 perror "Timed out trying to load $arg."
98 # gdb_start -- start GDB running.
102 verbose "Setting up target, Please wait..."
107 # gdb_exit -- exit gdb
110 catch default_gdb_exit
115 # make sure gdb has actually started, otherwise if the first test
116 # timesout, DejaGnu crashes