Jun JUL Aug
01
2012 2013 2014
success
fail

About this capture

COLLECTED BY

Organization: Internet Archive

The Internet Archive discovers and captures web pages through many different web crawls. At any given time several distinct crawls are running, some for months, and some every day or longer. View the web archive through the Wayback Machine.

Collection: Wide Crawl started April 2013

Web wide crawl with initial seedlist and crawler configuration from April 2013.
TIMESTAMPS

The Wayback Machine - http://web.archive.org/web/20130701225958/https://en.wikipedia.org/wiki/Debugging
 



Debugging



From Wikipedia, the free encyclopedia


Jump to: navigation, search  
Software development process
Coding Shots Annual Plan high res-5.jpg

Asoftware developer at work

Activities and steps
Methodologies
Supporting disciplines
Tools
  • t
  • e
  • Debugging is a methodical process of finding and reducing the number of bugs, or defects, in a computer program or a piece of electronic hardware, thus making it behave as expected. Debugging tends to be harder when various subsystems are tightly coupled, as changes in one may cause bugs to emerge in another. Many books have been written about debugging (see below: Further reading), as it involves numerous aspects, including interactive debugging, control flow, integration testing, log files, monitoring (application, system), memory dumps, profiling, Statistical Process Control, and special design tactics to improve detection while simplifying changes.

    Contents

    Origin[edit]

    There is some controversy over the origin of the term "debugging".

    The terms "bug" and "debugging" are both popularly attributed to Admiral Grace Hopper in the 1940s.[1] While she was working on a Mark II Computer at Harvard University, her associates discovered a moth stuck in a relay and thereby impeding operation, whereupon she remarked that they were "debugging" the system. However the term "bug" in the meaning of technical error dates back at least to 1878 and Thomas Edison (see software bug for a full discussion), and "debugging" seems to have been used as a term in aeronautics before entering the world of computers. Indeed, in an interview Grace Hopper remarked that she was not coining the term. The moth fit the already existing terminology, so it was saved.

    The Oxford English Dictionary entry for "debug" quotes the term "debugging" used in reference to airplane engine testing in a 1945 article in the Journal of the Royal Aeronautical Society; Hopper's bug was found on September 9, 1947. The term was not adopted by computer programmers until the early 1950s. The seminal article by Gill [2] in 1951 is the earliest in-depth discussion of programming errors, but it does not use the term "bug" or "debugging". In the ACM's digital library, the term "debugging" is first used in three papers from 1952 ACM National Meetings.[3][4][5] Two of the three use the term in quotation marks. By 1963, "debugging" was a common enough term to be mentioned in passing without explanation on page 1 of the CTSS manual.[6]

    Kidwell's article Stalking the Elusive Computer Bug[7] discusses the etymology of "bug" and "debug" in greater detail..

    Scope[edit]

    As software and electronic systems have become generally more complex, the various common debugging techniques have expanded with more methods to detect anomalies, assess impact, and schedule software patches or full updates to a system. The words "anomaly" and "discrepancy" can be used, as being more neutral terms, to avoid the words "error" and "defect" or "bug" where there might be an implication that all so-called errors, defectsorbugs must be fixed (at all costs). Instead, an impact assessment can be made to determine if changes to remove an anomaly (ordiscrepancy) would be cost-effective for the system, or perhaps a scheduled new release might render the change(s) unnecessary. Not all issues are life-criticalormission-critical in a system. Also, it is important to avoid the situation where a change might be more upsetting to users, long-term, than living with the known problem(s) (where the "cure would be worse than the disease"). Basing decisions of the acceptability of some anomalies can avoid a culture of a "zero-defects" mandate, where people might be tempted to deny the existence of problems so that the result would appear as zero defects. Considering the collateral issues, such as the cost-versus-benefit impact assessment, then broader debugging techniques will expand to determine the frequency of anomalies (how often the same "bugs" occur) to help assess their impact to the overall system.

    Tools[edit]

    Debugging on video game consoles is usually done with special hardware such as this Xbox debug unit intended only for developers.

    Debugging ranges, in complexity, from fixing simple errors to performing lengthy and tiresome tasks of data collection, analysis, and scheduling updates. The debugging skill of the programmer can be a major factor in the ability to debug a problem, but the difficulty of software debugging varies greatly with the complexity of the system, and also depends, to some extent, on the programming language(s) used and the available tools, such as debuggers. Debuggers are software tools which enable the programmer to monitor the execution of a program, stop it, restart it, set breakpoints, and change values in memory. The term debugger can also refer to the person who is doing the debugging.

    Generally, high-level programming languages, such as Java, make debugging easier, because they have features such as exception handling that make real sources of erratic behaviour easier to spot. In programming languages such as Corassembly, bugs may cause silent problems such as memory corruption, and it is often difficult to see where the initial problem happened. In those cases, memory debugger tools may be needed.

    In certain situations, general purpose software tools that are language specific in nature can be very useful. These take the form of static code analysis tools. These tools look for a very specific set of known problems, some common and some rare, within the source code. All such issues detected by these tools would rarely be picked up by a compiler or interpreter, thus they are not syntax checkers, but more semantic checkers. Some tools claim to be able to detect 300+ unique problems. Both commercial and free tools exist in various languages. These tools can be extremely useful when checking very large source trees, where it is impractical to do code walkthroughs. A typical example of a problem detected would be a variable dereference that occurs before the variable is assigned a value. Another example would be to perform strong type checking when the language does not require such. Thus, they are better at locating likely errors, versus actual errors. As a result, these tools have a reputation of false positives. The old Unix lint program is an early example.

    For debugging electronic hardware (e.g., computer hardware) as well as low-level software (e.g., BIOSes, device drivers) and firmware, instruments such as oscilloscopes, logic analyzersorin-circuit emulators (ICEs) are often used, alone or in combination. An ICE may perform many of the typical software debugger's tasks on low-level software and firmware.

    Typical debugging process[edit]

    Normally the first step in debugging is to attempt to reproduce the problem. This can be a non-trivial task, for example as with parallel processes or some unusual software bugs. Also, specific user environment and usage history can make it difficult to reproduce the problem.

    After the bug is reproduced, the input of the program may need to be simplified to make it easier to debug. For example, a bug in a compiler can make it crash when parsing some large source file. However, after simplification of the test case, only few lines from the original source file can be sufficient to reproduce the same crash. Such simplification can be made manually, using a divide-and-conquer approach. The programmer will try to remove some parts of original test case and check if the problem still exists. When debugging the problem in a GUI, the programmer can try to skip some user interaction from the original problem description and check if remaining actions are sufficient for bugs to appear.

    After the test case is sufficiently simplified, a programmer can use a debugger tool to examine program states (values of variables, plus the call stack) and track down the origin of the problem(s). Alternatively, tracing can be used. In simple cases, tracing is just a few print statements, which output the values of variables at certain points of program execution.

    Techniques[edit]

    Debugging for embedded systems[edit]

    In contrast to the general purpose computer software design environment, a primary characteristic of embedded environments is the sheer number of different platforms available to the developers (CPU architectures, vendors, operating systems and their variants). Embedded systems are, by definition, not general-purpose designs: they are typically developed for a single task (or small range of tasks), and the platform is chosen specifically to optimize that application. Not only does this fact make life tough for embedded system developers, it also makes debugging and testing of these systems harder as well, since different debugging tools are needed in different platforms.

    Anti-debugging[edit]

    Anti-debugging is "the implementation of one or more techniques within computer code that hinders attempts at reverse engineering or debugging a target process".[12] It is actively used in legitimate copy-protection schemas, but is also used by malware to complicate its detection and elimination.[13] Techniques used in anti-debugging include:

    An early example of anti-debugging existed in early versions of Microsoft Word which if an debugger was detected, it produced a message that said: "The tree of evil bears bitter fruit. Now trashing program disk.", after which it began erasing the Word floppy disk with zeros.[14][15]

    See also[edit]

    Portal icon Software Testing portal

    References[edit]

    1. ^ Grace Hopper from FOLDOC
  • ^ S. Gill, The Diagnosis of Mistakes in Programmes on the EDSAC, Proceedings of the Royal Society of London. Series A, Mathematical and Physical Sciences, Vol. 206, No. 1087 (May 22, 1951), pp. 538-554
  • ^ Robert V. D. Campbell, Evolution of automatic computation, Proceedings of the 1952 ACM national meeting (Pittsburgh), p 29-32, 1952.
  • ^ Alex Orden, Solution of systems of linear inequalities on a digital computer, Proceedings of the 1952 ACM national meeting (Pittsburgh), p. 91-95, 1952.
  • ^ Howard B. Demuth, John B. Jackson, Edmund Klein, N. Metropolis, Walter Orvedahl, James H. Richardson, MANIAC, Proceedings of the 1952 ACM national meeting (Toronto), p. 13-16
  • ^ The Compatible Time-Sharing System, M.I.T. Press, 1963
  • ^ Peggy Aldrich Kidwell, Stalking the Elusive Computer Bug, IEEE Annals of the History of Computing, 1998.
  • ^ E. J. Gauss (1982). "Pracniques: The "Wolf Fence" Algorithm for Debugging",. 
  • ^ Postmortem Debugging, Stephen Wormuller, Dr. Dobbs Journal, 2006
  • ^ Andreas Zeller: Why Programs Fail: A Guide to Systematic Debugging, Morgan Kaufmann, 2005. ISBN 1-55860-866-4
  • ^ Kent Beck, Hit 'em High, Hit 'em Low: Regression Testing and the Saff Squeeze
  • ^ Shields, Tyler (2008-12-02). "Anti-Debugging Series - Part I". Veracode. Retrieved 2009-03-17. 
  • ^ a b Software Protection through Anti-Debugging Michael N Gagnon, Stephen Taylor, Anup Ghosh
  • ^ Ross J. Anderson. Security Engineering. p. 684. ISBN 0-471-38922-6. 
  • ^ "Microsoft Word for DOS 1.15". 
  • Further reading[edit]

    External links[edit]

    Retrieved from "http://en.wikipedia.org/w/index.php?title=Debugging&oldid=562252408" 

    Categories: 
    Debuggers
    Debugging




    Navigation menu



    Personal tools



    Create account
    Log in
     



    Namespaces



    Article

    Talk
     


    Variants









    Views



    Read

    Edit

    View history
     


    Actions













    Navigation




    Main page

    Contents

    Featured content

    Current events

    Random article

    Donate to Wikipedia
     



    Interaction




    Help

    About Wikipedia

    Community portal

    Recent changes

    Contact Wikipedia
     



    Toolbox




    What links here

    Related changes

    Upload file

    Special pages

    Permanent link

    Page information

    Cite this page
     



    Print/export




    Create a book

    Download as PDF

    Printable version
     



    Languages




    العربية



    Български

    Català

    Česky

    Eesti

    Español

    فارسی



    Bahasa Indonesia

    Italiano

    עברית

    Nederlands



    Олык марий

    Polski

    Português

    Русский

    Simple English

    Slovenščina

    Suomi

    Türkçe

    Українська



    Edit links
     







    This page was last modified on 30 June 2013 at 14:32.

    Text is available under the Creative Commons Attribution-ShareAlike License; additional terms may apply. By using this site, you agree to the Terms of Use and Privacy Policy. 
    Wikipedia® is a registered trademark of the Wikimedia Foundation, Inc., a non-profit organization.
     


    Privacy policy

    About Wikipedia

    Disclaimers

    Contact Wikipedia

    Mobile view
     


    Wikimedia Foundation
    Powered by MediaWiki