mirror of
https://sourceware.org/git/binutils-gdb.git
synced 2024-12-09 04:21:49 +08:00
7a7d682b98
to here. * config/{mips-gdb.exp, nind-gdb.exp, udi-gdb.exp, vx-gdb.exp}: Remove various versions of gdb_exit. * config/vx-gdb.exp: Remove quit_vxgdb, change a caller to call gdb_exit. * config/unix-gdb.exp: gdb_exit remains here, and should override the generic version, since it's doing a lot of wierd stuff that the other versions aren't. FIXME, fold it in, or abandon this version.
88 lines
2.6 KiB
Plaintext
88 lines
2.6 KiB
Plaintext
# Test Framework Driver
|
|
# Copyright (C) 1988, 1990, 1991, 1992 Free Software Foundation, Inc.
|
|
|
|
# This program is free software; you can redistribute it and/or modify
|
|
# it under the terms of the GNU General Public License as published by
|
|
# the Free Software Foundation; either version 2 of the License, or
|
|
# (at your option) any later version.
|
|
#
|
|
# This program is distributed in the hope that it will be useful,
|
|
# but WITHOUT ANY WARRANTY; without even the implied warranty of
|
|
# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
|
|
# GNU General Public License for more details.
|
|
#
|
|
# You should have received a copy of the GNU General Public License
|
|
# along with this program; if not, write to the Free Software
|
|
# Foundation, Inc., 675 Mass Ave, Cambridge, MA 02139, USA. */
|
|
|
|
# Please email any bugs, comments, and/or additions to this file to:
|
|
# DejaGnu@cygnus.com
|
|
|
|
# This file was written by Rob Savoye. (rob@cygnus.com)
|
|
|
|
# these need to be initialized only if site.exp doesn't set them
|
|
if ![info exists prompt] then {
|
|
set prompt "\(gdb\)"
|
|
}
|
|
|
|
#
|
|
# gdb_version -- extract and print the version number of gdb
|
|
#
|
|
proc gdb_version {} {
|
|
global GDB
|
|
global GDBFLAGS
|
|
global prompt
|
|
set tmp [exec echo "q" | $GDB]
|
|
set version [lindex $tmp [lsearch $tmp "\[0-9\]*"]]
|
|
set version [string range $version 0 [expr [string length $version]-2]]
|
|
clone_output "[which $GDB] version $version $GDBFLAGS\n"
|
|
}
|
|
|
|
#
|
|
# gdb_load -- load a file into the debugger.
|
|
#
|
|
proc gdb_load { arg } {
|
|
global verbose
|
|
global loadpath
|
|
global loadfile
|
|
global prompt
|
|
global GDB
|
|
set loadfile [file tail $arg]
|
|
set loadpath [file dirname $arg]
|
|
send_user "Not implememted yet\n" ; return -1
|
|
}
|
|
|
|
#
|
|
# gdb_start -- start GDB running
|
|
#
|
|
proc gdb_start { } {
|
|
global GDB
|
|
global GDBFLAGS
|
|
global spawn_id
|
|
global prompt
|
|
global verbose
|
|
global targetname
|
|
send_user "Not implememted yet\n" ; return -1
|
|
}
|
|
|
|
expect_after {
|
|
"<return>" { send "\n"; clone_output "ERROR: Window too small" }
|
|
-re "\(y or n\) " { send "n\n"; clone_output "ERROR: Got interactive prompt" }
|
|
buffer_full { clone_output "ERROR: internal buffer is full" }
|
|
eof { clone_output "ERROR: eof -- pty is hosed" }
|
|
timeout { clone_output "ERROR: timeout" }
|
|
"virtual memory exhausted" { clone_output "ERROR: virtual memory exhausted" }
|
|
"Undefined command" { clone_output "ERROR: send string probably wrong" }
|
|
}
|
|
|
|
load_lib gdb.exp
|
|
|
|
gdb_start
|
|
|
|
# make sure gdb has actually started, otherwise if the first test
|
|
# timesout, DejaGnu crashes
|
|
send "\n"
|
|
expect {
|
|
-re "$prompt"
|
|
}
|