26
CHAPTER 1 BASIC FUNCTIONS
1.17 Symbolic Debugging
The symbols defined in a source program can be used for command parameters
(address). There are three types of symbols as follows:
• Global Symbol
• Static Symbol within Module (Local Symbol within Module)
• Local Symbol within Function
■ Types of Symbols
A symbol means the symbol defined while a program is created, and it usually has a type. Symbols become
usable by loading the debug information file.
Furthermore, a type of the symbol in C language is recognized and the command is executed.
There are three types of symbols as follows:
• Global symbol
A global symbol can be referred to from anywhere within a program. In C language, variables and
functions defined outside a function without a static declaration are in this category. In assembler,
symbols with a PUBLIC declaration are in this category.
• Static symbol within module (Local symbol within module)
A static symbol within module can be referred to only within the module where the symbol is defined.
In C language, variables and functions defined outside a function with a static declaration are in this
category. In assembler, symbols without a PUBLIC declaration are in this category.
• Local symbol within function
A local symbol within a function exists only in C language. A static symbol within a function and an
automatic variable are in this category.
- Static symbol within function
Out of the variables defined in function, those with static declaration.
- Automatic variable
Out of the variables defined in function, those without static declaration and parameters for the
function.
■ Setting Symbol Information
Symbol information in the file is set with the symbol information table by loading a debug information file.
This symbol information is created for each module.
The module is constructed for each source file to be compiled in C language, in assembler for each source
file to be assembled.
The debugger automatically selects the symbol information for the module to which the PC belongs to at
abortion of execution (Called "the current module"). A program in C language also has information about
which function the PC belongs to.