+Sun Jun 29 16:43:30 1997 Bob Manson <manson@charmed.cygnus.com>
+
+ * gdb.base/overlays.exp: Preliminary fixes; temporarily disabled
+ until it has been modified to work with the new testsuite.
+
+ * gdb.*/*.exp: Instead of causing 1 unresolved test when the
+ testcase won't compile, cause all of the testcases in the file to
+ fail instead.
+
+ * lib/gdb.exp(gdb_suppress_entire_file): New procedure.
+ (gdb_clear_suppressed): New procedure.
+ (gdb_stop_suppressing_tests): Only clear suppress_flag if
+ it contains a positive value.
+
Sat Jun 28 13:31:11 1997 Bob Manson <manson@charmed.cygnus.com>
* lib/gdb.exp(default_gdb_start): Use gdb_opts host feature.
+# Copyright (C) 1997 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., 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA.
+
+# Please email any bugs, comments, and/or additions to this file to:
+# bug-gdb@prep.ai.mit.edu
+
# Test that GDB properly ignores invalid stabs.
# Also test that GDB can debug a .o file, and that it doesn't mind
# a file that's more minimal than what a compiler normally puts out.
return 0
}
-if ![file exists ${objdir}/${subdir}/weird.s] {
- return 0
-}
-
set prms_id 0
set bug_id 0
# will be lost.
# Skip the rest of the stabs tests for this case.
send_gdb "ptype inttype\n"
- expect {
+ gdb_expect {
-re "^ptype inttype\r*\ntype = inttype.*$gdb_prompt $" {
pass "stabs found"
}
# Make sure that the variable gets printed out correctly, without
# any sort of warning message.
send_gdb "print $var\n"
- expect {
+ gdb_expect {
-re "^print $var\r*\n.\[0-9\]* = 42.*$gdb_prompt $" {
pass "variable $var printed properly"
}
}
if { [gdb_compile "${srcfile}" "${binfile}" object ""] != "" } {
- perror "Couldn't compile ${srcfile}"
- return -1
+ gdb_suppress_entire_file "Testcase compile failed, so all tests in this file will automatically fail."
}
remote_file build delete ${srcfile}
# But \[^\n\]* doesn't seem to work, so instead use the heuristic
# that a filename won't contain a space and a warning message will.
# But spaces following by backspaces aren't really spaces.
-expect {
+gdb_expect {
-re "^file (\[^ \]| +\008)*\r*\nReading symbols from $binfile\.\.\.done\.\r*\n$gdb_prompt $" {
pass "weirdx.o read without error"
}
}
}
+proc gdb_suppress_entire_file { reason } {
+ global suppress_flag;
+
+ warning "$reason\n";
+ set suppress_flag -1;
+}
+
#
# Set suppress_flag, which will cause all subsequent calls to send_gdb and
# gdb_expect to fail immediately (until the next call to
global suppress_flag;
if [info exists suppress_flag] {
- if { $suppress_flag != 0 } {
+ if { $suppress_flag > 0 } {
set suppress_flag 0;
clone_output "Tests restarted.\n";
}
}
}
+proc gdb_clear_suppressed { } {
+ global suppress_flag;
+
+ set suppress_flag 0;
+}
+
proc gdb_start { } {
default_gdb_start
}
}
proc default_gdb_init { args } {
- gdb_stop_suppressing_tests;
+ gdb_clear_suppressed;
# Uh, this is lame. Really, really, really lame. But there's this *one*
# testcase that will fail in random places if we don't increase this.