<s>
A	O
debugger	B-Application
or	O
debugging	B-Application
tool	I-Application
is	O
a	O
computer	B-Application
program	I-Application
used	O
to	O
test	O
and	O
debug	O
other	O
programs	O
(	O
the	O
"	O
target	O
"	O
program	O
)	O
.	O
</s>
<s>
The	O
main	O
use	O
of	O
a	O
debugger	B-Application
is	O
to	O
run	O
the	O
target	O
program	O
under	O
controlled	O
conditions	O
that	O
permit	O
the	O
programmer	O
to	O
track	O
its	O
execution	O
and	O
monitor	O
changes	O
in	O
computer	O
resources	O
that	O
may	O
indicate	O
malfunctioning	O
code	O
.	O
</s>
<s>
Typical	O
debugging	O
facilities	O
include	O
the	O
ability	O
to	O
run	O
or	O
halt	O
the	O
target	O
program	O
at	O
specific	O
points	O
,	O
display	O
the	O
contents	O
of	O
memory	B-General_Concept
,	O
CPU	B-General_Concept
registers	O
or	O
storage	O
devices	O
(	O
such	O
as	O
disk	O
drives	O
)	O
,	O
and	O
modify	O
memory	B-General_Concept
or	O
register	O
contents	O
in	O
order	O
to	O
enter	O
selected	O
test	O
data	O
that	O
might	O
be	O
a	O
cause	O
of	O
faulty	O
program	O
execution	O
.	O
</s>
<s>
The	O
code	O
to	O
be	O
examined	O
might	O
alternatively	O
be	O
running	O
on	O
an	O
instruction	B-Application
set	I-Application
simulator	I-Application
(	O
ISS	O
)	O
,	O
a	O
technique	O
that	O
allows	O
great	O
power	O
in	O
its	O
ability	O
to	O
halt	O
when	O
specific	O
conditions	O
are	O
encountered	O
,	O
but	O
which	O
will	O
typically	O
be	O
somewhat	O
slower	O
than	O
executing	O
the	O
code	O
directly	O
on	O
the	O
appropriate	O
(	O
or	O
the	O
same	O
)	O
processor	O
.	O
</s>
<s>
Some	O
debuggers	B-Application
offer	O
two	O
modes	O
of	O
operation	O
,	O
full	O
or	O
partial	O
simulation	O
,	O
to	O
limit	O
this	O
impact	O
.	O
</s>
<s>
A	O
"	O
trap	B-Application
"	O
occurs	O
when	O
the	O
program	O
cannot	O
normally	O
continue	O
because	O
of	O
a	O
programming	B-Error_Name
bug	I-Error_Name
or	O
invalid	O
data	O
.	O
</s>
<s>
For	O
example	O
,	O
the	O
program	O
might	O
have	O
tried	O
to	O
use	O
an	O
instruction	O
not	O
available	O
on	O
the	O
current	O
version	O
of	O
the	O
CPU	B-General_Concept
or	O
attempted	O
to	O
access	O
unavailable	O
or	O
protected	B-General_Concept
memory	I-General_Concept
.	O
</s>
<s>
When	O
the	O
program	O
"	O
traps	B-Application
"	O
or	O
reaches	O
a	O
preset	O
condition	O
,	O
the	O
debugger	B-Application
typically	O
shows	O
the	O
location	O
in	O
the	O
original	O
code	O
if	O
it	O
is	O
a	O
source-level	B-Application
debugger	I-Application
or	O
symbolic	B-Application
debugger	I-Application
,	O
commonly	O
now	O
seen	O
in	O
integrated	B-Application
development	I-Application
environments	I-Application
.	O
</s>
<s>
If	O
it	O
is	O
a	O
low-level	O
debugger	B-Application
or	O
a	O
machine-language	O
debugger	B-Application
it	O
shows	O
the	O
line	O
in	O
the	O
disassembly	O
(	O
unless	O
it	O
also	O
has	O
online	O
access	O
to	O
the	O
original	O
source	O
code	O
and	O
can	O
display	O
the	O
appropriate	O
section	O
of	O
code	O
from	O
the	O
assembly	O
or	O
compilation	O
)	O
.	O
</s>
<s>
Typically	O
,	O
debuggers	B-Application
offer	O
a	O
query	O
processor	O
,	O
a	O
symbol	O
resolver	O
,	O
an	O
expression	O
interpreter	O
,	O
and	O
a	O
debug	O
support	O
interface	O
at	O
its	O
top	O
level	O
.	O
</s>
<s>
Debuggers	B-Application
also	O
offer	O
more	O
sophisticated	O
functions	O
such	O
as	O
running	O
a	O
program	O
step	O
by	O
step	O
(	O
single-stepping	O
or	O
program	O
animation	O
)	O
,	O
stopping	O
(	O
breaking	O
)	O
(	O
pausing	O
the	O
program	O
to	O
examine	O
the	O
current	O
state	O
)	O
at	O
some	O
event	O
or	O
specified	O
instruction	O
by	O
means	O
of	O
a	O
breakpoint	O
,	O
and	O
tracking	O
the	O
values	O
of	O
variables	O
.	O
</s>
<s>
Some	O
debuggers	B-Application
have	O
the	O
ability	O
to	O
modify	O
program	O
state	O
while	O
it	O
is	O
running	O
.	O
</s>
<s>
The	O
same	O
functionality	O
which	O
makes	O
a	O
debugger	B-Application
useful	O
for	O
correcting	O
bugs	B-Error_Name
allows	O
it	O
to	O
be	O
used	O
as	O
a	O
software	B-Application
cracking	I-Application
tool	O
to	O
evade	O
copy	B-Application
protection	I-Application
,	O
digital	O
rights	O
management	O
,	O
and	O
other	O
software	B-Application
protection	I-Application
features	O
.	O
</s>
<s>
It	O
often	O
also	O
makes	O
it	O
useful	O
as	O
a	O
general	O
verification	O
tool	O
,	O
fault	O
coverage	O
,	O
and	O
performance	O
analyzer	O
,	O
especially	O
if	O
instruction	B-General_Concept
path	I-General_Concept
lengths	I-General_Concept
are	O
shown	O
.	O
</s>
<s>
Most	O
mainstream	O
debugging	O
engines	O
,	O
such	O
as	O
gdb	B-Language
and	O
dbx	B-Application
,	O
provide	O
console-based	O
command	B-Application
line	I-Application
interfaces	I-Application
.	O
</s>
<s>
Debugger	B-Application
front-ends	O
are	O
popular	O
extensions	O
to	O
debugger	B-Application
engines	O
that	O
provide	O
IDE	B-Application
integration	O
,	O
program	O
animation	O
,	O
and	O
visualization	O
features	O
.	O
</s>
<s>
Record	B-Application
and	I-Application
replay	I-Application
debugging	I-Application
,	O
also	O
known	O
as	O
"	O
software	O
flight	O
recording	O
"	O
or	O
"	O
program	O
execution	O
recording	O
"	O
,	O
captures	O
application	O
state	O
changes	O
and	O
stores	O
them	O
to	O
disk	O
as	O
each	O
instruction	O
in	O
a	O
program	O
executes	O
.	O
</s>
<s>
Record	B-Application
and	I-Application
replay	I-Application
debugging	I-Application
is	O
very	O
useful	O
for	O
remote	O
debugging	O
and	O
for	O
resolving	O
intermittent	O
,	O
non-deterministic	O
,	O
and	O
other	O
hard-to-reproduce	O
defects	O
.	O
</s>
<s>
Some	O
debuggers	B-Application
include	O
a	O
feature	O
called	O
"	O
reverse	O
debugging	O
"	O
,	O
also	O
known	O
as	O
"	O
historical	O
debugging	O
"	O
or	O
"	O
backwards	O
debugging	O
"	O
.	O
</s>
<s>
These	O
debuggers	B-Application
make	O
it	O
possible	O
to	O
step	O
a	O
program	O
's	O
execution	O
backwards	O
in	O
time	O
.	O
</s>
<s>
Various	O
debuggers	B-Application
include	O
this	O
feature	O
.	O
</s>
<s>
Microsoft	B-Application
Visual	I-Application
Studio	I-Application
(	O
2010	O
Ultimate	O
edition	O
,	O
2012	O
Ultimate	O
,	O
2013	O
Ultimate	O
,	O
and	O
2015	O
Enterprise	O
edition	O
)	O
offers	O
IntelliTrace	O
reverse	O
debugging	O
for	O
C#	O
,	O
Visual	O
Basic	O
.NET	O
,	O
and	O
some	O
other	O
languages	O
,	O
but	O
not	O
C++	O
.	O
</s>
<s>
Reverse	O
debuggers	B-Application
also	O
exist	O
for	O
C	O
,	O
C++	O
,	O
Java	O
,	O
Python	O
,	O
Perl	O
,	O
and	O
other	O
languages	O
.	O
</s>
<s>
Some	O
reverse	O
debuggers	B-Application
slow	O
down	O
the	O
target	O
by	O
orders	O
of	O
magnitude	O
,	O
but	O
the	O
best	O
reverse	O
debuggers	B-Application
cause	O
a	O
slowdown	O
of	O
2×	O
or	O
less	O
.	O
</s>
<s>
In	O
addition	O
to	O
the	O
features	O
of	O
reverse	O
debuggers	B-Application
,	O
time-travel	O
debugging	O
also	O
allow	O
users	O
to	O
interact	O
with	O
the	O
program	O
,	O
changing	O
the	O
history	O
if	O
desired	O
,	O
and	O
watch	O
how	O
the	O
program	O
responds	O
.	O
</s>
<s>
Some	O
debuggers	B-Application
operate	O
on	O
a	O
single	O
specific	O
language	O
while	O
others	O
can	O
handle	O
multiple	O
languages	O
transparently	O
.	O
</s>
<s>
For	O
example	O
,	O
if	O
the	O
main	O
target	O
program	O
is	O
written	O
in	O
COBOL	B-Application
but	O
calls	O
assembly	B-Language
language	I-Language
subroutines	O
and	O
PL/1	B-Language
subroutines	O
,	O
the	O
debugger	B-Application
may	O
have	O
to	O
dynamically	O
switch	O
modes	O
to	O
accommodate	O
the	O
changes	O
in	O
language	O
as	O
they	O
occur	O
.	O
</s>
<s>
Some	O
debuggers	B-Application
also	O
incorporate	O
memory	B-General_Concept
protection	I-General_Concept
to	O
avoid	O
storage	B-General_Concept
violations	I-General_Concept
such	O
as	O
buffer	B-General_Concept
overflow	I-General_Concept
.	O
</s>
<s>
This	O
may	O
be	O
extremely	O
important	O
in	O
transaction	B-General_Concept
processing	I-General_Concept
environments	O
where	O
memory	B-General_Concept
is	O
dynamically	O
allocated	O
from	O
memory	B-General_Concept
'	O
pools	O
 '	O
