home *** CD-ROM | disk | FTP | other *** search
/ OS/2 Shareware BBS: 10 Tools / 10-Tools.zip / sd386v50.zip / sd386src.zip / $$SYMBOL.H next >
Text File  |  1993-06-11  |  7KB  |  166 lines

  1. /*****************************************************************************/
  2. /* File:                                             IBM INTERNAL USE ONLY   */
  3. /*   $$symbol.h                                                              */
  4. /*                                                                           */
  5. /* Description:                                                              */
  6. /*                                                                           */
  7. /*  Record types for $$SYMBOLS segment                                       */
  8. /*                                                                           */
  9. /* History:                                                                  */
  10. /*                                                                           */
  11. /*   02/09/93 Merging $$syms16.h and $$syms32.h.                             */
  12. /*                                                                           */
  13. /*...Release 1.01 (04/03/92)                                                 */
  14. /*...                                                                        */
  15. /*... 02/09/93  809   Selwyn    HLL Level 2 support.                         */
  16. /*...                                                                        */
  17. /*****************************************************************************/
  18.  
  19. /*****************************************************************************/
  20. /* Macro for incrementing a symbol buffer to the next symbol record.         */
  21. /*****************************************************************************/
  22. #define NextSSrec(p) ((SSRec *) ((char *)(p) + ((SSRec *)(p))->RecLen + 2))
  23.  
  24. /*****************************************************************************/
  25. /* Values for the rectype field of the SSrec record in the $$symbols segment */
  26. /*****************************************************************************/
  27. #define   SSBEGIN        0x00
  28. #define   SSPROC         0x01
  29. #define   SSEND          0x02
  30. #define   SSDEF          0x04
  31. #define   SSVAR          0x05
  32. #define   SSREG          0x0D
  33. #define   SSCHGDEF       0x11
  34. #define   SSUSERDEF      0x12
  35. #define   SSPROCCPP      0x1D
  36. #define   SSVARCPP       0x1E
  37. #define   SSMEMFUNC      0x1A
  38. #define   SSENTRY        0x0F
  39.  
  40. /*****************************************************************************/
  41. /* values for the internal flags for procedure and static var records.       */
  42. /*****************************************************************************/
  43. #define   PROCEDURE      0x01
  44. #define   CPPPROCEDURE   0x02
  45. #define   MEMBERFUNC     0x04
  46. #define   SECONDENTRY    0x08
  47.  
  48. #define   STATIC         0x01
  49. #define   CPPSTATIC      0x02
  50. /*****************************************************************************/
  51. /* Internal symbol structures.                                               */
  52. /*****************************************************************************/
  53. typedef struct                          /* Type Number : 0x00               */
  54. {
  55.   USHORT  RecLen;
  56.   UCHAR   RecType;
  57.   UINT    BlockOffset;
  58.   UINT    BlockLen;
  59. } SSBegin;
  60.  
  61. typedef struct                          /* Type Number : 0x01               */
  62. {
  63.   USHORT  RecLen;
  64.   UCHAR   RecType;
  65.   UCHAR   Flags;
  66.   UINT    ProcOffset;
  67.   USHORT  TypeIndex;
  68.   UINT    ProcLen;
  69.   USHORT  DebugStart;
  70.   UINT    DebugEnd;
  71.   USHORT  ClassType;
  72.   UCHAR   NearFar;
  73.   USHORT  NameLen;
  74.   char    Name[1];
  75. } SSProc;
  76.  
  77. typedef struct                          /* Type Number : 0x04               */
  78. {
  79.   USHORT  RecLen;
  80.   UCHAR   RecType;
  81.   int     FrameOffset;
  82.   USHORT  TypeIndex;
  83.   USHORT  NameLen;
  84.   char    Name[1];
  85. } SSDef;
  86.  
  87. typedef struct                          /* Type Number : 0x05               */
  88. {
  89.   USHORT  RecLen;
  90.   UCHAR   RecType;
  91.   UCHAR   Flags;
  92.   UINT    Offset;
  93.   USHORT  ObjectNum;
  94.   USHORT  TypeIndex;
  95.   USHORT  NameLen;
  96.   char    Name[1];
  97. } SSVar;
  98.  
  99. typedef struct                          /* Type Number : 0x0D               */
  100. {
  101.   USHORT  RecLen;
  102.   UCHAR   RecType;
  103.   USHORT  TypeIndex;
  104.   UCHAR   RegNum;
  105.   USHORT  NameLen;
  106.   char    Name[1];
  107. } SSReg;
  108.  
  109. typedef struct                          /* Type Number : 0x11               */
  110. {
  111.   USHORT  RecLen;
  112.   UCHAR   RecType;
  113.   USHORT  SegNum;
  114.   USHORT  Reserved;
  115. } SSChgDef;
  116.  
  117. typedef struct                          /* Type Number : 0x12               */
  118. {
  119.   USHORT  RecLen;
  120.   UCHAR   RecType;
  121.   USHORT  TypeIndex;
  122.   USHORT  NameLen;
  123.   char    Name[1];
  124. } SSUserDef;
  125.  
  126. typedef struct                          /* Type Number : 0x02               */
  127. {
  128.   USHORT  RecLen;
  129.   UCHAR   RecType;
  130. } SSEnd;
  131.  
  132. typedef struct _SSrec
  133. {
  134.   USHORT  RecLen;
  135.   UCHAR   RecType;
  136. } SSRec;
  137.  
  138.  
  139. /* values for the regno field.                                               */
  140.  
  141. #define SSREGBX16 11                    /*                                605*/
  142. #define SSREGSI16 14                    /*                                605*/
  143. #define SSREGDI16 15                    /*                                605*/
  144. #define SSREGBX32 19                    /*                                605*/
  145. #define SSREGSI32 22                    /*                                605*/
  146. #define SSREGDI32 23                    /*                                605*/
  147.  
  148. /* The symbol STACKFRAME used by findlvar to indicate that the address of
  149.  * the local variable it found is relative to the stack frame.  The pointer
  150.  * returned in this case has a selector value of STACKFRAME, and a signed
  151.  * offset value that locates the variable relative to the base of the
  152.  * stack frame.  To compute an address, substitute the value of the SS
  153.  * register for the selector, and add the value of the BP register to the
  154.  * offset.
  155.  */
  156. #define STACKFRAME 0xFED8
  157. #define REGISTERADDRESS 0xFFD8
  158. #define REGISTERTYPEADDR 0x40           /* reg type addr bit pattern is   205*/
  159.                                         /* as follows 01000000            205*/
  160. #define REGISTERADDRMASK 0x3FFFFFFF     /* register address mask.         205*/
  161. #define STACKADDRBIT    31              /* EBP relative addr bit.         101*/
  162. #define STACKADDRSIGN   30              /* EBP relative +- bit.           101*/
  163. #define REGADDRBIT      30              /* Register address bit.          205*/
  164. #define REGADDCHECKPOS  24              /* postion of bit from where to   205*/
  165.                                         /* check register address         205*/
  166.