From: Fred Fish Date: Sat, 16 Mar 1996 19:51:15 +0000 (+0000) Subject: * gdb.base/break.exp: Fix pattern for matching "Delete all X-Git-Url: http://drtracing.org/?a=commitdiff_plain;h=1b5b958124f4cfe37672eacebc284194f0e21acf;p=deliverable%2Fbinutils-gdb.git * gdb.base/break.exp: Fix pattern for matching "Delete all breakpoints (y or n) ". Add "mips-dec-ultrix*" to setup_xfail for deleting all breakpoints test. Fix various timeout messages to include "(timeout)". * gdb.base/callfuncs.exp: Add "i*86-*-sysv4*" to setup_xfail for "p t_float_values2(3.14159,float_val2)". * gdb.base/funcargs.exp: Remove "mips-sgi-irix4*" setup_xfail for "continue to call2g" when gcc compiled. * gdb.base/langs.exp: Remove "i*86-*-sysv4*" setup_xfail for "up to foo in langs.exp", "show language at foo in langs.exp", "show language at cppsub_ in langs.exp", "up to fsub in langs.exp", and "show language at fsub in langs.exp". * gdb.base/list.exp: Remove "*-*-sysv4*" setup_xfail for "list line 1 in include file", "list message for lines past EOF", "list function in include file", "list list0.h:foo", and "list filename:function; nonexistant function". * gdb.base/ptype.exp: Change "i*86-*-sysv4*" setup_xfail for "whatis unnamed typedef'd enum (compiler bug in IBM's xlc)" and "ptype t_char_array" to be for native cc only. --- diff --git a/gdb/testsuite/ChangeLog b/gdb/testsuite/ChangeLog index 90ff170acc..452150132c 100644 --- a/gdb/testsuite/ChangeLog +++ b/gdb/testsuite/ChangeLog @@ -1,3 +1,25 @@ +Fri Mar 15 17:49:57 1996 Fred Fish (fnf@cygnus.com) + + * gdb.base/break.exp: Fix pattern for matching "Delete all + breakpoints (y or n) ". Add "mips-dec-ultrix*" to + setup_xfail for deleting all breakpoints test. Fix various + timeout messages to include "(timeout)". + * gdb.base/callfuncs.exp: Add "i*86-*-sysv4*" to setup_xfail + for "p t_float_values2(3.14159,float_val2)". + * gdb.base/funcargs.exp: Remove "mips-sgi-irix4*" setup_xfail + for "continue to call2g" when gcc compiled. + * gdb.base/langs.exp: Remove "i*86-*-sysv4*" setup_xfail for + "up to foo in langs.exp", "show language at foo in langs.exp", + "show language at cppsub_ in langs.exp", "up to fsub in langs.exp", + and "show language at fsub in langs.exp". + * gdb.base/list.exp: Remove "*-*-sysv4*" setup_xfail for + "list line 1 in include file", "list message for lines past EOF", + "list function in include file", "list list0.h:foo", and + "list filename:function; nonexistant function". + * gdb.base/ptype.exp: Change "i*86-*-sysv4*" setup_xfail for + "whatis unnamed typedef'd enum (compiler bug in IBM's xlc)" + and "ptype t_char_array" to be for native cc only. + Fri Mar 15 16:17:22 1996 Fred Fish * gdb.base/corefile.exp: Remove "alpha-dec-osf2*" native compiled diff --git a/gdb/testsuite/gdb.base/langs.exp b/gdb/testsuite/gdb.base/langs.exp index 7ac954be4c..8671e38f97 100644 --- a/gdb/testsuite/gdb.base/langs.exp +++ b/gdb/testsuite/gdb.base/langs.exp @@ -5,11 +5,29 @@ if $tracelevel then { set prms_id 0 set bug_id 0 -set binfile $objdir/$subdir/langs +set testfile langs +set binfile ${objdir}/${subdir}/${testfile} +if { [compile "${srcdir}/${subdir}/langs0.c -g -c -o ${binfile}0.o "] != "" } { + perror "Couldn't compile langs0.c to object" + return -1 +} +if { [compile "${srcdir}/${subdir}/langs1.c -g -c -o ${binfile}1.o "] != "" } { + perror "Couldn't compile langs1.c to object" + return -1 +} +if { [compile "${srcdir}/${subdir}/langs2.c -g -c -o ${binfile}2.o "] != "" } { + perror "Couldn't compile langs2.c to object" + return -1 +} +if { [compile "${binfile}0.o ${binfile}1.o ${binfile}2.o -o ${binfile}"] != "" } { + perror "Couldn't link langs." + return -1 +} -if ![file exists $binfile] then { - perror "$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 @@ -17,12 +35,14 @@ gdb_start gdb_reinitialize_dir $srcdir/$subdir gdb_load $binfile -source gdb.base/langs0.ci +source ${binfile}.ci gdb_test "b langs0" {Function "langs0" not defined\.} \ "break on nonexistent function in langs.exp" if [runto csub] then { + global noresults + gdb_test "show language" "currently c\".*" \ "show language at csub in langs.exp" # On some machines, foo doesn't get demangled because the N_SOL for @@ -30,32 +50,29 @@ if [runto csub] then { # the following regexps are kludged to accept foo__Fi as well as foo, # even though only the latter is correct. I haven't tried to xfail it # because it depends on details of the compiler. + + if {!$gcc_compiled} then { setup_xfail "hppa*-*-hpux*" } gdb_test "bt" "#0.*csub.*#1.*(foo|foo__Fi) \\(.*#2.*cppsub_ .*#3.*fsub.*#4.*langs0__2do \\(.*#5 \[0-9a-fx\]* in main.*" "backtrace in langs.exp" if {!$gcc_compiled} then { setup_xfail "rs6000-*-*" } - setup_xfail "i*86-*-sysv4*" gdb_test "up" ".* in (foo|foo__Fi) .* at langs2\\.cxx.*return csub \\(.*" \ "up to foo in langs.exp" - setup_xfail "i*86-*-sysv4*" gdb_test "show language" "currently c\\+\\+.*" \ "show language at foo in langs.exp" - setup_xfail "i*86-*-sysv4*" if {!$gcc_compiled} then { setup_xfail "rs6000-*-*" } gdb_test "up" ".* in cppsub_ .* at langs2\\.cxx.*return foo \\(.*" \ "up to cppsub_ in langs.exp" - setup_xfail "i*86-*-sysv4*" gdb_test "show language" "currently c\\+\\+.*" \ "show language at cppsub_ in langs.exp" - setup_xfail "i*86-*-sysv4*" if {!$gcc_compiled} then { setup_xfail "rs6000-*-*" } gdb_test "up" ".* in fsub.* at langs1\\.f.*return \\(cppsub .*" \ "up to fsub in langs.exp" - setup_xfail "i*86-*-sysv4*" gdb_test "show language" "currently fortran.*" \ "show language at fsub in langs.exp" + if {!$gcc_compiled} then { setup_xfail "hppa*-*-hpux*" } gdb_test "up" ".* in langs0__2do .* at .*langs0\\.c.*return fsub.*" \ "up to langs0__2do in langs.exp" gdb_test "show language" "currently c\".*" \ @@ -66,6 +83,8 @@ if [runto csub] then { gdb_test "show language" "currently c\".*" \ "show language at main in langs.exp" + if $noresults==1 then { return } + gdb_test "cont" "Program exited normally\\." \ "continue to exit in langs.exp" } diff --git a/gdb/testsuite/gdb.base/list.exp b/gdb/testsuite/gdb.base/list.exp index e192290330..82d4fc2521 100644 --- a/gdb/testsuite/gdb.base/list.exp +++ b/gdb/testsuite/gdb.base/list.exp @@ -26,12 +26,25 @@ if $tracelevel then { set prms_id 0 set bug_id 0 -set binfile "list" -set srcfile $binfile.c +set testfile "list" +set binfile ${objdir}/${subdir}/${testfile} +if { [compile "${srcdir}/${subdir}/list0.c -g -c -o ${binfile}0.o"] != "" } { + perror "Couldn't compile ${testfile}0.c to object" + return -1 +} +if { [compile "${srcdir}/${subdir}/list1.c -g -c -o ${binfile}1.o"] != "" } { + perror "Couldn't compile ${testfile}1.c to object" + return -1 +} +if { [compile "${binfile}0.o ${binfile}1.o -o ${binfile}"] != "" } { + perror "Couldn't link ${testfile}." + 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 } # @@ -406,8 +419,6 @@ proc test_listsize {} { proc test_list_include_file {} { global prompt - # FIXME This fails on DWARF. - setup_xfail "*-*-sysv4*" # FIXME Fails for COFF as well, I think. setup_xfail "a29k-*-udi" send "list list0.h:1\n" @@ -426,8 +437,6 @@ proc test_list_include_file {} { } } - # FIXME fails on DWARF - setup_xfail "*-*-sysv4*" # FIXME Fails for COFF as well, I think. setup_xfail "a29k-*-udi" send "list list0.h:100\n" @@ -497,11 +506,11 @@ proc test_list_filename_and_number {} { proc test_list_function {} { global prompt + global gcc_compiled # gcc appears to generate incorrect debugging information for code # in include files, which breaks this test. # SunPRO cc is the second case below, it's also correct. - setup_xfail "rs6000-*-*" 1804 setup_xfail "a29k-*-udi" send "list main\n" expect { @@ -535,9 +544,8 @@ proc test_list_function {} { # Test "list function" for C include file # Ultrix gdb is the second case, still correct. # SunPRO cc is the third case. - # FIXME This fails on DWARF - setup_xfail "*-*-sysv4*" setup_xfail "powerpc-*-*" + if {$gcc_compiled} then { setup_xfail "rs6000-*-*" } send "list foo\n" expect { -re "2\[ \t\]+including file.*11\[ \t\]+bar \[(\]+.*\[)\]+;\r\n$prompt $" { @@ -712,7 +720,6 @@ proc test_list_filename_and_function {} { # gcc appears to generate incorrect debugging information for code # in include files, which breaks this test. # SunPRO cc is the second case below, it's also correct. - setup_xfail "rs6000-*-*" 1804 setup_xfail "a29k-*-udi" send "list list0.c:main\n" expect { @@ -748,10 +755,8 @@ proc test_list_filename_and_function {} { # in include files, which breaks this test. # Ultrix gdb is the second case, one line different but still correct. # SunPRO cc is the third case. - # FIXME This fails on DWARF setup_xfail "rs6000-*-*" 1804 setup_xfail "powerpc-*-*" 1804 - setup_xfail "*-*-sysv4*" # FIXME Fails for COFF as well, I think. setup_xfail "a29k-*-udi" send "list list0.h:foo\n" @@ -852,10 +857,6 @@ proc test_list_filename_and_function {} { } } - # The following test takes the FIXME result on most systems using - # DWARF. It doesn't know how to find functions in include files. - - setup_xfail "*-*-sysv4*" send "list list0.h:foobar\n" expect { -re "Function \"foobar\" not defined.\r\n$prompt $" { @@ -901,7 +902,9 @@ proc test_forward_search {} { gdb_exit gdb_start gdb_reinitialize_dir $srcdir/$subdir -gdb_load $objdir/$subdir/$binfile +gdb_load ${binfile} + +source ${binfile}.ci if $usestubs { send "step\n"