From: Per Bothner Date: Thu, 5 Oct 1995 01:24:44 +0000 (+0000) Subject: * pr-8136.{ch,exp}, pr-8134.exp, func1.ch, Makefile.in: New test cases. X-Git-Url: https://git.libre-soc.org/?a=commitdiff_plain;h=f3415760cf56a290fc73375e04d1d25695d47a74;p=binutils-gdb.git * pr-8136.{ch,exp}, pr-8134.exp, func1.ch, Makefile.in: New test cases. --- diff --git a/gdb/testsuite/gdb.chill/.Sanitize b/gdb/testsuite/gdb.chill/.Sanitize index b09903fc9ed..2e4d8b77206 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 310670bc2bf..d9a92e1faaa 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 + + * pr-8136.{ch,exp}, pr-8134.exp, func1.ch, Makefile.in: New test cases. + Wed Sep 27 11:51:50 1995 Per Bothner * 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 b99f2dc439d..ad2bd9259d2 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 00000000000..d0d28ce9fae --- /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 00000000000..cfcc733c42d --- /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 00000000000..b380110eb18 --- /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 00000000000..fa8bd9f524e --- /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 +}