aboutsummaryrefslogtreecommitdiff
path: root/gdb
diff options
context:
space:
mode:
authorPer Bothner <per@bothner.com>1995-10-05 01:24:44 +0000
committerPer Bothner <per@bothner.com>1995-10-05 01:24:44 +0000
commitf3415760cf56a290fc73375e04d1d25695d47a74 (patch)
tree554d9960d063c86f3a9926ebc67a8ca70b0ed2d4 /gdb
parent706bfe5a1c25b80f2af9c48477035cfe73987ae4 (diff)
downloadfsf-binutils-gdb-f3415760cf56a290fc73375e04d1d25695d47a74.zip
fsf-binutils-gdb-f3415760cf56a290fc73375e04d1d25695d47a74.tar.gz
fsf-binutils-gdb-f3415760cf56a290fc73375e04d1d25695d47a74.tar.bz2
* pr-8136.{ch,exp}, pr-8134.exp, func1.ch, Makefile.in: New test cases.
Diffstat (limited to 'gdb')
-rw-r--r--gdb/testsuite/gdb.chill/.Sanitize4
-rw-r--r--gdb/testsuite/gdb.chill/ChangeLog4
-rw-r--r--gdb/testsuite/gdb.chill/Makefile.in7
-rw-r--r--gdb/testsuite/gdb.chill/func1.ch9
-rw-r--r--gdb/testsuite/gdb.chill/pr-8134.exp60
-rw-r--r--gdb/testsuite/gdb.chill/pr-8136.ch34
-rw-r--r--gdb/testsuite/gdb.chill/pr-8136.exp58
7 files changed, 175 insertions, 1 deletions
diff --git a/gdb/testsuite/gdb.chill/.Sanitize b/gdb/testsuite/gdb.chill/.Sanitize
index b09903f..2e4d8b7 100644
--- a/gdb/testsuite/gdb.chill/.Sanitize
+++ b/gdb/testsuite/gdb.chill/.Sanitize
@@ -31,6 +31,7 @@ chexp.exp
chillvars.ch
chillvars.exp
configure.in
+func1.ch
misc.ch
misc.exp
pr-4975.ch
@@ -52,6 +53,9 @@ pr-6292.exp
pr-6632.ch
pr-6632-grt.ch
pr-6632.exp
+pr-8134.exp
+pr-8136.ch
+pr-8136.exp
result.ch
result.exp
string.ch
diff --git a/gdb/testsuite/gdb.chill/ChangeLog b/gdb/testsuite/gdb.chill/ChangeLog
index 310670b..d9a92e1 100644
--- a/gdb/testsuite/gdb.chill/ChangeLog
+++ b/gdb/testsuite/gdb.chill/ChangeLog
@@ -1,3 +1,7 @@
+Wed Oct 4 18:20:53 1995 Per Bothner <bothner@kalessin.cygnus.com>
+
+ * pr-8136.{ch,exp}, pr-8134.exp, func1.ch, Makefile.in: New test cases.
+
Wed Sep 27 11:51:50 1995 Per Bothner <bothner@kalessin.cygnus.com>
* tuples.ch. tuples.exp: Add new test for setting a variant record
diff --git a/gdb/testsuite/gdb.chill/Makefile.in b/gdb/testsuite/gdb.chill/Makefile.in
index b99f2dc..ad2bd92 100644
--- a/gdb/testsuite/gdb.chill/Makefile.in
+++ b/gdb/testsuite/gdb.chill/Makefile.in
@@ -97,7 +97,7 @@ CHILL_LIB = ` \
EXECUTABLES = callch.exe chillvars.exe misc.exe \
result.exe string.exe tuples.exe \
pr-4975.exe pr-5016.exe pr-5020.exe pr-5022.exe pr-5646.exe pr-5984.exe \
- pr-6292.exe pr-6632.exe
+ pr-6292.exe pr-6632.exe pr-8136.exe
all: $(EXECUTABLES)
@@ -106,6 +106,7 @@ all: $(EXECUTABLES)
pr-4975.o: pr-4975-grt.o
pr-5646.o: pr-5646-grt.o
pr-6632.o: pr-6632-grt.o
+pr-8136.o: func1.o
.SUFFIXES: .ch .exe .check
@@ -113,6 +114,10 @@ pr-6632.exe: pr-6632.o pr-6632-grt.o
$(CHILL_FOR_TARGET) $(CHILLFLAGS) $(LDFLAGS) -o pr-6632.exe \
pr-6632.o pr-6632-grt.o $(CHILL_LIB) $(LIBS)
+pr-8136.exe: pr-8136.o func1.o
+ $(CHILL_FOR_TARGET) $(CHILLFLAGS) $(LDFLAGS) -o pr-8136.exe \
+ pr-8136.o func1.o $(CHILL_LIB) $(LIBS)
+
.o.exe:
$(CHILL_FOR_TARGET) $(CHILLFLAGS) $(LDFLAGS) -o $*.exe $*.o $(CHILL_LIB) $(LIBS)
diff --git a/gdb/testsuite/gdb.chill/func1.ch b/gdb/testsuite/gdb.chill/func1.ch
new file mode 100644
index 0000000..d0d28ce
--- /dev/null
+++ b/gdb/testsuite/gdb.chill/func1.ch
@@ -0,0 +1,9 @@
+func1: MODULE
+
+SYNMODE m_set = SET (e1, e2, e3, e4, e5, e6, e7, e8, e9, e10);
+SYNMODE m_setrange = RANGE (e3:e8);
+SYNMODE m_ps = POWERSET m_set;
+SYNMODE m_rangeps = POWERSET RANGE(0:31);
+GRANT ALL;
+
+END func1;
diff --git a/gdb/testsuite/gdb.chill/pr-8134.exp b/gdb/testsuite/gdb.chill/pr-8134.exp
new file mode 100644
index 0000000..cfcc733
--- /dev/null
+++ b/gdb/testsuite/gdb.chill/pr-8134.exp
@@ -0,0 +1,60 @@
+# Copyright (C) 1995 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 2 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, write to the Free Software
+# 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
+
+# This file was written by Per Bothner. (bothner@cygnus.com)
+
+if $tracelevel then {
+ strace $tracelevel
+}
+
+proc do_tests {} {
+ global prms_id bug_id subdir objdir srcdir binfile prompt
+
+ set prms_id 0
+ set bug_id 0
+
+ # Start with a fresh gdb.
+
+ gdb_exit
+ gdb_start
+ gdb_reinitialize_dir $srcdir/$subdir
+ gdb_load $objdir/$subdir/$binfile
+
+ send "set language chill\n" ; expect -re "$prompt $"
+
+ runto p1
+ gdb_test "print first" "= 1"
+ gdb_test "print last" "= 10"
+}
+
+# Check to see if we have an executable to test. If not, then either we
+# haven't tried to compile one, or the compilation failed for some reason.
+# In either case, just notify the user and skip the tests in this file.
+
+# Note we use pr-8136 for pr-8134.exp as well as pr-8136.exp.
+set binfile "pr-8136.exe"
+set srcfile $binfile.ch
+
+if [skip_chill_tests] then { continue }
+
+if ![file exists $objdir/$subdir/$binfile] then {
+ warning "$binfile does not exist; tests suppressed."
+} else {
+ do_tests
+}
diff --git a/gdb/testsuite/gdb.chill/pr-8136.ch b/gdb/testsuite/gdb.chill/pr-8136.ch
new file mode 100644
index 0000000..b380110
--- /dev/null
+++ b/gdb/testsuite/gdb.chill/pr-8136.ch
@@ -0,0 +1,34 @@
+-- NOTE: This test is used for pr-3134.exp as well as pr-8136.
+func: MODULE
+
+<> USE_SEIZE_FILE "func1.grt" <>
+SEIZE ALL;
+
+NEWMODE m_struct = STRUCT (i LONG, str CHARS(50) VARYING);
+DCL insarr ARRAY (1:10) INT;
+
+DCL setrange m_setrange := e5;
+
+DCL ps m_ps := [ e3, e7:e9 ];
+DCL range_ps m_rangeps := [ 2, 3, 4, 28 ];
+
+p1: PROC (first INT IN, last INT IN, s m_struct IN);
+
+ DCL foo LONG := 3;
+
+ startall: PROC ()
+ DO FOR i := first to last;
+ insarr(i) := i;
+ OD;
+ DO FOR i := first TO last;
+ WRITETEXT (stdout, "insarr(%C) := %C%/", i, insarr(i));
+ OD;
+ END startall;
+
+ startall ();
+
+END p1;
+
+p1 (LOWER (insarr), UPPER (insarr), [ 10, "This is a string." ]);
+
+END func;
diff --git a/gdb/testsuite/gdb.chill/pr-8136.exp b/gdb/testsuite/gdb.chill/pr-8136.exp
new file mode 100644
index 0000000..fa8bd9f
--- /dev/null
+++ b/gdb/testsuite/gdb.chill/pr-8136.exp
@@ -0,0 +1,58 @@
+# Copyright (C) 1995 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 2 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, write to the Free Software
+# 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
+
+# This file was written by Per Bothner. (bothner@cygnus.com)
+
+if $tracelevel then {
+ strace $tracelevel
+}
+
+proc do_tests {} {
+ global prms_id bug_id subdir objdir srcdir binfile prompt
+
+ set prms_id 0
+ set bug_id 0
+
+ # Start with a fresh gdb.
+
+ gdb_exit
+ gdb_start
+ gdb_reinitialize_dir $srcdir/$subdir
+ gdb_load $objdir/$subdir/$binfile
+
+ send "set language chill\n" ; expect -re "$prompt $"
+
+ runto p1
+ gdb_test "print ps" {= \[e3, e7:e9\]}
+}
+
+# Check to see if we have an executable to test. If not, then either we
+# haven't tried to compile one, or the compilation failed for some reason.
+# In either case, just notify the user and skip the tests in this file.
+
+set binfile "pr-8136.exe"
+set srcfile $binfile.ch
+
+if [skip_chill_tests] then { continue }
+
+if ![file exists $objdir/$subdir/$binfile] then {
+ warning "$binfile does not exist; tests suppressed."
+} else {
+ do_tests
+}