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=
"GDB%2fM2">GDB/M2
</a>,
13 Previous:
<a rel=
"previous" accesskey=
"p" href=
"M2-Scope.html#M2%20Scope">M2 Scope
</a>,
14 Up:
<a rel=
"up" accesskey=
"u" href=
"Modula-2.html#Modula-2">Modula-
2</a>
18 <h5 class=
"subsubsection">GDB and Modula-
2</h5>
20 <p>Some GDB commands have little use when debugging Modula-
2 programs.
21 Five subcommands of
<code>set print
</code> and
<code>show print
</code> apply
22 specifically to C and C
<tt>++
</tt>:
<code>vtbl
</code>,
<code>demangle
</code>,
23 <code>asm-demangle
</code>,
<code>object
</code>, and
<code>union
</code>. The first four
24 apply to C
<tt>++
</tt>, and the last to the C
<code>union
</code> type, which has no direct
27 <p>The
<code>@
</code> operator (see
<a href=
"Expressions.html#Expressions">Expressions
</a>), while available
28 with any language, is not useful with Modula-
2. Its
29 intent is to aid the debugging of
<dfn>dynamic arrays
</dfn>, which cannot be
30 created in Modula-
2 as they can in C or C
<tt>++
</tt>. However, because an
31 address can be specified by an integral constant, the construct
32 <code>{
</code><var>type
</var><code>}
</code><var>adrexp
</var><code></code> is still useful.
34 <p>In GDB scripts, the Modula-
2 inequality operator
<code>#
</code> is
35 interpreted as the beginning of a comment. Use
<code><></code> instead.