Native Inspect Manual (H06.13+, J06.03+)
Debugging Multiple Processes
Native Inspect provides support for debugging multiple TNS/E native processes in both the Guardian
and OSS environments. Native Inspect does not provide the same level of multiprocess debugging
capabilities that Inspect has traditionally provided and that is available on TNS/E systems by
debugging with Visual Inspect.
Multiprocess debugging is easiest using either Visual Inspect or separate instances of Native Inspect.
If you use Native Inspect for multiprocess debugging, you can choose either of the following
strategies:
• Use a separate Native Inspect instance for each process so that you are issuing debug requests
from separate terminal sessions.
• Use one instance of Native Inspect for all processes so that one process is the current process
and the other processes are in the background.
Debugging Two Processes With One Instance of Native Inspect
Suppose that you are running Native Inspect and are debugging a process (this is the “current
process” of the debugger, or the debugging target). Another process will automatically be given
to your existing instance of Native Inspect if a TNS/E native process causes a debugger to be
invoked, and the TNS/E process is running in the same CPU and has the same user ID as your
current process (or if you are using the super ID).
Two processes are then under the control of one instance of Native Inspect. See Example of Using
Multiple Instances of Native Inspect (page 26).
Using One Instance of Native Inspect to Debug Multiple Processes
You need to be mindful of which process is the current process (as indicated by the CPU,pin in
the eInspect prompt). With Native Inspect, most debugging options (such as the directory search
path) are defined as attributes of the debugger instance, not as values associated with the current
process.
Suppose that you are debugging two interacting processes. If you are stepping execution in process
A, which causes a breakpoint in process B to be hit, process B becomes the current process.
Advancing execution in process B might then result in completion of the step of process A, causing
it once again to be the current process.
In this situation, you will see the process ID of process A (3,301) displayed in the Native Inspect
prompt, and then the process ID of process B in the next prompt from Native Inspect (3,38). For
example:
(eInspect 3,301): step
(eInspect 3,38):
Considerations for Multi-Process Debugging
• Native Inspect can debug only those processes that are executing in the same CPU in which
the instance of Native Inspect is running.
For example, if a TNS/E native process running in CPU 3 calls Debug, and Native Inspect is
invoked as the debugger, the instance of Native Inspect must run in CPU 3.
• Native Inspect checks only for events at times when events are expected for the current
process—such as after process execution commands (or the wait command). Native Inspect
cannot receive events while prompting for user input.
Debugging events that occur for other processes are not necessarily reported when they occur,
but are reported when Native Inspect checks for events for the current process.
• Pressing the Break key interrupts waiting for a debugging event and redisplays the Native
Inspect command prompt, but cannot be used to interrupt other commands.
24 Introducing Native Inspect










