home *** CD-ROM | disk | FTP | other *** search
/ The Datafile PD-CD 5 / DATAFILE_PDCD5.iso / utilities / d / desklib / !DeskSrc / FN / Libraries / BackTrace / h / Defs
Encoding:
Text File  |  1996-11-19  |  1.1 KB  |  39 lines

  1. #ifndef __BackTrace_Defs_h
  2. #define __BackTrace_Defs_h
  3.  
  4. /* PCMask masks out status and mode bits to give a 26 bit program counter */
  5. /* (We're assuming the 26-bit PC APCS variant. The alternative is the 32-bit variant)
  6.  */
  7. #define Mask26Bits ((1u<<26)-1)
  8. #define PCMask (Mask26Bits & ~3)
  9.  
  10.  
  11. /* The save code pointer points 3 words into the function */
  12. #define SaveCodePointerOffset 2
  13.  
  14.  
  15. /* We need to search back from the instruction that created a frame until we
  16.  * find the name information word. NameInfoSearchWordLimit is the maximum number
  17.  * of words that we should search through
  18.  */
  19. #define NameInfoSearchWordLimit 4
  20.  
  21.  
  22. /* The following information is stored after the function name */
  23.  
  24. typedef struct    {
  25.     unsigned int    length    :24;    /* Number of bytes used to store function name (includes 0 padding) */
  26.     unsigned int    Desk_ff_code    : 8;    /* Should be 0xff if there is a function name before this information */
  27.     }
  28.     Desk_function_name_info;
  29.  
  30.  
  31. #ifdef MemCheck_MEMCHECK
  32.     #pragma -c0
  33.     /*
  34.     Turn off memory checking in stack-walking code - MemCheck doesn't like all the reads of the stack...
  35.      */
  36. #endif
  37.  
  38. #endif
  39.