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=
"Locations">Locations
</a>,
13 Next:
<a rel=
"next" accesskey=
"n" href=
"Values-and-their-Operations.html#Values%20and%20their%20Operations">Values and their Operations
</a>,
14 Previous:
<a rel=
"previous" accesskey=
"p" href=
"How-modes-are-displayed.html#How%20modes%20are%20displayed">How modes are displayed
</a>,
15 Up:
<a rel=
"up" accesskey=
"u" href=
"Chill.html#Chill">Chill
</a>
19 <h5 class=
"subsubsection">Locations and their accesses
</h5>
21 <p>A location in Chill is an object which can contain values.
23 <p>A value of a location is generally accessed by the (declared) name of
24 the location. The output conforms to the specification of values in
25 Chill programs. How values are specified
26 is the topic of the next section,
<a href=
"Values-and-their-Operations.html#Values%20and%20their%20Operations">Values and their Operations
</a>.
28 <p>The pseudo-location
<code>RESULT
</code> (or
<code>result
</code>) can be used to
29 display or change the result of a currently-active procedure:
31 <pre class=
"smallexample"> set result := EXPR
34 <p>This does the same as the Chill action
<code>RESULT EXPR
</code> (which
35 is not available in GDB).
37 <p>Values of reference mode locations are printed by
<code>PTR(
<hex
38 value
>)
</code> in case of a free reference mode, and by
<code>(REF
<reference
39 mode
>) (
<hex-value
>)
</code> in case of a bound reference.
<code><hex value
></code>
40 represents the address where the reference points to. To access the
41 value of the location referenced by the pointer, use the dereference
42 operator
<code>-
></code>.
44 <p>Values of procedure mode locations are displayed by
45 <pre class=
"smallexample"> <code>{ PROC
46 (
<argument modes
> )
<return mode
> }
<address
> <name of procedure
49 <code><argument modes
></code> is a list of modes according to the parameter
50 specification of the procedure and
<code><address
></code> shows the address of
53 <p>Substructures of string mode-, array mode- or structure mode-values
54 (e.g. array slices, fields of structure locations) are accessed using
55 certain operations which are described in the next section,
<a href=
"Values-and-their-Operations.html#Values%20and%20their%20Operations">Values and their Operations
</a>.
57 <p>A location value may be interpreted as having a different mode using the
58 location conversion. This mode conversion is written as
<code><mode
59 name
>(
<location
>)
</code>. The user has to consider that the sizes of the modes
60 have to be equal otherwise an error occurs. Furthermore, no range
61 checking of the location against the destination mode is performed, and
62 therefore the result can be quite confusing.
64 <pre class=
"smallexample"> (gdb) print int (s(
3 up
4)) XXX TO be filled in !! XXX