Professional Documents
Culture Documents
Definition -Debugging
Debugging is the routine process of locating and removing computer program bugs,
errors or abnormalities, which is methodically handled by software programmers via
debugging tools. Debugging checks, detects and corrects errors or bugs to allow proper
program operation according to set specifications. Also known as debug.
Aside from creating the architecture, debugging code is probably the most difficult task
of the development cycle. Debugging is primarily the task of locating and fixing errors
within the system. This task is made simpler when the programmer is familiar with the
various types of debugging tools available and how they can be used (the type of
information. As seen from some of the descriptions in Table1, debugging tools reside and
interconnect in some combination of standalone devices, on the host, and/or on the target
board.
Tool type
Hardware
Debugging tools
In-Circuit
description
Active device
Emulator
replaces
(ICE)
microprocessor
in system
capabilities
Similar to debuggers,
allows setting
breakpoints, single
stepping, etc.
ROM Emulator
Hardware
Active tool
processor dependent
Allows modification of
replaces ROM
with cables
debugger).
connected to
within ROM
emulator,
simulates ROM.
It is an
ASICs, etc.
intermediate
hardware device
connected to the
target via some
cable (i.e.
BDM), and
connected to the
host via another
port
Hardware
Background
BDM hardware
Debug Mode
on board (port
(BDM)
and integrated
as ICE
debug monitor
observe software
into master
execution unobtrusively
CPU), and
debugger on
breakpoints to stop
host, connected
software execution
via a serial
cable to BDM
port. The
connector on
cable to BDM
port commonly
processor/target
dependent, Motorola
referred to as
proprietary debug
wiggler. BDM
interface
debugging
sometimes
referred to as
On-Chip
Debugging
(OCD)
Hardware
Hardware
JTAG-
compliant
proprietary to specific
(JTAG)
hardware on
board
standard)
IEEE-ISTO
Options of
Nexus 5001
JTAG port,
functions depending on
Nexus-
level of compliance of
compliant port,
hardware
or both, several
layers of
compliance
(depending on
complexity of
master
processor,
engineering
Hardware
Oscilloscope
choice, etc.)
Passive analog
device that
graphs voltage
monitor up to 2 signals
simultaneously
(on vertical
axis) versus
specific conditions
time (on
horizontal axis),
used as voltmeter
(though a more
detecting the
exact voltage at
expensive one)
a given time
capture changes in a
signal on I/O port to
verify segments of
software are running,
calculate timing from
one signal change to
next, etc.
Hardware
Logic Analyzer
Passive device
processor independent
can be expensive
that captures
Logic Analyzer
and tracks
multiple signals
simultaneously
them
(continued)
capture changes in a
signal on I/O port to
verify segments of
software are running,
calculate timing from
can be triggered to
capture data from a clock
event off the target or an
internal logic analyzer
clock
processor independent
and allows view of
system executing in real
time with very little
intrusion
Hardware
Voltmeter
Measures
voltage
difference
to determine if circuit
between 2
points on circuit
Hardware
Ohmmeter
Measures
hardware tools
cheaper than other
resistance
hardware tools
between 2
points on circuit
to measure changes in
current/voltage in
terms of resistance
Hardware
Multimeter
measures both
voltage and
resistance
Software
Debugger
Functional
debugging tool
loading/single
stepping/tracing code on
target
implementing
breakpoints to stop
software execution
implementing
conditional breakpoints
to stop if particular
condition is met during
execution
Software
Profiler
Collects the
timing history
(when) behavior of
of selected
executing software
variables,
registers,
to capture execution
pattern (where) of
Software
Monitor
Debugging
executing software
similar to print statement
interface similar
to ICE, with
debug software
running on
target and host.
similar functionality to
Part of monitor
debugger (breakpoints,
resides in ROM
of target board
memory, etc.)
(commonly
called debug
embedded OS es can
include monitor for
agent or target
particular architectures
agent), and a
debugging
kernel on the
host. Software
on host and
target typically
communicate
via serial or
Ethernet
(depends on
what is
available on
target).
Software
Instruction Set
Runs on host
Simulator
and simulates
master
processor and
memory
times by taking in
(executable
consideration the
binary loaded
into simulator
as it would be
loaded onto
target) and
free
mimics the
hardware
Manual R
Readily available,
free or cheaper
than other
solutions,
effective, simpler
Print Statements
Functional
debugging tool,
printing
statements
inserted into
running
Dumps
Functional
to see output of
system
same as print statements
debugging tool
execution time in
of storage
statements (especially if
structure at
there is a filter
runtime
Counters/Timers
Performance
and efficiency
timing information by
debugging tool
in which
counters or
intrusiveness
incremented at
various points
Software
Fast Display
of code
Functional
debugging tool
in which LEDs
are toggled or
time deadlines
simple LCD
displays present
Output ports
Performance,
some data
Software
running
efficiency, and
with an oscilloscope or
logic analyzer, can
functional
debugging tool
in which output
port toggled at
toggles of port
various points
in software