diff options
Diffstat (limited to 'gdb/testsuite/gdb.base/whatis.exp')
-rw-r--r-- | gdb/testsuite/gdb.base/whatis.exp | 24 |
1 files changed, 16 insertions, 8 deletions
diff --git a/gdb/testsuite/gdb.base/whatis.exp b/gdb/testsuite/gdb.base/whatis.exp index 42a5c3f..011ff30 100644 --- a/gdb/testsuite/gdb.base/whatis.exp +++ b/gdb/testsuite/gdb.base/whatis.exp @@ -19,7 +19,7 @@ # This file was written by Rob Savoye. (rob@cygnus.com) -if $tracelevel then { +if $tracelevel { strace $tracelevel } @@ -29,11 +29,18 @@ if $tracelevel then { set prms_id 0 set bug_id 0 -set binfile "whatis" +set testfile whatis +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 } # Start with a fresh gdb. @@ -41,9 +48,9 @@ if ![file exists $objdir/$subdir/$binfile] then { gdb_exit gdb_start gdb_reinitialize_dir $srcdir/$subdir -gdb_load $objdir/$subdir/$binfile +gdb_load $binfile -source gdb.base/whatis.ci +source ${binfile}.ci # If we did not use the signed keyword when compiling the file, don't # expect GDB to know that char is signed. @@ -61,7 +68,7 @@ if $signed_keyword_not_used then { proc setup_xfail_on_long_vs_int {} { global gcc_compiled - if {!$gcc_compiled} then { + if {!$gcc_compiled} { setup_xfail "*-sun-sunos4*" "*-*-ultrix*" "i*86-sequent-bsd*" } } @@ -78,6 +85,7 @@ gdb_test "whatis v_char" \ "whatis char" setup_xfail "a29k-*-*" +if {!$gcc_compiled} then { setup_xfail "mips-sgi-irix*" } gdb_test "whatis v_signed_char" \ "type = $signed_char" \ "whatis signed char" |