* 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.
This commit is contained in:
Jeff Law 1995-08-12 22:11:33 +00:00
parent 07781ac0c3
commit 5c6f833bb0
8 changed files with 162 additions and 290 deletions

View file

@ -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 }
}
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 }
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 }
}
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