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=
"Signaling">Signaling
</a>,
13 Next:
<a rel=
"next" accesskey=
"n" href=
"Returning.html#Returning">Returning
</a>,
14 Previous:
<a rel=
"previous" accesskey=
"p" href=
"Jumping.html#Jumping">Jumping
</a>,
15 Up:
<a rel=
"up" accesskey=
"u" href=
"Altering.html#Altering">Altering
</a>
19 <h3 class=
"section">Giving your program a signal
</h3>
22 <dt><code>signal
</code><var>signal
</var><code></code>
23 <dd>Resume execution where your program stopped, but immediately give it the
24 signal
<var>signal
</var>.
<var>signal
</var> can be the name or the number of a
25 signal. For example, on many systems
<code>signal
2</code> and
<code>signal
26 SIGINT
</code> are both ways of sending an interrupt signal.
28 <p>Alternatively, if
<var>signal
</var> is zero, continue execution without
29 giving a signal. This is useful when your program stopped on account of
30 a signal and would ordinary see the signal when resumed with the
31 <code>continue
</code> command;
<code>signal
0</code> causes it to resume without a
34 <p><code>signal
</code> does not repeat when you press
<RET
> a second time
35 after executing the command.
38 <p>Invoking the
<code>signal
</code> command is not the same as invoking the
39 <code>kill
</code> utility from the shell. Sending a signal with
<code>kill
</code>
40 causes GDB to decide what to do with the signal depending on
41 the signal handling tables (see
<a href=
"Signals.html#Signals">Signals
</a>). The
<code>signal
</code> command
42 passes the signal directly to your program.