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=
"M2%20Scope">M2 Scope
</a>,
13 Next:
<a rel=
"next" accesskey=
"n" href=
"GDB-M2.html#GDB%2fM2">GDB/M2
</a>,
14 Previous:
<a rel=
"previous" accesskey=
"p" href=
"M2-Checks.html#M2%20Checks">M2 Checks
</a>,
15 Up:
<a rel=
"up" accesskey=
"u" href=
"Modula-2.html#Modula-2">Modula-
2</a>
19 <h5 class=
"subsubsection">The scope operators
<code>::
</code> and
<code>.
</code></h5>
21 <p>There are a few subtle differences between the Modula-
2 scope operator
22 (
<code>.
</code>) and the GDB scope operator (
<code>::
</code>). The two have
26 <var>module
</var> .
<var>id
</var>
27 <var>scope
</var> ::
<var>id
</var>
30 <p>where
<var>scope
</var> is the name of a module or a procedure,
31 <var>module
</var> the name of a module, and
<var>id
</var> is any declared
32 identifier within your program, except another module.
34 <p>Using the
<code>::
</code> operator makes GDB search the scope
35 specified by
<var>scope
</var> for the identifier
<var>id
</var>. If it is not
36 found in the specified scope, then GDB searches all scopes
37 enclosing the one specified by
<var>scope
</var>.
39 <p>Using the
<code>.
</code> operator makes GDB search the current scope for
40 the identifier specified by
<var>id
</var> that was imported from the
41 definition module specified by
<var>module
</var>. With this operator, it is
42 an error if the identifier
<var>id
</var> was not imported from definition
43 module
<var>module
</var>, or if
<var>id
</var> is not an identifier in