KernelDebugRef - Symbol Files
Reprint Courtesy of International Business Machines Corporation, © International Business Machines Corporation
The Kernel Debugger supports symbolic debugging. The MAPSYM utility program converts a .MAP file to a .SYM file. When a symbol file (generated with MAPSYM) is loaded by the operating system, the debugger can use public symbols in the operating system, executable programs, dynamic link libraries, or any device driver as part of an expression. The disassembler and the BL command also display addresses symbolically if the symbol exists for the address.
The debugger uses the MAPSYM format for the symbol file. The statement MAPSYM MAPFILE.MAP generates the .SYM file MAPFILE.SYM. The kernel's symbols must be on the system startup drive in the root directory, in a file named OS2KRNL.SYM. For device drivers, the .SYM file must be in the same directory as the device driver file with the .SYM extension.
To load symbols for a program or module, the .SYM file must be in the same directory as the .EXE or .DLL file, and the symbols will be loaded automatically.
The file name of the .SYM file must match that of the executable (program, device driver, or DLL) it corresponds to.
There can be more than one symbol file loaded at one time, and more than one currently active. The WA, WR, and LM commands control and list the currently active map files. The term map file refers to the .SYM file generated by MAPSYM. Each newly-loaded map file starts in the active state.
The message:
```Symbols Linked (xxxxxxxx)```
is printed when a symbol file loads successfully. The xxxxxxxx is the map name listed in the LM command.
The message:
```Symbols Unlinked (xxxxxxxxx)```
is printed when a program that has loaded symbols stops and the symbol file is removed.
Symbols are case insensitive.