Inspect Manual

Using Inspect With TNS/R Native Programs
Inspect Manual429164-006
17-6
Code Breakpoints
Code Breakpoints
When debugging a TNS/R program, you can set code breakpoints at any location in
the program. To set a breakpoint in native code, you can either specify a scope name
or a machine-level code address.
Signals
TNS and accelerated processes use a trap mechanism for exception handling. TNS
and accelerated processes in the OSS environment can also use a signal mechanism
for exception handling. (A signal is a means by which a process can be notified of or
affected by an event occurring in the system.)
TNS/R native processes, regardless of whether they are in the Guardian or OSS
environment, use a signal mechanism for exception handling. (OSS processes can
also use signals for communicating between processes.) The SIG_DEBUG parameter
was added to the MODIFY SIGNAL command to specify that when a signal is
delivered, the debugger will be invoked.
For example, where a TNS process might enter a trap handler on an arithmetic
overflow, a TNS/R native process might enter a signal handler.
Refer to the Guardian Programmer’s Guide and the Open System Services
Programmer’s Guide for details on signal handlers.
Commands Useful When Debugging Native
Programs
The commands listed are beneficial when debugging TNS/R native programs. For
more information, see Section 6, High-Level Inspect Commands.
ADD PROGRAM
The ADD PROGRAM command accepts the names of one or more SRLs. The SRL
clause is a single filename, or a comma separated list of SRL object files within
parentheses. If the process used more SRLs than you specified, Inspect will emit a
warning indicating this. By default, Inspect does not load public SRL object files.
BREAK
The BREAK command supports memory access breakpoints on TNS/R native
addresses. The support of MABs on native addresses applies to all data breakpoint
subtypes (ACCESS, CHANGE, READ, WRITE, READ WRITE, WRITE READ).