This document describes the On-Line Debugging Technique (ODT) for the PDP-11, a system program designed to assist in debugging other programs. ODT allows users to interact with a loaded object program from the keyboard, offering a range of powerful debugging features.
Key functionalities include:
- Memory Examination and Alteration: Users can print, examine, and modify the contents of any memory location (words or bytes) and various system registers.
- Program Execution Control: ODT enables running entire programs or specific portions using breakpoints, which temporarily halt execution at designated points. Users can set and remove up to eight breakpoints, control how many times a breakpoint is encountered before halting, and engage a single-instruction mode.
- Relocation Management: ODT provides automatic relocation facilities, allowing users to set relocation biases in dedicated registers (0-7). This helps relate relocatable code in assembly listings to actual relocated code in memory, simplifying address calculations. Commands are available to calculate offsets for relative addresses.
- Searching Capabilities: The program can search memory for specific bit patterns (
x;W) or for instructions that reference a particular effective address (r;E), aiding in finding data or code.
- Utility Functions: ODT includes a constant register (
$C) for temporary storage and calculations, and commands to fill blocks of memory with a specified value (;F for words, ;I for bytes). It also supports Radix-50 mode for examining and changing packed ASCII characters.
- Input/Output and Priority Control: Users can inspect and modify ASCII text in memory (
r;nA) and control ODT's operating priority level ($P).
- Operating Procedures: The document outlines how to load, start, restart, and re-enter ODT, and describes its error detection mechanisms for illegal commands or bad breakpoint entries. For non-DOS/BATCH environments, users must configure a global symbol
$$CON for console device information.
ODT's internal structure is modular, consisting of command decoding, command execution, and utility routines. When a breakpoint is encountered, ODT temporarily replaces the instruction with a trap, saves the program state, and restores the original instruction upon resuming execution.