15.4.9.4 Modula-2 Types

Currently gdb can print the following data types in Modula-2
syntax: array types, record types, set types, pointer types, procedure
types, enumerated types, subrange types and base types. You can also
print the contents of variables declared using these type.
This section gives a number of simple source code examples together with
sample gdb sessions.

Note that at present you cannot interactively manipulate set
expressions using the debugger.

The following example shows how you might declare an array in Modula-2
and how you can interact with gdb to print its type and contents:

VAR
s: ARRAY [-10..10] OF CHAR ;

(gdb) ptype s
ARRAY [-10..10] OF CHAR

Note that the array handling is not yet complete and although the type
is printed correctly, expression handling still assumes that all
arrays have a lower bound of zero and not -10 as in the example
above.