Jump to content

KernelDebugRef - Introduction

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

This section describes the use of the Kernel Debugger functions in the OS/2 system.

This release of the OS/2 toolkit contains a copy of the OS/2 debugging kernel. It is included to assist you in debugging your applications and drivers until higher-level debuggers such as IPMD can provide adequate debugging functions in complex situations.

The Kernel Debugger is a low-level debugger oriented toward system and device-driver debugging.

The use of this kernel is supported as an aid in debugging your software. We offer support for the installation and use of the debugging kernel and its commands and syntax.

The Kernel Debugger is derived from the DEBUG and SYMDEB debuggers, with enhancements to handle both real-mode and protected-mode operation. Most of the commands and structure of this debugger are the same as for DEBUG and SYMDEB. This document describes most of the Kernel Debugger's commands and new features.

The Kernel Debugger is actually a version of the OS/2 kernel that has a user interface included in the kernel itself. This interface always gets its input from an asynchronous port, usually COM2 or COM1, and always prints its output to the same asynchronous port. The Kernel Debugger is a compiled part of the kernel. Connect a terminal to communications port 2 (COM2) to receive output from the Kernel Debugger. To interrupt the Kernel Debugger at any time, press Control and C (Ctrl+C) on the terminal.

The debugger and user interface actually amount to about 80KB (where KB equals 1024 bytes) of code and data.

The debugger normally uses COM2 for its input and output, but if no COM2 exists, it looks for a COM1 port. If neither COM1 or COM2 exists, it looks for any other COM port in the ROM data area (40:0). A three-wire null modem cable is all that is needed, with pins 2 and 3 switched on one end of the cable. A full null modem cable works as well.

An asynchronous modem can be used to set up a remote debugging session. In a remote debugging session, you call over a telephone line to the system that has the problem. This allows you to solve problems at remote locations, using the Kernel Debugger.

See #Setup for Remote Debugging for more information about remote debugging.