diff options
author | Doug Evans <dje@google.com> | 2010-08-18 16:37:22 +0000 |
---|---|---|
committer | Doug Evans <dje@google.com> | 2010-08-18 16:37:22 +0000 |
commit | f1208f9e0a164d55b91416876a5881321d3851b7 (patch) | |
tree | 7364282c587f13fd0221468eb38a33a399f11460 /gdb/testsuite/gdb.base/printcmds.exp | |
parent | PR corefile/8210 (diff) | |
download | binutils-gdb-f1208f9e0a164d55b91416876a5881321d3851b7.tar.gz binutils-gdb-f1208f9e0a164d55b91416876a5881321d3851b7.tar.bz2 binutils-gdb-f1208f9e0a164d55b91416876a5881321d3851b7.zip |
* gdb.base/call-ar-st.exp (set_lang_c): Delete, unused.
* gdb.base/callfuncs.exp (set_lang_c): Delete, set c language directly.
* gdb.base/printcmds.exp (set_lang_c): Delete, set c language directly.
Simplify, early exit if runto_main fails.
* gdb.fortran/exprs.exp: load_lib fortran.exp.
(set_lang_fortran): Moved to lib/fortran.exp.
* gdb.fortran/types.exp: load_lib fortran.exp.
(set_lang_fortran): Moved to lib/fortran.exp.
* gdb.java/jmisc.exp (set_lang_java): Moved to lib/java.exp.
* gdb.java/jprint.exp (set_lang_java): Ditto.
* gdb.java/jv-exp.exp: load_lib java.exp.
If set_lang_java fails, issue a warning instead of failure to be
consistent with other set_lang_foo uses.
(set_lang_java): Moved to lib/java.exp.
* gdb.java/jv-print.exp (set_lang_java): Moved to lib/java.exp.
If set_lang_java fails, issue a warning instead of failure to be
consistent with other set_lang_foo uses.
* gdb.pascal/types.exp: load_lib pascal.exp.
(set_lang_pascal): Moved to lib/pascal.exp.
* lib/fortran.exp: New file.
* lib/java.exp (set_lang_java): New function.
* lib/pascal.exp (set_lang_pascal): New function.
Diffstat (limited to 'gdb/testsuite/gdb.base/printcmds.exp')
-rw-r--r-- | gdb/testsuite/gdb.base/printcmds.exp | 77 |
1 files changed, 30 insertions, 47 deletions
diff --git a/gdb/testsuite/gdb.base/printcmds.exp b/gdb/testsuite/gdb.base/printcmds.exp index 11e29fa5a65..4c82ab31015 100644 --- a/gdb/testsuite/gdb.base/printcmds.exp +++ b/gdb/testsuite/gdb.base/printcmds.exp @@ -25,7 +25,6 @@ if $tracelevel then { strace $tracelevel } - set testfile "printcmds" set srcfile ${testfile}.c set binfile ${objdir}/${subdir}/${testfile} @@ -36,22 +35,6 @@ if { [gdb_compile "${srcdir}/${subdir}/${srcfile}" "${binfile}" executable {deb get_compiler_info ${binfile} -# Set the current language to C. This counts as a test. If it -# fails, then we skip the other tests. - -proc set_lang_c {} { - global gdb_prompt - - if [gdb_test_no_output "set language c" "set language c"] { - return 0 - } - - if [gdb_test "show language" ".* source language is \"c\".*"] { - return 0 - } - return 1; -} - proc test_integer_literals_accepted {} { global gdb_prompt @@ -781,34 +764,34 @@ gdb_test_no_output "set print sevenbit-strings" gdb_test_no_output "set print address off" gdb_test_no_output "set width 0" -if [set_lang_c] then { - if { [test_compiler_info "armcc-*"] } { - # ARM RealView compresses large arrays in the data segment. - # Before the program starts, we can not read them. There is - # nothing in the file to indicate that data is compressed. - setup_xfail "arm*-*-eabi" - } - gdb_test "p ctable1\[120\]" "120 'x'" "p ctable1\[120\] #1" - - gdb_load ${binfile} - if [runto_main] then { - test_integer_literals_accepted - test_integer_literals_rejected - test_character_literals_accepted - test_print_all_chars - test_print_repeats_10 - test_print_strings - test_print_int_arrays - test_print_typedef_arrays - test_artificial_arrays - test_print_char_arrays -# We used to do the runto main here. - test_print_string_constants - test_print_array_constants - test_print_enums - test_printf - test_printf_with_dfp - } -} else { - fail "C print command tests suppressed" +if { [test_compiler_info "armcc-*"] } { + # ARM RealView compresses large arrays in the data segment. + # Before the program starts, we can not read them. There is + # nothing in the file to indicate that data is compressed. + setup_xfail "arm*-*-eabi" +} +gdb_test "p ctable1\[120\]" "120 'x'" "p ctable1\[120\] #1" + +gdb_load ${binfile} + +if ![runto_main] then { + fail "Can't run to main" + return 0 } + +test_integer_literals_accepted +test_integer_literals_rejected +test_character_literals_accepted +test_print_all_chars +test_print_repeats_10 +test_print_strings +test_print_int_arrays +test_print_typedef_arrays +test_artificial_arrays +test_print_char_arrays +# We used to do the runto main here. +test_print_string_constants +test_print_array_constants +test_print_enums +test_printf +test_printf_with_dfp |