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/lib | |
parent | 856d6f99ff9e391881377a4742520c1c405c694b (diff) | |
download | gdb-f1208f9e0a164d55b91416876a5881321d3851b7.zip gdb-f1208f9e0a164d55b91416876a5881321d3851b7.tar.gz gdb-f1208f9e0a164d55b91416876a5881321d3851b7.tar.bz2 |
* 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/lib')
-rw-r--r-- | gdb/testsuite/lib/fortran.exp | 30 | ||||
-rw-r--r-- | gdb/testsuite/lib/java.exp | 14 | ||||
-rw-r--r-- | gdb/testsuite/lib/pascal.exp | 13 |
3 files changed, 57 insertions, 0 deletions
diff --git a/gdb/testsuite/lib/fortran.exp b/gdb/testsuite/lib/fortran.exp new file mode 100644 index 0000000..b43f47d --- /dev/null +++ b/gdb/testsuite/lib/fortran.exp @@ -0,0 +1,30 @@ +# This test code is part of GDB, the GNU debugger. + +# Copyright 2010 Free Software Foundation, Inc. +# +# This program is free software; you can redistribute it and/or modify +# it under the terms of the GNU General Public License as published by +# the Free Software Foundation; either version 3 of the License, or +# (at your option) any later version. +# +# This program is distributed in the hope that it will be useful, +# but WITHOUT ANY WARRANTY; without even the implied warranty of +# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the +# GNU General Public License for more details. +# +# You should have received a copy of the GNU General Public License +# along with this program. If not, see <http://www.gnu.org/licenses/>. + +# Auxiliary function to set the language to fortran. +# The result is 1 (true) for success, 0 (false) for failure. + +proc set_lang_fortran {} { + if [gdb_test_no_output "set language fortran"] { + return 0 + } + if [gdb_test "show language" ".* source language is \"fortran\"." \ + "set language to \"fortran\""] { + return 0 + } + return 1; +} diff --git a/gdb/testsuite/lib/java.exp b/gdb/testsuite/lib/java.exp index fc56ba5..f552be9 100644 --- a/gdb/testsuite/lib/java.exp +++ b/gdb/testsuite/lib/java.exp @@ -105,6 +105,20 @@ proc compile_java_from_source { srcfile binfile compile_args } { return $result } +# Auxiliary function to set the language to java. +# The result is 1 (true) for success, 0 (false) for failure. + +proc set_lang_java {} { + if [gdb_test_no_output "set language java"] { + return 0 + } + if [gdb_test "show language" ".* source language is \"java\"." \ + "set language to \"java\""] { + return 0 + } + return 1; +} + # Local Variables: # tcl-indent-level:4 # End: diff --git a/gdb/testsuite/lib/pascal.exp b/gdb/testsuite/lib/pascal.exp index 9691bc1..af0b00d 100644 --- a/gdb/testsuite/lib/pascal.exp +++ b/gdb/testsuite/lib/pascal.exp @@ -150,3 +150,16 @@ proc gdb_compile_pascal {source dest type options} { } } +# Auxiliary function to set the language to pascal. +# The result is 1 (true) for success, 0 (false) for failure. + +proc set_lang_pascal {} { + if [gdb_test_no_output "set language pascal"] { + return 0 + } + if [gdb_test "show language" ".* source language is \"pascal\"." \ + "set language to \"pascal\""] { + return 0 + } + return 1; +} |