World Library  
Flag as Inappropriate
Email this Article


Article Id: WHEBN0000050485
Reproduction Date:

Title: Debugger  
Author: World Heritage Encyclopedia
Language: English
Subject: RosAsm, Comparison of integrated development environments, Debugging, Codeplay, GNU Debugger
Collection: Debuggers, Debugging, Utility Software Types
Publisher: World Heritage Encyclopedia


Winpdb debugging itself

A debugger or debugging tool is a computer program that is used to test and debug other programs (the "target" program). The code to be examined might alternatively be running on an instruction set simulator (ISS), a technique that allows great power in its ability to halt when specific conditions are encountered but which will typically be somewhat slower than executing the code directly on the appropriate (or the same) processor. Some debuggers offer two modes of operation—full or partial simulation—to limit this impact.

A "trap" occurs when the program cannot normally continue because of a programming bug or invalid data. For example, the program might have tried to use an instruction not available on the current version of the CPU or attempted to access unavailable or protected memory. When the program "traps" or reaches a preset condition, the debugger typically shows the location in the original code if it is a source-level debugger or symbolic debugger, commonly now seen in integrated development environments. If it is a low-level debugger or a machine-language debugger it shows the line in the disassembly (unless it also has online access to the original source code and can display the appropriate section of code from the assembly or compilation).


  • Features 1
    • Reverse debugging 1.1
  • Language dependency 2
  • Memory protection 3
  • Hardware support for debugging 4
  • Debugger front-ends 5
  • List of debuggers 6
  • See also 7
  • References 8
  • External links 9


Typically, debuggers offer a query processor, symbol resolver, expression interpreter, and debug support interface at its top level.[1] Debuggers also offer more sophisticated functions such as running a program step by step (single-stepping or program animation), stopping (breaking) (pausing the program to examine the current state) at some event or specified instruction by means of a breakpoint, and tracking the values of variables.[2] Some debuggers have the ability to modify program state while it is running. It may also be possible to continue execution at a different location in the program to bypass a crash or logical error.

The same functionality which makes a debugger useful for eliminating bugs allows it to be used as a software cracking tool to evade copy protection, digital rights management, and other software protection features. It often also makes it useful as a general verification tool, fault coverage, and performance analyzer, especially if instruction path lengths are shown.[3]

Most mainstream debugging engines, such as gdb and dbx, provide console-based command line interfaces. Debugger front-ends are popular extensions to debugger engines that provide IDE integration, program animation, and visualization features. Some early mainframe debuggers such as Oliver and SIMON provided this same functionality for the IBM System/360 and later operating systems, as long ago as the 1970s.

Reverse debugging

Some debuggers include a feature called "reverse debugging", also known as "historical debugging" or "backwards debugging". These debuggers make it possible to step a program's execution backwards in time. Various debuggers include this feature. Visual Studio Ultimate Edition debugger (2010 and up) offers reverse debugging for C#, Visual Basic .NET, and some other languages, but not C++. Other debuggers with the feature include gdb 7.0 and up, the "Omniscient Debugger" for Java, and a variety[4] of other debuggers. Reverse debugging is very useful for certain types of problems, but is still not commonly used yet.[5]

Language dependency

Some debuggers operate on a single specific language while others can handle multiple languages transparently. For example if the main target program is written in COBOL but calls assembly language subroutines and PL/1 subroutines, the debugger may have to dynamically switch modes to accommodate the changes in language as they occur.

Memory protection

Some debuggers also incorporate memory protection to avoid storage violations such as buffer overflow. This may be extremely important in transaction processing environments where memory is dynamically allocated from memory 'pools' on a task by task basis.

Hardware support for debugging

