Jump to content

KernelDebugRef - Symbol Files

From EDM2

Reprint Courtesy of International Business Machines Corporation, © International Business Machines Corporation

Kernel Debugger Reference
  1. Introduction
  2. Installing the Kernel Debugger
  3. The T Terminal Emulator
  4. Entering the Debugger
  5. Expressions
  6. Operator Precedence
  7. Binary Operators
  8. Unary Operators
  9. Numbers
  10. Strings
  11. Symbol Files
  12. Using Kernel Debugger Commands
  13. The Breakpoint (BP) Command
  14. Breakpoint Commands
  15. External Commands
  16. Using Default Commands
  17. External Debugger Commands
  18. Setting Useful Breakpoints
  19. Debugging Kernel Device Drivers
  20. Debugging VM Start Sessions
  21. Debugging a Remote System
  22. Notices

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.