aboutsummaryrefslogtreecommitdiff
path: root/gdb/testsuite/gdb.base/scope.exp
diff options
context:
space:
mode:
authorFred Fish <fnf@specifix.com>1995-08-16 07:37:19 +0000
committerFred Fish <fnf@specifix.com>1995-08-16 07:37:19 +0000
commitce102e96e626d98ff540720807e49abd9bec3d20 (patch)
treeaea227e348975ab7e58e6118f84398b4e5b61241 /gdb/testsuite/gdb.base/scope.exp
parent54b8ecb5f1b3bd0f0c1f42489df20c2d8dbe191c (diff)
downloadgdb-ce102e96e626d98ff540720807e49abd9bec3d20.zip
gdb-ce102e96e626d98ff540720807e49abd9bec3d20.tar.gz
gdb-ce102e96e626d98ff540720807e49abd9bec3d20.tar.bz2
* gdb.base/Makefile.in: Add action to .c.o transformation
rule that generates a .ci file for each .o file and remove explicit .c.o rules except for callfuncs.o. * gdb.c++/Makefile.in: Add .cc.o transformation rule that generates a .ci file for each .o file and remove explicit .cc.o rules. (clean): Remove *.tmp *.ci files. (EXECUTABLES): Remove templ-info.exp. * gdb.base/compiler.c: New file. * gdb.c++/compiler.cc: New file * gdb.base/scope.exp: Source gdb.base/scope.ci. Change rs6000-*-* xfail for "print 'scope0.c'::filelocal_ro" and "print 'scope1.c'::filelocal" and "print 'scope1.c'::filelocal_bss" and "print 'scope1.c'::filelocal_ro" and "print 'scope1.c'::foo::funclocal" and "print 'scope1.c'::foo::funclocal_ro" and "print 'scope1.c'::bar::funclocal" and "print 'scope0.c'::filelocal_ro" and "print 'scope1.c'::filelocal at foo" and "print 'scope1.c'::filelocal_bss at foo" and "print 'scope1.c'::filelocal_ro at foo" and "print 'scope1.c'::foo::funclocal at foo" and "print 'scope1.c'::foo::funclocal_bss at foo" and "print 'scope1.c'::foo::funclocal_ro at foo" and "print 'scope1.c'::bar::funclocal at foo" and "print 'scope0.c'::filelocal_ro" and "print 'scope1.c'::filelocal" and "print 'scope1.c'::filelocal_bss" and "print 'scope1.c'::filelocal_ro" and "print 'scope1.c'::foo::funclocal" and "print 'scope1.c'::foo::funclocal_bss" and "print 'scope1.c'::foo::funclocal_ro" and "print 'scope1.c'::bar::funclocal" and "print 'scope1.c'::bar::funclocal_bss" to only be xfail'd when not compiled with gcc. Add rs6000-*-* xfail for "print 'scope0.c'::filelocal_bss before run" when compiled with gcc. (test_at_main): Add rs6000-*-* xfail for "print filelocal_ro in test_at_main" when compiled with gcc. * gdb.base/ptype.exp: Source gdb.base/ptype.ci. Add rs6000-*-aix* xfail for "whatis unnamed typedef'd enum (compiler bug in IBM's xlc)" and "ptype t_char_array", not compiled with gcc. * gdb.base/list.exp (test_list_function): Add rs6000-*-* xfail for "list foo (in include file)" when gcc compiled. * gdb.base/funcargs.exp: Source gdb.base/funcargs.ci (integral_args): Add rs6000-*-* xfail for "run to call0a" if not compiled with gcc. (unsigned_integral_args): Add rs6000-*-* xfail for "run to call1a" if not compiled with gcc. (float_and_integral_args): Add rs6000-*-* xfail for "run to call2a" if not compiled with gcc and for "continue to call2b" for any compiler. Add rs6000-*-* xfail to "print f1 after run to call2a" for gcc compiled. (discard_and_shuffle): Add rs6000-*-* xfail for "run to call6a". (shuffle_round_robin): Add rs6000-*-* xfail for "backtrace from call7a" if not compiled with gcc. Add rs6000-*-* xfail for "backtrace from call7b" if compiled with gcc. (call_after_alloca): Add rs6000-*-* xfail for "print c in call_after_alloca" and "print s in call_after_alloca" and "backtrace from call_after_alloca_subr" if not compiled with gcc. (localvars_in_indirect_call): Add rs6000-*-* xfail for "print c in localvars_in_indirect_call" and "print c in localvars_in_indirect_call" and "backtrace in indirectly called function" and "stepping into indirectly called function" if not compiled with gcc. (localvars_after_alloca): Add rs6000-*-* xfail for "print c after runto localvars_after_alloca" and "print s after runto localvars_after_alloca" and "print i after runto localvars_after_alloca" and "print l after runto localvars_after_alloca" for all compilers. * gdb.base/whatis.exp: Source gdb.base/whatis.ci rather than whatis-info.exp. * gdb.base/opaque.exp: Source gdb.base/opaque0.ci rather than opaque-info.exp. Setup rs6000-*-* xfail for "ptype on opaque struct pointer (statically)" and "ptype on opaque struct pointer (dynamically)" when not compiled with gcc. * gdb.base/callfuncs.exp: Source gdb.base/callfuncs.ci rather than callf-info.exp. (do_function_calls): Add clear_xfail for rs6000-*-* for "p t_float_values2(3.14159,float_val2)". Seems to work fine there, both with xlc and gcc. Need to find out what it is doing right and fix other platforms. * gdb.base/callfuncs.exp: Add rs6000-*-* xfail for "call inferior func with struct - returns int", "call inferior func with struct - returns long", "call inferior func with struct - returns float", "call inferior func with struct - returns double", "call inferior func with struct - returns char *", but only if not gcc compiled (presumes xlc compiled). Change rs6000-*-* xfails for "call inferior func with struct - returns char" and " call inferior func with struct - returns short" to only xfail if not using gcc. (clean mostlyclean): Remove *.ci and *.tmp files. * gdb.c++/templates.exp: Source gdb.c++/templates.ci rather than templ-info.exp. * gdb.base/langs.exp: Source gdb.base/langs.ci. Add rs6000-*-* xfail for "up to foo in langs.exp" "up to cppsub_ in langs.exp" and "up to fsub in langs.exp" when not gcc compiled.
Diffstat (limited to 'gdb/testsuite/gdb.base/scope.exp')
-rw-r--r--gdb/testsuite/gdb.base/scope.exp86
1 files changed, 49 insertions, 37 deletions
diff --git a/gdb/testsuite/gdb.base/scope.exp b/gdb/testsuite/gdb.base/scope.exp
index 8dc66d0..a0bb7db 100644
--- a/gdb/testsuite/gdb.base/scope.exp
+++ b/gdb/testsuite/gdb.base/scope.exp
@@ -34,6 +34,8 @@ if ![file exists $objdir/$subdir/$binfile] then {
return 0
}
+source gdb.base/scope0.ci
+
# Test locating various things when stopped just inside main, after
# running init(). To prevent cascading of errors, we report the
# first one and quit. If all pass, then we print the pass results.
@@ -44,6 +46,7 @@ proc test_at_main {} {
global det_file
global srcdir
global subdir
+ global gcc_compiled
# skip past init. There may be a call to __main at the start of
# main, so the first next may only get us to the init call.
@@ -69,8 +72,6 @@ proc test_at_main {} {
}
}
- # The RS/6000 does not seem to be handle print 'file'::var.
- setup_xfail "rs6000-*-*"
send "print 'scope0.c'::filelocal\n"
expect {
-re "\\\$$decimal = 1\r\n$prompt $" {
@@ -99,7 +100,6 @@ proc test_at_main {} {
}
}
- setup_xfail "rs6000-*-*"
send "print 'scope0.c'::filelocal_bss\n"
expect {
-re "\\\$$decimal = 101\r\n$prompt $" {
@@ -122,16 +122,23 @@ proc test_at_main {} {
# No clue why the powerpc fails this test.
setup_xfail "powerpc-*-*"
+ if {$gcc_compiled} then { setup_xfail "rs6000-*-*" }
send "print filelocal_ro\n"
expect {
- -re "\\\$$decimal = 201\r\n$prompt $" { pass "print filelocal_ro" }
- -re "$prompt $" { fail "print filelocal_ro" ; return }
+ -re "\\\$$decimal = 201\r\n$prompt $" {
+ pass "print filelocal_ro in test_at_main"
+ }
+ -re "$prompt $" {
+ fail "print filelocal_ro in test_at_main"
+ return
+ }
timeout {
- fail "(timeout) print filelocal_ro" ; return
+ fail "(timeout) print filelocal_ro in test_at_main"
+ return
}
}
- setup_xfail "rs6000-*-*"
+ if {$gcc_compiled} then { setup_xfail "rs6000-*-*" }
setup_xfail "powerpc-*-*"
send "print 'scope0.c'::filelocal_ro\n"
expect {
@@ -150,7 +157,7 @@ proc test_at_main {} {
# Print scope1.c::filelocal, which is 2
- setup_xfail "rs6000-*-*"
+ if {$gcc_compiled} then { setup_xfail "rs6000-*-*" }
send "print 'scope1.c'::filelocal\n"
expect {
-re "\\\$$decimal = 2\r\n$prompt $" {
@@ -168,7 +175,7 @@ proc test_at_main {} {
# Print scope1.c::filelocal_bss, which is 102
- setup_xfail "rs6000-*-*"
+ if {$gcc_compiled} then { setup_xfail "rs6000-*-*" }
send "print 'scope1.c'::filelocal_bss\n"
expect {
-re "\\\$$decimal = 102\r\n$prompt $" {
@@ -186,7 +193,7 @@ proc test_at_main {} {
# Print scope1.c::filelocal_ro, which is 202
- setup_xfail "rs6000-*-*"
+ if {$gcc_compiled} then { setup_xfail "rs6000-*-*" }
send "print 'scope1.c'::filelocal_ro\n"
expect {
-re "\\\$$decimal = 202\r\n$prompt $" {
@@ -213,7 +220,7 @@ proc test_at_main {} {
}
}
- setup_xfail "rs6000-*-*"
+ if {$gcc_compiled} then { setup_xfail "rs6000-*-*" }
send "print 'scope1.c'::foo::funclocal\n"
expect {
-re "\\\$$decimal = 3\r\n$prompt $" {
@@ -242,7 +249,7 @@ proc test_at_main {} {
}
}
- setup_xfail "rs6000-*-*"
+ if {$gcc_compiled} then { setup_xfail "rs6000-*-*" }
send "print 'scope1.c'::foo::funclocal_ro\n"
expect {
-re "\\\$$decimal = 203\r\n$prompt $" {
@@ -268,7 +275,7 @@ proc test_at_main {} {
}
}
- setup_xfail "rs6000-*-*"
+ if {$gcc_compiled} then { setup_xfail "rs6000-*-*" }
send "print 'scope1.c'::bar::funclocal\n"
expect {
-re "\\\$$decimal = 4\r\n$prompt $" {
@@ -291,6 +298,7 @@ proc test_at_foo {} {
global det_file
global srcdir
global subdir
+ global gcc_compiled
send "next\n"
expect {
@@ -301,7 +309,6 @@ proc test_at_foo {} {
# Print scope0.c::filelocal, which is 1
- setup_xfail "rs6000-*-*"
send "print 'scope0.c'::filelocal\n"
expect {
-re "\\\$$decimal = 1\r\n$prompt $" {
@@ -319,7 +326,6 @@ proc test_at_foo {} {
# Print scope0.c::filelocal_bss, which is 101
- setup_xfail "rs6000-*-*"
send "print 'scope0.c'::filelocal_bss\n"
expect {
-re "\\\$$decimal = 101\r\n$prompt $" {
@@ -341,7 +347,7 @@ proc test_at_foo {} {
# Print scope0.c::filelocal_ro, which is 201
- setup_xfail "rs6000-*-*"
+ if {$gcc_compiled} then { setup_xfail "rs6000-*-*" }
setup_xfail "powerpc-*-*"
send "print 'scope0.c'::filelocal_ro\n"
expect {
@@ -360,7 +366,7 @@ proc test_at_foo {} {
# Print scope1.c::filelocal, which is 2
- setup_xfail "rs6000-*-*"
+ if {$gcc_compiled} then { setup_xfail "rs6000-*-*" }
send "print 'scope1.c'::filelocal\n"
expect {
-re "\\\$$decimal = 2\r\n$prompt $" {
@@ -379,7 +385,7 @@ proc test_at_foo {} {
gdb_test "print filelocal_bss" "\\\$$decimal = 102" \
"print filelocal_bss at foo"
- setup_xfail "rs6000-*-*"
+ if {$gcc_compiled} then { setup_xfail "rs6000-*-*" }
send "print 'scope1.c'::filelocal_bss\n"
expect {
-re "\\\$$decimal = 102\r\n$prompt $" {
@@ -398,7 +404,7 @@ proc test_at_foo {} {
gdb_test "print filelocal_ro" "\\\$$decimal = 202" \
"print filelocal_ro at foo"
- setup_xfail "rs6000-*-*"
+ if {$gcc_compiled} then { setup_xfail "rs6000-*-*" }
send "print 'scope1.c'::filelocal_ro\n"
expect {
-re "\\\$$decimal = 202\r\n$prompt $" { pass "print 'scope1.c'::filelocal_ro at foo" }
@@ -419,7 +425,7 @@ proc test_at_foo {} {
gdb_test "print foo::funclocal" "\\\$$decimal = 3" \
"print foo::funclocal at foo"
- setup_xfail "rs6000-*-*"
+ if {$gcc_compiled} then { setup_xfail "rs6000-*-*" }
send "print 'scope1.c'::foo::funclocal\n"
expect {
-re "\\\$$decimal = 3\r\n$prompt $" {
@@ -443,7 +449,7 @@ proc test_at_foo {} {
gdb_test "print foo::funclocal_bss" "\\\$$decimal = 103" \
"print foo::funclocal_bss at foo"
- setup_xfail "rs6000-*-*"
+ if {$gcc_compiled} then { setup_xfail "rs6000-*-*" }
send "print 'scope1.c'::foo::funclocal_bss\n"
expect {
-re "\\\$$decimal = 103\r\n$prompt $" {
@@ -469,7 +475,7 @@ proc test_at_foo {} {
gdb_test "print foo::funclocal_ro" "\\\$$decimal = 203" \
"print foo::funclocal_ro at foo"
- setup_xfail "rs6000-*-*"
+ if {$gcc_compiled} then { setup_xfail "rs6000-*-*" }
send "print 'scope1.c'::foo::funclocal_ro\n"
expect {
-re "\\\$$decimal = 203\r\n$prompt $" {
@@ -490,7 +496,7 @@ proc test_at_foo {} {
gdb_test "print bar::funclocal" "\\\$$decimal = 4" \
"print bar::funclocal at foo"
- setup_xfail "rs6000-*-*"
+ if {$gcc_compiled} then { setup_xfail "rs6000-*-*" }
send "print 'scope1.c'::bar::funclocal\n"
expect {
-re "\\\$$decimal = 4\r\n$prompt $" {
@@ -513,6 +519,7 @@ proc test_at_bar {} {
global det_file
global srcdir
global subdir
+ global gcc_compiled
send "next\n"
expect {
@@ -522,7 +529,6 @@ proc test_at_bar {} {
# Print scope0.c::filelocal, which is 1
- setup_xfail "rs6000-*-*"
send "print 'scope0.c'::filelocal\n"
expect {
-re "\\\$$decimal = 1\r\n$prompt $" {
@@ -540,7 +546,6 @@ proc test_at_bar {} {
# Print scope0.c::filelocal_bss, which is 101
- setup_xfail "rs6000-*-*"
send "print 'scope0.c'::filelocal_bss\n"
expect {
-re "\\\$$decimal = 101\r\n$prompt $" {
@@ -562,7 +567,7 @@ proc test_at_bar {} {
# Print scope0.c::filelocal_ro, which is 201
- setup_xfail "rs6000-*-*"
+ if {$gcc_compiled} then { setup_xfail "rs6000-*-*" }
setup_xfail "powerpc-*-*"
send "print 'scope0.c'::filelocal_ro\n"
expect {
@@ -588,7 +593,7 @@ proc test_at_bar {} {
}
}
- setup_xfail "rs6000-*-*"
+ if {$gcc_compiled} then { setup_xfail "rs6000-*-*" }
send "print 'scope1.c'::filelocal\n"
expect {
-re "\\\$$decimal = 2\r\n$prompt $" { pass "print 'scope1.c'::filelocal" }
@@ -613,7 +618,7 @@ proc test_at_bar {} {
}
}
- setup_xfail "rs6000-*-*"
+ if {$gcc_compiled} then { setup_xfail "rs6000-*-*" }
send "print 'scope1.c'::filelocal_bss\n"
expect {
-re "\\\$$decimal = 102\r\n$prompt $" { pass "print 'scope1.c'::filelocal_bss" }
@@ -631,14 +636,20 @@ proc test_at_bar {} {
send "print filelocal_ro\n"
expect {
- -re "\\\$$decimal = 202\r\n$prompt $" { pass "print filelocal_ro" }
- -re "$prompt $" { fail "print filelocal_ro" ; return }
+ -re "\\\$$decimal = 202\r\n$prompt $" {
+ pass "print filelocal_ro in test_at_bar"
+ }
+ -re "$prompt $" {
+ fail "print filelocal_ro in test_at_bar"
+ return
+ }
timeout {
- fail "(timeout) print filelocal_ro" ; return
+ fail "(timeout) print filelocal_ro in test_at_bar"
+ return
}
}
- setup_xfail "rs6000-*-*"
+ if {$gcc_compiled} then { setup_xfail "rs6000-*-*" }
send "print 'scope1.c'::filelocal_ro\n"
expect {
-re "\\\$$decimal = 202\r\n$prompt $" { pass "print 'scope1.c'::filelocal_ro" }
@@ -663,7 +674,7 @@ proc test_at_bar {} {
}
}
- setup_xfail "rs6000-*-*"
+ if {$gcc_compiled} then { setup_xfail "rs6000-*-*" }
send "print 'scope1.c'::foo::funclocal\n"
expect {
-re "\\\$$decimal = 3\r\n$prompt $" { pass "print 'scope1.c'::foo::funclocal" }
@@ -688,7 +699,7 @@ proc test_at_bar {} {
}
}
- setup_xfail "rs6000-*-*"
+ if {$gcc_compiled} then { 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" }
@@ -713,7 +724,7 @@ proc test_at_bar {} {
}
}
- setup_xfail "rs6000-*-*"
+ if {$gcc_compiled} then { 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" }
@@ -747,7 +758,7 @@ proc test_at_bar {} {
}
}
- setup_xfail "rs6000-*-*"
+ if {$gcc_compiled} then { setup_xfail "rs6000-*-*" }
send "print 'scope1.c'::bar::funclocal\n"
expect {
-re "\\\$$decimal = 4\r\n$prompt $" { pass "print 'scope1.c'::bar::funclocal" }
@@ -781,7 +792,7 @@ proc test_at_bar {} {
}
}
- setup_xfail "rs6000-*-*"
+ if {$gcc_compiled} then { setup_xfail "rs6000-*-*" }
send "print 'scope1.c'::bar::funclocal_bss\n"
expect {
-re "\\\$$decimal = 104\r\n$prompt $" { pass "print 'scope1.c'::bar::funclocal_bss" }
@@ -923,6 +934,7 @@ gdb_test "print 'scope0.c'::filelocal_ro" "= 201"
# gdb currently cannot access bss memory on some targets if the inferior
# is not running.
+if {$gcc_compiled} then { setup_xfail "rs6000-*-*" }
send "print 'scope0.c'::filelocal_bss\n"
expect {
-re " = 0\r\n$prompt $" {