Most modern microprocessors have at least one of these features in their CPU design to make debugging easier:

  • hardware support for single-stepping a program, such as the trap flag.
  • An instruction set that meets the Popek and Goldberg virtualization requirements makes it easier to write debugger software that runs on the same CPU as the software being debugged; such a CPU can execute the inner loops of the program under test at full speed, and still remain under debugger control.
  • In-System Programming allows an external hardware debugger to reprogram a system under test (for example, adding or removing instruction breakpoints). Many systems with such ISP support also have other hardware debug support.
  • Hardware support for code and data breakpoints, such as address comparators and data value comparators or, with considerably more work involved, page fault hardware.[6]
  • JTAG access to hardware debug interfaces such as those on ARM architecture processors or using the Nexus command set. Processors used in embedded systems typically have extensive JTAG debug support.
  • Microcontrollers with as few as six pins need to use low pin-count substitutes for JTAG, such as BDM, Spy-Bi-Wire, or debugWIRE on the Atmel AVR. DebugWIRE, for example, uses bidirectional signaling on the RESET pin.

Debugger front-ends

Some of the most capable and popular debuggers implement only a simple command line interface (CLI)—often to maximize portability and minimize resource consumption. Developers typically consider debugging via a graphical user interface (GUI) easier and more productive. This is the reason for visual front-ends, that allow users to monitor and control subservient CLI-only debuggers via graphical user interface. Some GUI debugger front-ends are designed to be compatible with a variety of CLI-only debuggers, while others are targeted at one specific debugger.

List of debuggers

Some widely used debuggers are

See also


  • Sanjeev Kumar Aggarwal and M. Sarath Kumar, "Debuggers for Programming Languages". In The Compiler Design Handbook: Optimizations and Machine Code Generation. Edited by Y.N. Srikant and Priti Shankar. Boca Raton, Florida: CRC Press, 2003. pp. 295-327.
  • Jonathan B. Rosenberg, How Debuggers Work: Algorithms, Data Structures, and Architecture, John Wiley & Sons, ISBN 0-471-14966-7
  1. ^ Aggarwal and Kumar, p. 302.
  2. ^ Aggarwal and Kumar 2003, p. 301.
  3. ^ Aggarwal and Kumar, pp. 307-312.
  4. ^ Engblom, Jakob (28 September 2012). "Reverse History Part Three – Products". Observations from Uppsala. Retrieved 30 August 2013. 
  5. ^ "Why is reverse debugging rarely used?". Programmers Stack Exchange. Stack Exchange, Inc. Retrieved 30 August 2013. 
  6. ^ Aggarwal and Kumar 2003, pp. 299-301.

External links

  • Debugging tools at DMOZ
  • Debugging Tools for Windows
  • OpenRCE: Various Debugger Resources and Plug-ins
  • Parallel computing development and debugging tools at DMOZ
This article was sourced from Creative Commons Attribution-ShareAlike License; additional terms may apply. World Heritage Encyclopedia content is assembled from numerous content providers, Open Access Publishing, and in compliance with The Fair Access to Science and Technology Research Act (FASTR), Wikimedia Foundation, Inc., Public Library of Science, The Encyclopedia of Life, Open Book Publishers (OBP), PubMed, U.S. National Library of Medicine, National Center for Biotechnology Information, U.S. National Library of Medicine, National Institutes of Health (NIH), U.S. Department of Health & Human Services, and, which sources content from all federal, state, local, tribal, and territorial government publication portals (.gov, .mil, .edu). Funding for and content contributors is made possible from the U.S. Congress, E-Government Act of 2002.
Crowd sourced content that is contributed to World Heritage Encyclopedia is peer reviewed and edited by our editorial staff to ensure quality scholarly research articles.
By using this site, you agree to the Terms of Use and Privacy Policy. World Heritage Encyclopedia™ is a registered trademark of the World Public Library Association, a non-profit organization.

Copyright © World Library Foundation. All rights reserved. eBooks from World Library are sponsored by the World Library Foundation,
a 501c(4) Member's Support Non-Profit Organization, and is NOT affiliated with any governmental agency or department.