Trace Functions

These functions enable a debugger to trace program execution. Execution trace is performed by setting hook routines.

  • Return from a hook routine must be done after states have returned to where they were when the hook routine was called. Restoring of registers, however, can be done in accordance with the register saving rules of C language functions.
  • In a hook routine, limitations on states must not be modified to make them less restrictive than when the routine was called. For example, if the hook routine was called during interrupts disabled state, interrupts must not be enabled.
  • A hook routine inherits the stack at the time of the hook. Too much stack use may therefore cause a stack overflow. The extent to which the stack can be used is not definite since it differs with the situation at the time of the hook. Switching to a separate stack in the hook routine would be safer.

Comments

Click here to Post a Comment