Debug symbol
Encyclopedia
A debug symbol is information that expresses which programming-language constructs generated a specific piece of machine code
Machine code
Machine code or machine language is a system of impartible instructions executed directly by a computer's central processing unit. Each instruction performs a very specific task, typically either an operation on a unit of data Machine code or machine language is a system of impartible instructions...

 in a given executable module. Sometimes the symbolic information is compiled together with the module's binary file
Binary file
A binary file is a computer file which may contain any type of data, encoded in binary form for computer storage and processing purposes; for example, computer document files containing formatted text...

, or distributed in separate file, or simply discarded during the compilation
Compiler
A compiler is a computer program that transforms source code written in a programming language into another computer language...

 and/or linking. This information enables a person using a symbolic debugger
Debugger
A debugger or debugging tool is a computer program that is used to test and debug other programs . The code to be examined might alternatively be running on an instruction set simulator , a technique that allows great power in its ability to halt when specific conditions are encountered but which...

 to gain additional information about the binary, such as the names of variables
Variable (programming)
In computer programming, a variable is a symbolic name given to some known or unknown quantity or information, for the purpose of allowing the name to be used independently of the information it represents...

 and routines from the original source code
Source code
In computer science, source code is text written using the format and syntax of the programming language that it is being written in. Such a language is specially designed to facilitate the work of computer programmers, who specify the actions to be performed by a computer mostly by writing source...

. This information can be extremely helpful while trying to investigate and fix a crashing
Crash (computing)
A crash in computing is a condition where a computer or a program, either an application or part of the operating system, ceases to function properly, often exiting after encountering errors. Often the offending program may appear to freeze or hang until a crash reporting service documents...

 application or any other fault.

When debug symbols are embedded in the binary itself, the file can then grow significantly larger (sometimes by several megabytes). To avoid this extra size, modern compilers and early mainframe debugging systems output the symbolic information into a separate file; for Microsoft compilers, this file is called a PDB
Program database
PDB stands for Program Database, a proprietary file format for storing debugging information about a program . PDB files commonly have a .pdb extension. A PDB file is typically created from source files during compilation...

 file. Some companies ship the PDB on their CD/DVD to enable troubleshooting and other companies (like Microsoft
Microsoft
Microsoft Corporation is an American public multinational corporation headquartered in Redmond, Washington, USA that develops, manufactures, licenses, and supports a wide range of products and services predominantly related to computing through its various product divisions...

, and the Mozilla Corporation
Mozilla Corporation
The Mozilla Corporation is a wholly owned subsidiary of the Mozilla Foundation that coordinates and integrates the development of Internet-related applications such as the Mozilla Firefox and SeaMonkey Navigator web browsers and the Mozilla Thunderbird email client by a growing global community of...

) have special online servers from which it's possible to download the debug symbols separately. Microsoft's WinDBG
WinDbg
WinDbg is a multipurposed debugger for Microsoft Windows, distributed on the web by Microsoft. It can be used to debug user mode applications, drivers, and the operating system itself in kernel mode...

 debugger can be configured to automatically download debug symbols for Windows DLL
Dynamic-link library
Dynamic-link library , or DLL, is Microsoft's implementation of the shared library concept in the Microsoft Windows and OS/2 operating systems...

s on demand as they are needed. The PDB debug symbols that Microsoft distributes are only partial (they include only public functions, global variables and their data types, whereas the Mozilla Corporation
Mozilla Corporation
The Mozilla Corporation is a wholly owned subsidiary of the Mozilla Foundation that coordinates and integrates the development of Internet-related applications such as the Mozilla Firefox and SeaMonkey Navigator web browsers and the Mozilla Thunderbird email client by a growing global community of...

 has similar infrastructure but distributes full debug information.

Both Microsoft and Mozilla also offer the source code
Source code
In computer science, source code is text written using the format and syntax of the programming language that it is being written in. Such a language is specially designed to facilitate the work of computer programmers, who specify the actions to be performed by a computer mostly by writing source...

 (Microsoft provides certain components, such as most of the .NET Framework
.NET Framework
The .NET Framework is a software framework that runs primarily on Microsoft Windows. It includes a large library and supports several programming languages which allows language interoperability...

, where as Mozilla offers full source) to make debugging easier.

History

Symbolic debuggers have actually been around in the mainframe
Mainframe computer
Mainframes are powerful computers used primarily by corporate and governmental organizations for critical applications, bulk data processing such as census, industry and consumer statistics, enterprise resource planning, and financial transaction processing.The term originally referred to the...

 world almost since the first introduction of suitable computer display
Computer display
A monitor or display is an electronic visual display for computers. The monitor comprises the display device, circuitry, and an enclosure...

s on which to display the symbolic debugging information (and even earlier with symbolic dumps on paper). They were not restricted to high level compile
Compiler
A compiler is a computer program that transforms source code written in a programming language into another computer language...

d languages and were available also for Assembly language
Assembly language
An assembly language is a low-level programming language for computers, microprocessors, microcontrollers, and other programmable devices. It implements a symbolic representation of the machine codes and other constants needed to program a given CPU architecture...

 programs. For the IBM/360, these produced object code (on request) that included "SYM cards". These were normally ignored by the program loader but were useful to a symbolic debugger as they were kept on the same program library as the executable logic code.

Public symbol and source servers

  • Microsoft Symbol Server
    Microsoft Symbol Server
    Microsoft Symbol Server is a Windows technology used to obtain symbol debugging information. It is built by using the SymSrv technology that is bundled with the Debugging Tools for Windows package. The SymChk.exe utility can be used to verify symbols and to build a local symbol cache in a...

  • Microsoft Reference Source Server: http://referencesource.microsoft.com/
  • Mozilla Source Server: https://developer.mozilla.org/en/Using_the_Mozilla_source_server
  • .NET libraries at SymbolSource: http://www.symbolsource.org/

See also

  • Symbol table
    Symbol table
    In computer science, a symbol table is a data structure used by a language translator such as a compiler or interpreter, where each identifier in a program's source code is associated with information relating to its declaration or appearance in the source, such as its type, scope level and...

  • CA/EZTEST
    CA/EZTEST
    CA/EZTEST was a CICS interactive test/debug software package distributed by Computer Associates and originally called EZTEST/CICS, produced by Capex Corporation of Phoenix, Arizona with assistance from Ken Dakin from England....

  • IBM OLIVER (CICS interactive test/debug), kept symbolic information from compile on a VSAM KSDS file
  • SIMON (Batch Interactive test/debug)
    SIMON (Batch Interactive test/debug)
    SIMON was a proprietary test/debugging toolkit for interactively testing Batch programs designed to run on IBM's System 360/370/390 architecture....

    , kept symbolic information from compile on a VSAM KSDS file
  • Debugging data format
    Debugging data format
    A debugging data format is a means of storing information about a compiled computer program for use by high-level debuggers. Modern debugging data formats store enough information to allow source-level debugging....

The source of this article is wikipedia, the free encyclopedia.  The text of this article is licensed under the GFDL.
 
x
OK