Whole document tree
    

Whole document tree

Debugging with GDB: How modes are displayed
[ < ] [ > ]   [ << ] [ Up ] [ >> ]         [Top] [Contents] [Index] [ ? ]

9.4.3.1 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
)


[ < ] [ > ]   [ << ] [ Up ] [ >> ]         [Top] [Contents] [Index] [ ? ]

This document was generated by root on January, 30 2002 using texi2html