aboutsummaryrefslogtreecommitdiff
path: root/gdb/testsuite
diff options
context:
space:
mode:
authorPer Bothner <per@bothner.com>1995-02-21 00:20:48 +0000
committerPer Bothner <per@bothner.com>1995-02-21 00:20:48 +0000
commit9fa343240eeebd5427da205d45758bd8b98a9bb9 (patch)
tree33cfd9b7442aa2d02983d4faddda569944fa9c18 /gdb/testsuite
parentd940a47ef84d6a3d7bc91c6616ce987411fbf0bd (diff)
downloadfsf-binutils-gdb-9fa343240eeebd5427da205d45758bd8b98a9bb9.zip
fsf-binutils-gdb-9fa343240eeebd5427da205d45758bd8b98a9bb9.tar.gz
fsf-binutils-gdb-9fa343240eeebd5427da205d45758bd8b98a9bb9.tar.bz2
* chillvars.ch: Add missing INIT's.
* chillvars.exp: Allow builtin types as either case. E.g. (BOOL|bool).
Diffstat (limited to 'gdb/testsuite')
-rw-r--r--gdb/testsuite/gdb.chill/ChangeLog5
-rw-r--r--gdb/testsuite/gdb.chill/chillvars.ch48
-rw-r--r--gdb/testsuite/gdb.chill/chillvars.exp124
3 files changed, 91 insertions, 86 deletions
diff --git a/gdb/testsuite/gdb.chill/ChangeLog b/gdb/testsuite/gdb.chill/ChangeLog
index 3ddad40..46872bd 100644
--- a/gdb/testsuite/gdb.chill/ChangeLog
+++ b/gdb/testsuite/gdb.chill/ChangeLog
@@ -1,3 +1,8 @@
+Mon Feb 20 16:19:58 1995 Per Bothner <bothner@kalessin.cygnus.com>
+
+ * chillvars.ch: Add missing INIT's.
+ * chillvars.exp: Allow builtin types as either case. E.g. (BOOL|bool).
+
Sun Feb 12 11:26:08 1995 Per Bothner <bothner@kalessin.cygnus.com>
* pr-6292.ch, pr-6292.exp, Makefile.in: New test case.
diff --git a/gdb/testsuite/gdb.chill/chillvars.ch b/gdb/testsuite/gdb.chill/chillvars.ch
index 0b732c0..3df623b 100644
--- a/gdb/testsuite/gdb.chill/chillvars.ch
+++ b/gdb/testsuite/gdb.chill/chillvars.ch
@@ -1,22 +1,22 @@
testvars: MODULE
-DCL bool_true BOOL := TRUE;
-DCL bool_false BOOL := FALSE;
+DCL bool_true BOOL INIT := TRUE;
+DCL bool_false BOOL INIT := FALSE;
DCL booltable1 ARRAY (0:3) BOOL INIT := [ TRUE, FALSE, FALSE, TRUE ];
DCL booltable2 ARRAY (4:7) BOOL INIT := [ TRUE, FALSE, FALSE, TRUE ];
-DCL control_char CHAR := C'07';
-DCL printable_char CHAR := 'a';
+DCL control_char CHAR INIT := C'07';
+DCL printable_char CHAR INIT := 'a';
DCL chartable1 ARRAY (0:2) CHAR INIT := [ C'00', C'01', C'02' ];
DCL chartable2 ARRAY (3:5) CHAR INIT := [ C'00', C'01', C'02' ];
-DCL string1 CHARS (4) := 'abcd';
-DCL string2 CHARS (5) := 'ef' // C'00' // 'gh';
-DCL string3 CHARS (6) := 'ef' // 'gh' // 'ij';
-DCL string4 CHARS (7) := (6) 'z' // C'00';
+DCL string1 CHARS (4) INIT := 'abcd';
+DCL string2 CHARS (5) INIT := 'ef' // C'00' // 'gh';
+DCL string3 CHARS (6) INIT := 'ef' // 'gh' // 'ij';
+DCL string4 CHARS (7) INIT := (6) 'z' // C'00';
-DCL byte_low BYTE := -128;
-DCL byte_high BYTE := 127;
+DCL byte_low BYTE INIT := -128;
+DCL byte_high BYTE INIT := 127;
DCL bytetable1 ARRAY (0:4) BYTE INIT := [ -2, -1, 0, 1, 2 ];
DCL bytetable2 ARRAY (5:9) BYTE INIT := [ -2, -1, 0, 1, 2 ];
DCL bytetable3 ARRAY (1:2,'c':'d',FALSE:TRUE) BYTE
@@ -24,38 +24,38 @@ DCL bytetable3 ARRAY (1:2,'c':'d',FALSE:TRUE) BYTE
DCL bytetable4 ARRAY (1:2) ARRAY ('c':'d') ARRAY (FALSE:TRUE) BYTE
INIT := [ [ [ 0, 1 ], [ 2, 3 ] ], [ [ 4, 5 ], [ 6, 7 ] ] ];
-DCL ubyte_low UBYTE := 0;
-DCL ubyte_high UBYTE := 255;
+DCL ubyte_low UBYTE INIT := 0;
+DCL ubyte_high UBYTE INIT := 255;
DCL ubytetable1 ARRAY (0:4) UBYTE INIT := [ 0, 1, 2, 3, 4 ];
DCL ubytetable2 ARRAY (5:9) UBYTE INIT := [ 0, 1, 2, 3, 4 ];
-DCL int_low INT := -32_768;
-DCL int_high INT := 32_767;
+DCL int_low INT INIT := -32_768;
+DCL int_high INT INIT := 32_767;
DCL inttable1 ARRAY (0:4) INT INIT := [ -2, -1, 0, 1, 2 ];
DCL inttable2 ARRAY (5:9) INT INIT := [ -2, -1, 0, 1, 2 ];
-DCL uint_low UINT := 0;
-DCL uint_high UINT := 65_535;
+DCL uint_low UINT INIT := 0;
+DCL uint_high UINT INIT := 65_535;
DCL uinttable1 ARRAY (0:4) UINT INIT := [ 0, 1, 2, 3, 4 ];
DCL uinttable2 ARRAY (5:9) UINT INIT := [ 0, 1, 2, 3, 4 ];
-DCL long_low LONG := -2_147_483_648;
-DCL long_high LONG := 2_147_483_647;
+DCL long_low LONG INIT := -2_147_483_648;
+DCL long_high LONG INIT := 2_147_483_647;
DCL longtable1 ARRAY (0:4) LONG INIT := [ -2, -1, 0, 1, 2 ];
DCL longtable2 ARRAY (5:9) LONG INIT := [ -2, -1, 0, 1, 2 ];
-DCL ulong_low ULONG := 0;
-DCL ulong_high ULONG := 4_294_967_295;
+DCL ulong_low ULONG INIT := 0;
+DCL ulong_high ULONG INIT := 4_294_967_295;
DCL ulongtable1 ARRAY (0:4) ULONG INIT := [ 0, 1, 2, 3, 4 ];
DCL ulongtable2 ARRAY (5:9) ULONG INIT := [ 0, 1, 2, 3, 4 ];
-DCL real1 FLOAT := 3.14159265358;
-DCL real2 FLOAT := -3.14159265358;
+DCL real1 FLOAT INIT := 3.14159265358;
+DCL real2 FLOAT INIT := -3.14159265358;
DCL realtable1 ARRAY (0:4) FLOAT INIT := [ -2.0, -1.0, 0.0, 1.0, 2.0 ];
DCL realtable2 ARRAY (5:9) FLOAT INIT := [ -2.0, -1.0, 0.0, 1.0, 2.0 ];
-DCL long_real1 DOUBLE := 3.14e300;
-DCL long_real2 DOUBLE := -3.14e-300;
+DCL long_real1 DOUBLE INIT := 3.14e300;
+DCL long_real2 DOUBLE INIT := -3.14e-300;
DCL longrealtable1 ARRAY (0:4) DOUBLE INIT := [ -2.0, -1.0, 0.0, 1.0, 2.0 ];
DCL longrealtable2 ARRAY (5:9) DOUBLE INIT := [ -2.0, -1.0, 0.0, 1.0, 2.0 ];
diff --git a/gdb/testsuite/gdb.chill/chillvars.exp b/gdb/testsuite/gdb.chill/chillvars.exp
index 6b430cf..05a9810 100644
--- a/gdb/testsuite/gdb.chill/chillvars.exp
+++ b/gdb/testsuite/gdb.chill/chillvars.exp
@@ -65,87 +65,87 @@ proc do_tests {} {
proc test_BOOL {} {
- gdb_test "ptype bool_true" "type = BOOL"
- gdb_test "ptype bool_false" "type = BOOL"
- gdb_test "whatis bool_true" "type = BOOL"
- gdb_test "whatis bool_false" "type = BOOL"
+ gdb_test "ptype bool_true" "type = (BOOL|bool)"
+ gdb_test "ptype bool_false" "type = (BOOL|bool)"
+ gdb_test "whatis bool_true" "type = (BOOL|bool)"
+ gdb_test "whatis bool_false" "type = (BOOL|bool)"
gdb_test "print bool_false" " = FALSE"
gdb_test "print bool_true" " = TRUE"
}
proc test_CHAR {} {
- gdb_test "ptype control_char" "type = CHAR"
- gdb_test "whatis control_char" "type = CHAR"
+ gdb_test "ptype control_char" "type = (CHAR|char)"
+ gdb_test "whatis control_char" "type = (CHAR|char)"
gdb_test "print control_char" " = C'07'"
- gdb_test "ptype printable_char" "type = CHAR"
- gdb_test "whatis printable_char" "type = CHAR"
+ gdb_test "ptype printable_char" "type = (CHAR|char)"
+ gdb_test "whatis printable_char" "type = (CHAR|char)"
gdb_test "print printable_char" " = 'a'"
}
proc test_BYTE {} {
- gdb_test "ptype byte_low" "type = BYTE"
- gdb_test "whatis byte_low" "type = BYTE"
+ gdb_test "ptype byte_low" "type = (BYTE|byte)"
+ gdb_test "whatis byte_low" "type = (BYTE|byte)"
gdb_test "print byte_low" " = -128"
- gdb_test "ptype byte_high" "type = BYTE"
- gdb_test "whatis byte_high" "type = BYTE"
+ gdb_test "ptype byte_high" "type = (BYTE|byte)"
+ gdb_test "whatis byte_high" "type = (BYTE|byte)"
gdb_test "print byte_high" " = 127"
}
proc test_UBYTE {} {
- gdb_test "ptype ubyte_low" "type = UBYTE"
- gdb_test "whatis ubyte_low" "type = UBYTE"
+ gdb_test "ptype ubyte_low" "type = (UBYTE|ubyte)"
+ gdb_test "whatis ubyte_low" "type = (UBYTE|ubyte)"
gdb_test "print ubyte_low" " = 0"
- gdb_test "ptype ubyte_high" "type = UBYTE"
- gdb_test "whatis ubyte_high" "type = UBYTE"
+ gdb_test "ptype ubyte_high" "type = (UBYTE|ubyte)"
+ gdb_test "whatis ubyte_high" "type = (UBYTE|ubyte)"
gdb_test "print ubyte_high" " = 255"
}
proc test_INT {} {
- gdb_test "ptype int_low" "type = INT"
- gdb_test "whatis int_low" "type = INT"
+ gdb_test "ptype int_low" "type = (INT|int)"
+ gdb_test "whatis int_low" "type = (INT|int)"
gdb_test "print int_low" " = -32768"
- gdb_test "ptype int_high" "type = INT"
- gdb_test "whatis int_high" "type = INT"
+ gdb_test "ptype int_high" "type = (INT|int)"
+ gdb_test "whatis int_high" "type = (INT|int)"
gdb_test "print int_high" " = 32767"
}
proc test_UINT {} {
- gdb_test "ptype uint_low" "type = UINT"
- gdb_test "whatis uint_low" "type = UINT"
+ gdb_test "ptype uint_low" "type = (UINT|uint)"
+ gdb_test "whatis uint_low" "type = (UINT|uint)"
gdb_test "print uint_low" " = 0"
- gdb_test "ptype uint_high" "type = UINT"
- gdb_test "whatis uint_high" "type = UINT"
+ gdb_test "ptype uint_high" "type = (UINT|uint)"
+ gdb_test "whatis uint_high" "type = (UINT|uint)"
gdb_test "print uint_high" " = 65535"
}
proc test_LONG {} {
- gdb_test "ptype long_low" "type = LONG"
- gdb_test "whatis long_low" "type = LONG"
+ gdb_test "ptype long_low" "type = (LONG|long)"
+ gdb_test "whatis long_low" "type = (LONG|long)"
gdb_test "print long_low" " = -2147483648"
- gdb_test "ptype long_high" "type = LONG"
- gdb_test "whatis long_high" "type = LONG"
+ gdb_test "ptype long_high" "type = (LONG|long)"
+ gdb_test "whatis long_high" "type = (LONG|long)"
gdb_test "print long_high" " = 2147483647"
}
proc test_ULONG {} {
- gdb_test "ptype ulong_low" "type = ULONG"
- gdb_test "whatis ulong_low" "type = ULONG"
+ gdb_test "ptype ulong_low" "type = (ULONG|ulong)"
+ gdb_test "whatis ulong_low" "type = (ULONG|ulong)"
gdb_test "print ulong_low" " = 0"
- gdb_test "ptype ulong_high" "type = ULONG"
- gdb_test "whatis ulong_high" "type = ULONG"
+ gdb_test "ptype ulong_high" "type = (ULONG|ulong)"
+ gdb_test "whatis ulong_high" "type = (ULONG|ulong)"
gdb_test "print ulong_high" " = 4294967295"
}
proc test_REAL {} {
- gdb_test "ptype real1" "type = FLOAT"
- gdb_test "whatis real1" "type = FLOAT"
+ gdb_test "ptype real1" "type = (FLOAT|float)"
+ gdb_test "whatis real1" "type = (FLOAT|float)"
gdb_test "print real1" " = 3.14159274"
}
proc test_LONG_REAL {} {
- gdb_test "ptype long_real1" "type = DOUBLE"
- gdb_test "whatis long_real1" "type = DOUBLE"
+ gdb_test "ptype long_real1" "type = (DOUBLE|double)"
+ gdb_test "whatis long_real1" "type = (DOUBLE|double)"
gdb_test "print long_real1" " = 3\\.1400000000000001e\\+300"
}
@@ -153,90 +153,90 @@ proc test_POWERSET {} {
}
proc test_arrays {} {
- gdb_test "ptype booltable1" "type = ARRAY \[(\]+0:3\[)\]+ BOOL"
+ gdb_test "ptype booltable1" "type = ARRAY \\(+0:3\\)+ (BOOL|bool)"
gdb_test_exact "print booltable1" \
{ = [(0): TRUE, (1:2): FALSE, (3): TRUE]}
- gdb_test "ptype booltable2" "type = ARRAY \[(\]+4:7\[)\]+ BOOL"
+ gdb_test "ptype booltable2" "type = ARRAY \\(+4:7\\)+ (BOOL|bool)"
gdb_test_exact "print booltable2" { = [(4): TRUE, (5:6): FALSE, (7): TRUE]}
- gdb_test "ptype chartable1" "type = ARRAY \[(\]+0:2\[)\]+ CHAR"
+ gdb_test "ptype chartable1" "type = ARRAY \\(+0:2\\)+ (CHAR|char)"
gdb_test_exact "print chartable1" {= [(0): C'00', (1): C'01', (2): C'02']}
- gdb_test "ptype chartable2" "type = ARRAY \[(\]+3:5\[)\]+ CHAR"
+ gdb_test "ptype chartable2" "type = ARRAY \\(+3:5\\)+ (CHAR|char)"
gdb_test_exact "print chartable2" \
{= [(3): C'00', (4): C'01', (5): C'02']}
- gdb_test "ptype bytetable1" "type = ARRAY \[(\]+0:4\[)\]+ BYTE"
+ gdb_test "ptype bytetable1" "type = ARRAY \\(+0:4\\)+ (BYTE|byte)"
gdb_test_exact "print bytetable1" \
{= [(0): -2, (1): -1, (2): 0, (3): 1, (4): 2]}
- gdb_test "ptype bytetable2" "type = ARRAY \[(\]+5:9\[)\]+ BYTE"
+ gdb_test "ptype bytetable2" "type = ARRAY \\(+5:9\\)+ (BYTE|byte)"
gdb_test_exact "print bytetable2" \
{= [(5): -2, (6): -1, (7): 0, (8): 1, (9): 2]}
- gdb_test_exact "ptype bytetable3" \
- {type = ARRAY (1:2) ARRAY ('c':'d') ARRAY (FALSE:TRUE) BYTE}
+ gdb_test "ptype bytetable3" \
+ "type = ARRAY \\(1:2\\) ARRAY \\('c':'d'\\) ARRAY \\(FALSE:TRUE\\) (BYTE|byte)"
gdb_test_exact "print bytetable3" \
{= [(1): [('c'): [(FALSE): 0, (TRUE): 1], ('d'): [(FALSE): 2, (TRUE): 3]], (2): [('c'): [(FALSE): 4, (TRUE): 5], ('d'): [(FALSE): 6, (TRUE): 7]]]}
- gdb_test_exact "ptype bytetable4" \
- {type = ARRAY (1:2) ARRAY ('c':'d') ARRAY (FALSE:TRUE) BYTE}
+ gdb_test "ptype bytetable4" \
+ "type = ARRAY \\(1:2\\) ARRAY \\('c':'d'\\) ARRAY \\(FALSE:TRUE\\) (BYTE|byte)"
gdb_test_exact "print bytetable4" \
{= [(1): [('c'): [(FALSE): 0, (TRUE): 1], ('d'): [(FALSE): 2, (TRUE): 3]], (2): [('c'): [(FALSE): 4, (TRUE): 5], ('d'): [(FALSE): 6, (TRUE): 7]]]}
- gdb_test "ptype ubytetable1" "type = ARRAY \[(\]+0:4\[)\]+ UBYTE"
+ gdb_test "ptype ubytetable1" "type = ARRAY \\(+0:4\\)+ (UBYTE|ubyte)"
gdb_test_exact "print ubytetable1" \
{= [(0): 0, (1): 1, (2): 2, (3): 3, (4): 4]}
- gdb_test "ptype ubytetable2" "type = ARRAY \[(\]+5:9\[)\]+ UBYTE"
+ gdb_test "ptype ubytetable2" "type = ARRAY \\(+5:9\\)+ (UBYTE|ubyte)"
gdb_test_exact "print ubytetable2" \
{= [(5): 0, (6): 1, (7): 2, (8): 3, (9): 4]}
- gdb_test "ptype inttable1" "type = ARRAY \[(\]+0:4\[)\]+ INT"
+ gdb_test "ptype inttable1" "type = ARRAY \\(+0:4\\)+ (INT|int)"
gdb_test_exact "print inttable1" \
{= [(0): -2, (1): -1, (2): 0, (3): 1, (4): 2]}
- gdb_test "ptype inttable2" "type = ARRAY \[(\]+5:9\[)\]+ INT"
+ gdb_test "ptype inttable2" "type = ARRAY \\(+5:9\\)+ (INT|int)"
gdb_test_exact "print inttable2" \
{= [(5): -2, (6): -1, (7): 0, (8): 1, (9): 2]}
- gdb_test "ptype uinttable1" "type = ARRAY \[(\]+0:4\[)\]+ UINT"
+ gdb_test "ptype uinttable1" "type = ARRAY \\(+0:4\\)+ (UINT|uint)"
gdb_test_exact "print uinttable1" \
{= [(0): 0, (1): 1, (2): 2, (3): 3, (4): 4]}
- gdb_test "ptype uinttable2" "type = ARRAY \[(\]+5:9\[)\]+ UINT"
+ gdb_test "ptype uinttable2" "type = ARRAY \\(+5:9\\)+ (UINT|uint)"
gdb_test_exact "print uinttable2" \
{= [(5): 0, (6): 1, (7): 2, (8): 3, (9): 4]}
- gdb_test "ptype longtable1" "type = ARRAY \[(\]+0:4\[)\]+ LONG"
+ gdb_test "ptype longtable1" "type = ARRAY \\(+0:4\\)+ (LONG|long)"
gdb_test_exact "print longtable1" \
{= [(0): -2, (1): -1, (2): 0, (3): 1, (4): 2]}
- gdb_test "ptype longtable2" "type = ARRAY \[(\]+5:9\[)\]+ LONG"
+ gdb_test "ptype longtable2" "type = ARRAY \\(+5:9\\)+ (LONG|long)"
gdb_test_exact "print longtable2" \
{= [(5): -2, (6): -1, (7): 0, (8): 1, (9): 2]}
- gdb_test "ptype ulongtable1" "type = ARRAY \[(\]+0:4\[)\]+ ULONG"
+ gdb_test "ptype ulongtable1" "type = ARRAY \\(+0:4\\)+ (ULONG|ulong)"
gdb_test_exact "print ulongtable1" \
{= [(0): 0, (1): 1, (2): 2, (3): 3, (4): 4]}
- gdb_test "ptype ulongtable2" "type = ARRAY \[(\]+5:9\[)\]+ ULONG"
+ gdb_test "ptype ulongtable2" "type = ARRAY \\(+5:9\\)+ (ULONG|ulong)"
gdb_test_exact "print ulongtable2" \
{= [(5): 0, (6): 1, (7): 2, (8): 3, (9): 4]}
- gdb_test "ptype realtable1" "type = ARRAY \[(\]+0:4\[)\]+ FLOAT"
+ gdb_test "ptype realtable1" "type = ARRAY \\(+0:4\\)+ (FLOAT|float)"
gdb_test_exact "print realtable1" \
{= [(0): -2, (1): -1, (2): 0, (3): 1, (4): 2]}
- gdb_test "ptype realtable2" "type = ARRAY \[(\]+5:9\[)\]+ FLOAT"
+ gdb_test "ptype realtable2" "type = ARRAY \\(+5:9\\)+ (FLOAT|float)"
gdb_test_exact "print realtable2" \
{= [(5): -2, (6): -1, (7): 0, (8): 1, (9): 2]}
- gdb_test "ptype longrealtable1" "type = ARRAY \[(\]+0:4\[)\]+ DOUBLE"
+ gdb_test "ptype longrealtable1" "type = ARRAY \\(+0:4\\)+ (DOUBLE|double)"
gdb_test_exact "print longrealtable1" \
{= [(0): -2, (1): -1, (2): 0, (3): 1, (4): 2]}
- gdb_test "ptype longrealtable2" "type = ARRAY \[(\]+5:9\[)\]+ DOUBLE"
+ gdb_test "ptype longrealtable2" "type = ARRAY \\(+5:9\\)+ (DOUBLE|double)"
gdb_test_exact "print longrealtable2" \
{= [(5): -2, (6): -1, (7): 0, (8): 1, (9): 2]}
}
@@ -275,11 +275,11 @@ proc test_strings {} {
proc test_structs {} {
gdb_test "ptype struct1" \
- "type = STRUCT \[(\]+.*abool BOOL,.*aint INT,.*astring CHARS \[(\]+8\[)\]+.*\[)\]+"
+ "type = STRUCT \\(+.*abool (BOOL|bool),.*aint (INT|int),.*astring CHARS \\(+8\\)+.*\\)+"
gdb_test "print struct1" \
".* = \\\[\.abool: TRUE, \.aint: 123, \.astring: \"a string\"\\\]"
gdb_test "ptype struct2" \
- "type = STRUCT \[(\]+.*abool BOOL,.*nstruct simple_struct,.*aint INT.*\[)\]+"
+ "type = STRUCT \\(+.*abool (BOOL|bool),.*nstruct simple_struct,.*aint (INT|int).*\\)+"
gdb_test "print struct2" \
".* = \\\[.abool: TRUE, \.nstruct: \\\[\.abool: FALSE, \.aint: 456, \.astring: \"deadbeef\"\\\], \.aint: 789\\\]"
}