Download Debugger Manual - Typewritten Software
Transcript
6 WORKING WITH REGISTERS This section describes the Debugger's internal process register, and explains how to examine and modify registers. It also discusses the use of register mnemonics, and tells how to proceed from a new Code Segment and Instruction Pointer (CS:IP) using CODE-G. THE PROCESS REGISTER The process register PR is a Debugger internal register. This register always identifies and keeps track of the current process. The PR is set automatically to the process identifier of the process that most recently reached a breakpoint. For example, if Process 2 is the process that most recently reached a breakpoint, then PR is set to 2. When you invoke the Debugger from the Executive or from the Context Manager (using CODE-GO) just before the execution of an application system begins, PR is set to the identifier of the first user process. All Debugger commands that involve processes treat the process with which they are concerned as the current process. For example, whenever registers are read or written to, the register of the current process is used. EXAMINING AND MODIFYING REGISTERS To debug a single-process program, you normally do not need to refer to PR at all. However, to debug a multiprocess program, you must know which of the processes involved is the current process. You can examine and change PR the same way you would examine and change any other word location: by opening it and then entering a new parameter, if desired. For example, if the current process is number 4 and you want to change it to number 7, type PR → Working with Registers 6-1