Native Inspect Manual (H06.13+, J06.03+)

Example of Using Multiple Instances of Native Inspect
You are running Native Inspect in CPU 3 and are debugging the process
$DISK1.MYSUBVOL.MYPROG (CPU,pin=3,301). A second debugging target named
$DISK2.SVOL2.YOURPROG (CPU,pin=3,32) is assigned to your instance of Native Inspect.
After a debugging event is reported for the new current process, the following command prompt
indicates that the current process has changed:
(eInspect 3,301):
< debugging event is reported here >
(eInspect 3,32):
To have a separate Native Inspect instance for each process being debugged, you need to attach
the new process (3,32) to a new Native Inspect instance, and then detach the process from the
original Native Inspect instance as follows:
1. Start a second Native Inspect instance in a different terminal session but running on the same
CPU:
TACL > einspect / cpu 3/
(eInspect 3,-2):
2. Using this new Native Inspect instance, enter an attach command, specifying the process
ID of the process you want to transfer as follows:
(eInspect 3,-2): attach 32
The attach command does not complete until you perform the final step (detach).
3. Using the original Native Inspect instance, enter the detach command as follows:
(eInspect 3,32): detach
The preceding detach command releases the new process to the attaching Native Inspect
instance and allows the original process back to its original instance of Native Inspect.
4. The new terminal session indicates that the attach has completed, and process 3,32 is the
current process for the new instance of Native Inspect:
(eInspect 3,-2): attach 32
Symbols read in for program loadfile
\PIPPIN.$D0117.TESTS.ODISP3.
Process (3,32) received DS_EVENT_ENTER_DEBUG
(eInspect 3,32):
You now have two instances of Native Inspect attached to each of the two programs being
debugged in CPU 3.
Global Debugging
A privileged user (the super ID user) can set one or more global breakpoints (breakpoints set in
code that is shared by multiple processes, such as DLLs). Any process that encounters the global
breakpoint comes under the control of Native Inspect. Such a debug session is defined as global
debugging.
Native Inspect Is the Global Debugger
On the TNS/E system, only Native Inspect can do global debugging, and only one global
debugging session can exist in a CPU at any one time. The Native Inspect instance that sets a
global breakpoint is implicitly registered as the global debugger in that CPU when the first global
breakpoint is set, and the Native Inspect instance is deregistered when the last global breakpoint
is removed.
Global debugging is privileged debugging and is also a special case of multiprocess debugging
(see Debugging Multiple Processes (page 24)). The super ID user must use one instance of Native
26 Introducing Native Inspect