debugging (scott)
TRANSCRIPT
-
7/31/2019 Debugging (Scott)
1/14
Debugging
-
7/31/2019 Debugging (Scott)
2/14
I.Definition
Debugging is a methodical process offinding and reducing the number
ofbugs, or defects, in a computer
program or a piece ofelectronichardware, thus making it behave as
expected. Debugging tends to be
harder when various subsystemsare tightly coupled, as changes in one
may cause bugs to emerge in another.
http://en.wikipedia.org/wiki/Computer_bughttp://en.wikipedia.org/wiki/Computer_programhttp://en.wikipedia.org/wiki/Computer_programhttp://en.wikipedia.org/wiki/Electronic_hardwarehttp://en.wikipedia.org/wiki/Electronic_hardwarehttp://en.wikipedia.org/wiki/Low-Coupling_/_High-Cohesion_patternhttp://en.wikipedia.org/wiki/Low-Coupling_/_High-Cohesion_patternhttp://en.wikipedia.org/wiki/Electronic_hardwarehttp://en.wikipedia.org/wiki/Electronic_hardwarehttp://en.wikipedia.org/wiki/Computer_programhttp://en.wikipedia.org/wiki/Computer_programhttp://en.wikipedia.org/wiki/Computer_bug -
7/31/2019 Debugging (Scott)
3/14
II. Origin
The terms "bug" and "debugging" areboth popularly attributed toAdmiral
Grace Hopperin the 1940s. While she
was working on a Mark II Computer atHarvard University, her associates
discovered a moth stuck in a relay and
thereby impeding operation,whereupon she remarked that they
were "debugging" the system.
http://en.wikipedia.org/wiki/Admiral_Grace_Hopperhttp://en.wikipedia.org/wiki/Admiral_Grace_Hopperhttp://en.wikipedia.org/wiki/Admiral_Grace_Hopperhttp://en.wikipedia.org/wiki/Admiral_Grace_Hopper -
7/31/2019 Debugging (Scott)
4/14
The Oxford English Dictionary entryfor "debug" quotes the term
"debugging" used in reference to
airplane engine testing in a 1945article in the Journal of the Royal
Aeronautical Society,
Hopper's bug was found onSeptember 9, 1947.
http://en.wikipedia.org/wiki/Oxford_English_Dictionaryhttp://en.wikipedia.org/wiki/Computer_bughttp://en.wikipedia.org/wiki/Computer_bughttp://en.wikipedia.org/wiki/Oxford_English_Dictionary -
7/31/2019 Debugging (Scott)
5/14
III. Tool
Debuggers are software tools which
enable the programmer to monitor
the execution of a program, stop it, re-start it, set breakpoints, and change
values in memory. The
term debugger can also refer to theperson who is doing the debugging.
-
7/31/2019 Debugging (Scott)
6/14
high-level programming languages, such
as Java, make debugging easier,
because they have features suchas exception handling that make real
sources of erratic behaviour easier to
spot. In programming languages suchas C or assembly, bugs may cause silent
problems such as memory corruption,
and it is often difficult to see where the
initial problem happened. In thosecases, memory debugger tools may be
needed.
-
7/31/2019 Debugging (Scott)
7/14
In certain situations, general purpose
software tools that are languagespecific in nature can be very useful.These take the form ofstatic codeanalysis tools. These tools look for a
very specific set of known problems,some common and some rare, withinthe source code. All such issuesdetected by these tools would rarelybe picked up by a compiler orinterpreter, thus they are not syntaxcheckers, but more semantic
checkers.
http://en.wikipedia.org/wiki/List_of_tools_for_static_code_analysishttp://en.wikipedia.org/wiki/List_of_tools_for_static_code_analysishttp://en.wikipedia.org/wiki/List_of_tools_for_static_code_analysishttp://en.wikipedia.org/wiki/List_of_tools_for_static_code_analysis -
7/31/2019 Debugging (Scott)
8/14
For debugging electronic hardware
(e.g., computer hardware) as well aslow-level software
(e.g., BIOSes, device drivers)
and firmware, instruments suchasoscilloscopes, logic analyzers orin-
circuit emulators (ICEs) are often
used, alone or in combination. An ICEmay perform many of the typical
software debugger's tasks on low-
level software and firmware.
http://en.wikipedia.org/wiki/Computer_hardwarehttp://en.wikipedia.org/wiki/BIOShttp://en.wikipedia.org/wiki/Device_driverhttp://en.wikipedia.org/wiki/Firmwarehttp://en.wikipedia.org/wiki/Oscilloscopehttp://en.wikipedia.org/wiki/Logic_analyzerhttp://en.wikipedia.org/wiki/In-circuit_emulatorhttp://en.wikipedia.org/wiki/In-circuit_emulatorhttp://en.wikipedia.org/wiki/Softwarehttp://en.wikipedia.org/wiki/Firmwarehttp://en.wikipedia.org/wiki/Firmwarehttp://en.wikipedia.org/wiki/Softwarehttp://en.wikipedia.org/wiki/In-circuit_emulatorhttp://en.wikipedia.org/wiki/In-circuit_emulatorhttp://en.wikipedia.org/wiki/In-circuit_emulatorhttp://en.wikipedia.org/wiki/Logic_analyzerhttp://en.wikipedia.org/wiki/Oscilloscopehttp://en.wikipedia.org/wiki/Firmwarehttp://en.wikipedia.org/wiki/Device_driverhttp://en.wikipedia.org/wiki/BIOShttp://en.wikipedia.org/wiki/Computer_hardware -
7/31/2019 Debugging (Scott)
9/14
IV. Techniques
Print (or tracing) debugging is the actof watching (live or recorded) trace
statements, or print statements, that
indicate the flow of execution of aprocess. This is sometimes
called printf debugging, due to the
use of the printfstatement in C.
http://en.wikipedia.org/wiki/Printfhttp://en.wikipedia.org/wiki/Printf -
7/31/2019 Debugging (Scott)
10/14
Remote debugging is the process ofdebugging a program running on a
system different than the debugger. To
start remote debugging, debuggerconnects to a remote system over a
network. Once connected, debugger
can control the execution of theprogram on the remote system and
retrieve information about its state.
-
7/31/2019 Debugging (Scott)
11/14
Post-mortem debugging is debugging ofthe program after it has already crashed.Related techniques often include varioustracing techniques (for example,[8])
and/or analysis ofmemory dump (orcoredump) of the crashed process. Thedump of the process could be obtainedautomatically by the system (forexample, when process has terminateddue to an unhandled exception), or by aprogrammer-inserted instruction, ormanually by the interactive user.
http://en.wikipedia.org/wiki/Crash_(computing)http://en.wikipedia.org/wiki/Debugginghttp://en.wikipedia.org/wiki/Memory_dumphttp://en.wikipedia.org/wiki/Core_dumphttp://en.wikipedia.org/wiki/Core_dumphttp://en.wikipedia.org/wiki/Core_dumphttp://en.wikipedia.org/wiki/Core_dumphttp://en.wikipedia.org/wiki/Memory_dumphttp://en.wikipedia.org/wiki/Debugginghttp://en.wikipedia.org/wiki/Crash_(computing) -
7/31/2019 Debugging (Scott)
12/14
Delta Debugging- technique ofautomating test case simplification.
Saff Squeeze- technique of isolatingfailure within the test using
progressive inlining of parts of the
failing test.[10]
http://en.wikipedia.org/w/index.php?title=Delta_Debugging&action=edit&redlink=1http://en.wikipedia.org/wiki/Debugginghttp://en.wikipedia.org/wiki/Debugginghttp://en.wikipedia.org/w/index.php?title=Delta_Debugging&action=edit&redlink=1 -
7/31/2019 Debugging (Scott)
13/14
Thank You!
-
7/31/2019 Debugging (Scott)
14/14