Hi, here are some patches to enhance the gdb Modula-2 language mode. In summary arrays (both static and unbounded) are now handled correctly within expressions and data type description. Unbounded arrays also have their dynamic bounds displayed and HIGH and SIZE also understand unbounded arrays. I've updated the gdb.texinfo to reflect the changes and also include a number of dejagnu test cases which minic two of the documentation examples and 11 other test cases. I've tested gdb and the changes introduce no further failures (and it implements a commented out test in the repro (gdb.modula2/unbounded-array.exp ptype). Here is an example of usage - taken from the new documentation: The following example shows a static @code{ARRAY} being passed into a procedure as an unbounded @code{ARRAY}. The @code{ptype} command on the unbounded @code{ARRAY} reveals its dynamic bounds. @value{GDBN} can be requested to @code{print} the entire @code{ARRAY} or rows or elements of the dynamic array. @smallexample TYPE pos = RECORD x, y: CARDINAL ; END ; PROCEDURE foo (a: ARRAY OF ARRAY OF pos) ; BEGIN END foo ; VAR b: ARRAY [1..2] OF ARRAY [2..3] OF pos ; BEGIN b[1][2].x := 4 ; b[1][2].y := 2 ; foo (b) @end smallexample @smallexample (@value{GDBP}) break foo (@value{GDBP}) run (@value{GDBP}) set lang modula-2 (@value{GDBP}) ptype b type = ARRAY [1..2] OF ARRAY [2..3] OF RECORD x : CARDINAL; y : CARDINAL; END (@value{GDBP}) ptype a type = ARRAY <0..1> OF ARRAY <0..1> OF RECORD x : CARDINAL; y : CARDINAL; END (@value{GDBP}) print a[0] $1 = @{@{x = 4, y = 2@}, @{x = 0, y = 0@}, @} (@value{GDBP}) print a[0][0] $2 = @{x = 4, y = 2@} (@value{GDBP}) print a[0][0].x $3 = 4 (@value{GDBP}) print HIGH(a) $4 = 1 (@value{GDBP}) print HIGH(a[0]) $5 = 1 (@value{GDBP}) print SIZE(a) $6 = 32 (@value{GDBP}) print SIZE(a[0]) $7 = 16 @end smallexample The instrinsic procedure functions @code{SIZE} and @code{HIGH} will return the last index into the @code{ARRAY} and the number of bytes of data used by the @code{ARRAY} respectively. The range of an unbounded @code{ARRAY} is shown inside @code{<} and @code{>} to differentiate from static array bounds @code{[} and @code{]}. Hope these patches are useful and perhaps they might be applied when at a convenient point in the correct development phase. I acknowledge that the top level diffs need to go to the gcc mailing list - and will post them there - I thought it useful to post the complete set here as well regards, Gaius ---------------------------------------------------------------------- here is a tar archive with the new files