Debug Manual

Table Of Contents
Introduction
Debug Manual421921-003
1-16
Debug/Program Execution Environment
Debug/Program Execution Environment
Debug executes in a private environment with its own stack; it does not use the
environment of the procedure from which it was invoked. Debug does not use any
processor registers of the process being debugged, so all registers are available to the
user program. Debug runs as part of the original user process executing out of the
system code portion of the process, as illustrated in Figure 1-3. Debug data is stored
outside the user data area.
In a process being debugged, Debug displays output to the terminal and accepts input
from the terminal as illustrated in Figure 1-4 on page 1-17. Panel 1 illustrates control
going to a terminal at an assumed breakpoint. Then Debug requests input. Panel 2
illustrates a request to Debug to display data at location 100. Panel 3 illustrates Debug
reading the location and returning the information, which is the value 25, to the
terminal.
When several processes run the same program file in the same processor module,
they share the code area. If a breakpoint is set in shared code using the default
breakpoint mode, only the process that set the breakpoint enters the debug state when
it executes or accesses the breakpoint location. If you are debugging in privileged
mode, you can direct all processes to break at that location by specifying ALL when
setting the breakpoint.
When a privileged memory-access breakpoint is set with the ALL attribute specified
(for example, BM0,r,ALL), every other memory-access breakpoint in that processor is
inhibited. The other breakpoints return to use when the privileged ALL breakpoint is
cleared. Only one ALL memory-access breakpoint is allowed per processor.
Figure 1-3. Debug/User Process Diagram
VST0103.vsd
System Code System Library System Data
User Code User Library User Data
Debug
User Process
Debug Data