Initial bulk commit for "Git on MSys"
[msysgit/historical-msysgit.git] / mingw / info / gdb / Locations.html
blobd8f3a91eaf607a935dc3cb039a391f741e99fa5e
1 <html lang="en">
2 <head>
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">
8 </head>
9 <body>
10 <div class="node">
11 <p>
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>
16 <hr><br>
17 </div>
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
32 </pre>
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(&lt;hex
38 value&gt;)</code> in case of a free reference mode, and by <code>(REF &lt;reference
39 mode&gt;) (&lt;hex-value&gt;)</code> in case of a bound reference. <code>&lt;hex value&gt;</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>-&gt;</code>.
44 <p>Values of procedure mode locations are displayed by
45 <pre class="smallexample"> <code>{ PROC
46 (&lt;argument modes&gt; ) &lt;return mode&gt; } &lt;address&gt; &lt;name of procedure
47 location&gt;</code>
48 </pre>
49 <code>&lt;argument modes&gt;</code> is a list of modes according to the parameter
50 specification of the procedure and <code>&lt;address&gt;</code> shows the address of
51 the entry point.
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>&lt;mode
59 name&gt;(&lt;location&gt;)</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
65 </pre>
67 </body></html>