diff options
author | Wilfried Moser <moser@cygnus> | 1996-01-29 08:09:04 +0000 |
---|---|---|
committer | Wilfried Moser <moser@cygnus> | 1996-01-29 08:09:04 +0000 |
commit | d59558827ed8da7fd4cf379a5bb25f3a2fca3091 (patch) | |
tree | 3ba90968364c5dc7acc9d42b602b4d70433dc672 /gdb | |
parent | fa9f58403a22bccf475d72b50d135880b41dd516 (diff) | |
download | ppe42-binutils-d59558827ed8da7fd4cf379a5bb25f3a2fca3091.tar.gz ppe42-binutils-d59558827ed8da7fd4cf379a5bb25f3a2fca3091.zip |
* builtins.ch, builtins.exp: Enhance test case.
* extstruct.ch, extstruct-grt.ch, extstruct.exp: New test case.
Diffstat (limited to 'gdb')
-rw-r--r-- | gdb/testsuite/gdb.chill/.Sanitize | 3 | ||||
-rw-r--r-- | gdb/testsuite/gdb.chill/ChangeLog | 6 | ||||
-rw-r--r-- | gdb/testsuite/gdb.chill/builtins.ch | 7 | ||||
-rw-r--r-- | gdb/testsuite/gdb.chill/builtins.exp | 11 | ||||
-rw-r--r-- | gdb/testsuite/gdb.chill/extstruct-grt.ch | 12 | ||||
-rw-r--r-- | gdb/testsuite/gdb.chill/extstruct.ch | 16 | ||||
-rw-r--r-- | gdb/testsuite/gdb.chill/extstruct.exp | 65 |
7 files changed, 120 insertions, 0 deletions
diff --git a/gdb/testsuite/gdb.chill/.Sanitize b/gdb/testsuite/gdb.chill/.Sanitize index e3b301f6d1..4189ddff5f 100644 --- a/gdb/testsuite/gdb.chill/.Sanitize +++ b/gdb/testsuite/gdb.chill/.Sanitize @@ -36,6 +36,9 @@ configure configure.in enum.ch enum.exp +extstruct.ch +extstruct-grt.ch +extstruct.exp func1.ch misc.ch misc.exp diff --git a/gdb/testsuite/gdb.chill/ChangeLog b/gdb/testsuite/gdb.chill/ChangeLog index 5ad556b3bf..443080bf80 100644 --- a/gdb/testsuite/gdb.chill/ChangeLog +++ b/gdb/testsuite/gdb.chill/ChangeLog @@ -1,3 +1,9 @@ +Mon Jan 29 00:05:01 1996 Wilfried Moser (Alcatel) <moser@rtl.cygnus.com> + + * builtins.ch, builtins.exp: Enhance test case. + + * extstruct.ch, extstruct-grt.ch, extstruct.exp: New test case. + Tue Jan 23 16:57:13 1996 Per Bothner <bothner@kalessin.cygnus.com> * enum.ch, enum.exp: New test case (covers PRs 8869 and 8870). diff --git a/gdb/testsuite/gdb.chill/builtins.ch b/gdb/testsuite/gdb.chill/builtins.ch index 6a94b76200..ef12c839b9 100644 --- a/gdb/testsuite/gdb.chill/builtins.ch +++ b/gdb/testsuite/gdb.chill/builtins.ch @@ -16,6 +16,10 @@ DCL v_set m_set INIT := e3; SYNMODE m_set_range = m_set(e2:e5); DCL v_set_range m_set_range INIT := e3; +SYNMODE m_numbered_set = SET (n1 = 25, n2 = 22, n3 = 35, n4 = 33, + n5 = 45, n6 = 43); +DCL v_numbered_set m_numbered_set INIT := n3; + SYNMODE m_char_range = CHAR('A':'Z'); DCL v_char_range m_char_range INIT := 'G'; @@ -51,6 +55,9 @@ DCL v_int_arr ARRAY (INT) BYTE; SYNMODE m_set_arr = ARRAY (m_set) BYTE; DCL v_set_arr ARRAY (m_set) BYTE; +SYNMODE m_numbered_set_arr = ARRAY (m_numbered_set) BYTE; +DCL v_numbered_set_arr ARRAY (m_numbered_set) BYTE; + SYNMODE m_char_range_arr = ARRAY (m_char_range) BYTE; DCL v_char_range_arr ARRAY (m_char_range) BYTE; diff --git a/gdb/testsuite/gdb.chill/builtins.exp b/gdb/testsuite/gdb.chill/builtins.exp index 820b540255..f588fe29e1 100644 --- a/gdb/testsuite/gdb.chill/builtins.exp +++ b/gdb/testsuite/gdb.chill/builtins.exp @@ -128,6 +128,7 @@ proc test_lower {} { test_print_accept "print lower(ulong)" "0" test_print_accept "print lower(m_set)" "e1" test_print_accept "print lower(m_set_range)" "e2" + test_print_accept "print lower(m_numbered_set)" "n2" test_print_accept "print lower(m_char_range)" "'A'" test_print_accept "print lower(m_bool_range)" "FALSE" test_print_accept "print lower(m_long_range)" "255" @@ -149,6 +150,7 @@ proc test_lower {} { test_print_accept "print lower(v_ulong)" "0" test_print_accept "print lower(v_set)" "e1" test_print_accept "print lower(v_set_range)" "e2" + test_print_accept "print lower(v_numbered_set)" "n2" test_print_accept "print lower(v_char_range)" "'A'" test_print_accept "print lower(v_bool_range)" "FALSE" test_print_accept "print lower(v_long_range)" "255" @@ -179,6 +181,7 @@ proc test_lower {} { } test_print_accept "print lower(m_set_arr)" "e1" test_print_accept "print lower(m_set_range_arr)" "e2" + test_print_accept "print lower(m_numbered_set_arr)" "n2" test_print_accept "print lower(m_char_range_arr)" "'A'" test_print_accept "print lower(m_bool_range_arr)" "FALSE" test_print_accept "print lower(m_long_range_arr)" "255" @@ -195,6 +198,7 @@ proc test_lower {} { } test_print_accept "print lower(v_set_arr)" "e1" test_print_accept "print lower(v_set_range_arr)" "e2" + test_print_accept "print lower(v_numbered_set_arr)" "n2" test_print_accept "print lower(v_char_range_arr)" "'A'" test_print_accept "print lower(v_bool_range_arr)" "FALSE" test_print_accept "print lower(v_long_range_arr)" "255" @@ -226,6 +230,7 @@ proc test_upper {} { } test_print_accept "print upper(m_set)" "e6" test_print_accept "print upper(m_set_range)" "e5" + test_print_accept "print upper(m_numbered_set)" "n5" test_print_accept "print upper(m_char_range)" "'Z'" test_print_accept "print upper(m_bool_range)" "FALSE" test_print_accept "print upper(m_long_range)" "3211" @@ -250,6 +255,7 @@ proc test_upper {} { } test_print_accept "print upper(v_set)" "e6" test_print_accept "print upper(v_set_range)" "e5" + test_print_accept "print upper(v_numbered_set)" "n5" test_print_accept "print upper(v_char_range)" "'Z'" test_print_accept "print upper(v_bool_range)" "FALSE" test_print_accept "print upper(v_long_range)" "3211" @@ -280,6 +286,7 @@ proc test_upper {} { } test_print_accept "print upper(m_set_arr)" "e6" test_print_accept "print upper(m_set_range_arr)" "e5" + test_print_accept "print upper(m_numbered_set_arr)" "n5" test_print_accept "print upper(m_char_range_arr)" "'Z'" test_print_accept "print upper(m_bool_range_arr)" "FALSE" test_print_accept "print upper(m_long_range_arr)" "3211" @@ -296,6 +303,7 @@ proc test_upper {} { } test_print_accept "print upper(v_set_arr)" "e6" test_print_accept "print upper(v_set_range_arr)" "e5" + test_print_accept "print upper(v_numbered_set_arr)" "n5" test_print_accept "print upper(v_char_range_arr)" "'Z'" test_print_accept "print upper(v_bool_range_arr)" "FALSE" test_print_accept "print upper(v_long_range_arr)" "3211" @@ -351,6 +359,7 @@ proc test_size {} { test_print_accept "print size(m_struct)" "36" } test_print_accept "print size(m_set)" "1" + test_print_accept "print size(m_numbered_set)" "1" test_print_accept "print size(m_char_range)" "1" test_print_accept "print size(m_range_arr)" "17" test_print_accept "print size(m_chars)" "20" @@ -374,6 +383,7 @@ proc test_size {} { test_print_accept "print size(v_struct)" "36" } test_print_accept "print size(v_set)" "1" + test_print_accept "print size(v_numbered_set)" "1" test_print_accept "print size(v_char_range)" "1" test_print_accept "print size(v_range_arr)" "17" test_print_accept "print size(v_chars)" "20" @@ -405,6 +415,7 @@ proc test_num {} { test_print_accept "print num(v_ulong)" "4444" test_print_accept "print num(v_set)" "2" test_print_accept "print num(v_set_range)" "2" + test_print_accept "print num(v_numbered_set)" "35" test_print_accept "print num(v_char_range)" "71" test_print_accept "print num(v_long_range)" "1000" test_print_accept "print num(v_range)" "23" diff --git a/gdb/testsuite/gdb.chill/extstruct-grt.ch b/gdb/testsuite/gdb.chill/extstruct-grt.ch new file mode 100644 index 0000000000..abd0d5ee3e --- /dev/null +++ b/gdb/testsuite/gdb.chill/extstruct-grt.ch @@ -0,0 +1,12 @@ +pot1: MODULE + +SYNMODE m_array1 = ARRAY (2:3) ulong; +SYNMODE m_struct = STRUCT (f1 int, + f2 REF m_array1, + f3 m_array1); +SYNMODE m_array3 = ARRAY (5:6) m_struct; +SYNMODE m_array4 = ARRAY (7:8) ARRAY (9:10) m_struct; + +GRANT all; + +END pot1; diff --git a/gdb/testsuite/gdb.chill/extstruct.ch b/gdb/testsuite/gdb.chill/extstruct.ch new file mode 100644 index 0000000000..649f60948e --- /dev/null +++ b/gdb/testsuite/gdb.chill/extstruct.ch @@ -0,0 +1,16 @@ +pottendo: MODULE + +<> USE_SEIZE_FILE "extstruct-grt.grt" <> +SEIZE m_array3; +SEIZE m_array4; + +SYNMODE m_x = STRUCT (i long, + ar m_array3); +SYNMODE m_y = STRUCT (i long, + ar m_array4); + +DCL x LONG; + +x := 10; + +END pottendo; diff --git a/gdb/testsuite/gdb.chill/extstruct.exp b/gdb/testsuite/gdb.chill/extstruct.exp new file mode 100644 index 0000000000..6ef4b9af71 --- /dev/null +++ b/gdb/testsuite/gdb.chill/extstruct.exp @@ -0,0 +1,65 @@ +# Copyright (C) 1992, 1994 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 +} + +if [skip_chill_tests] then { continue } + +set testfile2 "extstruct-grt" +set srcfile2 ${srcdir}/$subdir/${testfile2}.ch +if { [compile "${srcfile2} -g -c"] != "" } { + perror "Couldn't compile ${srcfile2}" + return -1 +} + +set testfile "extstruct" +set srcfile ${srcdir}/$subdir/${testfile}.ch +set binfile ${objdir}/${subdir}/${testfile}.exe +if { [compile "${srcfile} -g -o ${binfile} ${CHILL_RT0} ${CHILL_LIB}"] != "" } { + perror "Couldn't compile ${srcfile}" + return -1 +} + +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 $binfile + + send "set language chill\n" ; expect -re "$prompt $" + + send "set var \$i := m_x\[\]\n" ; expect -re "$prompt $" + gdb_test "print \$i" { = \[.i: 0, .ar: \[\(5:6\): \[.f1: 0, .f2: NULL, .f3: \[\(2:3\): 0\]\]\]\]} + + send "set var \$j := m_y\[\]\n" ; expect -re "$prompt $" + gdb_test "print \$j" { = \[.i: 0, .ar: \[\(7:8\): \[\(9:10\): \[.f1: 0, .f2: NULL, .f3: \[\(2:3\): 0\]\]\]\]\]} +} + +do_tests |