3 <title>Debugging with GDB
</title>
4 <meta http-equiv=
"Content-Type" content=
"text/html">
5 <meta name=
"description" content=
"Debugging with GDB">
6 <meta name=
"generator" content=
"makeinfo 4.3">
7 <link href=
"http://www.gnu.org/software/texinfo/" rel=
"generator-home">
12 Node:
<a name=
"How%20modes%20are%20displayed">How modes are displayed
</a>,
13 Next:
<a rel=
"next" accesskey=
"n" href=
"Locations.html#Locations">Locations
</a>,
14 Up:
<a rel=
"up" accesskey=
"u" href=
"Chill.html#Chill">Chill
</a>
18 <h5 class=
"subsubsection">How modes are displayed
</h5>
20 <p>The Chill Datatype- (Mode) support of GDB is directly related
21 with the functionality of the
<small>GNU
</small> Chill compiler, and therefore deviates
22 slightly from the standard specification of the Chill language. The
26 <dt><code></code><em>Discrete modes:
</em><code></code>
29 <li><em>Integer Modes
</em> which are predefined by
<code>BYTE, UBYTE, INT,
30 UINT, LONG, ULONG
</code>,
31 <li><em>Boolean Mode
</em> which is predefined by
<code>BOOL
</code>,
32 <li><em>Character Mode
</em> which is predefined by
<code>CHAR
</code>,
33 <li><em>Set Mode
</em> which is displayed by the keyword
<code>SET
</code>.
34 <pre class=
"smallexample"> (gdb) ptype x
35 type = SET (karli =
10, susi =
20, fritzi =
100)
37 If the type is an unnumbered set the set element values are omitted.
38 <li><em>Range Mode
</em> which is displayed by
39 <pre class=
"smallexample"> <code>type =
<basemode
>(
<lower bound
> :
<upper bound
>)
</code>
41 where
<code><lower bound
>,
<upper bound
></code> can be of any discrete literal
42 expression (e.g. set element names).
45 <br><dt><code></code><em>Powerset Mode:
</em><code></code>
46 <dd>A Powerset Mode is displayed by the keyword
<code>POWERSET
</code> followed by
47 the member mode of the powerset. The member mode can be any discrete mode.
48 <pre class=
"smallexample"> (gdb) ptype x
49 type = POWERSET SET (egon, hugo, otto)
52 <br><dt><code></code><em>Reference Modes:
</em><code></code>
55 <li><em>Bound Reference Mode
</em> which is displayed by the keyword
<code>REF
</code>
56 followed by the mode name to which the reference is bound.
57 <li><em>Free Reference Mode
</em> which is displayed by the keyword
<code>PTR
</code>.
60 <br><dt><code></code><em>Procedure mode
</em><code></code>
61 <dd>The procedure mode is displayed by
<code>type = PROC(
<parameter list
>)
62 <return mode
> EXCEPTIONS (
<exception list
>)
</code>. The
<code><parameter
63 list
></code> is a list of the parameter modes.
<code><return mode
></code> indicates
64 the mode of the result of the procedure if any. The exceptionlist lists
65 all possible exceptions which can be raised by the procedure.
67 <br><dt><code></code><em>Synchronization Modes:
</em><code></code>
70 <li><em>Event Mode
</em> which is displayed by
71 <pre class=
"smallexample"> <code>EVENT (
<event length
>)
</code>
73 where
<code>(
<event length
>)
</code> is optional.
74 <li><em>Buffer Mode
</em> which is displayed by
75 <pre class=
"smallexample"> <code>BUFFER (
<buffer length
>)
<buffer element mode
></code>
77 where
<code>(
<buffer length
>)
</code> is optional.
80 <br><dt><code></code><em>Timing Modes:
</em><code></code>
83 <li><em>Duration Mode
</em> which is predefined by
<code>DURATION
</code>
84 <li><em>Absolute Time Mode
</em> which is predefined by
<code>TIME
</code>
87 <br><dt><code></code><em>Real Modes:
</em><code></code>
88 <dd>Real Modes are predefined with
<code>REAL
</code> and
<code>LONG_REAL
</code>.
90 <br><dt><code></code><em>String Modes:
</em><code></code>
93 <li><em>Character String Mode
</em> which is displayed by
94 <pre class=
"smallexample"> <code>CHARS(
<string length
>)
</code>
96 followed by the keyword
<code>VARYING
</code> if the String Mode is a varying
98 <li><em>Bit String Mode
</em> which is displayed by
99 <pre class=
"smallexample"> <code>BOOLS(
<string
104 <br><dt><code></code><em>Array Mode:
</em><code></code>
105 <dd>The Array Mode is displayed by the keyword
<code>ARRAY(
<range
>)
</code>
106 followed by the element mode (which may in turn be an array mode).
107 <pre class=
"smallexample"> (gdb) ptype x
110 SET (karli =
10, susi =
20, fritzi =
100)
113 <br><dt><code></code><em>Structure Mode
</em><code></code>
114 <dd>The Structure mode is displayed by the keyword
<code>STRUCT(
<field
115 list
>)
</code>. The
<code><field list
></code> consists of names and modes of fields
116 of the structure. Variant structures have the keyword
<code>CASE
<field
>
117 OF
<variant fields
> ESAC
</code> in their field list. Since the current version
118 of the GNU Chill compiler doesn't implement tag processing (no runtime
119 checks of variant fields, and therefore no debugging info), the output
120 always displays all variant fields.
121 <pre class=
"smallexample"> (gdb) ptype str