diff options
author | Elena Zannoni <ezannoni@kwikemart.cygnus.com> | 2000-03-14 17:01:05 +0000 |
---|---|---|
committer | Elena Zannoni <ezannoni@kwikemart.cygnus.com> | 2000-03-14 17:01:05 +0000 |
commit | 751a959bb828352de7d12339268c363a0773af5f (patch) | |
tree | 89bf929b3fcceefb301376aae1b63096746e733e /gdb/testsuite/gdb.base/printcmds.c | |
parent | Add missing ChangeLog entry for: (diff) | |
download | binutils-gdb-751a959bb828352de7d12339268c363a0773af5f.tar.gz binutils-gdb-751a959bb828352de7d12339268c363a0773af5f.tar.bz2 binutils-gdb-751a959bb828352de7d12339268c363a0773af5f.zip |
2000-03-14 Elena Zannoni <ezannoni@kwikemart.cygnus.com>
* eval.c (evaluate_subexp_with_coercion): Add call to
check_typedef, to handle typedeffed vars correctly.
* gdb.base/printcmds.c: Add typedeffed arrays.
* gdb.base/printcmds.exp (test_print_typedef_arrays): New
procedure to test arrays that are typedef'd.
Diffstat (limited to 'gdb/testsuite/gdb.base/printcmds.c')
-rw-r--r-- | gdb/testsuite/gdb.base/printcmds.c | 8 |
1 files changed, 7 insertions, 1 deletions
diff --git a/gdb/testsuite/gdb.base/printcmds.c b/gdb/testsuite/gdb.base/printcmds.c index 27080741a3b..f49c3ebf1b7 100644 --- a/gdb/testsuite/gdb.base/printcmds.c +++ b/gdb/testsuite/gdb.base/printcmds.c @@ -59,6 +59,12 @@ unsigned char ctable2[] = { /* Single and multidimensional arrays to test access and printing of array members. */ +typedef int ArrayInt [10]; +ArrayInt a1 = {2,4,6,8,10,12,14,16,18,20}; + +typedef char ArrayChar [5]; +ArrayChar a2 = {'a','b','c','d','\0'}; + int int1dim[12] = {0,1,2,3,4,5,6,7,8,9,10,11}; int int2dim[3][4] = {{0,1,2,3},{4,5,6,7},{8,9,10,11}}; int int3dim[2][3][2] = {{{0,1},{2,3},{4,5}},{{6,7},{8,9},{10,11}}}; @@ -97,5 +103,5 @@ int main () /* Prevent AIX linker from removing variables. */ return ctable1[0] + ctable2[0] + int1dim[0] + int2dim[0][0] + int3dim[0][0][0] + int4dim[0][0][0][0] + teststring[0] + - *parrays -> array1; + *parrays -> array1 + a1[0] + a2[0]; } |