aboutsummaryrefslogtreecommitdiff
path: root/gdb/testsuite/lib/pascal.exp
diff options
context:
space:
mode:
Diffstat (limited to 'gdb/testsuite/lib/pascal.exp')
-rw-r--r--gdb/testsuite/lib/pascal.exp13
1 files changed, 13 insertions, 0 deletions
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;
+}