
D-16
Motorola DSP56000 Family Optimizing C Compiler User’s Manual
For More Information On This Product,
Go to: www.freescale.com
Motorola
Stopping and Continuing
The ‘a(chǎn)ttach’ command is also used to debug a remote machine via a serial connection. See
section Attach, for more info.
D.5.6 Killing the Child Process
kill
Kill the child process in which the program being debugged is running under GDB.
This command is useful if you wish to debug a core dump instead. GDB ignores any core
dump file if it is actually running the program, so the ‘kill’ command is the only sure way
to make sure the core dump file is used once again.
It is also useful if you wish to run the program outside the debugger for once and then go
back to debugging it.
The ‘kill’ command is also useful if you wish to re-compile and re-link the program, since
on many systems it is impossible to modify an executable file which is running in a
process. But, in this case, it is just as good to exit GDB, since you will need to read a new
symbol table after the program is re-compiled if you wish to debug the new version, and
restarting GDB is the easiest way to do that.
D.6 Stopping and Continuing
When you run a program normally, it runs until it terminates. The principal purpose of
using a debugger is so that you can stop it before that point; or so that if the program runs
into trouble you can investigate and find out why.
D.6.1 Signals
A signal is an asynchronous event that can happen in a program. The operating system
defines the possible kinds of signals, and gives each kind a name and a number. For
example, SIGINT is the signal a program gets when you type Ctrl-c; SIGSEGV is the
signal a program gets from referencing a place in memory far away from all the areas in
use; SIGALRM occurs when the alarm clock timer goes off (which happens only if the
program has requested an alarm).
Some signals, including SIGALRM, are a normal part of the functioning of the program.
Others, such as SIGSEGV, indicate errors; these signals are fatal (kill the program
immediately) if the program has not specified in advance some other way to handle the
signal. SIGINT does not indicate an error in the program, but it is normally fatal so it can
carry out the purpose of Ctrl-c: to kill the program.
F
Freescale Semiconductor, Inc.
n
.