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

when the DLL is loaded, Native Inspect again attempts to load the symbols using the actual load
address for the DLL.
Setting Breakpoints
Native Inspect does not support the ability to set breakpoints on DLL functions before the DLL is
loaded; you must wait until the DLL is loaded. Use the add-symbol-file command if you want
to specify the base address relative to which symbolic addresses are calculated.
Debugging Memory Problems
You can use the Native Inspect debugger to find memory leaks, view heap usage, and detect
related problems.
The following memory-related errors can occur in an application:
Heap corruption
Memory leaks
Access errors
The memory leak detection functionality is only available when using the memory leak detection
special library, ZRTCDLL (in 32-bit)/YRTCDLL (in 64-bit), found in the $SYSTEM.SYSnn subvolume.
The library must be specified as an "interpose library" when the application is run using the lib
option.
For example, if the application does not specify the ZRTCDLL library, it will get the following
message:
(eInspect 1,598):set heap-check on
ZRTCDLL library not found. To use runtime checking this library
must be specified using the "lib" option.
To avoid this message, the application must be run with the lib option. For example:
For 32-bit application:
rund application /lib $system.sys00.zrtcdll/
For 64-bit application:
run debug lib=/G/system/sys00/yrtcdll application
NOTE: If your application already uses an interpose library, it is not possible to add the memory
leak detection library and thus obtain memory leak detection functionality.
Heap Corruption
A heap corruption occurs when an application erroneously overwrites some of the data in the
heap. Heap corruption can result in data corruption, memory corruption, or both. When an
application inadvertently uses the erroneously overwritten data in the heap, it results in data
corruption in the application. Data corruption can lead to unpredictable program behavior. The
data corruption in the heap can lead to memory corruption if the corrupted data in the heap is
used by memory management functions in the application to allocate, access, or deallocate memory
blocks.
In other words, memory corruption occurs when the corrupted datum in the heap is accessed as
a pointer. Memory corruptions compromise the data integrity of the application and can result in
segmentation violations if the erroneously allocated or accessed memory blocks are out of the
bounds of the virtual memory of the application.
Memory Leaks
A memory leak occurs when an application fails to free allocated memory. As a result, the kernel
frees the memory that is allocated by a process only when the process terminates. If the program
leaks memory on a continual basis, the virtual memory requirement for the process continues to
Debugging Memory Problems 29