home *** CD-ROM | disk | FTP | other *** search
/ Total Destruction / Total_Destruction.iso / addons / Lccwin32.exe / Lccwin32 / lccpub / src / cv.h < prev    next >
Encoding:
C/C++ Source or Header  |  1997-11-11  |  3.8 KB  |  170 lines

  1.  
  2. #define S_COMPILE    0x1
  3. #define S_REGISTER  0x2
  4. #define S_UDT       0x4
  5. #define S_START     0x5
  6. #define S_END       0x6
  7. #define S_OBJNAME   0x9
  8. #define S_BPREL32    0x200
  9. #define S_LDATA32    0x201
  10. #define S_GDATA32    0x202
  11. #define S_GPROC32    0x205
  12. #define S_LPROC32    0x204
  13. #define S_BLOCK32    0x207
  14. #define S_LABEL32    0x209
  15. #define S_PROCREF   0x400
  16. #define S_DATAREF   0x401
  17.  
  18. struct procInfo {
  19.     long pParent;
  20.     long pEnd;
  21.     long pNext;
  22.     long procLength;
  23.     long debugStart;
  24.     long debugEnd;
  25.     long offset;
  26.     short segment;
  27.     short procType;
  28.     char flags;
  29.     union {
  30.         char fname[4];
  31.         char *Name;
  32.     } u;
  33. };
  34.  
  35. struct blockInfo {
  36.     long pParent;
  37.     long pEnd;
  38.     long length;
  39.     long offset;
  40.     short segment;
  41.     char name[1];
  42. };
  43. struct localDataInfo {
  44.     long offset;
  45.     short segment;
  46.     short type;
  47.     char name[1];
  48. };
  49. /*
  50. (0x0200) BP Relative 16:32
  51. This symbol specifies symbols that are allocated on the stack for a procedure.
  52. For C/C++, these include the actual parameters to a function and the local 
  53. nonstatic variables of functions.
  54.   
  55. 2        2            4        2        *
  56.  
  57. length    S_BPREL32    offset    @type    name
  58.  
  59. offset    Signed offset relative to BP.  If offset  is 0, then the symbol was 
  60.         assigned to a register or never instantiated by the optimizer and cannot 
  61.         be evaluated because its location is unknown.
  62. @type     Type of the symbol
  63. name    Length-prefixed name of the symbol
  64. */
  65. #define S_BPREL32    0x200
  66. struct autoDataInfo {
  67.     long offset;    /* offset from BP */
  68.     short type;
  69.     char name[1];
  70. };
  71.  
  72. struct UDT {    /* User Defined Type */
  73.     short type;
  74.     char name[1];
  75. };
  76.  
  77. struct codeLabel {
  78.     long offset;
  79.     short segment;
  80.     char flags;
  81.     char name[1];
  82. };
  83.  
  84. /* All values not defined are reserved for future use.*/
  85. #define sstModule    0x120
  86. #define sstTypes    0x121
  87. #define sstPublic    0x122
  88. #define sstPublicSym    0x123
  89. #define sstSymbols    0x124
  90. #define sstAlignSym    0x125
  91. #define sstSrcLnSeg    0x126
  92. #define sstSrcModule    0x127
  93. #define sstLibraries    0x128
  94. #define sstGlobalSym    0x129
  95. #define sstGlobalPub    0x12a
  96. #define sstGlobalTypes    0x12b
  97. #define sstMPC    0x12c
  98. #define sstSegMap    0x12d
  99. #define sstSegName    0x12e
  100. #define sstPreComp    0x12f
  101. /* unused    0x130 */
  102. #define sstOffsetMap16    0x131
  103. #define sstOffsetMap32    0x132
  104. #define sstFileIndex    0x133
  105. #define sstStaticSym    0x134
  106.  
  107. #if 0
  108. #define FRAME_FPO 0
  109. #define FRAME_TRAP 1
  110. #define FRAME_TSS 2
  111. typedef struct _FOP_DATA {
  112.     DWORD ulOffStart; /* Start of the function */
  113.     DWORD cbProcSize; /* size of the function */
  114.     DWORD Locals;      /* Number of bytes in locals */
  115.     WORD  Params;     /* Number of bytes in params */
  116.     WORD  cbProlog:8; /* Number of bytes of prologue code */
  117.     WORD  cbRegs  :3; /* Number of registers saved */
  118.     WORD  fHasSEH :1; /* True if SEH (?) in function */
  119.     WORD  fUseBP  :1; /* True if ebp has been allocated */
  120.     WORD  reserved:1;
  121.     WORD  cbFrame :2; /* frame type */
  122. }FPO_DATA;
  123. #endif
  124. typedef struct tagDataList {
  125.     struct tagDataList *Next;
  126.     int len;
  127.     char *data;
  128.     char *Name;
  129.     short Typeidx;
  130. } DataList;
  131. typedef struct tagProcList {
  132.     struct tagProcList *Next;
  133.     struct procInfo procInfo;
  134.     int len;
  135.     char *data;
  136.     DataList *FunctionRecord;
  137.     unsigned short NrOfArguments;
  138.     Symbol Sym;
  139. } ProcList;
  140.  
  141. #define LF_POINTER   0x2
  142. #define LF_STRUCTURE 0x5
  143. #define LF_UNION     0x6
  144. #define LF_PROCEDURE 0x8
  145. #define LF_ARGLIST   0x201
  146. #define LF_LIST      0x204
  147. #define LF_MEMBER    0x406
  148. #define LF_LONG      0x8003
  149. #define LF_ARRAY     0x3
  150. typedef struct tagStructType {
  151.     unsigned short len;
  152.     unsigned short tag;
  153.     unsigned short count;
  154.     unsigned short fieldtype;
  155.     unsigned short property;
  156.     unsigned short derived;
  157.     unsigned short vshape;
  158.     unsigned short bytes;
  159.     char name[1];
  160. } StructType;
  161.  
  162. extern DataList *DataSymbolsInfo;
  163. extern DataList *DataTypesInfo;
  164. extern ProcList *ProceduresList;
  165. char *PutLengthPrefixedName(char *dst,char *src);
  166. DataList *AddToCVData(char *data,int len,char *name);
  167.  
  168.  
  169.  
  170.