From: Jeff Law Date: Sat, 12 Aug 1995 22:11:33 +0000 (+0000) Subject: * gdb.base/callfuncs.exp: Add xfails for the powerpc. X-Git-Tag: gdb-4_18~11156 X-Git-Url: http://review.tizen.org/git/?a=commitdiff_plain;h=5c6f833bb0a981df13d831932f56a5807f5ef126;p=external%2Fbinutils.git * gdb.base/callfuncs.exp: Add xfails for the powerpc. * gdb.base/corefile.exp: Likewise. * gdb.base/list.exp: Likewise. * gdb.base/scope.exp: Likewise. * gdb.base/siganls.exp: Likewise. * gdb.base/nodebug.exp: Add xfails for the powerpc. Handle aix4 compiler output. * gdb.base/whatis.exp: Likewise. --- diff --git a/gdb/testsuite/ChangeLog b/gdb/testsuite/ChangeLog index b023d10..6516f40 100644 --- a/gdb/testsuite/ChangeLog +++ b/gdb/testsuite/ChangeLog @@ -1,3 +1,15 @@ +Sat Aug 12 15:05:36 1995 Jeffrey A. Law + + * gdb.base/callfuncs.exp: Add xfails for the powerpc. + * gdb.base/corefile.exp: Likewise. + * gdb.base/list.exp: Likewise. + * gdb.base/scope.exp: Likewise. + * gdb.base/siganls.exp: Likewise. + + * gdb.base/nodebug.exp: Add xfails for the powerpc. Handle aix4 + compiler output. + * gdb.base/whatis.exp: Likewise. + start-sanitize-sh3e Fri Aug 11 13:36:20 1995 Jeff Law (law@snake.cs.utah.edu) diff --git a/gdb/testsuite/gdb.base/callfuncs.exp b/gdb/testsuite/gdb.base/callfuncs.exp index 5eee5e1..5b4eb3e 100644 --- a/gdb/testsuite/gdb.base/callfuncs.exp +++ b/gdb/testsuite/gdb.base/callfuncs.exp @@ -147,14 +147,17 @@ proc do_function_calls {} { # to avoid such problems in the common case. This may or may not help # the RS6000. setup_xfail "rs6000*-*-*" + setup_xfail "powerpc*-*-*" gdb_test "p t_func_values(add,func_val2)" " = 1" setup_xfail "rs6000*-*-*" + setup_xfail "powerpc*-*-*" gdb_test "p t_func_values(func_val1,doubleit)" " = 1" gdb_test "p t_call_add(func_val1,3,4)" " = 7" setup_xfail "rs6000*-*-*" + setup_xfail "powerpc*-*-*" gdb_test "p t_call_add(add,3,4)" " = 7" gdb_test "p t_enum_value1(enumval1)" " = 1" diff --git a/gdb/testsuite/gdb.base/corefile.exp b/gdb/testsuite/gdb.base/corefile.exp index 6f0810c..9421fcc 100644 --- a/gdb/testsuite/gdb.base/corefile.exp +++ b/gdb/testsuite/gdb.base/corefile.exp @@ -78,11 +78,12 @@ if $verbose>1 then { send_user "Spawning $GDB -nw $GDBFLAGS -core=$objdir/$subdir/corefile\n" } -# The RS/6000 gdb doesn't know how to extract the file name and +# The RS/6000 and powerpc gdb doesn't know how to extract the file name and # terminating signal from the core file, so all these tests are # expected to fail. setup_xfail "rs6000-*-*" +setup_xfail "powerpc-*-*" set oldtimeout $timeout set timeout [expr "$timeout + 60"] eval "spawn $GDB -nw $GDBFLAGS -core=$objdir/$subdir/corefile" @@ -107,6 +108,7 @@ if $verbose>1 then { setup_xfail "rs6000-*-*" +setup_xfail "powerpc-*-*" # This fails in p3, but not in devo. spawn $GDB -nw $GDBFLAGS $objdir/$subdir/$binfile -core=$objdir/$subdir/corefile expect { @@ -129,6 +131,7 @@ gdb_load $objdir/$subdir/$binfile # Test basic corefile recognition via core-file command. setup_xfail "rs6000-*-*" +setup_xfail "powerpc-*-*" send "core-file $objdir/$subdir/corefile\n" expect { -re "Core was generated by .*coremaker.*\r diff --git a/gdb/testsuite/gdb.base/list.exp b/gdb/testsuite/gdb.base/list.exp index 91bf215..e192290 100644 --- a/gdb/testsuite/gdb.base/list.exp +++ b/gdb/testsuite/gdb.base/list.exp @@ -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 @@ -44,7 +44,7 @@ proc set_listsize { arg } { send "set listsize $arg\n" expect { - -re "set listsize $arg\r\n$prompt $" {} + -re "set listsize $arg\[\r\n\]+$prompt $" {} -re ".*$prompt $" { fail "setting listsize to $arg" ; return 0 } timeout { fail "set listsize to $arg (timeout)" ; return 0 } } @@ -81,13 +81,17 @@ proc test_listsize {} { } # Show the default lines + # The second case is for optimized code, it is still correct. # This doesn't work for COFF targets. setup_xfail "a29k-*-udi" send "list\n" expect { -re "1\[ \t\]+#include \"list0.h\".*10\[ \t\]+x = 0;\r\n$prompt $" { - pass "show default lines around main" + pass "list default lines around main" + } + -re "2.*11\[ \t\]+foo .x\[+)\]+;\r\n$prompt $" { + pass "list default lines around main" } -re ".*$prompt $" { fail "list default lines around main" @@ -317,7 +321,7 @@ proc test_listsize {} { send "set listsize 0\n" expect { - -re "set listsize 0\r\n$prompt $" { + -re "set listsize 0\[\r\n\]+$prompt $" { setup_xfail "*-*-*" send "show listsize\n" expect { @@ -336,7 +340,7 @@ proc test_listsize {} { } send "list 1\n" expect { - -re "list 1\r\n$prompt $" { + -re "list 1\[\r\n\]+$prompt $" { pass "listsize of 0 suppresses output" } -re ".*$prompt $" { @@ -359,7 +363,7 @@ proc test_listsize {} { send "set listsize -1\n" expect { - -re "set listsize -1\r\n$prompt $" { + -re "set listsize -1\[\r\n\]+$prompt $" { send "show listsize\n" expect { -re "Number of source lines .* is unlimited.\r\n.*$prompt $" { @@ -378,7 +382,7 @@ proc test_listsize {} { -re "1\[ \t\]+#include .*\r\n39\[ \t\]+\}\r\n$prompt $" { pass "list line 1 with unlimited listsize" } - -re "list 1\r\n$prompt $" { + -re "list 1\[\r\n\]+$prompt $" { fail "listsize of -1 (unlimited) suppresses output" } timeout { @@ -504,7 +508,7 @@ proc test_list_function {} { -re "1\[ \t\]+#include .*8\[ \t\]+breakpoint\[(\]\[)\]+;\r\n$prompt $" { pass "list function in source file 1" } - -re "2\[ \t\]+.*11\[ \t\]+foo \[(\]+.*\[)\]+;\r\n$prompt $" { + -re "5\[ \t\]+int x;.*14\[ \t\]+foo \[(\]+.*\[)\]+;\r\n$prompt $" { pass "list function in source file 1" } -re ".*$prompt $" { fail "list main" ; return } @@ -533,6 +537,7 @@ proc test_list_function {} { # SunPRO cc is the third case. # FIXME This fails on DWARF setup_xfail "*-*-sysv4*" + setup_xfail "powerpc-*-*" send "list foo\n" expect { -re "2\[ \t\]+including file.*11\[ \t\]+bar \[(\]+.*\[)\]+;\r\n$prompt $" { @@ -714,7 +719,7 @@ proc test_list_filename_and_function {} { -re "1\[ \t\]+#include .*8\[ \t\]+breakpoint\[(\]\[)\]+;\r\n$prompt $" { incr testcnt } - -re "2\[ \t\]+.*11\[ \t\]+foo \[(\]+.*\[)\]+;\r\n$prompt $" { + -re "5\[ \t\]+int x;.*14\[ \t\]+foo \[(\]+.*\[)\]+;\r\n$prompt $" { pass "list function in source file 1" } -re ".*$prompt $" { fail "list list0.c:main" } @@ -731,7 +736,7 @@ proc test_list_filename_and_function {} { -re "36\[ \t\]+\}.*42\[ \t\]+\}\r\n$prompt $" { incr testcnt } - -re "36.*42\[ \t\]+\}\r\n$prompt $" { + -re "37.*42\[ \t\]+\}\r\n$prompt $" { incr testcnt } -re ".*$prompt $" { fail "list list0.c:unused" } @@ -745,6 +750,7 @@ proc test_list_filename_and_function {} { # 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" @@ -869,7 +875,6 @@ proc test_list_filename_and_function {} { } proc test_forward_search {} { - global timeout gdb_test "set listsize 4" "" # On SunOS4, this gives us lines 19-22. On AIX, it gives us @@ -887,10 +892,8 @@ proc test_forward_search {} { # In any case, we just want GDB to not crash if the line # being searched is extremely long. - set oldtimeout $timeout set timeout 30 gdb_test "search 1234" "" - set timeout $oldtimeout } # Start with a fresh gdb. diff --git a/gdb/testsuite/gdb.base/nodebug.exp b/gdb/testsuite/gdb.base/nodebug.exp index 9b978c1..551156c 100644 --- a/gdb/testsuite/gdb.base/nodebug.exp +++ b/gdb/testsuite/gdb.base/nodebug.exp @@ -32,70 +32,63 @@ if ![file exists $binfile] then { # being told they are ints or functions returning int like old # versions of gdb used to do. - # On alpha (and other ecoff systems, even stabs in ecoff) GCC - # puts out stProc and related symbols which cause GDB to think - # it knows the type. GDB probably could be fixed to do - # better, but for now xfail these tests. Irix5, even though - # it is ELF, counts as "ecoff" because gcc puts out a .mdebug - # section even without -g. Personally, I think that is pretty - # dubious, but maybe dbx requires it. - setup_xfail "alpha*-*-osf*" "mips*-*-irix*" "*-*-ultrix*" + # On alpha (and other ecoff systems) the native compilers put + # out debugging info for non-aggregate return values of functions + # even without -g, which should be accepted. + # Irix5, even though it is ELF, counts as "ecoff" because it + # encapsulates ecoff debugging info in a .mdebug section. + gdb_test "p top" \ - "{<(text variable|function), no debug info>} \[0-9a-fx]* " - setup_xfail "alpha*-*-osf*" "mips*-*-irix*" "*-*-ultrix*" - gdb_test "whatis top" "<(text variable|function), no debug info>" - setup_xfail "alpha*-*-osf*" "mips*-*-irix*" "*-*-ultrix*" - gdb_test "ptype top" "int \\((|)\\)" + "{(<(text variable|function), no debug info>|short \\(\\))} \[0-9a-fx]* " + gdb_test "whatis top" \ + "(<(text variable|function), no debug info>|short \\(\\))" + gdb_test "ptype top" "(short|int) \\((||, )\\)" - setup_xfail "alpha*-*-osf*" "mips*-*-irix*" "*-*-ultrix*" gdb_test "p middle" \ - "{<(text variable|function), no debug info>} \[0-9a-fx]* " - setup_xfail "alpha*-*-osf*" "mips*-*-irix*" "*-*-ultrix*" - gdb_test "whatis middle" "<(text variable|function), no debug info>" - setup_xfail "alpha*-*-osf*" "mips*-*-irix*" "*-*-ultrix*" - gdb_test "ptype middle" "int \\((|)\\)" + "{(<(text variable|function), no debug info>|short \\(\\))} \[0-9a-fx]* " + gdb_test "whatis middle" \ + "(<(text variable|function), no debug info>|short \\(\\))" + gdb_test "ptype middle" "(short|int) \\((||, )\\)" gdb_test "p dataglobal" "= 3" - setup_xfail "alpha*-*-osf*" "mips*-*-irix*" "*-*-ultrix*" gdb_test "whatis dataglobal" \ "<(data variable|variable), no debug info>" - setup_xfail "alpha*-*-osf*" "mips*-*-irix*" "*-*-ultrix*" gdb_test "ptype dataglobal" "<(data variable|variable), no debug info>" # The only symbol xcoff puts out for statics is for the TOC entry. # Possible, but hairy, for gdb to deal. Right now it doesn't, it # doesn't know the variables exist at all. setup_xfail "rs6000*-*-aix*" + setup_xfail "powerpc*-*-aix*" gdb_test "p datalocal" "= 4" setup_xfail "rs6000*-*-aix*" - setup_xfail "alpha*-*-osf*" "mips*-*-irix*" "*-*-ultrix*" + setup_xfail "powerpc*-*-aix*" gdb_test "whatis datalocal" "<(data variable|variable), no debug info>" setup_xfail "rs6000*-*-aix*" - setup_xfail "alpha*-*-osf*" "mips*-*-irix*" "*-*-ultrix*" + setup_xfail "powerpc*-*-aix*" gdb_test "ptype datalocal" "<(data variable|variable), no debug info>" gdb_test "p bssglobal" "= 0" - setup_xfail "alpha*-*-osf*" "mips*-*-irix*" "*-*-ultrix*" gdb_test "whatis bssglobal" "<(data variable|variable), no debug info>" - setup_xfail "alpha*-*-osf*" "mips*-*-irix*" "*-*-ultrix*" gdb_test "ptype bssglobal" "<(data variable|variable), no debug info>" setup_xfail "rs6000*-*-aix*" + setup_xfail "powerpc*-*-aix*" gdb_test "p bsslocal" "= 0" setup_xfail "rs6000*-*-aix*" - setup_xfail "alpha*-*-osf*" "mips*-*-irix*" "*-*-ultrix*" + setup_xfail "powerpc*-*-aix*" gdb_test "whatis bsslocal" "<(data variable|variable), no debug info>" setup_xfail "rs6000*-*-aix*" - setup_xfail "alpha*-*-osf*" "mips*-*-irix*" "*-*-ultrix*" + setup_xfail "powerpc*-*-aix*" gdb_test "ptype bsslocal" "<(data variable|variable), no debug info>" gdb_test "backtrace" "#0.*inner.*#1.*middle.*#2.*top.*#3.*main.*" \ - "backtrace in nodebug.exp" + "backtrace from inner in nodebug.exp" # Or if that doesn't work, at least hope for the external symbols # Commented out because if we aren't going to xfail the above test # ever, why bother with a weaker test? #gdb_test "backtrace" "#0.*inner.*#1.*#2.*top.*#3.*main.*" \ - # "backtrace in nodebug.exp for externals" + # "backtrace from inner in nodebug.exp for externals" # This test is not as obscure as it might look. `p getenv ("TERM")' # is a real-world example, at least on many systems. @@ -104,7 +97,8 @@ if ![file exists $binfile] then { # Now, try that we can give names of file-local symbols which happen # to be unique, and have it still work if [runto middle] then { - gdb_test "backtrace" "#0.*middle.*#1.*top.*#2.*main.*" + gdb_test "backtrace" "#0.*middle.*#1.*top.*#2.*main.*" \ + "backtrace from middle in nodebug.exp" } } } diff --git a/gdb/testsuite/gdb.base/scope.exp b/gdb/testsuite/gdb.base/scope.exp index d77e573..8dc66d0 100644 --- a/gdb/testsuite/gdb.base/scope.exp +++ b/gdb/testsuite/gdb.base/scope.exp @@ -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 @@ -120,6 +120,8 @@ proc test_at_main {} { # Print scope0.c::filelocal_ro, which is 201 + # No clue why the powerpc fails this test. + setup_xfail "powerpc-*-*" send "print filelocal_ro\n" expect { -re "\\\$$decimal = 201\r\n$prompt $" { pass "print filelocal_ro" } @@ -130,6 +132,7 @@ proc test_at_main {} { } setup_xfail "rs6000-*-*" + setup_xfail "powerpc-*-*" send "print 'scope0.c'::filelocal_ro\n" expect { -re "\\\$$decimal = 201\r\n$prompt $" { @@ -314,7 +317,7 @@ proc test_at_foo {} { } } - # Print scope0.c::filelocal_bss, which is 101 + # Print scope0.c::filelocal_bss, which is 101 setup_xfail "rs6000-*-*" send "print 'scope0.c'::filelocal_bss\n" @@ -336,9 +339,10 @@ proc test_at_foo {} { } } - # Print scope0.c::filelocal_ro, which is 201 + # Print scope0.c::filelocal_ro, which is 201 setup_xfail "rs6000-*-*" + setup_xfail "powerpc-*-*" send "print 'scope0.c'::filelocal_ro\n" expect { -re "\\\$$decimal = 201\r\n$prompt $" { pass "print 'scope0.c'::filelocal_ro" } @@ -352,205 +356,153 @@ proc test_at_foo {} { } } - # Print scope1.c::filelocal, which is 2 + gdb_test "print filelocal" "\\\$$decimal = 2" "print filelocal at foo" - send "print filelocal\n" - expect { - -re "\\\$$decimal = 2\r\n$prompt $" { pass "print filelocal" } - -re "$prompt $" { fail "print filelocal" ; return } - timeout { - fail "(timeout) print filelocal" ; return - } - } + # Print scope1.c::filelocal, which is 2 setup_xfail "rs6000-*-*" send "print 'scope1.c'::filelocal\n" expect { - -re "\\\$$decimal = 2\r\n$prompt $" { pass "print 'scope1.c'::filelocal" } + -re "\\\$$decimal = 2\r\n$prompt $" { + pass "print 'scope1.c'::filelocal at foo" + } -re "No symbol \"scope1.c\" in current context.*$prompt $" { send "print '$srcdir/$subdir/scope1.c'::filelocal\n" exp_continue } - -re "$prompt $" { fail "print 'scope1.c'::filelocal" ; return } + -re "$prompt $" { fail "print 'scope1.c'::filelocal at foo" ; return } timeout { - fail "(timeout) print 'scope1.c'::filelocal" ; return + fail "(timeout) print 'scope1.c'::filelocal at foo" ; return } } - # Print scope1.c::filelocal_bss, which is 102 - - send "print filelocal_bss\n" - expect { - -re "\\\$$decimal = 102\r\n$prompt $" { pass "print filelocal_bss" } - -re "$prompt $" { fail "print filelocal_bss" ; return } - timeout { - fail "(timeout) print filelocal_bss" ; return - } - } + gdb_test "print filelocal_bss" "\\\$$decimal = 102" \ + "print filelocal_bss at foo" setup_xfail "rs6000-*-*" send "print 'scope1.c'::filelocal_bss\n" expect { - -re "\\\$$decimal = 102\r\n$prompt $" { pass "print 'scope1.c'::filelocal_bss" } + -re "\\\$$decimal = 102\r\n$prompt $" { + pass "print 'scope1.c'::filelocal_bss at foo" + } -re "No symbol \"scope1.c\" in current context.*$prompt $" { send "print '$srcdir/$subdir/scope1.c'::filelocal_bss\n" exp_continue } - -re "$prompt $" { fail "print 'scope1.c'::filelocal_bss" ; return } + -re "$prompt $" { fail "print 'scope1.c'::filelocal_bss at foo" } timeout { - fail "(timeout) print 'scope1.c'::filelocal_bss" ; return + fail "(timeout) print 'scope1.c'::filelocal_bss at foo" } } - # Print scope1.c::filelocal_ro, which is 202 - - send "print filelocal_ro\n" - expect { - -re "\\\$$decimal = 202\r\n$prompt $" { pass "print filelocal_ro" } - -re "$prompt $" { fail "print filelocal_ro" ; return } - timeout { - fail "(timeout) print filelocal_ro" ; return - } - } + gdb_test "print filelocal_ro" "\\\$$decimal = 202" \ + "print filelocal_ro at foo" setup_xfail "rs6000-*-*" send "print 'scope1.c'::filelocal_ro\n" expect { - -re "\\\$$decimal = 202\r\n$prompt $" { pass "print 'scope1.c'::filelocal_ro" } + -re "\\\$$decimal = 202\r\n$prompt $" { pass "print 'scope1.c'::filelocal_ro at foo" } -re "No symbol \"scope1.c\" in current context.*$prompt $" { send "print '$srcdir/$subdir/scope1.c'::filelocal_ro\n" exp_continue } - -re "$prompt $" { fail "print 'scope1.c'::filelocal_ro" ; return } + -re "$prompt $" { fail "print 'scope1.c'::filelocal_ro at foo" } timeout { - fail "(timeout) print 'scope1.c'::filelocal_ro" ; return + fail "(timeout) print 'scope1.c'::filelocal_ro at foo" } } # Print scope1.c::foo::funclocal, which is 3 - send "print funclocal\n" - expect { - -re "\\\$$decimal = 3\r\n$prompt $" { pass "print funclocal" } - -re "$prompt $" { fail "print funclocal" ; return } - timeout { - fail "(timeout) print funclocal" ; return - } - } + gdb_test "print funclocal" "\\\$$decimal = 3" "print funclocal at foo" - send "print foo::funclocal\n" - expect { - -re "\\\$$decimal = 3\r\n$prompt $" { pass "print foo::funclocal" } - -re "$prompt $" { fail "print foo::funclocal" ; return } - timeout { - fail "(timeout) print foo::funclocal" ; return - } - } + gdb_test "print foo::funclocal" "\\\$$decimal = 3" \ + "print foo::funclocal at foo" setup_xfail "rs6000-*-*" send "print 'scope1.c'::foo::funclocal\n" expect { - -re "\\\$$decimal = 3\r\n$prompt $" { pass "print 'scope1.c'::foo::funclocal" } + -re "\\\$$decimal = 3\r\n$prompt $" { + pass "print 'scope1.c'::foo::funclocal at foo" + } -re "No symbol \"scope1.c\" in current context.*$prompt $" { send "print '$srcdir/$subdir/scope1.c'::foo::funclocal\n" exp_continue } - -re "$prompt $" { fail "print 'scope1.c'::foo::funclocal" ; return } + -re "$prompt $" { fail "print 'scope1.c'::foo::funclocal at foo" } timeout { - fail "(timeout) print 'scope1.c'::foo::funclocal" ; return + fail "(timeout) print 'scope1.c'::foo::funclocal at foo" } } # Print scope1.c::foo::funclocal_bss, which is 103 - send "print funclocal_bss\n" - expect { - -re "\\\$$decimal = 103\r\n$prompt $" { pass "print funclocal_bss" } - -re "$prompt $" { fail "print funclocal_bss" ; return } - timeout { - fail "(timeout) print funclocal_bss" ; return - } - } + gdb_test "print funclocal_bss" "\\\$$decimal = 103" \ + "print funclocal_bss at foo" - send "print foo::funclocal_bss\n" - expect { - -re "\\\$$decimal = 103\r\n$prompt $" { pass "print foo::funclocal_bss" } - -re "$prompt $" { fail "print foo::funclocal_bss" ; return } - timeout { - fail "(timeout) print foo::funclocal_bss" ; return - } - } + gdb_test "print foo::funclocal_bss" "\\\$$decimal = 103" \ + "print foo::funclocal_bss at foo" setup_xfail "rs6000-*-*" send "print 'scope1.c'::foo::funclocal_bss\n" expect { - -re "\\\$$decimal = 103\r\n$prompt $" { pass "print 'scope1.c'::foo::funclocal_bss" } + -re "\\\$$decimal = 103\r\n$prompt $" { + pass "print 'scope1.c'::foo::funclocal_bss at foo" + } -re "No symbol \"scope1.c\" in current context.*$prompt $" { send "print '$srcdir/$subdir/scope1.c'::foo::funclocal_bss\n" exp_continue } - -re "$prompt $" { fail "print 'scope1.c'::foo::funclocal_bss" ; return } + -re "$prompt $" { + fail "print 'scope1.c'::foo::funclocal_bss at foo" + } timeout { - fail "(timeout) print 'scope1.c'::foo::funclocal_bss" ; return + fail "(timeout) print 'scope1.c'::foo::funclocal_bss at foo" } } # Print scope1.c::foo::funclocal_ro, which is 203 - send "print funclocal_ro\n" - expect { - -re "\\\$$decimal = 203\r\n$prompt $" { pass "print funclocal_ro" } - -re "$prompt $" { fail "print funclocal_ro" ; return } - timeout { - fail "(timeout) print funclocal_ro" ; return - } - } + gdb_test "print funclocal_ro" "\\\$$decimal = 203" \ + "print funclocal_ro at foo" - send "print foo::funclocal_ro\n" - expect { - -re "\\\$$decimal = 203\r\n$prompt $" { pass "print foo::funclocal_ro" } - -re "$prompt $" { fail "print foo::funclocal_ro" ; return } - timeout { - fail "(timeout) print foo::funclocal_ro" ; return - } - } + gdb_test "print foo::funclocal_ro" "\\\$$decimal = 203" \ + "print foo::funclocal_ro at foo" setup_xfail "rs6000-*-*" send "print 'scope1.c'::foo::funclocal_ro\n" expect { - -re "\\\$$decimal = 203\r\n$prompt $" { pass "print 'scope1.c'::foo::funclocal_ro" } + -re "\\\$$decimal = 203\r\n$prompt $" { + pass "print 'scope1.c'::foo::funclocal_ro at foo" + } -re "No symbol \"scope1.c\" in current context.*$prompt $" { send "print '$srcdir/$subdir/scope1.c'::foo::funclocal_ro\n" exp_continue } - -re "$prompt $" { fail "print 'scope1.c'::foo::funclocal_ro" ; return } + -re "$prompt $" { fail "print 'scope1.c'::foo::funclocal_ro at foo" } timeout { - fail "(timeout) print 'scope1.c'::foo::funclocal_ro" ; return + fail "(timeout) print 'scope1.c'::foo::funclocal_ro at foo" } } # Print scope1.c::bar::funclocal, which is 4 - send "print bar::funclocal\n" - expect { - -re "\\\$$decimal = 4\r\n$prompt $" { pass "print bar::funclocal" } - -re "$prompt $" { fail "print bar::funclocal" ; return } - timeout { - fail "(timeout) print bar::funclocal" ; return - } - } + gdb_test "print bar::funclocal" "\\\$$decimal = 4" \ + "print bar::funclocal at foo" setup_xfail "rs6000-*-*" send "print 'scope1.c'::bar::funclocal\n" expect { - -re "\\\$$decimal = 4\r\n$prompt $" { pass "print 'scope1.c'::bar::funclocal" } + -re "\\\$$decimal = 4\r\n$prompt $" { + pass "print 'scope1.c'::bar::funclocal at foo" + } -re "No symbol \"scope1.c\" in current context.*$prompt $" { send "print '$srcdir/$subdir/scope1.c'::bar::funclocal\n" exp_continue } - -re "$prompt $" { fail "print 'scope1.c'::bar::funclocal" ; return } + -re "$prompt $" { fail "print 'scope1.c'::bar::funclocal at foo" } timeout { - fail "(timeout) print 'scope1.c'::bar::funclocal" ; return + fail "(timeout) print 'scope1.c'::bar::funclocal at foo" } } } @@ -611,6 +563,7 @@ proc test_at_bar {} { # Print scope0.c::filelocal_ro, which is 201 setup_xfail "rs6000-*-*" + setup_xfail "powerpc-*-*" send "print 'scope0.c'::filelocal_ro\n" expect { -re "\\\$$decimal = 201\r\n$prompt $" { pass "print 'scope0.c'::filelocal_ro" } @@ -843,8 +796,8 @@ proc test_at_bar {} { } } -# FIXME: This test was originally part of some local scope resolution -# tests. It probably belongs somewhere else now. +# This test has little to do with local scopes, but it is in scope.exp anyway. +# That's life. proc test_at_autovars {} { global prompt @@ -915,129 +868,37 @@ proc test_at_localscopes {} { # Should be at first (outermost) scope. Check values. - send "print localval\n" - expect { - -re ".* = 10\r\n$prompt $" { pass "bad value for localval, outer scope" } - -re "$prompt $" { fail "bad value for localval, outer scope" ; return } - default { - fail "(timeout) bad value for localval, outer scope" ; return - } - } - send "print localval1\n" - expect { - -re ".* = 11\r\n$prompt $" { pass "bad value for localval1" } - -re "$prompt $" { fail "bad value for localval1" ; return } - timeout { fail "(timeout) bad value for localval1" ; return } - } - send "print localval2\n" - expect { - -re "No symbol \"localval2\" in current context.\r\n$prompt $" { - pass "bad value for localval2" - } - -re "$prompt $" { fail "bad value for localval2" ; return } - timeout { fail "(timeout) bad value for localval2" ; return } - } - send "print localval3\n" - expect { - -re "No symbol \"localval3\" in current context.\r\n$prompt $" { - pass "bad value for localval3" - } - -re "$prompt $" { fail "bad value for localval3" ; return } - timeout { fail "(timeout) bad value for localval3" ; return } - } + gdb_test "print localval" " = 10" "print localval, outer scope" + gdb_test "print localval1" " = 11" "print localval1, outer scope" + gdb_test "print localval2" "No symbol \"localval2\" in current context." \ + "print localval2, outer scope" + gdb_test "print localval3" "No symbol \"localval3\" in current context." \ + "print localval3, outer scope" - send "cont\n" - expect { - -re "Break.* marker3 \\(\\) at .*:$decimal.*$prompt $" { - send "up\n" - expect { - -re ".*$prompt $" {} - timeout { fail "up from marker3" ; return } - } - } - -re "$prompt $" { fail "continue to marker3" ; return } - timeout { fail "(timeout) continue to marker3" ; return } - } + if [gdb_test "cont" "Break.* marker3 \\(\\) at .*:$decimal.*" \ + "continue to marker3 in scope.exp"] then { return } + if [gdb_test "up" "" "up from marker3 in scope.exp"] then { return } # Should be at next (first nested) scope. Check values. - send "print localval\n" - expect { - -re ".* = 20\r\n$prompt $" { pass "bad value for localval, first nested scope" } - -re "$prompt $" { - fail "bad value for localval, first nested scope" ; return - } - timeout { - fail "(timeout) bad value for localval, first nested scope" ; - return - } - } - send "print localval1\n" - expect { - -re ".* = 11\r\n$prompt $" { pass "bad value for localval1" } - -re "$prompt $" { fail "bad value for localval1" ; return } - timeout { fail "(timeout) bad value for localval1" ; return } - } - send "print localval2\n" - expect { - -re ".* = 12\r\n$prompt $" { pass "bad value for localval2" } - -re "$prompt $" { fail "bad value for localval2" ; return } - timeout { fail "(timeout) bad value for localval2" ; return } - } - send "print localval3\n" - expect { - -re "No symbol \"localval3\" in current context.\r\n$prompt $" { - pass "bad value for localval3" - } - -re "$prompt $" { fail "bad value for localval3" ; return } - timeout { fail "(timeout) bad value for localval3" ; return } - } + gdb_test "print localval" " = 20" \ + "print localval, first nested scope" + gdb_test "print localval1" " = 11" "print localval1, first nested scope" + gdb_test "print localval2" " = 12" "print localval2, first nested scope" + gdb_test "print localval3" "No symbol \"localval3\" in current context." \ + "print localval3, first nested scope" # This test will only fail if the file was compiled by gcc, but # there's no way to check that. setup_xfail "a29k-*-udi" 2423 - send "cont\n" - expect { - -re "Break.* marker4.*at .*:$decimal.*$prompt $" { - pass "continue to marker4" - send "up\n" - expect { - -re ".*$prompt $" { pass "up from marker4" } - timeout { fail "up from marker4" ; return } - } - } - -re "$prompt $" { fail "continue to marker4" ; return } - timeout { fail "(timeout) continue to marker4" ; return } - } - - send "print localval\n" - expect { - -re ".* = 30\r\n$prompt $" { pass "bad value for localval, innermost scope" } - -re "$prompt $" { - fail "bad value for localval, innermost scope" ; return - } - timeout { - fail "(timeout) bad value for localval, innermost scope" ; return - } - } - send "print localval1\n" - expect { - -re ".* = 11\r\n$prompt $" { pass "bad value for localval1" } - -re "$prompt $" { fail "bad value for localval1" ; return } - timeout { fail "(timeout) bad value for localval1" ; return } - } - send "print localval2\n" - expect { - -re ".* = 12\r\n$prompt $" { pass "bad value for localval2" } - -re "$prompt $" { fail "bad value for localval2" ; return } - timeout { fail "(timeout) bad value for localval2" ; return } - } - send "print localval3\n" - expect { - -re ".* = 13\r\n$prompt $" { pass "bad value for localval3" } - -re "$prompt $" { fail "bad value for localval3" ; return } - timeout { fail "(timeout) bad value for localval3" ; return } - } + if [gdb_test "cont" "Break.* marker4.*at .*:$decimal.*" \ + "continue to marker4 in scope.exp"] then { return } + if [gdb_test "up" "" "up from marker4 in scope.exp"] then { return } + + gdb_test "print localval" " = 30" "print localval, innermost scope" + gdb_test "print localval1" " = 11" "print localval1, innermost scope" + gdb_test "print localval2" " = 12" "print localval2, innermost scope" + gdb_test "print localval3" " = 13" "print localval3, innermost scope" } # Start with a fresh gdb. @@ -1056,6 +917,7 @@ if [istarget "*-*-vxworks*"] { # AIX--sections get mapped to the same address so we can't get the right one. setup_xfail "rs6000-*-*" +setup_xfail "powerpc-*-*" gdb_test "print 'scope0.c'::filelocal_ro" "= 201" @@ -1084,7 +946,7 @@ setup_xfail "rs6000-*-*" gdb_test "print 'scope0.c'::filelocal" "= 1" \ "print 'scope0.c'::filelocal before run" -if [runto main] then { test_at_main } +if [runto_main] then { test_at_main } if [istarget "mips-idt-*"] then { # Restart because IDT/SIM runs out of file descriptors. gdb_exit diff --git a/gdb/testsuite/gdb.base/signals.exp b/gdb/testsuite/gdb.base/signals.exp index 6e3bd97..50ed0fe 100644 --- a/gdb/testsuite/gdb.base/signals.exp +++ b/gdb/testsuite/gdb.base/signals.exp @@ -232,6 +232,7 @@ proc signal_tests_1 {} { setup_xfail "sparc-*-*" setup_xfail "rs6000-*-*" + setup_xfail "powerpc-*-*" # A faulty bash will not step the inferior into sigtramp on sun3. if {$bash_bug} then { @@ -331,8 +332,9 @@ if [runto_main] then { # Haven't investigated this xfail setup_xfail "rs6000-*-*" + setup_xfail "powerpc-*-*" gdb_test "p count" "= 2" "p count #1 in signals.exp" - if [istarget "rs6000-*-*"] { return 0 } + if { [istarget "rs6000-*-*"] || [istarget "powerpc-*-*"] } { return 0 } gdb_test "condition \$handler_breakpoint_number" "now unconditional\\." gdb_test "next" "alarm \\(.*" "next to alarm #2 in signals.exp" diff --git a/gdb/testsuite/gdb.base/whatis.exp b/gdb/testsuite/gdb.base/whatis.exp index 56d9073..4406365 100644 --- a/gdb/testsuite/gdb.base/whatis.exp +++ b/gdb/testsuite/gdb.base/whatis.exp @@ -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 @@ -73,15 +73,8 @@ proc setup_xfail_on_long_vs_int {} { # uses in the stabs. So we need to deal with names both from gcc and # native compilers. # -# On the i960, which defaults to unsigned characters, gdb -# misinterprets char as unsigned char. -# Likewise with the rs6000; the compiler doesn't give us enough information -# to distinguish between char and unsigned char -setup_xfail "rs6000-*-*" -setup_xfail "i960-*-*" 1821 -setup_xfail "mips-idt-*" "mips-sgi-*" "a29k-*-*" gdb_test "whatis v_char" \ - "type = char" \ + "type = (unsigned char|char)" \ "whatis char" setup_xfail "a29k-*-*" @@ -110,7 +103,7 @@ gdb_test "whatis v_int" \ "whatis int" gdb_test "whatis v_signed_int" \ - "type = int" \ + "type = (signed |)int" \ "whatis signed int" gdb_test "whatis v_unsigned_int" \ @@ -128,7 +121,7 @@ setup_xfail_on_long_vs_int # AIX xlc gets this wrong and unsigned long right. Go figure. if {!$gcc_compiled} then {setup_xfail "rs6000-*-aix*"} gdb_test "whatis v_signed_long" \ - "type = (long|long int)" \ + "type = (signed |)(long|long int)" \ "whatis signed long" setup_xfail_on_long_vs_int @@ -167,7 +160,7 @@ gdb_test "whatis v_short_array" \ pass "whatis short array" gdb_test "whatis v_signed_short_array" \ - "type = (short|short int) \\\[2\\\]" \ + "type = (signed |)(short|short int) \\\[2\\\]" \ "whatis signed short array" gdb_test "whatis v_unsigned_short_array" \ @@ -179,7 +172,7 @@ gdb_test "whatis v_int_array" \ "whatis int array" gdb_test "whatis v_signed_int_array" \ - "type = int \\\[2\\\]" \ + "type = (signed |)int \\\[2\\\]" \ "whatis signed int array" gdb_test "whatis v_unsigned_int_array" \ @@ -231,7 +224,7 @@ gdb_test "whatis v_short_pointer" \ pass "whatis short pointer" gdb_test "whatis v_signed_short_pointer" \ - "type = (short|short int) \\*" \ + "type = (signed |)(short|short int) \\*" \ "whatis signed short pointer" gdb_test "whatis v_unsigned_short_pointer" \ @@ -243,7 +236,7 @@ gdb_test "whatis v_int_pointer" \ "whatis int pointer" gdb_test "whatis v_signed_int_pointer" \ - "type = int \\*" \ + "type = (signed |)int \\*" \ "whatis signed int pointer" gdb_test "whatis v_unsigned_int_pointer" \ @@ -311,7 +304,7 @@ gdb_test "whatis v_short_func" \ "whatis short function" gdb_test "whatis v_signed_short_func" \ - "type = short (int |)\\(\\)" \ + "type = (signed |)short (int |)\\(\\)" \ "whatis signed short function" gdb_test "whatis v_unsigned_short_func" \ @@ -323,7 +316,7 @@ gdb_test "whatis v_int_func" \ "whatis int function" gdb_test "whatis v_signed_int_func" \ - "type = int \\(\\)" \ + "type = (signed |)int \\(\\)" \ "whatis signed int function" gdb_test "whatis v_unsigned_int_func" \ @@ -335,7 +328,7 @@ gdb_test "whatis v_long_func" \ "whatis long function" gdb_test "whatis v_signed_long_func" \ - "type = (int|long|long int) \\(\\)" \ + "type = (signed |)(int|long|long int) \\(\\)" \ "whatis signed long function" gdb_test "whatis v_unsigned_long_func" \