HP 3000 Manuals

Debugging MPE XL Code-related Traps [ Trap Handling Programmer's Guide ] MPE/iX 5.0 Documentation


Trap Handling Programmer's Guide

Debugging MPE XL Code-related Traps 

Code-related traps result from illegal or erroneous coding.  The types of
MPE XL code-related traps are listed in Chapter 3.  These traps are
permanently enabled and cannot be caught and handled.

Although code-related traps cause the offending process to be aborted,
you can use a stack trace and the system debugger to find the cause of
the trap.  Refer to Examples 1-1 and 1-2 for illustrations of the types
of stack traces.  For more information about stack traces, the SETDUMP
intrinsic, and use of the system debugger, refer to the System Debug 
Reference Manual (32650-90013).

The most common types of code-related traps are the data memory
protection trap and the invalid data pointer trap.  Generally, these
traps are caused by one of the following programmer errors dealing with
pointers:

 *  A nil pointer was dereferenced.

 *  Faulty pointer arithmetic caused the pointer to become misaligned or
    invalid.

 *  A data area was accessed without the proper access rights.

The instruction memory protection trap is also sometimes encountered.  It
generally results when an unauthorized, non-operating system user calls
an operating system procedure running at privilege level 0.

The other types of code-related traps are usually caused by modifying
executable code or by using either corrupt code or invalid code
sequences.  Unmodified compiled code should not produce these errors.



MPE/iX 5.0 Documentation