on	O
a	O
task	O
by	O
task	O
basis	O
.	O
</s>
<s>
Most	O
modern	O
microprocessors	O
have	O
at	O
least	O
one	O
of	O
these	O
features	O
in	O
their	O
CPU	B-General_Concept
design	I-General_Concept
to	O
make	O
debugging	O
easier	O
:	O
</s>
<s>
Hardware	O
support	O
for	O
single-stepping	O
a	O
program	O
,	O
such	O
as	O
the	O
trap	B-General_Concept
flag	I-General_Concept
.	O
</s>
<s>
An	O
instruction	O
set	O
that	O
meets	O
the	O
Popek	B-Architecture
and	I-Architecture
Goldberg	I-Architecture
virtualization	I-Architecture
requirements	I-Architecture
makes	O
it	O
easier	O
to	O
write	O
debugger	B-Application
software	O
that	O
runs	O
on	O
the	O
same	O
CPU	B-General_Concept
as	O
the	O
software	O
being	O
debugged	O
;	O
such	O
a	O
CPU	B-General_Concept
can	O
execute	O
the	O
inner	O
loops	O
of	O
the	O
program	O
under	O
test	O
at	O
full	O
speed	O
,	O
and	O
still	O
remain	O
under	O
debugger	B-Application
control	O
.	O
</s>
<s>
In-system	B-Device
programming	I-Device
allows	O
an	O
external	O
hardware	O
debugger	B-Application
to	O
reprogram	O
a	O
system	O
under	O
test	O
(	O
for	O
example	O
,	O
adding	O
or	O
removing	O
instruction	O
breakpoints	O
)	O
.	O
</s>
<s>
Hardware	O
support	O
for	O
code	O
and	O
data	O
breakpoints	O
,	O
such	O
as	O
address	O
comparators	O
and	O
data	O
value	O
comparators	O
or	O
,	O
with	O
considerably	O
more	O
work	O
involved	O
,	O
page	B-General_Concept
fault	I-General_Concept
hardware	O
.	O
</s>
<s>
JTAG	O
access	O
to	O
hardware	O
debug	O
interfaces	O
such	O
as	O
those	O
on	O
ARM	B-Architecture
architecture	I-Architecture
processors	O
or	O
using	O
the	O
Nexus	O
command	O
set	O
.	O
</s>
<s>
Micro	O
controllers	O
with	O
as	O
few	O
as	O
six	O
pins	O
need	O
to	O
use	O
low	O
pin-count	O
substitutes	O
for	O
JTAG	O
,	O
such	O
as	O
BDM	B-Application
,	O
Spy-Bi-Wire	O
,	O
or	O
debugWIRE	O
on	O
the	O
Atmel	B-Architecture
AVR	I-Architecture
.	O
</s>
<s>
Some	O
of	O
the	O
most	O
capable	O
and	O
popular	O
debuggers	B-Application
implement	O
only	O
a	O
simple	O
command	B-Application
line	I-Application
interface	I-Application
(	O
CLI	O
)	O
—	O
often	O
to	O
maximize	O
portability	O
and	O
minimize	O
resource	O
consumption	O
.	O
</s>
<s>
Developers	O
typically	O
consider	O
debugging	O
via	O
a	O
graphical	B-Application
user	I-Application
interface	I-Application
(	O
GUI	B-Application
)	O
easier	O
and	O
more	O
productive	O
.	O
</s>
<s>
This	O
is	O
the	O
reason	O
for	O
visual	O
front-ends	O
,	O
that	O
allow	O
users	O
to	O
monitor	O
and	O
control	O
subservient	O
CLI-only	O
debuggers	B-Application
via	O
graphical	B-Application
user	I-Application
interface	I-Application
.	O
</s>
<s>
Some	O
GUI	B-Application
debugger	B-Application
front-ends	O
are	O
designed	O
to	O
be	O
compatible	O
with	O
a	O
variety	O
of	O
CLI-only	O
debuggers	B-Application
,	O
while	O
others	O
are	O
targeted	O
at	O
one	O
specific	O
debugger	B-Application
.	O
</s>
<s>
Some	O
widely	O
used	O
debuggers	B-Application
are	O
:	O
</s>
<s>
Earlier	O
minicomputer	B-Architecture
debuggers	B-Application
include	O
:	O
</s>
<s>
Mainframe	B-Architecture
debuggers	B-Application
include	O
:	O
</s>
