How modes are displayed
.......................
The Chill Datatype- (Mode) support of GDB is directly related with
the functionality of the GNU Chill compiler, and therefore deviates
slightly from the standard specification of the Chill language. The
provided modes are:
`_Discrete modes:_'
* _Integer Modes_ which are predefined by `BYTE, UBYTE, INT,
UINT, LONG, ULONG',
* _Boolean Mode_ which is predefined by `BOOL',
* _Character Mode_ which is predefined by `CHAR',
* _Set Mode_ which is displayed by the keyword `SET'.
(gdb) ptype x
type = SET (karli = 10, susi = 20, fritzi = 100)
If the type is an unnumbered set the set element values are
omitted.
* _Range Mode_ which is displayed by
`type = <basemode>(<lower bound> : <upper bound>)'
where `<lower bound>, <upper bound>' can be of any discrete
literal expression (e.g. set element names).
`_Powerset Mode:_'
A Powerset Mode is displayed by the keyword `POWERSET' followed by
the member mode of the powerset. The member mode can be any
discrete mode.
(gdb) ptype x
type = POWERSET SET (egon, hugo, otto)
`_Reference Modes:_'
* _Bound Reference Mode_ which is displayed by the keyword `REF'
followed by the mode name to which the reference is bound.
* _Free Reference Mode_ which is displayed by the keyword `PTR'.
`_Procedure mode_'
The procedure mode is displayed by `type = PROC(<parameter list>)
<return mode> EXCEPTIONS (<exception list>)'. The `<parameter
list>' is a list of the parameter modes. `<return mode>' indicates
the mode of the result of the procedure if any. The exceptionlist
lists all possible exceptions which can be raised by the procedure.
`_Synchronization Modes:_'
* _Event Mode_ which is displayed by
`EVENT (<event length>)'
where `(<event length>)' is optional.
* _Buffer Mode_ which is displayed by
`BUFFER (<buffer length>)<buffer element mode>'
where `(<buffer length>)' is optional.
`_Timing Modes:_'
* _Duration Mode_ which is predefined by `DURATION'
* _Absolute Time Mode_ which is predefined by `TIME'
`_Real Modes:_'
Real Modes are predefined with `REAL' and `LONG_REAL'.
`_String Modes:_'
* _Character String Mode_ which is displayed by
`CHARS(<string length>)'
followed by the keyword `VARYING' if the String Mode is a
varying mode
* _Bit String Mode_ which is displayed by
`BOOLS(<string
length>)'
`_Array Mode:_'
The Array Mode is displayed by the keyword `ARRAY(<range>)'
followed by the element mode (which may in turn be an array mode).
(gdb) ptype x
type = ARRAY (1:42)
ARRAY (1:20)
SET (karli = 10, susi = 20, fritzi = 100)
`_Structure Mode_'
The Structure mode is displayed by the keyword `STRUCT(<field
list>)'. The `<field list>' consists of names and modes of fields
of the structure. Variant structures have the keyword `CASE
<field> OF <variant fields> ESAC' in their field list. Since the
current version of the GNU Chill compiler doesn't implement tag
processing (no runtime checks of variant fields, and therefore no
debugging info), the output always displays all variant fields.
(gdb) ptype str
type = STRUCT (
as x,
bs x,
CASE bs OF
(karli):
cs a
(ott):
ds x
ESAC
)