aboutsummaryrefslogtreecommitdiff
path: root/gdb/testsuite/gdb.base/exprs.exp
diff options
context:
space:
mode:
Diffstat (limited to 'gdb/testsuite/gdb.base/exprs.exp')
-rw-r--r--gdb/testsuite/gdb.base/exprs.exp38
1 files changed, 21 insertions, 17 deletions
diff --git a/gdb/testsuite/gdb.base/exprs.exp b/gdb/testsuite/gdb.base/exprs.exp
index cf81939..fcf7c2a 100644
--- a/gdb/testsuite/gdb.base/exprs.exp
+++ b/gdb/testsuite/gdb.base/exprs.exp
@@ -1,4 +1,4 @@
-# Copyright (C) 1988, 1990, 1991, 1992 Free Software Foundation, Inc.
+# Copyright (C) 1988, 1990, 1991, 1992, 1994 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
@@ -12,7 +12,7 @@
#
# 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. */
+# 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
@@ -29,23 +29,32 @@ if $tracelevel then {
set prms_id 0
set bug_id 0
-set binfile "exprs"
+set testfile "exprs"
+set srcfile ${srcdir}/$subdir/${testfile}.c
+set binfile ${objdir}/${subdir}/${testfile}
+if { [compile "${srcfile} -g -o ${binfile}"] != "" } {
+ perror "Couldn't compile ${srcfile}"
+ return -1
+}
-if ![file exists $objdir/$subdir/$binfile] then {
- perror "$objdir/$subdir/$binfile does not exist."
- return 0
+execute_anywhere "rm -f ${binfile}.ci"
+if { [compile "-E ${srcdir}/${subdir}/compiler.c > ${binfile}.ci"] != "" } {
+ perror "Couldn't make ${testfile}.ci file"
+ return -1
}
gdb_exit
gdb_start
gdb_reinitialize_dir $srcdir/$subdir
-gdb_load $objdir/$subdir/$binfile
+gdb_load ${binfile}
+
+source ${binfile}.ci
#
# set it up at a breakpoint so we can play with the variable values
#
-if ![runto main] then {
+if ![runto_main] then {
perror "couldn't run to breakpoint"
continue
}
@@ -233,6 +242,7 @@ expect {
# make char a minus
+if {!$gcc_compiled} then { setup_xfail "mips-sgi-irix4*" }
send "set variable v_signed_char=-1\n"
expect {
-re "set.*$prompt $" {
@@ -255,6 +265,7 @@ expect {
}
+if {!$gcc_compiled} then { setup_xfail "mips-sgi-irix4*" }
send "set variable v_signed_char=-1\n"
expect {
-re "set.*$prompt $" {
@@ -277,6 +288,7 @@ expect {
}
+if {!$gcc_compiled} then { setup_xfail "mips-sgi-irix4*" }
send "set variable v_signed_char=-1\n"
expect {
-re "set.*$prompt $" {
@@ -298,7 +310,7 @@ expect {
timeout { fail "(timeout) print signed char < (minus)" }
}
-
+if {!$gcc_compiled} then { setup_xfail "mips-sgi-irix4*" }
send "set variable v_signed_char=-1\n"
expect {
-re "set.*$prompt $" {
@@ -1530,9 +1542,6 @@ expect {
}
}
-re "print.*.\[0-9\]* = 0.*$prompt $" {
-# gdb currently compares all values as long, so this failure probably
-# applies to any configuration where LONGEST is bigger than a target int.
- setup_xfail "alpha-*-*"
fail "print unsigned int == (~0)"
send "print v_unsigned_int == (unsigned int)~0\n"
expect {
@@ -2165,8 +2174,3 @@ expect {
-re "$prompt $" { fail "print unsigned long > (~0)" }
timeout { fail "(timeout) print unsigned long > (~0)" }
}
-
-if [istarget "a29k-*-udi"] then {
- # FIXME: If PR 2415 is fixed, this is not needed.
- gdb_target_udi
-}