Leaked source code of windows server 2003
You can not select more than 25 topics Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.

3823 lines
137 KiB

  1. /*** cvinfo.h - Generic CodeView information definitions
  2. *
  3. * Structures, constants, etc. for accessing and interpreting
  4. * CodeView information.
  5. *
  6. */
  7. /*** The master copy of this file resides in the langapi project.
  8. * All Microsoft projects are required to use the master copy without
  9. * modification. Modification of the master version or a copy
  10. * without consultation with all parties concerned is extremely
  11. * risky.
  12. *
  13. * When this file is modified, the corresponding documentation file
  14. * omfdeb.doc in the langapi project must be updated.
  15. */
  16. #ifndef _VC_VER_INC
  17. #include "..\include\vcver.h"
  18. #endif
  19. #pragma once
  20. #include "cvconst.h"
  21. #ifndef _CV_INFO_INCLUDED
  22. #define _CV_INFO_INCLUDED
  23. #ifdef __cplusplus
  24. #pragma warning ( disable: 4200 )
  25. #endif
  26. #ifndef __INLINE
  27. #ifdef __cplusplus
  28. #define __INLINE inline
  29. #else
  30. #define __INLINE __inline
  31. #endif
  32. #endif
  33. #pragma pack ( push, 1 )
  34. typedef unsigned long CV_uoff32_t;
  35. typedef long CV_off32_t;
  36. typedef unsigned short CV_uoff16_t;
  37. typedef short CV_off16_t;
  38. typedef unsigned short CV_typ16_t;
  39. typedef unsigned long CV_typ_t;
  40. typedef unsigned long CV_pubsymflag_t; // must be same as CV_typ_t.
  41. typedef unsigned short _2BYTEPAD;
  42. typedef unsigned long CV_tkn_t;
  43. #if !defined (CV_ZEROLEN)
  44. #define CV_ZEROLEN
  45. #endif
  46. #if !defined (FLOAT10)
  47. #if defined(_M_I86) // 16 bit x86 supporting long double
  48. typedef long double FLOAT10;
  49. #else // 32 bit w/o long double support
  50. typedef struct FLOAT10
  51. {
  52. char b[10];
  53. } FLOAT10;
  54. #endif
  55. #endif
  56. #define CV_SIGNATURE_C6 0L // Actual signature is >64K
  57. #define CV_SIGNATURE_C7 1L // First explicit signature
  58. #define CV_SIGNATURE_C11 2L // C11 (vc5.x) 32-bit types
  59. #define CV_SIGNATURE_C13 4L // C13 (vc7.x) zero terminated names
  60. #define CV_SIGNATURE_RESERVED 5L // All signatures from 5 to 64K are reserved
  61. #define CV_MAXOFFSET 0xffffffff
  62. #ifndef GUID_DEFINED
  63. #define GUID_DEFINED
  64. typedef struct _GUID { // size is 16
  65. unsigned long Data1;
  66. unsigned short Data2;
  67. unsigned short Data3;
  68. unsigned char Data4[8];
  69. } GUID;
  70. #endif // !GUID_DEFINED
  71. typedef GUID SIG70; // new to 7.0 are 16-byte guid-like signatures
  72. typedef SIG70 * PSIG70;
  73. typedef const SIG70 * PCSIG70;
  74. /** CodeView Symbol and Type OMF type information is broken up into two
  75. * ranges. Type indices less than 0x1000 describe type information
  76. * that is frequently used. Type indices above 0x1000 are used to
  77. * describe more complex features such as functions, arrays and
  78. * structures.
  79. */
  80. /** Primitive types have predefined meaning that is encoded in the
  81. * values of the various bit fields in the value.
  82. *
  83. * A CodeView primitive type is defined as:
  84. *
  85. * 1 1
  86. * 1 089 7654 3 210
  87. * r mode type r sub
  88. *
  89. * Where
  90. * mode is the pointer mode
  91. * type is a type indicator
  92. * sub is a subtype enumeration
  93. * r is a reserved field
  94. *
  95. * See Microsoft Symbol and Type OMF (Version 4.0) for more
  96. * information.
  97. */
  98. #define CV_MMASK 0x700 // mode mask
  99. #define CV_TMASK 0x0f0 // type mask
  100. // can we use the reserved bit ??
  101. #define CV_SMASK 0x00f // subtype mask
  102. #define CV_MSHIFT 8 // primitive mode right shift count
  103. #define CV_TSHIFT 4 // primitive type right shift count
  104. #define CV_SSHIFT 0 // primitive subtype right shift count
  105. // macros to extract primitive mode, type and size
  106. #define CV_MODE(typ) (((typ) & CV_MMASK) >> CV_MSHIFT)
  107. #define CV_TYPE(typ) (((typ) & CV_TMASK) >> CV_TSHIFT)
  108. #define CV_SUBT(typ) (((typ) & CV_SMASK) >> CV_SSHIFT)
  109. // macros to insert new primitive mode, type and size
  110. #define CV_NEWMODE(typ, nm) ((CV_typ_t)(((typ) & ~CV_MMASK) | ((nm) << CV_MSHIFT)))
  111. #define CV_NEWTYPE(typ, nt) (((typ) & ~CV_TMASK) | ((nt) << CV_TSHIFT))
  112. #define CV_NEWSUBT(typ, ns) (((typ) & ~CV_SMASK) | ((ns) << CV_SSHIFT))
  113. // pointer mode enumeration values
  114. typedef enum CV_prmode_e {
  115. CV_TM_DIRECT = 0, // mode is not a pointer
  116. CV_TM_NPTR = 1, // mode is a near pointer
  117. CV_TM_FPTR = 2, // mode is a far pointer
  118. CV_TM_HPTR = 3, // mode is a huge pointer
  119. CV_TM_NPTR32 = 4, // mode is a 32 bit near pointer
  120. CV_TM_FPTR32 = 5, // mode is a 32 bit far pointer
  121. CV_TM_NPTR64 = 6, // mode is a 64 bit near pointer
  122. CV_TM_NPTR128 = 7, // mode is a 128 bit near pointer
  123. } CV_prmode_e;
  124. // type enumeration values
  125. typedef enum CV_type_e {
  126. CV_SPECIAL = 0x00, // special type size values
  127. CV_SIGNED = 0x01, // signed integral size values
  128. CV_UNSIGNED = 0x02, // unsigned integral size values
  129. CV_BOOLEAN = 0x03, // Boolean size values
  130. CV_REAL = 0x04, // real number size values
  131. CV_COMPLEX = 0x05, // complex number size values
  132. CV_SPECIAL2 = 0x06, // second set of special types
  133. CV_INT = 0x07, // integral (int) values
  134. CV_CVRESERVED = 0x0f,
  135. } CV_type_e;
  136. // subtype enumeration values for CV_SPECIAL
  137. typedef enum CV_special_e {
  138. CV_SP_NOTYPE = 0x00,
  139. CV_SP_ABS = 0x01,
  140. CV_SP_SEGMENT = 0x02,
  141. CV_SP_VOID = 0x03,
  142. CV_SP_CURRENCY = 0x04,
  143. CV_SP_NBASICSTR = 0x05,
  144. CV_SP_FBASICSTR = 0x06,
  145. CV_SP_NOTTRANS = 0x07,
  146. CV_SP_HRESULT = 0x08,
  147. } CV_special_e;
  148. // subtype enumeration values for CV_SPECIAL2
  149. typedef enum CV_special2_e {
  150. CV_S2_BIT = 0x00,
  151. CV_S2_PASCHAR = 0x01 // Pascal CHAR
  152. } CV_special2_e;
  153. // subtype enumeration values for CV_SIGNED, CV_UNSIGNED and CV_BOOLEAN
  154. typedef enum CV_integral_e {
  155. CV_IN_1BYTE = 0x00,
  156. CV_IN_2BYTE = 0x01,
  157. CV_IN_4BYTE = 0x02,
  158. CV_IN_8BYTE = 0x03,
  159. CV_IN_16BYTE = 0x04
  160. } CV_integral_e;
  161. // subtype enumeration values for CV_REAL and CV_COMPLEX
  162. typedef enum CV_real_e {
  163. CV_RC_REAL32 = 0x00,
  164. CV_RC_REAL64 = 0x01,
  165. CV_RC_REAL80 = 0x02,
  166. CV_RC_REAL128 = 0x03,
  167. CV_RC_REAL48 = 0x04
  168. } CV_real_e;
  169. // subtype enumeration values for CV_INT (really int)
  170. typedef enum CV_int_e {
  171. CV_RI_CHAR = 0x00,
  172. CV_RI_INT1 = 0x00,
  173. CV_RI_WCHAR = 0x01,
  174. CV_RI_UINT1 = 0x01,
  175. CV_RI_INT2 = 0x02,
  176. CV_RI_UINT2 = 0x03,
  177. CV_RI_INT4 = 0x04,
  178. CV_RI_UINT4 = 0x05,
  179. CV_RI_INT8 = 0x06,
  180. CV_RI_UINT8 = 0x07,
  181. CV_RI_INT16 = 0x08,
  182. CV_RI_UINT16 = 0x09
  183. } CV_int_e;
  184. // macros to check the type of a primitive
  185. #define CV_TYP_IS_DIRECT(typ) (CV_MODE(typ) == CV_TM_DIRECT)
  186. #define CV_TYP_IS_PTR(typ) (CV_MODE(typ) != CV_TM_DIRECT)
  187. #define CV_TYP_IS_NPTR(typ) (CV_MODE(typ) == CV_TM_NPTR)
  188. #define CV_TYP_IS_FPTR(typ) (CV_MODE(typ) == CV_TM_FPTR)
  189. #define CV_TYP_IS_HPTR(typ) (CV_MODE(typ) == CV_TM_HPTR)
  190. #define CV_TYP_IS_NPTR32(typ) (CV_MODE(typ) == CV_TM_NPTR32)
  191. #define CV_TYP_IS_FPTR32(typ) (CV_MODE(typ) == CV_TM_FPTR32)
  192. #define CV_TYP_IS_SIGNED(typ) (((CV_TYPE(typ) == CV_SIGNED) && CV_TYP_IS_DIRECT(typ)) || \
  193. (typ == T_INT1) || \
  194. (typ == T_INT2) || \
  195. (typ == T_INT4) || \
  196. (typ == T_INT8) || \
  197. (typ == T_INT16) || \
  198. (typ == T_RCHAR))
  199. #define CV_TYP_IS_UNSIGNED(typ) (((CV_TYPE(typ) == CV_UNSIGNED) && CV_TYP_IS_DIRECT(typ)) || \
  200. (typ == T_UINT1) || \
  201. (typ == T_UINT2) || \
  202. (typ == T_UINT4) || \
  203. (typ == T_UINT8) || \
  204. (typ == T_UINT16))
  205. #define CV_TYP_IS_REAL(typ) ((CV_TYPE(typ) == CV_REAL) && CV_TYP_IS_DIRECT(typ))
  206. #define CV_FIRST_NONPRIM 0x1000
  207. #define CV_IS_PRIMITIVE(typ) ((typ) < CV_FIRST_NONPRIM)
  208. #define CV_TYP_IS_COMPLEX(typ) ((CV_TYPE(typ) == CV_COMPLEX) && CV_TYP_IS_DIRECT(typ))
  209. #define CV_IS_INTERNAL_PTR(typ) (CV_IS_PRIMITIVE(typ) && \
  210. CV_TYPE(typ) == CV_CVRESERVED && \
  211. CV_TYP_IS_PTR(typ))
  212. // selected values for type_index - for a more complete definition, see
  213. // Microsoft Symbol and Type OMF document
  214. // Special Types
  215. typedef enum TYPE_ENUM_e {
  216. // Special Types
  217. T_NOTYPE = 0x0000, // uncharacterized type (no type)
  218. T_ABS = 0x0001, // absolute symbol
  219. T_SEGMENT = 0x0002, // segment type
  220. T_VOID = 0x0003, // void
  221. T_HRESULT = 0x0008, // OLE/COM HRESULT
  222. T_32PHRESULT = 0x0408, // OLE/COM HRESULT __ptr32 *
  223. T_64PHRESULT = 0x0608, // OLE/COM HRESULT __ptr64 *
  224. T_PVOID = 0x0103, // near pointer to void
  225. T_PFVOID = 0x0203, // far pointer to void
  226. T_PHVOID = 0x0303, // huge pointer to void
  227. T_32PVOID = 0x0403, // 32 bit pointer to void
  228. T_32PFVOID = 0x0503, // 16:32 pointer to void
  229. T_64PVOID = 0x0603, // 64 bit pointer to void
  230. T_CURRENCY = 0x0004, // BASIC 8 byte currency value
  231. T_NBASICSTR = 0x0005, // Near BASIC string
  232. T_FBASICSTR = 0x0006, // Far BASIC string
  233. T_NOTTRANS = 0x0007, // type not translated by cvpack
  234. T_BIT = 0x0060, // bit
  235. T_PASCHAR = 0x0061, // Pascal CHAR
  236. // Character types
  237. T_CHAR = 0x0010, // 8 bit signed
  238. T_PCHAR = 0x0110, // 16 bit pointer to 8 bit signed
  239. T_PFCHAR = 0x0210, // 16:16 far pointer to 8 bit signed
  240. T_PHCHAR = 0x0310, // 16:16 huge pointer to 8 bit signed
  241. T_32PCHAR = 0x0410, // 32 bit pointer to 8 bit signed
  242. T_32PFCHAR = 0x0510, // 16:32 pointer to 8 bit signed
  243. T_64PCHAR = 0x0610, // 64 bit pointer to 8 bit signed
  244. T_UCHAR = 0x0020, // 8 bit unsigned
  245. T_PUCHAR = 0x0120, // 16 bit pointer to 8 bit unsigned
  246. T_PFUCHAR = 0x0220, // 16:16 far pointer to 8 bit unsigned
  247. T_PHUCHAR = 0x0320, // 16:16 huge pointer to 8 bit unsigned
  248. T_32PUCHAR = 0x0420, // 32 bit pointer to 8 bit unsigned
  249. T_32PFUCHAR = 0x0520, // 16:32 pointer to 8 bit unsigned
  250. T_64PUCHAR = 0x0620, // 64 bit pointer to 8 bit unsigned
  251. // really a character types
  252. T_RCHAR = 0x0070, // really a char
  253. T_PRCHAR = 0x0170, // 16 bit pointer to a real char
  254. T_PFRCHAR = 0x0270, // 16:16 far pointer to a real char
  255. T_PHRCHAR = 0x0370, // 16:16 huge pointer to a real char
  256. T_32PRCHAR = 0x0470, // 32 bit pointer to a real char
  257. T_32PFRCHAR = 0x0570, // 16:32 pointer to a real char
  258. T_64PRCHAR = 0x0670, // 64 bit pointer to a real char
  259. // really a wide character types
  260. T_WCHAR = 0x0071, // wide char
  261. T_PWCHAR = 0x0171, // 16 bit pointer to a wide char
  262. T_PFWCHAR = 0x0271, // 16:16 far pointer to a wide char
  263. T_PHWCHAR = 0x0371, // 16:16 huge pointer to a wide char
  264. T_32PWCHAR = 0x0471, // 32 bit pointer to a wide char
  265. T_32PFWCHAR = 0x0571, // 16:32 pointer to a wide char
  266. T_64PWCHAR = 0x0671, // 64 bit pointer to a wide char
  267. // 8 bit int types
  268. T_INT1 = 0x0068, // 8 bit signed int
  269. T_PINT1 = 0x0168, // 16 bit pointer to 8 bit signed int
  270. T_PFINT1 = 0x0268, // 16:16 far pointer to 8 bit signed int
  271. T_PHINT1 = 0x0368, // 16:16 huge pointer to 8 bit signed int
  272. T_32PINT1 = 0x0468, // 32 bit pointer to 8 bit signed int
  273. T_32PFINT1 = 0x0568, // 16:32 pointer to 8 bit signed int
  274. T_64PINT1 = 0x0668, // 64 bit pointer to 8 bit signed int
  275. T_UINT1 = 0x0069, // 8 bit unsigned int
  276. T_PUINT1 = 0x0169, // 16 bit pointer to 8 bit unsigned int
  277. T_PFUINT1 = 0x0269, // 16:16 far pointer to 8 bit unsigned int
  278. T_PHUINT1 = 0x0369, // 16:16 huge pointer to 8 bit unsigned int
  279. T_32PUINT1 = 0x0469, // 32 bit pointer to 8 bit unsigned int
  280. T_32PFUINT1 = 0x0569, // 16:32 pointer to 8 bit unsigned int
  281. T_64PUINT1 = 0x0669, // 64 bit pointer to 8 bit unsigned int
  282. // 16 bit short types
  283. T_SHORT = 0x0011, // 16 bit signed
  284. T_PSHORT = 0x0111, // 16 bit pointer to 16 bit signed
  285. T_PFSHORT = 0x0211, // 16:16 far pointer to 16 bit signed
  286. T_PHSHORT = 0x0311, // 16:16 huge pointer to 16 bit signed
  287. T_32PSHORT = 0x0411, // 32 bit pointer to 16 bit signed
  288. T_32PFSHORT = 0x0511, // 16:32 pointer to 16 bit signed
  289. T_64PSHORT = 0x0611, // 64 bit pointer to 16 bit signed
  290. T_USHORT = 0x0021, // 16 bit unsigned
  291. T_PUSHORT = 0x0121, // 16 bit pointer to 16 bit unsigned
  292. T_PFUSHORT = 0x0221, // 16:16 far pointer to 16 bit unsigned
  293. T_PHUSHORT = 0x0321, // 16:16 huge pointer to 16 bit unsigned
  294. T_32PUSHORT = 0x0421, // 32 bit pointer to 16 bit unsigned
  295. T_32PFUSHORT = 0x0521, // 16:32 pointer to 16 bit unsigned
  296. T_64PUSHORT = 0x0621, // 64 bit pointer to 16 bit unsigned
  297. // 16 bit int types
  298. T_INT2 = 0x0072, // 16 bit signed int
  299. T_PINT2 = 0x0172, // 16 bit pointer to 16 bit signed int
  300. T_PFINT2 = 0x0272, // 16:16 far pointer to 16 bit signed int
  301. T_PHINT2 = 0x0372, // 16:16 huge pointer to 16 bit signed int
  302. T_32PINT2 = 0x0472, // 32 bit pointer to 16 bit signed int
  303. T_32PFINT2 = 0x0572, // 16:32 pointer to 16 bit signed int
  304. T_64PINT2 = 0x0672, // 64 bit pointer to 16 bit signed int
  305. T_UINT2 = 0x0073, // 16 bit unsigned int
  306. T_PUINT2 = 0x0173, // 16 bit pointer to 16 bit unsigned int
  307. T_PFUINT2 = 0x0273, // 16:16 far pointer to 16 bit unsigned int
  308. T_PHUINT2 = 0x0373, // 16:16 huge pointer to 16 bit unsigned int
  309. T_32PUINT2 = 0x0473, // 32 bit pointer to 16 bit unsigned int
  310. T_32PFUINT2 = 0x0573, // 16:32 pointer to 16 bit unsigned int
  311. T_64PUINT2 = 0x0673, // 64 bit pointer to 16 bit unsigned int
  312. // 32 bit long types
  313. T_LONG = 0x0012, // 32 bit signed
  314. T_ULONG = 0x0022, // 32 bit unsigned
  315. T_PLONG = 0x0112, // 16 bit pointer to 32 bit signed
  316. T_PULONG = 0x0122, // 16 bit pointer to 32 bit unsigned
  317. T_PFLONG = 0x0212, // 16:16 far pointer to 32 bit signed
  318. T_PFULONG = 0x0222, // 16:16 far pointer to 32 bit unsigned
  319. T_PHLONG = 0x0312, // 16:16 huge pointer to 32 bit signed
  320. T_PHULONG = 0x0322, // 16:16 huge pointer to 32 bit unsigned
  321. T_32PLONG = 0x0412, // 32 bit pointer to 32 bit signed
  322. T_32PULONG = 0x0422, // 32 bit pointer to 32 bit unsigned
  323. T_32PFLONG = 0x0512, // 16:32 pointer to 32 bit signed
  324. T_32PFULONG = 0x0522, // 16:32 pointer to 32 bit unsigned
  325. T_64PLONG = 0x0612, // 64 bit pointer to 32 bit signed
  326. T_64PULONG = 0x0622, // 64 bit pointer to 32 bit unsigned
  327. // 32 bit int types
  328. T_INT4 = 0x0074, // 32 bit signed int
  329. T_PINT4 = 0x0174, // 16 bit pointer to 32 bit signed int
  330. T_PFINT4 = 0x0274, // 16:16 far pointer to 32 bit signed int
  331. T_PHINT4 = 0x0374, // 16:16 huge pointer to 32 bit signed int
  332. T_32PINT4 = 0x0474, // 32 bit pointer to 32 bit signed int
  333. T_32PFINT4 = 0x0574, // 16:32 pointer to 32 bit signed int
  334. T_64PINT4 = 0x0674, // 64 bit pointer to 32 bit signed int
  335. T_UINT4 = 0x0075, // 32 bit unsigned int
  336. T_PUINT4 = 0x0175, // 16 bit pointer to 32 bit unsigned int
  337. T_PFUINT4 = 0x0275, // 16:16 far pointer to 32 bit unsigned int
  338. T_PHUINT4 = 0x0375, // 16:16 huge pointer to 32 bit unsigned int
  339. T_32PUINT4 = 0x0475, // 32 bit pointer to 32 bit unsigned int
  340. T_32PFUINT4 = 0x0575, // 16:32 pointer to 32 bit unsigned int
  341. T_64PUINT4 = 0x0675, // 64 bit pointer to 32 bit unsigned int
  342. // 64 bit quad types
  343. T_QUAD = 0x0013, // 64 bit signed
  344. T_PQUAD = 0x0113, // 16 bit pointer to 64 bit signed
  345. T_PFQUAD = 0x0213, // 16:16 far pointer to 64 bit signed
  346. T_PHQUAD = 0x0313, // 16:16 huge pointer to 64 bit signed
  347. T_32PQUAD = 0x0413, // 32 bit pointer to 64 bit signed
  348. T_32PFQUAD = 0x0513, // 16:32 pointer to 64 bit signed
  349. T_64PQUAD = 0x0613, // 64 bit pointer to 64 bit signed
  350. T_UQUAD = 0x0023, // 64 bit unsigned
  351. T_PUQUAD = 0x0123, // 16 bit pointer to 64 bit unsigned
  352. T_PFUQUAD = 0x0223, // 16:16 far pointer to 64 bit unsigned
  353. T_PHUQUAD = 0x0323, // 16:16 huge pointer to 64 bit unsigned
  354. T_32PUQUAD = 0x0423, // 32 bit pointer to 64 bit unsigned
  355. T_32PFUQUAD = 0x0523, // 16:32 pointer to 64 bit unsigned
  356. T_64PUQUAD = 0x0623, // 64 bit pointer to 64 bit unsigned
  357. // 64 bit int types
  358. T_INT8 = 0x0076, // 64 bit signed int
  359. T_PINT8 = 0x0176, // 16 bit pointer to 64 bit signed int
  360. T_PFINT8 = 0x0276, // 16:16 far pointer to 64 bit signed int
  361. T_PHINT8 = 0x0376, // 16:16 huge pointer to 64 bit signed int
  362. T_32PINT8 = 0x0476, // 32 bit pointer to 64 bit signed int
  363. T_32PFINT8 = 0x0576, // 16:32 pointer to 64 bit signed int
  364. T_64PINT8 = 0x0676, // 64 bit pointer to 64 bit signed int
  365. T_UINT8 = 0x0077, // 64 bit unsigned int
  366. T_PUINT8 = 0x0177, // 16 bit pointer to 64 bit unsigned int
  367. T_PFUINT8 = 0x0277, // 16:16 far pointer to 64 bit unsigned int
  368. T_PHUINT8 = 0x0377, // 16:16 huge pointer to 64 bit unsigned int
  369. T_32PUINT8 = 0x0477, // 32 bit pointer to 64 bit unsigned int
  370. T_32PFUINT8 = 0x0577, // 16:32 pointer to 64 bit unsigned int
  371. T_64PUINT8 = 0x0677, // 64 bit pointer to 64 bit unsigned int
  372. // 128 bit octet types
  373. T_OCT = 0x0014, // 128 bit signed
  374. T_POCT = 0x0114, // 16 bit pointer to 128 bit signed
  375. T_PFOCT = 0x0214, // 16:16 far pointer to 128 bit signed
  376. T_PHOCT = 0x0314, // 16:16 huge pointer to 128 bit signed
  377. T_32POCT = 0x0414, // 32 bit pointer to 128 bit signed
  378. T_32PFOCT = 0x0514, // 16:32 pointer to 128 bit signed
  379. T_64POCT = 0x0614, // 64 bit pointer to 128 bit signed
  380. T_UOCT = 0x0024, // 128 bit unsigned
  381. T_PUOCT = 0x0124, // 16 bit pointer to 128 bit unsigned
  382. T_PFUOCT = 0x0224, // 16:16 far pointer to 128 bit unsigned
  383. T_PHUOCT = 0x0324, // 16:16 huge pointer to 128 bit unsigned
  384. T_32PUOCT = 0x0424, // 32 bit pointer to 128 bit unsigned
  385. T_32PFUOCT = 0x0524, // 16:32 pointer to 128 bit unsigned
  386. T_64PUOCT = 0x0624, // 64 bit pointer to 128 bit unsigned
  387. // 128 bit int types
  388. T_INT16 = 0x0078, // 128 bit signed int
  389. T_PINT16 = 0x0178, // 16 bit pointer to 128 bit signed int
  390. T_PFINT16 = 0x0278, // 16:16 far pointer to 128 bit signed int
  391. T_PHINT16 = 0x0378, // 16:16 huge pointer to 128 bit signed int
  392. T_32PINT16 = 0x0478, // 32 bit pointer to 128 bit signed int
  393. T_32PFINT16 = 0x0578, // 16:32 pointer to 128 bit signed int
  394. T_64PINT16 = 0x0678, // 64 bit pointer to 128 bit signed int
  395. T_UINT16 = 0x0079, // 128 bit unsigned int
  396. T_PUINT16 = 0x0179, // 16 bit pointer to 128 bit unsigned int
  397. T_PFUINT16 = 0x0279, // 16:16 far pointer to 128 bit unsigned int
  398. T_PHUINT16 = 0x0379, // 16:16 huge pointer to 128 bit unsigned int
  399. T_32PUINT16 = 0x0479, // 32 bit pointer to 128 bit unsigned int
  400. T_32PFUINT16 = 0x0579, // 16:32 pointer to 128 bit unsigned int
  401. T_64PUINT16 = 0x0679, // 64 bit pointer to 128 bit unsigned int
  402. // 32 bit real types
  403. T_REAL32 = 0x0040, // 32 bit real
  404. T_PREAL32 = 0x0140, // 16 bit pointer to 32 bit real
  405. T_PFREAL32 = 0x0240, // 16:16 far pointer to 32 bit real
  406. T_PHREAL32 = 0x0340, // 16:16 huge pointer to 32 bit real
  407. T_32PREAL32 = 0x0440, // 32 bit pointer to 32 bit real
  408. T_32PFREAL32 = 0x0540, // 16:32 pointer to 32 bit real
  409. T_64PREAL32 = 0x0640, // 64 bit pointer to 32 bit real
  410. // 48 bit real types
  411. T_REAL48 = 0x0044, // 48 bit real
  412. T_PREAL48 = 0x0144, // 16 bit pointer to 48 bit real
  413. T_PFREAL48 = 0x0244, // 16:16 far pointer to 48 bit real
  414. T_PHREAL48 = 0x0344, // 16:16 huge pointer to 48 bit real
  415. T_32PREAL48 = 0x0444, // 32 bit pointer to 48 bit real
  416. T_32PFREAL48 = 0x0544, // 16:32 pointer to 48 bit real
  417. T_64PREAL48 = 0x0644, // 64 bit pointer to 48 bit real
  418. // 64 bit real types
  419. T_REAL64 = 0x0041, // 64 bit real
  420. T_PREAL64 = 0x0141, // 16 bit pointer to 64 bit real
  421. T_PFREAL64 = 0x0241, // 16:16 far pointer to 64 bit real
  422. T_PHREAL64 = 0x0341, // 16:16 huge pointer to 64 bit real
  423. T_32PREAL64 = 0x0441, // 32 bit pointer to 64 bit real
  424. T_32PFREAL64 = 0x0541, // 16:32 pointer to 64 bit real
  425. T_64PREAL64 = 0x0641, // 64 bit pointer to 64 bit real
  426. // 80 bit real types
  427. T_REAL80 = 0x0042, // 80 bit real
  428. T_PREAL80 = 0x0142, // 16 bit pointer to 80 bit real
  429. T_PFREAL80 = 0x0242, // 16:16 far pointer to 80 bit real
  430. T_PHREAL80 = 0x0342, // 16:16 huge pointer to 80 bit real
  431. T_32PREAL80 = 0x0442, // 32 bit pointer to 80 bit real
  432. T_32PFREAL80 = 0x0542, // 16:32 pointer to 80 bit real
  433. T_64PREAL80 = 0x0642, // 64 bit pointer to 80 bit real
  434. // 128 bit real types
  435. T_REAL128 = 0x0043, // 128 bit real
  436. T_PREAL128 = 0x0143, // 16 bit pointer to 128 bit real
  437. T_PFREAL128 = 0x0243, // 16:16 far pointer to 128 bit real
  438. T_PHREAL128 = 0x0343, // 16:16 huge pointer to 128 bit real
  439. T_32PREAL128 = 0x0443, // 32 bit pointer to 128 bit real
  440. T_32PFREAL128 = 0x0543, // 16:32 pointer to 128 bit real
  441. T_64PREAL128 = 0x0643, // 64 bit pointer to 128 bit real
  442. // 32 bit complex types
  443. T_CPLX32 = 0x0050, // 32 bit complex
  444. T_PCPLX32 = 0x0150, // 16 bit pointer to 32 bit complex
  445. T_PFCPLX32 = 0x0250, // 16:16 far pointer to 32 bit complex
  446. T_PHCPLX32 = 0x0350, // 16:16 huge pointer to 32 bit complex
  447. T_32PCPLX32 = 0x0450, // 32 bit pointer to 32 bit complex
  448. T_32PFCPLX32 = 0x0550, // 16:32 pointer to 32 bit complex
  449. T_64PCPLX32 = 0x0650, // 64 bit pointer to 32 bit complex
  450. // 64 bit complex types
  451. T_CPLX64 = 0x0051, // 64 bit complex
  452. T_PCPLX64 = 0x0151, // 16 bit pointer to 64 bit complex
  453. T_PFCPLX64 = 0x0251, // 16:16 far pointer to 64 bit complex
  454. T_PHCPLX64 = 0x0351, // 16:16 huge pointer to 64 bit complex
  455. T_32PCPLX64 = 0x0451, // 32 bit pointer to 64 bit complex
  456. T_32PFCPLX64 = 0x0551, // 16:32 pointer to 64 bit complex
  457. T_64PCPLX64 = 0x0651, // 64 bit pointer to 64 bit complex
  458. // 80 bit complex types
  459. T_CPLX80 = 0x0052, // 80 bit complex
  460. T_PCPLX80 = 0x0152, // 16 bit pointer to 80 bit complex
  461. T_PFCPLX80 = 0x0252, // 16:16 far pointer to 80 bit complex
  462. T_PHCPLX80 = 0x0352, // 16:16 huge pointer to 80 bit complex
  463. T_32PCPLX80 = 0x0452, // 32 bit pointer to 80 bit complex
  464. T_32PFCPLX80 = 0x0552, // 16:32 pointer to 80 bit complex
  465. T_64PCPLX80 = 0x0652, // 64 bit pointer to 80 bit complex
  466. // 128 bit complex types
  467. T_CPLX128 = 0x0053, // 128 bit complex
  468. T_PCPLX128 = 0x0153, // 16 bit pointer to 128 bit complex
  469. T_PFCPLX128 = 0x0253, // 16:16 far pointer to 128 bit complex
  470. T_PHCPLX128 = 0x0353, // 16:16 huge pointer to 128 bit real
  471. T_32PCPLX128 = 0x0453, // 32 bit pointer to 128 bit complex
  472. T_32PFCPLX128 = 0x0553, // 16:32 pointer to 128 bit complex
  473. T_64PCPLX128 = 0x0653, // 64 bit pointer to 128 bit complex
  474. // boolean types
  475. T_BOOL08 = 0x0030, // 8 bit boolean
  476. T_PBOOL08 = 0x0130, // 16 bit pointer to 8 bit boolean
  477. T_PFBOOL08 = 0x0230, // 16:16 far pointer to 8 bit boolean
  478. T_PHBOOL08 = 0x0330, // 16:16 huge pointer to 8 bit boolean
  479. T_32PBOOL08 = 0x0430, // 32 bit pointer to 8 bit boolean
  480. T_32PFBOOL08 = 0x0530, // 16:32 pointer to 8 bit boolean
  481. T_64PBOOL08 = 0x0630, // 64 bit pointer to 8 bit boolean
  482. T_BOOL16 = 0x0031, // 16 bit boolean
  483. T_PBOOL16 = 0x0131, // 16 bit pointer to 16 bit boolean
  484. T_PFBOOL16 = 0x0231, // 16:16 far pointer to 16 bit boolean
  485. T_PHBOOL16 = 0x0331, // 16:16 huge pointer to 16 bit boolean
  486. T_32PBOOL16 = 0x0431, // 32 bit pointer to 18 bit boolean
  487. T_32PFBOOL16 = 0x0531, // 16:32 pointer to 16 bit boolean
  488. T_64PBOOL16 = 0x0631, // 64 bit pointer to 18 bit boolean
  489. T_BOOL32 = 0x0032, // 32 bit boolean
  490. T_PBOOL32 = 0x0132, // 16 bit pointer to 32 bit boolean
  491. T_PFBOOL32 = 0x0232, // 16:16 far pointer to 32 bit boolean
  492. T_PHBOOL32 = 0x0332, // 16:16 huge pointer to 32 bit boolean
  493. T_32PBOOL32 = 0x0432, // 32 bit pointer to 32 bit boolean
  494. T_32PFBOOL32 = 0x0532, // 16:32 pointer to 32 bit boolean
  495. T_64PBOOL32 = 0x0632, // 64 bit pointer to 32 bit boolean
  496. T_BOOL64 = 0x0033, // 64 bit boolean
  497. T_PBOOL64 = 0x0133, // 16 bit pointer to 64 bit boolean
  498. T_PFBOOL64 = 0x0233, // 16:16 far pointer to 64 bit boolean
  499. T_PHBOOL64 = 0x0333, // 16:16 huge pointer to 64 bit boolean
  500. T_32PBOOL64 = 0x0433, // 32 bit pointer to 64 bit boolean
  501. T_32PFBOOL64 = 0x0533, // 16:32 pointer to 64 bit boolean
  502. T_64PBOOL64 = 0x0633, // 64 bit pointer to 64 bit boolean
  503. // ???
  504. T_NCVPTR = 0x01f0, // CV Internal type for created near pointers
  505. T_FCVPTR = 0x02f0, // CV Internal type for created far pointers
  506. T_HCVPTR = 0x03f0, // CV Internal type for created huge pointers
  507. T_32NCVPTR = 0x04f0, // CV Internal type for created near 32-bit pointers
  508. T_32FCVPTR = 0x05f0, // CV Internal type for created far 32-bit pointers
  509. T_64NCVPTR = 0x06f0, // CV Internal type for created near 64-bit pointers
  510. } TYPE_ENUM_e;
  511. /** No leaf index can have a value of 0x0000. The leaf indices are
  512. * separated into ranges depending upon the use of the type record.
  513. * The second range is for the type records that are directly referenced
  514. * in symbols. The first range is for type records that are not
  515. * referenced by symbols but instead are referenced by other type
  516. * records. All type records must have a starting leaf index in these
  517. * first two ranges. The third range of leaf indices are used to build
  518. * up complex lists such as the field list of a class type record. No
  519. * type record can begin with one of the leaf indices. The fourth ranges
  520. * of type indices are used to represent numeric data in a symbol or
  521. * type record. These leaf indices are greater than 0x8000. At the
  522. * point that type or symbol processor is expecting a numeric field, the
  523. * next two bytes in the type record are examined. If the value is less
  524. * than 0x8000, then the two bytes contain the numeric value. If the
  525. * value is greater than 0x8000, then the data follows the leaf index in
  526. * a format specified by the leaf index. The final range of leaf indices
  527. * are used to force alignment of subfields within a complex type record..
  528. */
  529. typedef enum LEAF_ENUM_e {
  530. // leaf indices starting records but referenced from symbol records
  531. LF_MODIFIER_16t = 0x0001,
  532. LF_POINTER_16t = 0x0002,
  533. LF_ARRAY_16t = 0x0003,
  534. LF_CLASS_16t = 0x0004,
  535. LF_STRUCTURE_16t = 0x0005,
  536. LF_UNION_16t = 0x0006,
  537. LF_ENUM_16t = 0x0007,
  538. LF_PROCEDURE_16t = 0x0008,
  539. LF_MFUNCTION_16t = 0x0009,
  540. LF_VTSHAPE = 0x000a,
  541. LF_COBOL0_16t = 0x000b,
  542. LF_COBOL1 = 0x000c,
  543. LF_BARRAY_16t = 0x000d,
  544. LF_LABEL = 0x000e,
  545. LF_NULL = 0x000f,
  546. LF_NOTTRAN = 0x0010,
  547. LF_DIMARRAY_16t = 0x0011,
  548. LF_VFTPATH_16t = 0x0012,
  549. LF_PRECOMP_16t = 0x0013, // not referenced from symbol
  550. LF_ENDPRECOMP = 0x0014, // not referenced from symbol
  551. LF_OEM_16t = 0x0015, // oem definable type string
  552. #ifdef LNGNM
  553. LF_TYPESERVER_ST = 0x0016, // not referenced from symbol
  554. #else
  555. LF_TYPESERVER = 0x0016, // not referenced from symbol
  556. #endif
  557. // leaf indices starting records but referenced only from type records
  558. LF_SKIP_16t = 0x0200,
  559. LF_ARGLIST_16t = 0x0201,
  560. LF_DEFARG_16t = 0x0202,
  561. LF_LIST = 0x0203,
  562. LF_FIELDLIST_16t = 0x0204,
  563. LF_DERIVED_16t = 0x0205,
  564. LF_BITFIELD_16t = 0x0206,
  565. LF_METHODLIST_16t = 0x0207,
  566. LF_DIMCONU_16t = 0x0208,
  567. LF_DIMCONLU_16t = 0x0209,
  568. LF_DIMVARU_16t = 0x020a,
  569. LF_DIMVARLU_16t = 0x020b,
  570. LF_REFSYM = 0x020c,
  571. LF_BCLASS_16t = 0x0400,
  572. LF_VBCLASS_16t = 0x0401,
  573. LF_IVBCLASS_16t = 0x0402,
  574. #ifdef LNGNM
  575. LF_ENUMERATE_ST = 0x0403,
  576. #else
  577. LF_ENUMERATE = 0x0403,
  578. #endif
  579. LF_FRIENDFCN_16t = 0x0404,
  580. LF_INDEX_16t = 0x0405,
  581. LF_MEMBER_16t = 0x0406,
  582. LF_STMEMBER_16t = 0x0407,
  583. LF_METHOD_16t = 0x0408,
  584. LF_NESTTYPE_16t = 0x0409,
  585. LF_VFUNCTAB_16t = 0x040a,
  586. LF_FRIENDCLS_16t = 0x040b,
  587. LF_ONEMETHOD_16t = 0x040c,
  588. LF_VFUNCOFF_16t = 0x040d,
  589. // 32-bit type index versions of leaves, all have the 0x1000 bit set
  590. //
  591. LF_TI16_MAX = 0x1000,
  592. LF_MODIFIER = 0x1001,
  593. LF_POINTER = 0x1002,
  594. #ifdef LNGNM
  595. LF_ARRAY_ST = 0x1003,
  596. LF_CLASS_ST = 0x1004,
  597. LF_STRUCTURE_ST = 0x1005,
  598. LF_UNION_ST = 0x1006,
  599. LF_ENUM_ST = 0x1007,
  600. #else
  601. LF_ARRAY = 0x1003,
  602. LF_CLASS = 0x1004,
  603. LF_STRUCTURE = 0x1005,
  604. LF_UNION = 0x1006,
  605. LF_ENUM = 0x1007,
  606. #endif
  607. LF_PROCEDURE = 0x1008,
  608. LF_MFUNCTION = 0x1009,
  609. LF_COBOL0 = 0x100a,
  610. LF_BARRAY = 0x100b,
  611. #ifdef LNGNM
  612. LF_DIMARRAY_ST = 0x100c,
  613. #else
  614. LF_DIMARRAY = 0x100c,
  615. #endif
  616. LF_VFTPATH = 0x100d,
  617. #ifdef LNGNM
  618. LF_PRECOMP_ST = 0x100e, // not referenced from symbol
  619. #else
  620. LF_PRECOMP = 0x100e, // not referenced from symbol
  621. #endif
  622. LF_OEM = 0x100f, // oem definable type string
  623. #ifdef LNGNM
  624. LF_ALIAS_ST = 0x1010, // alias (typedef) type
  625. #else
  626. LF_ALIAS = 0x1010, // alias (typedef) type
  627. #endif
  628. LF_OEM2 = 0x1011, // oem definable type string
  629. // leaf indices starting records but referenced only from type records
  630. LF_SKIP = 0x1200,
  631. LF_ARGLIST = 0x1201,
  632. #ifdef LNGNM
  633. LF_DEFARG_ST = 0x1202,
  634. #else
  635. LF_DEFARG = 0x1202,
  636. #endif
  637. LF_FIELDLIST = 0x1203,
  638. LF_DERIVED = 0x1204,
  639. LF_BITFIELD = 0x1205,
  640. LF_METHODLIST = 0x1206,
  641. LF_DIMCONU = 0x1207,
  642. LF_DIMCONLU = 0x1208,
  643. LF_DIMVARU = 0x1209,
  644. LF_DIMVARLU = 0x120a,
  645. LF_BCLASS = 0x1400,
  646. LF_VBCLASS = 0x1401,
  647. LF_IVBCLASS = 0x1402,
  648. #ifdef LNGNM
  649. LF_FRIENDFCN_ST = 0x1403,
  650. #else
  651. LF_FRIENDFCN = 0x1403,
  652. #endif
  653. LF_INDEX = 0x1404,
  654. #ifdef LNGNM
  655. LF_MEMBER_ST = 0x1405,
  656. LF_STMEMBER_ST = 0x1406,
  657. LF_METHOD_ST = 0x1407,
  658. LF_NESTTYPE_ST = 0x1408,
  659. #else
  660. LF_MEMBER = 0x1405,
  661. LF_STMEMBER = 0x1406,
  662. LF_METHOD = 0x1407,
  663. LF_NESTTYPE = 0x1408,
  664. #endif
  665. LF_VFUNCTAB = 0x1409,
  666. LF_FRIENDCLS = 0x140a,
  667. #ifdef LNGNM
  668. LF_ONEMETHOD_ST = 0x140b,
  669. #else
  670. LF_ONEMETHOD = 0x140b,
  671. #endif
  672. LF_VFUNCOFF = 0x140c,
  673. #ifndef LNGNM
  674. LF_NESTTYPEEX = 0x140d,
  675. LF_MEMBERMODIFY = 0x140e,
  676. LF_MANAGED = 0x140f,
  677. #else
  678. LF_NESTTYPEEX_ST = 0x140d,
  679. LF_MEMBERMODIFY_ST = 0x140e,
  680. LF_MANAGED_ST = 0x140f,
  681. // Types w/ SZ names
  682. LF_ST_MAX = 0x1500,
  683. LF_TYPESERVER = 0x1501, // not referenced from symbol
  684. LF_ENUMERATE = 0x1502,
  685. LF_ARRAY = 0x1503,
  686. LF_CLASS = 0x1504,
  687. LF_STRUCTURE = 0x1505,
  688. LF_UNION = 0x1506,
  689. LF_ENUM = 0x1507,
  690. LF_DIMARRAY = 0x1508,
  691. LF_PRECOMP = 0x1509, // not referenced from symbol
  692. LF_ALIAS = 0x150a, // alias (typedef) type
  693. LF_DEFARG = 0x150b,
  694. LF_FRIENDFCN = 0x150c,
  695. LF_MEMBER = 0x150d,
  696. LF_STMEMBER = 0x150e,
  697. LF_METHOD = 0x150f,
  698. LF_NESTTYPE = 0x1510,
  699. LF_ONEMETHOD = 0x1511,
  700. LF_NESTTYPEEX = 0x1512,
  701. LF_MEMBERMODIFY = 0x1513,
  702. LF_MANAGED = 0x1514,
  703. LF_TYPESERVER2 = 0x1515,
  704. #endif
  705. LF_NUMERIC = 0x8000,
  706. LF_CHAR = 0x8000,
  707. LF_SHORT = 0x8001,
  708. LF_USHORT = 0x8002,
  709. LF_LONG = 0x8003,
  710. LF_ULONG = 0x8004,
  711. LF_REAL32 = 0x8005,
  712. LF_REAL64 = 0x8006,
  713. LF_REAL80 = 0x8007,
  714. LF_REAL128 = 0x8008,
  715. LF_QUADWORD = 0x8009,
  716. LF_UQUADWORD = 0x800a,
  717. LF_REAL48 = 0x800b,
  718. LF_COMPLEX32 = 0x800c,
  719. LF_COMPLEX64 = 0x800d,
  720. LF_COMPLEX80 = 0x800e,
  721. LF_COMPLEX128 = 0x800f,
  722. LF_VARSTRING = 0x8010,
  723. LF_OCTWORD = 0x8017,
  724. LF_UOCTWORD = 0x8018,
  725. LF_DECIMAL = 0x8019,
  726. LF_DATE = 0x801a,
  727. LF_UTF8STRING = 0x801b,
  728. LF_PAD0 = 0xf0,
  729. LF_PAD1 = 0xf1,
  730. LF_PAD2 = 0xf2,
  731. LF_PAD3 = 0xf3,
  732. LF_PAD4 = 0xf4,
  733. LF_PAD5 = 0xf5,
  734. LF_PAD6 = 0xf6,
  735. LF_PAD7 = 0xf7,
  736. LF_PAD8 = 0xf8,
  737. LF_PAD9 = 0xf9,
  738. LF_PAD10 = 0xfa,
  739. LF_PAD11 = 0xfb,
  740. LF_PAD12 = 0xfc,
  741. LF_PAD13 = 0xfd,
  742. LF_PAD14 = 0xfe,
  743. LF_PAD15 = 0xff,
  744. } LEAF_ENUM_e;
  745. // end of leaf indices
  746. // Type enum for pointer records
  747. // Pointers can be one of the following types
  748. typedef enum CV_ptrtype_e {
  749. CV_PTR_NEAR = 0x00, // 16 bit pointer
  750. CV_PTR_FAR = 0x01, // 16:16 far pointer
  751. CV_PTR_HUGE = 0x02, // 16:16 huge pointer
  752. CV_PTR_BASE_SEG = 0x03, // based on segment
  753. CV_PTR_BASE_VAL = 0x04, // based on value of base
  754. CV_PTR_BASE_SEGVAL = 0x05, // based on segment value of base
  755. CV_PTR_BASE_ADDR = 0x06, // based on address of base
  756. CV_PTR_BASE_SEGADDR = 0x07, // based on segment address of base
  757. CV_PTR_BASE_TYPE = 0x08, // based on type
  758. CV_PTR_BASE_SELF = 0x09, // based on self
  759. CV_PTR_NEAR32 = 0x0a, // 32 bit pointer
  760. CV_PTR_FAR32 = 0x0b, // 16:32 pointer
  761. CV_PTR_64 = 0x0c, // 64 bit pointer
  762. CV_PTR_UNUSEDPTR = 0x0d // first unused pointer type
  763. } CV_ptrtype_e;
  764. // Mode enum for pointers
  765. // Pointers can have one of the following modes
  766. typedef enum CV_ptrmode_e {
  767. CV_PTR_MODE_PTR = 0x00, // "normal" pointer
  768. CV_PTR_MODE_REF = 0x01, // reference
  769. CV_PTR_MODE_PMEM = 0x02, // pointer to data member
  770. CV_PTR_MODE_PMFUNC = 0x03, // pointer to member function
  771. CV_PTR_MODE_RESERVED= 0x04 // first unused pointer mode
  772. } CV_ptrmode_e;
  773. // enumeration for method properties
  774. typedef enum CV_methodprop_e {
  775. CV_MTvanilla = 0x00,
  776. CV_MTvirtual = 0x01,
  777. CV_MTstatic = 0x02,
  778. CV_MTfriend = 0x03,
  779. CV_MTintro = 0x04,
  780. CV_MTpurevirt = 0x05,
  781. CV_MTpureintro = 0x06
  782. } CV_methodprop_e;
  783. // enumeration for virtual shape table entries
  784. typedef enum CV_VTS_desc_e {
  785. CV_VTS_near = 0x00,
  786. CV_VTS_far = 0x01,
  787. CV_VTS_thin = 0x02,
  788. CV_VTS_outer = 0x03,
  789. CV_VTS_meta = 0x04,
  790. CV_VTS_near32 = 0x05,
  791. CV_VTS_far32 = 0x06,
  792. CV_VTS_unused = 0x07
  793. } CV_VTS_desc_e;
  794. // enumeration for LF_LABEL address modes
  795. typedef enum CV_LABEL_TYPE_e {
  796. CV_LABEL_NEAR = 0, // near return
  797. CV_LABEL_FAR = 4 // far return
  798. } CV_LABEL_TYPE_e;
  799. // enumeration for LF_MODIFIER values
  800. typedef struct CV_modifier_t {
  801. unsigned short MOD_const :1;
  802. unsigned short MOD_volatile :1;
  803. unsigned short MOD_unaligned :1;
  804. unsigned short MOD_unused :13;
  805. } CV_modifier_t;
  806. // bit field structure describing class/struct/union/enum properties
  807. typedef struct CV_prop_t {
  808. unsigned short packed :1; // true if structure is packed
  809. unsigned short ctor :1; // true if constructors or destructors present
  810. unsigned short ovlops :1; // true if overloaded operators present
  811. unsigned short isnested :1; // true if this is a nested class
  812. unsigned short cnested :1; // true if this class contains nested types
  813. unsigned short opassign :1; // true if overloaded assignment (=)
  814. unsigned short opcast :1; // true if casting methods
  815. unsigned short fwdref :1; // true if forward reference (incomplete defn)
  816. unsigned short scoped :1; // scoped definition
  817. unsigned short reserved :7;
  818. } CV_prop_t;
  819. // class field attribute
  820. typedef struct CV_fldattr_t {
  821. unsigned short access :2; // access protection CV_access_t
  822. unsigned short mprop :3; // method properties CV_methodprop_t
  823. unsigned short pseudo :1; // compiler generated fcn and does not exist
  824. unsigned short noinherit :1; // true if class cannot be inherited
  825. unsigned short noconstruct :1; // true if class cannot be constructed
  826. unsigned short compgenx :1; // compiler generated fcn and does exist
  827. unsigned short unused :7; // unused
  828. } CV_fldattr_t;
  829. // Structures to access to the type records
  830. typedef struct TYPTYPE {
  831. unsigned short len;
  832. unsigned short leaf;
  833. unsigned char data[CV_ZEROLEN];
  834. } TYPTYPE; // general types record
  835. __INLINE char *NextType (char * pType) {
  836. return (pType + ((TYPTYPE *)pType)->len + sizeof(unsigned short));
  837. }
  838. typedef enum CV_PMEMBER {
  839. CV_PDM16_NONVIRT = 0x00, // 16:16 data no virtual fcn or base
  840. CV_PDM16_VFCN = 0x01, // 16:16 data with virtual functions
  841. CV_PDM16_VBASE = 0x02, // 16:16 data with virtual bases
  842. CV_PDM32_NVVFCN = 0x03, // 16:32 data w/wo virtual functions
  843. CV_PDM32_VBASE = 0x04, // 16:32 data with virtual bases
  844. CV_PMF16_NEARNVSA = 0x05, // 16:16 near method nonvirtual single address point
  845. CV_PMF16_NEARNVMA = 0x06, // 16:16 near method nonvirtual multiple address points
  846. CV_PMF16_NEARVBASE = 0x07, // 16:16 near method virtual bases
  847. CV_PMF16_FARNVSA = 0x08, // 16:16 far method nonvirtual single address point
  848. CV_PMF16_FARNVMA = 0x09, // 16:16 far method nonvirtual multiple address points
  849. CV_PMF16_FARVBASE = 0x0a, // 16:16 far method virtual bases
  850. CV_PMF32_NVSA = 0x0b, // 16:32 method nonvirtual single address point
  851. CV_PMF32_NVMA = 0x0c, // 16:32 method nonvirtual multiple address point
  852. CV_PMF32_VBASE = 0x0d // 16:32 method virtual bases
  853. } CV_PMEMBER;
  854. // memory representation of pointer to member. These representations are
  855. // indexed by the enumeration above in the LF_POINTER record
  856. // representation of a 16:16 pointer to data for a class with no
  857. // virtual functions or virtual bases
  858. struct CV_PDMR16_NONVIRT {
  859. CV_off16_t mdisp; // displacement to data (NULL = -1)
  860. };
  861. // representation of a 16:16 pointer to data for a class with virtual
  862. // functions
  863. struct CV_PMDR16_VFCN {
  864. CV_off16_t mdisp; // displacement to data ( NULL = 0)
  865. };
  866. // representation of a 16:16 pointer to data for a class with
  867. // virtual bases
  868. struct CV_PDMR16_VBASE {
  869. CV_off16_t mdisp; // displacement to data
  870. CV_off16_t pdisp; // this pointer displacement to vbptr
  871. CV_off16_t vdisp; // displacement within vbase table
  872. // NULL = (,,0xffff)
  873. };
  874. // representation of a 32 bit pointer to data for a class with
  875. // or without virtual functions and no virtual bases
  876. struct CV_PDMR32_NVVFCN {
  877. CV_off32_t mdisp; // displacement to data (NULL = 0x80000000)
  878. };
  879. // representation of a 32 bit pointer to data for a class
  880. // with virtual bases
  881. struct CV_PDMR32_VBASE {
  882. CV_off32_t mdisp; // displacement to data
  883. CV_off32_t pdisp; // this pointer displacement
  884. CV_off32_t vdisp; // vbase table displacement
  885. // NULL = (,,0xffffffff)
  886. };
  887. // representation of a 16:16 pointer to near member function for a
  888. // class with no virtual functions or bases and a single address point
  889. struct CV_PMFR16_NEARNVSA {
  890. CV_uoff16_t off; // near address of function (NULL = 0)
  891. };
  892. // representation of a 16 bit pointer to member functions of a
  893. // class with no virtual bases and multiple address points
  894. struct CV_PMFR16_NEARNVMA {
  895. CV_uoff16_t off; // offset of function (NULL = 0,x)
  896. signed short disp;
  897. };
  898. // representation of a 16 bit pointer to member function of a
  899. // class with virtual bases
  900. struct CV_PMFR16_NEARVBASE {
  901. CV_uoff16_t off; // offset of function (NULL = 0,x,x,x)
  902. CV_off16_t mdisp; // displacement to data
  903. CV_off16_t pdisp; // this pointer displacement
  904. CV_off16_t vdisp; // vbase table displacement
  905. };
  906. // representation of a 16:16 pointer to far member function for a
  907. // class with no virtual bases and a single address point
  908. struct CV_PMFR16_FARNVSA {
  909. CV_uoff16_t off; // offset of function (NULL = 0:0)
  910. unsigned short seg; // segment of function
  911. };
  912. // representation of a 16:16 far pointer to member functions of a
  913. // class with no virtual bases and multiple address points
  914. struct CV_PMFR16_FARNVMA {
  915. CV_uoff16_t off; // offset of function (NULL = 0:0,x)
  916. unsigned short seg;
  917. signed short disp;
  918. };
  919. // representation of a 16:16 far pointer to member function of a
  920. // class with virtual bases
  921. struct CV_PMFR16_FARVBASE {
  922. CV_uoff16_t off; // offset of function (NULL = 0:0,x,x,x)
  923. unsigned short seg;
  924. CV_off16_t mdisp; // displacement to data
  925. CV_off16_t pdisp; // this pointer displacement
  926. CV_off16_t vdisp; // vbase table displacement
  927. };
  928. // representation of a 32 bit pointer to member function for a
  929. // class with no virtual bases and a single address point
  930. struct CV_PMFR32_NVSA {
  931. CV_uoff32_t off; // near address of function (NULL = 0L)
  932. };
  933. // representation of a 32 bit pointer to member function for a
  934. // class with no virtual bases and multiple address points
  935. struct CV_PMFR32_NVMA {
  936. CV_uoff32_t off; // near address of function (NULL = 0L,x)
  937. CV_off32_t disp;
  938. };
  939. // representation of a 32 bit pointer to member function for a
  940. // class with virtual bases
  941. struct CV_PMFR32_VBASE {
  942. CV_uoff32_t off; // near address of function (NULL = 0L,x,x,x)
  943. CV_off32_t mdisp; // displacement to data
  944. CV_off32_t pdisp; // this pointer displacement
  945. CV_off32_t vdisp; // vbase table displacement
  946. };
  947. // Easy leaf - used for generic casting to reference leaf field
  948. // of a subfield of a complex list
  949. typedef struct lfEasy {
  950. unsigned short leaf; // LF_...
  951. } lfEasy;
  952. /** The following type records are basically variant records of the
  953. * above structure. The "unsigned short leaf" of the above structure and
  954. * the "unsigned short leaf" of the following type definitions are the same
  955. * symbol. When the OMF record is locked via the MHOMFLock API
  956. * call, the address of the "unsigned short leaf" is returned
  957. */
  958. /** Notes on alignment
  959. * Alignment of the fields in most of the type records is done on the
  960. * basis of the TYPTYPE record base. That is why in most of the lf*
  961. * records that the CV_typ_t (32-bit types) is located on what appears to
  962. * be a offset mod 4 == 2 boundary. The exception to this rule are those
  963. * records that are in a list (lfFieldList, lfMethodList), which are
  964. * aligned to their own bases since they don't have the length field
  965. */
  966. /**** Change log for 16-bit to 32-bit type and symbol records
  967. Record type Change (f == field arrangement, p = padding added)
  968. ----------------------------------------------------------------------
  969. lfModifer f
  970. lfPointer fp
  971. lfClass f
  972. lfStructure f
  973. lfUnion f
  974. lfEnum f
  975. lfVFTPath p
  976. lfPreComp p
  977. lfOEM p
  978. lfArgList p
  979. lfDerived p
  980. mlMethod p (method list member)
  981. lfBitField f
  982. lfDimCon f
  983. lfDimVar p
  984. lfIndex p (field list member)
  985. lfBClass f (field list member)
  986. lfVBClass f (field list member)
  987. lfFriendCls p (field list member)
  988. lfFriendFcn p (field list member)
  989. lfMember f (field list member)
  990. lfSTMember f (field list member)
  991. lfVFuncTab p (field list member)
  992. lfVFuncOff p (field list member)
  993. lfNestType p (field list member)
  994. DATASYM32 f
  995. PROCSYM32 f
  996. VPATHSYM32 f
  997. REGREL32 f
  998. THREADSYM32 f
  999. PROCSYMMIPS f
  1000. */
  1001. // Type record for LF_MODIFIER
  1002. typedef struct lfModifier_16t {
  1003. unsigned short leaf; // LF_MODIFIER_16t
  1004. CV_modifier_t attr; // modifier attribute modifier_t
  1005. CV_typ16_t type; // modified type
  1006. } lfModifier_16t;
  1007. typedef struct lfModifier {
  1008. unsigned short leaf; // LF_MODIFIER
  1009. CV_typ_t type; // modified type
  1010. CV_modifier_t attr; // modifier attribute modifier_t
  1011. } lfModifier;
  1012. // type record for LF_POINTER
  1013. #ifndef __cplusplus
  1014. typedef struct lfPointer_16t {
  1015. #endif
  1016. struct lfPointerBody_16t {
  1017. unsigned short leaf; // LF_POINTER_16t
  1018. struct lfPointerAttr_16t {
  1019. unsigned char ptrtype :5; // ordinal specifying pointer type (CV_ptrtype_e)
  1020. unsigned char ptrmode :3; // ordinal specifying pointer mode (CV_ptrmode_e)
  1021. unsigned char isflat32 :1; // true if 0:32 pointer
  1022. unsigned char isvolatile :1; // TRUE if volatile pointer
  1023. unsigned char isconst :1; // TRUE if const pointer
  1024. unsigned char isunaligned :1; // TRUE if unaligned pointer
  1025. unsigned char unused :4;
  1026. } attr;
  1027. CV_typ16_t utype; // type index of the underlying type
  1028. #if (defined(__cplusplus) || defined(_MSC_VER)) // for C++ and MS compilers that support unnamed unions
  1029. };
  1030. #else
  1031. } u;
  1032. #endif
  1033. #ifdef __cplusplus
  1034. typedef struct lfPointer_16t : public lfPointerBody_16t {
  1035. #endif
  1036. union {
  1037. struct {
  1038. CV_typ16_t pmclass; // index of containing class for pointer to member
  1039. unsigned short pmenum; // enumeration specifying pm format
  1040. } pm;
  1041. unsigned short bseg; // base segment if PTR_BASE_SEG
  1042. unsigned char Sym[1]; // copy of base symbol record (including length)
  1043. struct {
  1044. CV_typ16_t index; // type index if CV_PTR_BASE_TYPE
  1045. unsigned char name[1]; // name of base type
  1046. } btype;
  1047. } pbase;
  1048. } lfPointer_16t;
  1049. #ifndef __cplusplus
  1050. typedef struct lfPointer {
  1051. #endif
  1052. struct lfPointerBody {
  1053. unsigned short leaf; // LF_POINTER
  1054. CV_typ_t utype; // type index of the underlying type
  1055. struct lfPointerAttr {
  1056. unsigned long ptrtype :5; // ordinal specifying pointer type (CV_ptrtype_e)
  1057. unsigned long ptrmode :3; // ordinal specifying pointer mode (CV_ptrmode_e)
  1058. unsigned long isflat32 :1; // true if 0:32 pointer
  1059. unsigned long isvolatile :1; // TRUE if volatile pointer
  1060. unsigned long isconst :1; // TRUE if const pointer
  1061. unsigned long isunaligned :1; // TRUE if unaligned pointer
  1062. unsigned long isrestrict :1; // TRUE if restricted pointer (allow agressive opts)
  1063. unsigned long unused :19;// pad out to 32-bits for following cv_typ_t's
  1064. } attr;
  1065. #if (defined(__cplusplus) || defined(_MSC_VER)) // for C++ and MS compilers that support unnamed unions
  1066. };
  1067. #else
  1068. } u;
  1069. #endif
  1070. #ifdef __cplusplus
  1071. typedef struct lfPointer : public lfPointerBody {
  1072. #endif
  1073. union {
  1074. struct {
  1075. CV_typ_t pmclass; // index of containing class for pointer to member
  1076. unsigned short pmenum; // enumeration specifying pm format
  1077. } pm;
  1078. unsigned short bseg; // base segment if PTR_BASE_SEG
  1079. unsigned char Sym[1]; // copy of base symbol record (including length)
  1080. struct {
  1081. CV_typ_t index; // type index if CV_PTR_BASE_TYPE
  1082. unsigned char name[1]; // name of base type
  1083. } btype;
  1084. } pbase;
  1085. } lfPointer;
  1086. // type record for LF_ARRAY
  1087. typedef struct lfArray_16t {
  1088. unsigned short leaf; // LF_ARRAY_16t
  1089. CV_typ16_t elemtype; // type index of element type
  1090. CV_typ16_t idxtype; // type index of indexing type
  1091. unsigned char data[CV_ZEROLEN]; // variable length data specifying
  1092. // size in bytes and name
  1093. } lfArray_16t;
  1094. typedef struct lfArray {
  1095. unsigned short leaf; // LF_ARRAY
  1096. CV_typ_t elemtype; // type index of element type
  1097. CV_typ_t idxtype; // type index of indexing type
  1098. unsigned char data[CV_ZEROLEN]; // variable length data specifying
  1099. // size in bytes and name
  1100. } lfArray;
  1101. // type record for LF_CLASS, LF_STRUCTURE
  1102. typedef struct lfClass_16t {
  1103. unsigned short leaf; // LF_CLASS_16t, LF_STRUCT_16t
  1104. unsigned short count; // count of number of elements in class
  1105. CV_typ16_t field; // type index of LF_FIELD descriptor list
  1106. CV_prop_t property; // property attribute field (prop_t)
  1107. CV_typ16_t derived; // type index of derived from list if not zero
  1108. CV_typ16_t vshape; // type index of vshape table for this class
  1109. unsigned char data[CV_ZEROLEN]; // data describing length of structure in
  1110. // bytes and name
  1111. } lfClass_16t;
  1112. typedef lfClass_16t lfStructure_16t;
  1113. typedef struct lfClass {
  1114. unsigned short leaf; // LF_CLASS, LF_STRUCT
  1115. unsigned short count; // count of number of elements in class
  1116. CV_prop_t property; // property attribute field (prop_t)
  1117. CV_typ_t field; // type index of LF_FIELD descriptor list
  1118. CV_typ_t derived; // type index of derived from list if not zero
  1119. CV_typ_t vshape; // type index of vshape table for this class
  1120. unsigned char data[CV_ZEROLEN]; // data describing length of structure in
  1121. // bytes and name
  1122. } lfClass;
  1123. typedef lfClass lfStructure;
  1124. // type record for LF_UNION
  1125. typedef struct lfUnion_16t {
  1126. unsigned short leaf; // LF_UNION_16t
  1127. unsigned short count; // count of number of elements in class
  1128. CV_typ16_t field; // type index of LF_FIELD descriptor list
  1129. CV_prop_t property; // property attribute field
  1130. unsigned char data[CV_ZEROLEN]; // variable length data describing length of
  1131. // structure and name
  1132. } lfUnion_16t;
  1133. typedef struct lfUnion {
  1134. unsigned short leaf; // LF_UNION
  1135. unsigned short count; // count of number of elements in class
  1136. CV_prop_t property; // property attribute field
  1137. CV_typ_t field; // type index of LF_FIELD descriptor list
  1138. unsigned char data[CV_ZEROLEN]; // variable length data describing length of
  1139. // structure and name
  1140. } lfUnion;
  1141. // type record for LF_ALIAS
  1142. typedef struct lfAlias {
  1143. unsigned short leaf; // LF_ALIAS
  1144. CV_typ_t utype; // underlying type
  1145. unsigned char Name[1]; // alias name
  1146. } lfAlias;
  1147. // type record for LF_MANAGED
  1148. typedef struct lfManaged {
  1149. unsigned short leaf; // LF_MANAGED
  1150. unsigned char Name[1]; // utf8, zero terminated managed type name
  1151. } lfManaged;
  1152. // type record for LF_ENUM
  1153. typedef struct lfEnum_16t {
  1154. unsigned short leaf; // LF_ENUM_16t
  1155. unsigned short count; // count of number of elements in class
  1156. CV_typ16_t utype; // underlying type of the enum
  1157. CV_typ16_t field; // type index of LF_FIELD descriptor list
  1158. CV_prop_t property; // property attribute field
  1159. unsigned char Name[1]; // length prefixed name of enum
  1160. } lfEnum_16t;
  1161. typedef struct lfEnum {
  1162. unsigned short leaf; // LF_ENUM
  1163. unsigned short count; // count of number of elements in class
  1164. CV_prop_t property; // property attribute field
  1165. CV_typ_t utype; // underlying type of the enum
  1166. CV_typ_t field; // type index of LF_FIELD descriptor list
  1167. unsigned char Name[1]; // length prefixed name of enum
  1168. } lfEnum;
  1169. // Type record for LF_PROCEDURE
  1170. typedef struct lfProc_16t {
  1171. unsigned short leaf; // LF_PROCEDURE_16t
  1172. CV_typ16_t rvtype; // type index of return value
  1173. unsigned char calltype; // calling convention (CV_call_t)
  1174. unsigned char reserved; // reserved for future use
  1175. unsigned short parmcount; // number of parameters
  1176. CV_typ16_t arglist; // type index of argument list
  1177. } lfProc_16t;
  1178. typedef struct lfProc {
  1179. unsigned short leaf; // LF_PROCEDURE
  1180. CV_typ_t rvtype; // type index of return value
  1181. unsigned char calltype; // calling convention (CV_call_t)
  1182. unsigned char reserved; // reserved for future use
  1183. unsigned short parmcount; // number of parameters
  1184. CV_typ_t arglist; // type index of argument list
  1185. } lfProc;
  1186. // Type record for member function
  1187. typedef struct lfMFunc_16t {
  1188. unsigned short leaf; // LF_MFUNCTION_16t
  1189. CV_typ16_t rvtype; // type index of return value
  1190. CV_typ16_t classtype; // type index of containing class
  1191. CV_typ16_t thistype; // type index of this pointer (model specific)
  1192. unsigned char calltype; // calling convention (call_t)
  1193. unsigned char reserved; // reserved for future use
  1194. unsigned short parmcount; // number of parameters
  1195. CV_typ16_t arglist; // type index of argument list
  1196. long thisadjust; // this adjuster (long because pad required anyway)
  1197. } lfMFunc_16t;
  1198. typedef struct lfMFunc {
  1199. unsigned short leaf; // LF_MFUNCTION
  1200. CV_typ_t rvtype; // type index of return value
  1201. CV_typ_t classtype; // type index of containing class
  1202. CV_typ_t thistype; // type index of this pointer (model specific)
  1203. unsigned char calltype; // calling convention (call_t)
  1204. unsigned char reserved; // reserved for future use
  1205. unsigned short parmcount; // number of parameters
  1206. CV_typ_t arglist; // type index of argument list
  1207. long thisadjust; // this adjuster (long because pad required anyway)
  1208. } lfMFunc;
  1209. // type record for virtual function table shape
  1210. typedef struct lfVTShape {
  1211. unsigned short leaf; // LF_VTSHAPE
  1212. unsigned short count; // number of entries in vfunctable
  1213. unsigned char desc[CV_ZEROLEN]; // 4 bit (CV_VTS_desc) descriptors
  1214. } lfVTShape;
  1215. // type record for cobol0
  1216. typedef struct lfCobol0_16t {
  1217. unsigned short leaf; // LF_COBOL0_16t
  1218. CV_typ16_t type; // parent type record index
  1219. unsigned char data[CV_ZEROLEN];
  1220. } lfCobol0_16t;
  1221. typedef struct lfCobol0 {
  1222. unsigned short leaf; // LF_COBOL0
  1223. CV_typ_t type; // parent type record index
  1224. unsigned char data[CV_ZEROLEN];
  1225. } lfCobol0;
  1226. // type record for cobol1
  1227. typedef struct lfCobol1 {
  1228. unsigned short leaf; // LF_COBOL1
  1229. unsigned char data[CV_ZEROLEN];
  1230. } lfCobol1;
  1231. // type record for basic array
  1232. typedef struct lfBArray_16t {
  1233. unsigned short leaf; // LF_BARRAY_16t
  1234. CV_typ16_t utype; // type index of underlying type
  1235. } lfBArray_16t;
  1236. typedef struct lfBArray {
  1237. unsigned short leaf; // LF_BARRAY
  1238. CV_typ_t utype; // type index of underlying type
  1239. } lfBArray;
  1240. // type record for assembler labels
  1241. typedef struct lfLabel {
  1242. unsigned short leaf; // LF_LABEL
  1243. unsigned short mode; // addressing mode of label
  1244. } lfLabel;
  1245. // type record for dimensioned arrays
  1246. typedef struct lfDimArray_16t {
  1247. unsigned short leaf; // LF_DIMARRAY_16t
  1248. CV_typ16_t utype; // underlying type of the array
  1249. CV_typ16_t diminfo; // dimension information
  1250. unsigned char name[1]; // length prefixed name
  1251. } lfDimArray_16t;
  1252. typedef struct lfDimArray {
  1253. unsigned short leaf; // LF_DIMARRAY
  1254. CV_typ_t utype; // underlying type of the array
  1255. CV_typ_t diminfo; // dimension information
  1256. unsigned char name[1]; // length prefixed name
  1257. } lfDimArray;
  1258. // type record describing path to virtual function table
  1259. typedef struct lfVFTPath_16t {
  1260. unsigned short leaf; // LF_VFTPATH_16t
  1261. unsigned short count; // count of number of bases in path
  1262. CV_typ16_t base[1]; // bases from root to leaf
  1263. } lfVFTPath_16t;
  1264. typedef struct lfVFTPath {
  1265. unsigned short leaf; // LF_VFTPATH
  1266. unsigned long count; // count of number of bases in path
  1267. CV_typ_t base[1]; // bases from root to leaf
  1268. } lfVFTPath;
  1269. // type record describing inclusion of precompiled types
  1270. typedef struct lfPreComp_16t {
  1271. unsigned short leaf; // LF_PRECOMP_16t
  1272. unsigned short start; // starting type index included
  1273. unsigned short count; // number of types in inclusion
  1274. unsigned long signature; // signature
  1275. unsigned char name[CV_ZEROLEN]; // length prefixed name of included type file
  1276. } lfPreComp_16t;
  1277. typedef struct lfPreComp {
  1278. unsigned short leaf; // LF_PRECOMP
  1279. unsigned long start; // starting type index included
  1280. unsigned long count; // number of types in inclusion
  1281. unsigned long signature; // signature
  1282. unsigned char name[CV_ZEROLEN]; // length prefixed name of included type file
  1283. } lfPreComp;
  1284. // type record describing end of precompiled types that can be
  1285. // included by another file
  1286. typedef struct lfEndPreComp {
  1287. unsigned short leaf; // LF_ENDPRECOMP
  1288. unsigned long signature; // signature
  1289. } lfEndPreComp;
  1290. // type record for OEM definable type strings
  1291. typedef struct lfOEM_16t {
  1292. unsigned short leaf; // LF_OEM_16t
  1293. unsigned short cvOEM; // MS assigned OEM identified
  1294. unsigned short recOEM; // OEM assigned type identifier
  1295. unsigned short count; // count of type indices to follow
  1296. CV_typ16_t index[CV_ZEROLEN]; // array of type indices followed
  1297. // by OEM defined data
  1298. } lfOEM_16t;
  1299. typedef struct lfOEM {
  1300. unsigned short leaf; // LF_OEM
  1301. unsigned short cvOEM; // MS assigned OEM identified
  1302. unsigned short recOEM; // OEM assigned type identifier
  1303. unsigned long count; // count of type indices to follow
  1304. CV_typ_t index[CV_ZEROLEN]; // array of type indices followed
  1305. // by OEM defined data
  1306. } lfOEM;
  1307. #define OEM_MS_FORTRAN90 0xF090
  1308. #define OEM_ODI 0x0010
  1309. #define OEM_THOMSON_SOFTWARE 0x5453
  1310. #define OEM_ODI_REC_BASELIST 0x0000
  1311. typedef struct lfOEM2 {
  1312. unsigned short leaf; // LF_OEM2
  1313. unsigned char idOem[16]; // an oem ID (GUID)
  1314. unsigned long count; // count of type indices to follow
  1315. CV_typ_t index[CV_ZEROLEN]; // array of type indices followed
  1316. // by OEM defined data
  1317. } lfOEM2;
  1318. // type record describing using of a type server
  1319. typedef struct lfTypeServer {
  1320. unsigned short leaf; // LF_TYPESERVER
  1321. unsigned long signature; // signature
  1322. unsigned long age; // age of database used by this module
  1323. unsigned char name[CV_ZEROLEN]; // length prefixed name of PDB
  1324. } lfTypeServer;
  1325. // type record describing using of a type server with v7 (GUID) signatures
  1326. typedef struct lfTypeServer2 {
  1327. unsigned short leaf; // LF_TYPESERVER2
  1328. SIG70 sig70; // guid signature
  1329. unsigned long age; // age of database used by this module
  1330. unsigned char name[CV_ZEROLEN]; // length prefixed name of PDB
  1331. } lfTypeServer2;
  1332. // description of type records that can be referenced from
  1333. // type records referenced by symbols
  1334. // type record for skip record
  1335. typedef struct lfSkip_16t {
  1336. unsigned short leaf; // LF_SKIP_16t
  1337. CV_typ16_t type; // next valid index
  1338. unsigned char data[CV_ZEROLEN]; // pad data
  1339. } lfSkip_16t;
  1340. typedef struct lfSkip {
  1341. unsigned short leaf; // LF_SKIP
  1342. CV_typ_t type; // next valid index
  1343. unsigned char data[CV_ZEROLEN]; // pad data
  1344. } lfSkip;
  1345. // argument list leaf
  1346. typedef struct lfArgList_16t {
  1347. unsigned short leaf; // LF_ARGLIST_16t
  1348. unsigned short count; // number of arguments
  1349. CV_typ16_t arg[CV_ZEROLEN]; // number of arguments
  1350. } lfArgList_16t;
  1351. typedef struct lfArgList {
  1352. unsigned short leaf; // LF_ARGLIST
  1353. unsigned long count; // number of arguments
  1354. CV_typ_t arg[CV_ZEROLEN]; // number of arguments
  1355. } lfArgList;
  1356. // derived class list leaf
  1357. typedef struct lfDerived_16t {
  1358. unsigned short leaf; // LF_DERIVED_16t
  1359. unsigned short count; // number of arguments
  1360. CV_typ16_t drvdcls[CV_ZEROLEN]; // type indices of derived classes
  1361. } lfDerived_16t;
  1362. typedef struct lfDerived {
  1363. unsigned short leaf; // LF_DERIVED
  1364. unsigned long count; // number of arguments
  1365. CV_typ_t drvdcls[CV_ZEROLEN]; // type indices of derived classes
  1366. } lfDerived;
  1367. // leaf for default arguments
  1368. typedef struct lfDefArg_16t {
  1369. unsigned short leaf; // LF_DEFARG_16t
  1370. CV_typ16_t type; // type of resulting expression
  1371. unsigned char expr[CV_ZEROLEN]; // length prefixed expression string
  1372. } lfDefArg_16t;
  1373. typedef struct lfDefArg {
  1374. unsigned short leaf; // LF_DEFARG
  1375. CV_typ_t type; // type of resulting expression
  1376. unsigned char expr[CV_ZEROLEN]; // length prefixed expression string
  1377. } lfDefArg;
  1378. // list leaf
  1379. // This list should no longer be used because the utilities cannot
  1380. // verify the contents of the list without knowing what type of list
  1381. // it is. New specific leaf indices should be used instead.
  1382. typedef struct lfList {
  1383. unsigned short leaf; // LF_LIST
  1384. char data[CV_ZEROLEN]; // data format specified by indexing type
  1385. } lfList;
  1386. // field list leaf
  1387. // This is the header leaf for a complex list of class and structure
  1388. // subfields.
  1389. typedef struct lfFieldList_16t {
  1390. unsigned short leaf; // LF_FIELDLIST_16t
  1391. char data[CV_ZEROLEN]; // field list sub lists
  1392. } lfFieldList_16t;
  1393. typedef struct lfFieldList {
  1394. unsigned short leaf; // LF_FIELDLIST
  1395. char data[CV_ZEROLEN]; // field list sub lists
  1396. } lfFieldList;
  1397. // type record for non-static methods and friends in overloaded method list
  1398. typedef struct mlMethod_16t {
  1399. CV_fldattr_t attr; // method attribute
  1400. CV_typ16_t index; // index to type record for procedure
  1401. unsigned long vbaseoff[CV_ZEROLEN]; // offset in vfunctable if intro virtual
  1402. } mlMethod_16t;
  1403. typedef struct mlMethod {
  1404. CV_fldattr_t attr; // method attribute
  1405. _2BYTEPAD pad0; // internal padding, must be 0
  1406. CV_typ_t index; // index to type record for procedure
  1407. unsigned long vbaseoff[CV_ZEROLEN]; // offset in vfunctable if intro virtual
  1408. } mlMethod;
  1409. typedef struct lfMethodList_16t {
  1410. unsigned short leaf;
  1411. unsigned char mList[CV_ZEROLEN]; // really a mlMethod_16t type
  1412. } lfMethodList_16t;
  1413. typedef struct lfMethodList {
  1414. unsigned short leaf;
  1415. unsigned char mList[CV_ZEROLEN]; // really a mlMethod type
  1416. } lfMethodList;
  1417. // type record for LF_BITFIELD
  1418. typedef struct lfBitfield_16t {
  1419. unsigned short leaf; // LF_BITFIELD_16t
  1420. unsigned char length;
  1421. unsigned char position;
  1422. CV_typ16_t type; // type of bitfield
  1423. } lfBitfield_16t;
  1424. typedef struct lfBitfield {
  1425. unsigned short leaf; // LF_BITFIELD
  1426. CV_typ_t type; // type of bitfield
  1427. unsigned char length;
  1428. unsigned char position;
  1429. } lfBitfield;
  1430. // type record for dimensioned array with constant bounds
  1431. typedef struct lfDimCon_16t {
  1432. unsigned short leaf; // LF_DIMCONU_16t or LF_DIMCONLU_16t
  1433. unsigned short rank; // number of dimensions
  1434. CV_typ16_t typ; // type of index
  1435. unsigned char dim[CV_ZEROLEN]; // array of dimension information with
  1436. // either upper bounds or lower/upper bound
  1437. } lfDimCon_16t;
  1438. typedef struct lfDimCon {
  1439. unsigned short leaf; // LF_DIMCONU or LF_DIMCONLU
  1440. CV_typ_t typ; // type of index
  1441. unsigned short rank; // number of dimensions
  1442. unsigned char dim[CV_ZEROLEN]; // array of dimension information with
  1443. // either upper bounds or lower/upper bound
  1444. } lfDimCon;
  1445. // type record for dimensioned array with variable bounds
  1446. typedef struct lfDimVar_16t {
  1447. unsigned short leaf; // LF_DIMVARU_16t or LF_DIMVARLU_16t
  1448. unsigned short rank; // number of dimensions
  1449. CV_typ16_t typ; // type of index
  1450. CV_typ16_t dim[CV_ZEROLEN]; // array of type indices for either
  1451. // variable upper bound or variable
  1452. // lower/upper bound. The referenced
  1453. // types must be LF_REFSYM or T_VOID
  1454. } lfDimVar_16t;
  1455. typedef struct lfDimVar {
  1456. unsigned short leaf; // LF_DIMVARU or LF_DIMVARLU
  1457. unsigned long rank; // number of dimensions
  1458. CV_typ_t typ; // type of index
  1459. CV_typ_t dim[CV_ZEROLEN]; // array of type indices for either
  1460. // variable upper bound or variable
  1461. // lower/upper bound. The count of type
  1462. // indices is rank or rank*2 depending on
  1463. // whether it is LFDIMVARU or LF_DIMVARLU.
  1464. // The referenced types must be
  1465. // LF_REFSYM or T_VOID
  1466. } lfDimVar;
  1467. // type record for referenced symbol
  1468. typedef struct lfRefSym {
  1469. unsigned short leaf; // LF_REFSYM
  1470. unsigned char Sym[1]; // copy of referenced symbol record
  1471. // (including length)
  1472. } lfRefSym;
  1473. /** the following are numeric leaves. They are used to indicate the
  1474. * size of the following variable length data. When the numeric
  1475. * data is a single byte less than 0x8000, then the data is output
  1476. * directly. If the data is more the 0x8000 or is a negative value,
  1477. * then the data is preceeded by the proper index.
  1478. */
  1479. // signed character leaf
  1480. typedef struct lfChar {
  1481. unsigned short leaf; // LF_CHAR
  1482. signed char val; // signed 8-bit value
  1483. } lfChar;
  1484. // signed short leaf
  1485. typedef struct lfShort {
  1486. unsigned short leaf; // LF_SHORT
  1487. short val; // signed 16-bit value
  1488. } lfShort;
  1489. // unsigned short leaf
  1490. typedef struct lfUShort {
  1491. unsigned short leaf; // LF_unsigned short
  1492. unsigned short val; // unsigned 16-bit value
  1493. } lfUShort;
  1494. // signed long leaf
  1495. typedef struct lfLong {
  1496. unsigned short leaf; // LF_LONG
  1497. long val; // signed 32-bit value
  1498. } lfLong;
  1499. // unsigned long leaf
  1500. typedef struct lfULong {
  1501. unsigned short leaf; // LF_ULONG
  1502. unsigned long val; // unsigned 32-bit value
  1503. } lfULong;
  1504. // signed quad leaf
  1505. typedef struct lfQuad {
  1506. unsigned short leaf; // LF_QUAD
  1507. unsigned char val[8]; // signed 64-bit value
  1508. } lfQuad;
  1509. // unsigned quad leaf
  1510. typedef struct lfUQuad {
  1511. unsigned short leaf; // LF_UQUAD
  1512. unsigned char val[8]; // unsigned 64-bit value
  1513. } lfUQuad;
  1514. // signed int128 leaf
  1515. typedef struct lfOct {
  1516. unsigned short leaf; // LF_OCT
  1517. unsigned char val[16]; // signed 128-bit value
  1518. } lfOct;
  1519. // unsigned int128 leaf
  1520. typedef struct lfUOct {
  1521. unsigned short leaf; // LF_UOCT
  1522. unsigned char val[16]; // unsigned 128-bit value
  1523. } lfUOct;
  1524. // real 32-bit leaf
  1525. typedef struct lfReal32 {
  1526. unsigned short leaf; // LF_REAL32
  1527. float val; // 32-bit real value
  1528. } lfReal32;
  1529. // real 48-bit leaf
  1530. typedef struct lfReal48 {
  1531. unsigned short leaf; // LF_REAL48
  1532. unsigned char val[6]; // 48-bit real value
  1533. } lfReal48;
  1534. // real 64-bit leaf
  1535. typedef struct lfReal64 {
  1536. unsigned short leaf; // LF_REAL64
  1537. double val; // 64-bit real value
  1538. } lfReal64;
  1539. // real 80-bit leaf
  1540. typedef struct lfReal80 {
  1541. unsigned short leaf; // LF_REAL80
  1542. FLOAT10 val; // real 80-bit value
  1543. } lfReal80;
  1544. // real 128-bit leaf
  1545. typedef struct lfReal128 {
  1546. unsigned short leaf; // LF_REAL128
  1547. char val[16]; // real 128-bit value
  1548. } lfReal128;
  1549. // complex 32-bit leaf
  1550. typedef struct lfCmplx32 {
  1551. unsigned short leaf; // LF_COMPLEX32
  1552. float val_real; // real component
  1553. float val_imag; // imaginary component
  1554. } lfCmplx32;
  1555. // complex 64-bit leaf
  1556. typedef struct lfCmplx64 {
  1557. unsigned short leaf; // LF_COMPLEX64
  1558. double val_real; // real component
  1559. double val_imag; // imaginary component
  1560. } flCmplx64;
  1561. // complex 80-bit leaf
  1562. typedef struct lfCmplx80 {
  1563. unsigned short leaf; // LF_COMPLEX80
  1564. FLOAT10 val_real; // real component
  1565. FLOAT10 val_imag; // imaginary component
  1566. } lfCmplx80;
  1567. // complex 128-bit leaf
  1568. typedef struct lfCmplx128 {
  1569. unsigned short leaf; // LF_COMPLEX128
  1570. char val_real[16]; // real component
  1571. char val_imag[16]; // imaginary component
  1572. } lfCmplx128;
  1573. // variable length numeric field
  1574. typedef struct lfVarString {
  1575. unsigned short leaf; // LF_VARSTRING
  1576. unsigned short len; // length of value in bytes
  1577. unsigned char value[CV_ZEROLEN]; // value
  1578. } lfVarString;
  1579. //***********************************************************************
  1580. // index leaf - contains type index of another leaf
  1581. // a major use of this leaf is to allow the compilers to emit a
  1582. // long complex list (LF_FIELD) in smaller pieces.
  1583. typedef struct lfIndex_16t {
  1584. unsigned short leaf; // LF_INDEX_16t
  1585. CV_typ16_t index; // type index of referenced leaf
  1586. } lfIndex_16t;
  1587. typedef struct lfIndex {
  1588. unsigned short leaf; // LF_INDEX
  1589. _2BYTEPAD pad0; // internal padding, must be 0
  1590. CV_typ_t index; // type index of referenced leaf
  1591. } lfIndex;
  1592. // subfield record for base class field
  1593. typedef struct lfBClass_16t {
  1594. unsigned short leaf; // LF_BCLASS_16t
  1595. CV_typ16_t index; // type index of base class
  1596. CV_fldattr_t attr; // attribute
  1597. unsigned char offset[CV_ZEROLEN]; // variable length offset of base within class
  1598. } lfBClass_16t;
  1599. typedef struct lfBClass {
  1600. unsigned short leaf; // LF_BCLASS
  1601. CV_fldattr_t attr; // attribute
  1602. CV_typ_t index; // type index of base class
  1603. unsigned char offset[CV_ZEROLEN]; // variable length offset of base within class
  1604. } lfBClass;
  1605. // subfield record for direct and indirect virtual base class field
  1606. typedef struct lfVBClass_16t {
  1607. unsigned short leaf; // LF_VBCLASS_16t | LV_IVBCLASS_16t
  1608. CV_typ16_t index; // type index of direct virtual base class
  1609. CV_typ16_t vbptr; // type index of virtual base pointer
  1610. CV_fldattr_t attr; // attribute
  1611. unsigned char vbpoff[CV_ZEROLEN]; // virtual base pointer offset from address point
  1612. // followed by virtual base offset from vbtable
  1613. } lfVBClass_16t;
  1614. typedef struct lfVBClass {
  1615. unsigned short leaf; // LF_VBCLASS | LV_IVBCLASS
  1616. CV_fldattr_t attr; // attribute
  1617. CV_typ_t index; // type index of direct virtual base class
  1618. CV_typ_t vbptr; // type index of virtual base pointer
  1619. unsigned char vbpoff[CV_ZEROLEN]; // virtual base pointer offset from address point
  1620. // followed by virtual base offset from vbtable
  1621. } lfVBClass;
  1622. // subfield record for friend class
  1623. typedef struct lfFriendCls_16t {
  1624. unsigned short leaf; // LF_FRIENDCLS_16t
  1625. CV_typ16_t index; // index to type record of friend class
  1626. } lfFriendCls_16t;
  1627. typedef struct lfFriendCls {
  1628. unsigned short leaf; // LF_FRIENDCLS
  1629. _2BYTEPAD pad0; // internal padding, must be 0
  1630. CV_typ_t index; // index to type record of friend class
  1631. } lfFriendCls;
  1632. // subfield record for friend function
  1633. typedef struct lfFriendFcn_16t {
  1634. unsigned short leaf; // LF_FRIENDFCN_16t
  1635. CV_typ16_t index; // index to type record of friend function
  1636. unsigned char Name[1]; // name of friend function
  1637. } lfFriendFcn_16t;
  1638. typedef struct lfFriendFcn {
  1639. unsigned short leaf; // LF_FRIENDFCN
  1640. _2BYTEPAD pad0; // internal padding, must be 0
  1641. CV_typ_t index; // index to type record of friend function
  1642. unsigned char Name[1]; // name of friend function
  1643. } lfFriendFcn;
  1644. // subfield record for non-static data members
  1645. typedef struct lfMember_16t {
  1646. unsigned short leaf; // LF_MEMBER_16t
  1647. CV_typ16_t index; // index of type record for field
  1648. CV_fldattr_t attr; // attribute mask
  1649. unsigned char offset[CV_ZEROLEN]; // variable length offset of field followed
  1650. // by length prefixed name of field
  1651. } lfMember_16t;
  1652. typedef struct lfMember {
  1653. unsigned short leaf; // LF_MEMBER
  1654. CV_fldattr_t attr; // attribute mask
  1655. CV_typ_t index; // index of type record for field
  1656. unsigned char offset[CV_ZEROLEN]; // variable length offset of field followed
  1657. // by length prefixed name of field
  1658. } lfMember;
  1659. // type record for static data members
  1660. typedef struct lfSTMember_16t {
  1661. unsigned short leaf; // LF_STMEMBER_16t
  1662. CV_typ16_t index; // index of type record for field
  1663. CV_fldattr_t attr; // attribute mask
  1664. unsigned char Name[1]; // length prefixed name of field
  1665. } lfSTMember_16t;
  1666. typedef struct lfSTMember {
  1667. unsigned short leaf; // LF_STMEMBER
  1668. CV_fldattr_t attr; // attribute mask
  1669. CV_typ_t index; // index of type record for field
  1670. unsigned char Name[1]; // length prefixed name of field
  1671. } lfSTMember;
  1672. // subfield record for virtual function table pointer
  1673. typedef struct lfVFuncTab_16t {
  1674. unsigned short leaf; // LF_VFUNCTAB_16t
  1675. CV_typ16_t type; // type index of pointer
  1676. } lfVFuncTab_16t;
  1677. typedef struct lfVFuncTab {
  1678. unsigned short leaf; // LF_VFUNCTAB
  1679. _2BYTEPAD pad0; // internal padding, must be 0
  1680. CV_typ_t type; // type index of pointer
  1681. } lfVFuncTab;
  1682. // subfield record for virtual function table pointer with offset
  1683. typedef struct lfVFuncOff_16t {
  1684. unsigned short leaf; // LF_VFUNCOFF_16t
  1685. CV_typ16_t type; // type index of pointer
  1686. CV_off32_t offset; // offset of virtual function table pointer
  1687. } lfVFuncOff_16t;
  1688. typedef struct lfVFuncOff {
  1689. unsigned short leaf; // LF_VFUNCOFF
  1690. _2BYTEPAD pad0; // internal padding, must be 0.
  1691. CV_typ_t type; // type index of pointer
  1692. CV_off32_t offset; // offset of virtual function table pointer
  1693. } lfVFuncOff;
  1694. // subfield record for overloaded method list
  1695. typedef struct lfMethod_16t {
  1696. unsigned short leaf; // LF_METHOD_16t
  1697. unsigned short count; // number of occurrences of function
  1698. CV_typ16_t mList; // index to LF_METHODLIST record
  1699. unsigned char Name[1]; // length prefixed name of method
  1700. } lfMethod_16t;
  1701. typedef struct lfMethod {
  1702. unsigned short leaf; // LF_METHOD
  1703. unsigned short count; // number of occurrences of function
  1704. CV_typ_t mList; // index to LF_METHODLIST record
  1705. unsigned char Name[1]; // length prefixed name of method
  1706. } lfMethod;
  1707. // subfield record for nonoverloaded method
  1708. typedef struct lfOneMethod_16t {
  1709. unsigned short leaf; // LF_ONEMETHOD_16t
  1710. CV_fldattr_t attr; // method attribute
  1711. CV_typ16_t index; // index to type record for procedure
  1712. unsigned long vbaseoff[CV_ZEROLEN]; // offset in vfunctable if
  1713. // intro virtual followed by
  1714. // length prefixed name of method
  1715. } lfOneMethod_16t;
  1716. typedef struct lfOneMethod {
  1717. unsigned short leaf; // LF_ONEMETHOD
  1718. CV_fldattr_t attr; // method attribute
  1719. CV_typ_t index; // index to type record for procedure
  1720. unsigned long vbaseoff[CV_ZEROLEN]; // offset in vfunctable if
  1721. // intro virtual followed by
  1722. // length prefixed name of method
  1723. } lfOneMethod;
  1724. // subfield record for enumerate
  1725. typedef struct lfEnumerate {
  1726. unsigned short leaf; // LF_ENUMERATE
  1727. CV_fldattr_t attr; // access
  1728. unsigned char value[CV_ZEROLEN]; // variable length value field followed
  1729. // by length prefixed name
  1730. } lfEnumerate;
  1731. // type record for nested (scoped) type definition
  1732. typedef struct lfNestType_16t {
  1733. unsigned short leaf; // LF_NESTTYPE_16t
  1734. CV_typ16_t index; // index of nested type definition
  1735. unsigned char Name[1]; // length prefixed type name
  1736. } lfNestType_16t;
  1737. typedef struct lfNestType {
  1738. unsigned short leaf; // LF_NESTTYPE
  1739. _2BYTEPAD pad0; // internal padding, must be 0
  1740. CV_typ_t index; // index of nested type definition
  1741. unsigned char Name[1]; // length prefixed type name
  1742. } lfNestType;
  1743. // type record for nested (scoped) type definition, with attributes
  1744. // new records for vC v5.0, no need to have 16-bit ti versions.
  1745. typedef struct lfNestTypeEx {
  1746. unsigned short leaf; // LF_NESTTYPEEX
  1747. CV_fldattr_t attr; // member access
  1748. CV_typ_t index; // index of nested type definition
  1749. unsigned char Name[1]; // length prefixed type name
  1750. } lfNestTypeEx;
  1751. // type record for modifications to members
  1752. typedef struct lfMemberModify {
  1753. unsigned short leaf; // LF_MEMBERMODIFY
  1754. CV_fldattr_t attr; // the new attributes
  1755. CV_typ_t index; // index of base class type definition
  1756. unsigned char Name[1]; // length prefixed member name
  1757. } lfMemberModify;
  1758. // type record for pad leaf
  1759. typedef struct lfPad {
  1760. unsigned char leaf;
  1761. } SYM_PAD;
  1762. // Symbol definitions
  1763. typedef enum SYM_ENUM_e {
  1764. S_COMPILE = 0x0001, // Compile flags symbol
  1765. S_REGISTER_16t = 0x0002, // Register variable
  1766. S_CONSTANT_16t = 0x0003, // constant symbol
  1767. S_UDT_16t = 0x0004, // User defined type
  1768. S_SSEARCH = 0x0005, // Start Search
  1769. S_END = 0x0006, // Block, procedure, "with" or thunk end
  1770. S_SKIP = 0x0007, // Reserve symbol space in $$Symbols table
  1771. S_CVRESERVE = 0x0008, // Reserved symbol for CV internal use
  1772. #ifdef LNGNM
  1773. S_OBJNAME_ST = 0x0009, // path to object file name
  1774. #else
  1775. S_OBJNAME = 0x0009, // path to object file name
  1776. #endif
  1777. S_ENDARG = 0x000a, // end of argument/return list
  1778. S_COBOLUDT_16t = 0x000b, // special UDT for cobol that does not symbol pack
  1779. S_MANYREG_16t = 0x000c, // multiple register variable
  1780. S_RETURN = 0x000d, // return description symbol
  1781. S_ENTRYTHIS = 0x000e, // description of this pointer on entry
  1782. S_BPREL16 = 0x0100, // BP-relative
  1783. S_LDATA16 = 0x0101, // Module-local symbol
  1784. S_GDATA16 = 0x0102, // Global data symbol
  1785. S_PUB16 = 0x0103, // a public symbol
  1786. S_LPROC16 = 0x0104, // Local procedure start
  1787. S_GPROC16 = 0x0105, // Global procedure start
  1788. S_THUNK16 = 0x0106, // Thunk Start
  1789. S_BLOCK16 = 0x0107, // block start
  1790. S_WITH16 = 0x0108, // with start
  1791. S_LABEL16 = 0x0109, // code label
  1792. S_CEXMODEL16 = 0x010a, // change execution model
  1793. S_VFTABLE16 = 0x010b, // address of virtual function table
  1794. S_REGREL16 = 0x010c, // register relative address
  1795. S_BPREL32_16t = 0x0200, // BP-relative
  1796. S_LDATA32_16t = 0x0201, // Module-local symbol
  1797. S_GDATA32_16t = 0x0202, // Global data symbol
  1798. S_PUB32_16t = 0x0203, // a public symbol (CV internal reserved)
  1799. S_LPROC32_16t = 0x0204, // Local procedure start
  1800. S_GPROC32_16t = 0x0205, // Global procedure start
  1801. #ifdef LNGNM
  1802. S_THUNK32_ST = 0x0206, // Thunk Start
  1803. S_BLOCK32_ST = 0x0207, // block start
  1804. S_WITH32_ST = 0x0208, // with start
  1805. S_LABEL32_ST = 0x0209, // code label
  1806. #else
  1807. S_THUNK32 = 0x0206, // Thunk Start
  1808. S_BLOCK32 = 0x0207, // block start
  1809. S_WITH32 = 0x0208, // with start
  1810. S_LABEL32 = 0x0209, // code label
  1811. #endif
  1812. S_CEXMODEL32 = 0x020a, // change execution model
  1813. S_VFTABLE32_16t = 0x020b, // address of virtual function table
  1814. S_REGREL32_16t = 0x020c, // register relative address
  1815. S_LTHREAD32_16t = 0x020d, // local thread storage
  1816. S_GTHREAD32_16t = 0x020e, // global thread storage
  1817. S_SLINK32 = 0x020f, // static link for MIPS EH implementation
  1818. S_LPROCMIPS_16t = 0x0300, // Local procedure start
  1819. S_GPROCMIPS_16t = 0x0301, // Global procedure start
  1820. #ifdef LNGNM
  1821. // if these ref symbols have names following then the names are in ST format
  1822. S_PROCREF_ST = 0x0400, // Reference to a procedure
  1823. S_DATAREF_ST = 0x0401, // Reference to data
  1824. #else
  1825. S_PROCREF = 0x0400, // Reference to a procedure
  1826. S_DATAREF = 0x0401, // Reference to data
  1827. #endif
  1828. S_ALIGN = 0x0402, // Used for page alignment of symbols
  1829. #ifdef LNGNM
  1830. S_LPROCREF_ST = 0x0403, // Local Reference to a procedure
  1831. #else
  1832. S_LPROCREF = 0x0403, // Local Reference to a procedure
  1833. #endif
  1834. S_OEM = 0x0404, // OEM defined symbol
  1835. // sym records with 32-bit types embedded instead of 16-bit
  1836. // all have 0x1000 bit set for easy identification
  1837. // only do the 32-bit target versions since we don't really
  1838. // care about 16-bit ones anymore.
  1839. S_TI16_MAX = 0x1000,
  1840. #ifndef LNGNM
  1841. S_REGISTER = 0x1001, // Register variable
  1842. S_CONSTANT = 0x1002, // constant symbol
  1843. S_UDT = 0x1003, // User defined type
  1844. S_COBOLUDT = 0x1004, // special UDT for cobol that does not symbol pack
  1845. S_MANYREG = 0x1005, // multiple register variable
  1846. S_BPREL32 = 0x1006, // BP-relative
  1847. S_LDATA32 = 0x1007, // Module-local symbol
  1848. S_GDATA32 = 0x1008, // Global data symbol
  1849. S_PUB32 = 0x1009, // a public symbol (CV internal reserved)
  1850. S_LPROC32 = 0x100a, // Local procedure start
  1851. S_GPROC32 = 0x100b, // Global procedure start
  1852. S_VFTABLE32 = 0x100c, // address of virtual function table
  1853. S_REGREL32 = 0x100d, // register relative address
  1854. S_LTHREAD32 = 0x100e, // local thread storage
  1855. S_GTHREAD32 = 0x100f, // global thread storage
  1856. S_LPROCMIPS = 0x1010, // Local procedure start
  1857. S_GPROCMIPS = 0x1011, // Global procedure start
  1858. // new symbol records for edit and continue information
  1859. S_FRAMEPROC = 0x1012, // extra frame and proc information
  1860. S_COMPILE2 = 0x1013, // extended compile flags and info
  1861. // new symbols necessary for 16-bit enumerates of IA64 registers
  1862. // and IA64 specific symbols
  1863. S_MANYREG2 = 0x1014, // multiple register variable
  1864. S_LPROCIA64 = 0x1015, // Local procedure start (IA64)
  1865. S_GPROCIA64 = 0x1016, // Global procedure start (IA64)
  1866. // Local symbols for IL
  1867. S_LOCALSLOT = 0x1017, // local IL sym with field for local slot index
  1868. S_SLOT = S_LOCALSLOT, // alias for LOCALSLOT
  1869. S_PARAMSLOT = 0x1018, // local IL sym with field for parameter slot index
  1870. S_ANNOTATION = 0x1019, // Annotation string literals
  1871. // symbols to support managed code debugging
  1872. S_GMANPROC = 0x101a, // Global proc
  1873. S_LMANPROC = 0x101b, // Local proc
  1874. S_RESERVED1 = 0x101c, // reserved
  1875. S_RESERVED2 = 0x101d, // reserved
  1876. S_RESERVED3 = 0x101e, // reserved
  1877. S_RESERVED4 = 0x101f, // reserved
  1878. S_LMANDATA = 0x1020, // Static data
  1879. S_GMANDATA = 0x1021, // Global data
  1880. S_MANFRAMEREL = 0x1022, // Frame relative local var or param
  1881. S_MANREGISTER = 0x1023, // Register local var or param
  1882. S_MANSLOT = 0x1024, // Slot local var or param
  1883. S_MANMANYREG = 0x1025, // Multiple register local var or param
  1884. S_MANREGREL = 0x1026, // Register relative local var or param
  1885. S_MANMANYREG2 = 0x1027, // Multiple register local var or param
  1886. S_MANTYPREF = 0x1028, // Index for type referenced by name from metadata
  1887. S_UNAMESPACE = 0x1029, // Using namespace
  1888. S_NOLNGNAMEMAX,
  1889. S_NOLNGNAMELAST = S_NOLNGNAMEMAX - 1,
  1890. // Keep the long name and non-long name versions of S_ANNOTATIONREF
  1891. // and S_TOKENREF the same
  1892. //
  1893. S_ANNOTATIONREF = 0x1128, // Reference to S_ANNOTATION symbol
  1894. #else
  1895. S_REGISTER_ST = 0x1001, // Register variable
  1896. S_CONSTANT_ST = 0x1002, // constant symbol
  1897. S_UDT_ST = 0x1003, // User defined type
  1898. S_COBOLUDT_ST = 0x1004, // special UDT for cobol that does not symbol pack
  1899. S_MANYREG_ST = 0x1005, // multiple register variable
  1900. S_BPREL32_ST = 0x1006, // BP-relative
  1901. S_LDATA32_ST = 0x1007, // Module-local symbol
  1902. S_GDATA32_ST = 0x1008, // Global data symbol
  1903. S_PUB32_ST = 0x1009, // a public symbol (CV internal reserved)
  1904. S_LPROC32_ST = 0x100a, // Local procedure start
  1905. S_GPROC32_ST = 0x100b, // Global procedure start
  1906. S_VFTABLE32 = 0x100c, // address of virtual function table
  1907. S_REGREL32_ST = 0x100d, // register relative address
  1908. S_LTHREAD32_ST = 0x100e, // local thread storage
  1909. S_GTHREAD32_ST = 0x100f, // global thread storage
  1910. S_LPROCMIPS_ST = 0x1010, // Local procedure start
  1911. S_GPROCMIPS_ST = 0x1011, // Global procedure start
  1912. // new symbol records for edit and continue information
  1913. S_FRAMEPROC = 0x1012, // extra frame and proc information
  1914. S_COMPILE2_ST = 0x1013, // extended compile flags and info
  1915. // new symbols necessary for 16-bit enumerates of IA64 registers
  1916. // and IA64 specific symbols
  1917. S_MANYREG2_ST = 0x1014, // multiple register variable
  1918. S_LPROCIA64_ST = 0x1015, // Local procedure start (IA64)
  1919. S_GPROCIA64_ST = 0x1016, // Global procedure start (IA64)
  1920. // Local symbols for IL
  1921. S_LOCALSLOT_ST = 0x1017, // local IL sym with field for local slot index
  1922. S_PARAMSLOT_ST = 0x1018, // local IL sym with field for parameter slot index
  1923. S_ANNOTATION = 0x1019, // Annotation string literals
  1924. // symbols to support managed code debugging
  1925. S_GMANPROC_ST = 0x101a, // Global proc
  1926. S_LMANPROC_ST = 0x101b, // Local proc
  1927. S_RESERVED1 = 0x101c, // reserved
  1928. S_RESERVED2 = 0x101d, // reserved
  1929. S_RESERVED3 = 0x101e, // reserved
  1930. S_RESERVED4 = 0x101f, // reserved
  1931. S_LMANDATA_ST = 0x1020,
  1932. S_GMANDATA_ST = 0x1021,
  1933. S_MANFRAMEREL_ST= 0x1022,
  1934. S_MANREGISTER_ST= 0x1023,
  1935. S_MANSLOT_ST = 0x1024,
  1936. S_MANMANYREG_ST = 0x1025,
  1937. S_MANREGREL_ST = 0x1026,
  1938. S_MANMANYREG2_ST= 0x1027,
  1939. S_MANTYPREF = 0x1028, // Index for type referenced by name from metadata
  1940. S_UNAMESPACE_ST = 0x1029, // Using namespace
  1941. // Symbols w/ SZ name fields. All name fields contain utf8 encoded strings.
  1942. S_ST_MAX = 0x1100, // starting point for SZ name symbols
  1943. S_OBJNAME = 0x1101, // path to object file name
  1944. S_THUNK32 = 0x1102, // Thunk Start
  1945. S_BLOCK32 = 0x1103, // block start
  1946. S_WITH32 = 0x1104, // with start
  1947. S_LABEL32 = 0x1105, // code label
  1948. S_REGISTER = 0x1106, // Register variable
  1949. S_CONSTANT = 0x1107, // constant symbol
  1950. S_UDT = 0x1108, // User defined type
  1951. S_COBOLUDT = 0x1109, // special UDT for cobol that does not symbol pack
  1952. S_MANYREG = 0x110a, // multiple register variable
  1953. S_BPREL32 = 0x110b, // BP-relative
  1954. S_LDATA32 = 0x110c, // Module-local symbol
  1955. S_GDATA32 = 0x110d, // Global data symbol
  1956. S_PUB32 = 0x110e, // a public symbol (CV internal reserved)
  1957. S_LPROC32 = 0x110f, // Local procedure start
  1958. S_GPROC32 = 0x1110, // Global procedure start
  1959. S_REGREL32 = 0x1111, // register relative address
  1960. S_LTHREAD32 = 0x1112, // local thread storage
  1961. S_GTHREAD32 = 0x1113, // global thread storage
  1962. S_LPROCMIPS = 0x1114, // Local procedure start
  1963. S_GPROCMIPS = 0x1115, // Global procedure start
  1964. S_COMPILE2 = 0x1116, // extended compile flags and info
  1965. S_MANYREG2 = 0x1117, // multiple register variable
  1966. S_LPROCIA64 = 0x1118, // Local procedure start (IA64)
  1967. S_GPROCIA64 = 0x1119, // Global procedure start (IA64)
  1968. S_LOCALSLOT = 0x111a, // local IL sym with field for local slot index
  1969. S_SLOT = S_LOCALSLOT, // alias for LOCALSLOT
  1970. S_PARAMSLOT = 0x111b, // local IL sym with field for parameter slot index
  1971. // symbols to support managed code debugging
  1972. S_LMANDATA = 0x111c,
  1973. S_GMANDATA = 0x111d,
  1974. S_MANFRAMEREL = 0x111e,
  1975. S_MANREGISTER = 0x111f,
  1976. S_MANSLOT = 0x1120,
  1977. S_MANMANYREG = 0x1121,
  1978. S_MANREGREL = 0x1122,
  1979. S_MANMANYREG2 = 0x1123,
  1980. S_UNAMESPACE = 0x1124, // Using namespace
  1981. // ref symbols with name fields
  1982. S_PROCREF = 0x1125, // Reference to a procedure
  1983. S_DATAREF = 0x1126, // Reference to data
  1984. S_LPROCREF = 0x1127, // Local Reference to a procedure
  1985. S_ANNOTATIONREF = 0x1128, // Reference to an S_ANNOTATION symbol
  1986. S_TOKENREF = 0x1129, // Reference to one of the many MANPROCSYM's
  1987. // continuation of managed symbols
  1988. S_GMANPROC = 0x112a, // Global proc
  1989. S_LMANPROC = 0x112b, // Local proc
  1990. // short, light-weight thunks
  1991. S_TRAMPOLINE = 0x112c, // trampoline thunks
  1992. S_MANCONSTANT = 0x112d, // constants with metadata type info
  1993. // native attributed local/parms
  1994. S_ATTR_FRAMEREL = 0x112e, // relative to virtual frame ptr
  1995. S_ATTR_REGISTER = 0x112f, // stored in a register
  1996. S_ATTR_REGREL = 0x1130, // relative to register (alternate frame ptr)
  1997. S_ATTR_MANYREG = 0x1131, // stored in >1 register
  1998. // Separated code (from the compiler) support
  1999. S_SEPCODE = 0x1132,
  2000. #endif
  2001. S_RECTYPE_MAX, // one greater than last
  2002. S_RECTYPE_LAST = S_RECTYPE_MAX - 1,
  2003. } SYM_ENUM_e;
  2004. // enum describing compile flag ambient data model
  2005. typedef enum CV_CFL_DATA {
  2006. CV_CFL_DNEAR = 0x00,
  2007. CV_CFL_DFAR = 0x01,
  2008. CV_CFL_DHUGE = 0x02
  2009. } CV_CFL_DATA;
  2010. // enum describing compile flag ambiant code model
  2011. typedef enum CV_CFL_CODE_e {
  2012. CV_CFL_CNEAR = 0x00,
  2013. CV_CFL_CFAR = 0x01,
  2014. CV_CFL_CHUGE = 0x02
  2015. } CV_CFL_CODE_e;
  2016. // enum describing compile flag target floating point package
  2017. typedef enum CV_CFL_FPKG_e {
  2018. CV_CFL_NDP = 0x00,
  2019. CV_CFL_EMU = 0x01,
  2020. CV_CFL_ALT = 0x02
  2021. } CV_CFL_FPKG_e;
  2022. // enum describing function return method
  2023. typedef struct CV_PROCFLAGS {
  2024. union {
  2025. unsigned char bAll;
  2026. unsigned char grfAll;
  2027. struct {
  2028. unsigned char CV_PFLAG_NOFPO :1; // frame pointer present
  2029. unsigned char CV_PFLAG_INT :1; // interrupt return
  2030. unsigned char CV_PFLAG_FAR :1; // far return
  2031. unsigned char CV_PFLAG_NEVER :1; // function does not return
  2032. unsigned char CV_PFLAG_NOTREACHED:1; // label isn't fallen into
  2033. unsigned char CV_PFLAG_CUST_CALL :1; // custom calling convention
  2034. unsigned char CV_PFLAG_NOINLINE :1; // function marked as noinline
  2035. unsigned char unused :1; //
  2036. };
  2037. };
  2038. } CV_PROCFLAGS;
  2039. // Extended proc flags
  2040. //
  2041. typedef struct CV_EXPROCFLAGS {
  2042. CV_PROCFLAGS cvpf;
  2043. union {
  2044. unsigned char grfAll;
  2045. struct {
  2046. unsigned char __reserved :8; // must be zero
  2047. };
  2048. };
  2049. } CV_EXPROCFLAGS;
  2050. // local variable flags
  2051. typedef struct CV_LVARFLAGS {
  2052. unsigned short fIsParam :1; // variable is a parameter
  2053. unsigned short fAddrTaken :1; // address is taken
  2054. unsigned short fCompGenx :1; // variable is compiler generated
  2055. unsigned short unused :13;// must be zero
  2056. } CV_LVARFLAGS;
  2057. // extended attributes common to all local variables
  2058. typedef struct CV_lvar_attr {
  2059. CV_uoff32_t off; // first code address where var is live
  2060. unsigned short seg;
  2061. CV_LVARFLAGS flags; // local var flags
  2062. } CV_lvar_attr;
  2063. // enum describing function data return method
  2064. typedef enum CV_GENERIC_STYLE_e {
  2065. CV_GENERIC_VOID = 0x00, // void return type
  2066. CV_GENERIC_REG = 0x01, // return data is in registers
  2067. CV_GENERIC_ICAN = 0x02, // indirect caller allocated near
  2068. CV_GENERIC_ICAF = 0x03, // indirect caller allocated far
  2069. CV_GENERIC_IRAN = 0x04, // indirect returnee allocated near
  2070. CV_GENERIC_IRAF = 0x05, // indirect returnee allocated far
  2071. CV_GENERIC_UNUSED = 0x06 // first unused
  2072. } CV_GENERIC_STYLE_e;
  2073. typedef struct CV_GENERIC_FLAG {
  2074. unsigned short cstyle :1; // true push varargs right to left
  2075. unsigned short rsclean :1; // true if returnee stack cleanup
  2076. unsigned short unused :14; // unused
  2077. } CV_GENERIC_FLAG;
  2078. // flag bitfields for separated code attributes
  2079. typedef struct CV_SEPCODEFLAGS {
  2080. unsigned long fIsLexicalScope : 1; // S_SEPCODE doubles as lexical scope
  2081. unsigned long fReturnsToParent : 1; // code frag returns to parent
  2082. unsigned long pad : 30; // must be zero
  2083. } CV_SEPCODEFLAGS;
  2084. // Generic layout for symbol records
  2085. typedef struct SYMTYPE {
  2086. unsigned short reclen; // Record length
  2087. unsigned short rectyp; // Record type
  2088. char data[CV_ZEROLEN];
  2089. } SYMTYPE;
  2090. __INLINE SYMTYPE *NextSym (SYMTYPE * pSym) {
  2091. return (SYMTYPE *) ((char *)pSym + pSym->reclen + sizeof(unsigned short));
  2092. }
  2093. // non-model specific symbol types
  2094. typedef struct REGSYM_16t {
  2095. unsigned short reclen; // Record length
  2096. unsigned short rectyp; // S_REGISTER_16t
  2097. CV_typ16_t typind; // Type index
  2098. unsigned short reg; // register enumerate
  2099. unsigned char name[1]; // Length-prefixed name
  2100. } REGSYM_16t;
  2101. typedef struct REGSYM {
  2102. unsigned short reclen; // Record length
  2103. unsigned short rectyp; // S_REGISTER
  2104. CV_typ_t typind; // Type index or Metadata token
  2105. unsigned short reg; // register enumerate
  2106. unsigned char name[1]; // Length-prefixed name
  2107. } REGSYM;
  2108. typedef struct ATTRREGSYM {
  2109. unsigned short reclen; // Record length
  2110. unsigned short rectyp; // S_MANREGISTER | S_ATTR_REGISTER
  2111. CV_typ_t typind; // Type index or Metadata token
  2112. CV_lvar_attr attr; // local var attributes
  2113. unsigned short reg; // register enumerate
  2114. unsigned char name[1]; // Length-prefixed name
  2115. } ATTRREGSYM;
  2116. typedef struct MANYREGSYM_16t {
  2117. unsigned short reclen; // Record length
  2118. unsigned short rectyp; // S_MANYREG_16t
  2119. CV_typ16_t typind; // Type index
  2120. unsigned char count; // count of number of registers
  2121. unsigned char reg[1]; // count register enumerates followed by
  2122. // length-prefixed name. Registers are
  2123. // most significant first.
  2124. } MANYREGSYM_16t;
  2125. typedef struct MANYREGSYM {
  2126. unsigned short reclen; // Record length
  2127. unsigned short rectyp; // S_MANYREG
  2128. CV_typ_t typind; // Type index or metadata token
  2129. unsigned char count; // count of number of registers
  2130. unsigned char reg[1]; // count register enumerates followed by
  2131. // length-prefixed name. Registers are
  2132. // most significant first.
  2133. } MANYREGSYM;
  2134. typedef struct MANYREGSYM2 {
  2135. unsigned short reclen; // Record length
  2136. unsigned short rectyp; // S_MANYREG2
  2137. CV_typ_t typind; // Type index or metadata token
  2138. unsigned short count; // count of number of registers
  2139. unsigned short reg[1]; // count register enumerates followed by
  2140. // length-prefixed name. Registers are
  2141. // most significant first.
  2142. } MANYREGSYM2;
  2143. typedef struct ATTRMANYREGSYM {
  2144. unsigned short reclen; // Record length
  2145. unsigned short rectyp; // S_MANMANYREG
  2146. CV_typ_t typind; // Type index or metadata token
  2147. CV_lvar_attr attr; // local var attributes
  2148. unsigned char count; // count of number of registers
  2149. unsigned char reg[1]; // count register enumerates followed by
  2150. // length-prefixed name. Registers are
  2151. // most significant first.
  2152. unsigned char name[CV_ZEROLEN]; // utf-8 encoded zero terminate name
  2153. } ATTRMANYREGSYM;
  2154. typedef struct ATTRMANYREGSYM2 {
  2155. unsigned short reclen; // Record length
  2156. unsigned short rectyp; // S_MANMANYREG2 | S_ATTR_MANYREG
  2157. CV_typ_t typind; // Type index or metadata token
  2158. CV_lvar_attr attr; // local var attributes
  2159. unsigned short count; // count of number of registers
  2160. unsigned short reg[1]; // count register enumerates followed by
  2161. // length-prefixed name. Registers are
  2162. // most significant first.
  2163. unsigned char name[CV_ZEROLEN]; // utf-8 encoded zero terminate name
  2164. } ATTRMANYREGSYM2;
  2165. typedef struct CONSTSYM_16t {
  2166. unsigned short reclen; // Record length
  2167. unsigned short rectyp; // S_CONSTANT_16t
  2168. CV_typ16_t typind; // Type index (containing enum if enumerate)
  2169. unsigned short value; // numeric leaf containing value
  2170. unsigned char name[CV_ZEROLEN]; // Length-prefixed name
  2171. } CONSTSYM_16t;
  2172. typedef struct CONSTSYM {
  2173. unsigned short reclen; // Record length
  2174. unsigned short rectyp; // S_CONSTANT or S_MANCONSTANT
  2175. CV_typ_t typind; // Type index (containing enum if enumerate) or metadata token
  2176. unsigned short value; // numeric leaf containing value
  2177. unsigned char name[CV_ZEROLEN]; // Length-prefixed name
  2178. } CONSTSYM;
  2179. typedef struct UDTSYM_16t {
  2180. unsigned short reclen; // Record length
  2181. unsigned short rectyp; // S_UDT_16t | S_COBOLUDT_16t
  2182. CV_typ16_t typind; // Type index
  2183. unsigned char name[1]; // Length-prefixed name
  2184. } UDTSYM_16t;
  2185. typedef struct UDTSYM {
  2186. unsigned short reclen; // Record length
  2187. unsigned short rectyp; // S_UDT | S_COBOLUDT
  2188. CV_typ_t typind; // Type index
  2189. unsigned char name[1]; // Length-prefixed name
  2190. } UDTSYM;
  2191. typedef struct MANTYPREF {
  2192. unsigned short reclen; // Record length
  2193. unsigned short rectyp; // S_MANTYPREF
  2194. CV_typ_t typind; // Type index
  2195. } MANTYPREF;
  2196. typedef struct SEARCHSYM {
  2197. unsigned short reclen; // Record length
  2198. unsigned short rectyp; // S_SSEARCH
  2199. unsigned long startsym; // offset of the procedure
  2200. unsigned short seg; // segment of symbol
  2201. } SEARCHSYM;
  2202. typedef struct CFLAGSYM {
  2203. unsigned short reclen; // Record length
  2204. unsigned short rectyp; // S_COMPILE
  2205. unsigned char machine; // target processor
  2206. struct {
  2207. unsigned char language :8; // language index
  2208. unsigned char pcode :1; // true if pcode present
  2209. unsigned char floatprec :2; // floating precision
  2210. unsigned char floatpkg :2; // float package
  2211. unsigned char ambdata :3; // ambient data model
  2212. unsigned char ambcode :3; // ambient code model
  2213. unsigned char mode32 :1; // true if compiled 32 bit mode
  2214. unsigned char pad :4; // reserved
  2215. } flags;
  2216. unsigned char ver[1]; // Length-prefixed compiler version string
  2217. } CFLAGSYM;
  2218. typedef struct COMPILESYM {
  2219. unsigned short reclen; // Record length
  2220. unsigned short rectyp; // S_COMPILE2
  2221. struct {
  2222. unsigned long iLanguage : 8; // language index
  2223. unsigned long fEC : 1; // compiled for E/C
  2224. unsigned long fNoDbgInfo : 1; // not compiled with debug info
  2225. unsigned long fLTCG : 1; // compiled with LTCG
  2226. unsigned long fNoDataAlign : 1; // compiled with -Bzalign
  2227. unsigned long fManagedPresent : 1; // managed code/data present
  2228. unsigned long pad : 19; // reserved, must be 0
  2229. } flags;
  2230. unsigned short machine; // target processor
  2231. unsigned short verFEMajor; // front end major version #
  2232. unsigned short verFEMinor; // front end minor version #
  2233. unsigned short verFEBuild; // front end build version #
  2234. unsigned short verMajor; // back end major version #
  2235. unsigned short verMinor; // back end minor version #
  2236. unsigned short verBuild; // back end build version #
  2237. unsigned char verSt[1]; // Length-prefixed compiler version string, followed
  2238. // by an optional block of zero terminated strings
  2239. // terminated with a double zero.
  2240. } COMPILESYM;
  2241. typedef struct OBJNAMESYM {
  2242. unsigned short reclen; // Record length
  2243. unsigned short rectyp; // S_OBJNAME
  2244. unsigned long signature; // signature
  2245. unsigned char name[1]; // Length-prefixed name
  2246. } OBJNAMESYM;
  2247. typedef struct ENDARGSYM {
  2248. unsigned short reclen; // Record length
  2249. unsigned short rectyp; // S_ENDARG
  2250. } ENDARGSYM;
  2251. typedef struct RETURNSYM {
  2252. unsigned short reclen; // Record length
  2253. unsigned short rectyp; // S_RETURN
  2254. CV_GENERIC_FLAG flags; // flags
  2255. unsigned char style; // CV_GENERIC_STYLE_e return style
  2256. // followed by return method data
  2257. } RETURNSYM;
  2258. typedef struct ENTRYTHISSYM {
  2259. unsigned short reclen; // Record length
  2260. unsigned short rectyp; // S_ENTRYTHIS
  2261. unsigned char thissym; // symbol describing this pointer on entry
  2262. } ENTRYTHISSYM;
  2263. // symbol types for 16:16 memory model
  2264. typedef struct BPRELSYM16 {
  2265. unsigned short reclen; // Record length
  2266. unsigned short rectyp; // S_BPREL16
  2267. CV_off16_t off; // BP-relative offset
  2268. CV_typ16_t typind; // Type index
  2269. unsigned char name[1]; // Length-prefixed name
  2270. } BPRELSYM16;
  2271. typedef struct DATASYM16 {
  2272. unsigned short reclen; // Record length
  2273. unsigned short rectyp; // S_LDATA or S_GDATA
  2274. CV_uoff16_t off; // offset of symbol
  2275. unsigned short seg; // segment of symbol
  2276. CV_typ16_t typind; // Type index
  2277. unsigned char name[1]; // Length-prefixed name
  2278. } DATASYM16;
  2279. typedef DATASYM16 PUBSYM16;
  2280. typedef struct PROCSYM16 {
  2281. unsigned short reclen; // Record length
  2282. unsigned short rectyp; // S_GPROC16 or S_LPROC16
  2283. unsigned long pParent; // pointer to the parent
  2284. unsigned long pEnd; // pointer to this blocks end
  2285. unsigned long pNext; // pointer to next symbol
  2286. unsigned short len; // Proc length
  2287. unsigned short DbgStart; // Debug start offset
  2288. unsigned short DbgEnd; // Debug end offset
  2289. CV_uoff16_t off; // offset of symbol
  2290. unsigned short seg; // segment of symbol
  2291. CV_typ16_t typind; // Type index
  2292. CV_PROCFLAGS flags; // Proc flags
  2293. unsigned char name[1]; // Length-prefixed name
  2294. } PROCSYM16;
  2295. typedef struct THUNKSYM16 {
  2296. unsigned short reclen; // Record length
  2297. unsigned short rectyp; // S_THUNK
  2298. unsigned long pParent; // pointer to the parent
  2299. unsigned long pEnd; // pointer to this blocks end
  2300. unsigned long pNext; // pointer to next symbol
  2301. CV_uoff16_t off; // offset of symbol
  2302. unsigned short seg; // segment of symbol
  2303. unsigned short len; // length of thunk
  2304. unsigned char ord; // THUNK_ORDINAL specifying type of thunk
  2305. unsigned char name[1]; // name of thunk
  2306. unsigned char variant[CV_ZEROLEN]; // variant portion of thunk
  2307. } THUNKSYM16;
  2308. typedef struct LABELSYM16 {
  2309. unsigned short reclen; // Record length
  2310. unsigned short rectyp; // S_LABEL16
  2311. CV_uoff16_t off; // offset of symbol
  2312. unsigned short seg; // segment of symbol
  2313. CV_PROCFLAGS flags; // flags
  2314. unsigned char name[1]; // Length-prefixed name
  2315. } LABELSYM16;
  2316. typedef struct BLOCKSYM16 {
  2317. unsigned short reclen; // Record length
  2318. unsigned short rectyp; // S_BLOCK16
  2319. unsigned long pParent; // pointer to the parent
  2320. unsigned long pEnd; // pointer to this blocks end
  2321. unsigned short len; // Block length
  2322. CV_uoff16_t off; // offset of symbol
  2323. unsigned short seg; // segment of symbol
  2324. unsigned char name[1]; // Length-prefixed name
  2325. } BLOCKSYM16;
  2326. typedef struct WITHSYM16 {
  2327. unsigned short reclen; // Record length
  2328. unsigned short rectyp; // S_WITH16
  2329. unsigned long pParent; // pointer to the parent
  2330. unsigned long pEnd; // pointer to this blocks end
  2331. unsigned short len; // Block length
  2332. CV_uoff16_t off; // offset of symbol
  2333. unsigned short seg; // segment of symbol
  2334. unsigned char expr[1]; // Length-prefixed expression
  2335. } WITHSYM16;
  2336. typedef enum CEXM_MODEL_e {
  2337. CEXM_MDL_table = 0x00, // not executable
  2338. CEXM_MDL_jumptable = 0x01, // Compiler generated jump table
  2339. CEXM_MDL_datapad = 0x02, // Data padding for alignment
  2340. CEXM_MDL_native = 0x20, // native (actually not-pcode)
  2341. CEXM_MDL_cobol = 0x21, // cobol
  2342. CEXM_MDL_codepad = 0x22, // Code padding for alignment
  2343. CEXM_MDL_code = 0x23, // code
  2344. CEXM_MDL_sql = 0x30, // sql
  2345. CEXM_MDL_pcode = 0x40, // pcode
  2346. CEXM_MDL_pcode32Mac = 0x41, // macintosh 32 bit pcode
  2347. CEXM_MDL_pcode32MacNep = 0x42, // macintosh 32 bit pcode native entry point
  2348. CEXM_MDL_javaInt = 0x50,
  2349. CEXM_MDL_unknown = 0xff
  2350. } CEXM_MODEL_e;
  2351. // use the correct enumerate name
  2352. #define CEXM_MDL_SQL CEXM_MDL_sql
  2353. typedef enum CV_COBOL_e {
  2354. CV_COBOL_dontstop,
  2355. CV_COBOL_pfm,
  2356. CV_COBOL_false,
  2357. CV_COBOL_extcall
  2358. } CV_COBOL_e;
  2359. typedef struct CEXMSYM16 {
  2360. unsigned short reclen; // Record length
  2361. unsigned short rectyp; // S_CEXMODEL16
  2362. CV_uoff16_t off; // offset of symbol
  2363. unsigned short seg; // segment of symbol
  2364. unsigned short model; // execution model
  2365. union {
  2366. struct {
  2367. CV_uoff16_t pcdtable; // offset to pcode function table
  2368. CV_uoff16_t pcdspi; // offset to segment pcode information
  2369. } pcode;
  2370. struct {
  2371. unsigned short subtype; // see CV_COBOL_e above
  2372. unsigned short flag;
  2373. } cobol;
  2374. };
  2375. } CEXMSYM16;
  2376. typedef struct VPATHSYM16 {
  2377. unsigned short reclen; // record length
  2378. unsigned short rectyp; // S_VFTPATH16
  2379. CV_uoff16_t off; // offset of virtual function table
  2380. unsigned short seg; // segment of virtual function table
  2381. CV_typ16_t root; // type index of the root of path
  2382. CV_typ16_t path; // type index of the path record
  2383. } VPATHSYM16;
  2384. typedef struct REGREL16 {
  2385. unsigned short reclen; // Record length
  2386. unsigned short rectyp; // S_REGREL16
  2387. CV_uoff16_t off; // offset of symbol
  2388. unsigned short reg; // register index
  2389. CV_typ16_t typind; // Type index
  2390. unsigned char name[1]; // Length-prefixed name
  2391. } REGREL16;
  2392. typedef struct BPRELSYM32_16t {
  2393. unsigned short reclen; // Record length
  2394. unsigned short rectyp; // S_BPREL32_16t
  2395. CV_off32_t off; // BP-relative offset
  2396. CV_typ16_t typind; // Type index
  2397. unsigned char name[1]; // Length-prefixed name
  2398. } BPRELSYM32_16t;
  2399. typedef struct BPRELSYM32 {
  2400. unsigned short reclen; // Record length
  2401. unsigned short rectyp; // S_BPREL32
  2402. CV_off32_t off; // BP-relative offset
  2403. CV_typ_t typind; // Type index or Metadata token
  2404. unsigned char name[1]; // Length-prefixed name
  2405. } BPRELSYM32;
  2406. typedef struct FRAMERELSYM {
  2407. unsigned short reclen; // Record length
  2408. unsigned short rectyp; // S_MANFRAMEREL | S_ATTR_FRAMEREL
  2409. CV_off32_t off; // Frame relative offset
  2410. CV_typ_t typind; // Type index or Metadata token
  2411. CV_lvar_attr attr; // local var attributes
  2412. unsigned char name[1]; // Length-prefixed name
  2413. } FRAMERELSYM;
  2414. typedef FRAMERELSYM ATTRFRAMERELSYM;
  2415. typedef struct SLOTSYM32 {
  2416. unsigned short reclen; // Record length
  2417. unsigned short rectyp; // S_LOCALSLOT or S_PARAMSLOT
  2418. unsigned long iSlot; // slot index
  2419. CV_typ_t typind; // Type index or Metadata token
  2420. unsigned char name[1]; // Length-prefixed name
  2421. } SLOTSYM32;
  2422. typedef struct ATTRSLOTSYM {
  2423. unsigned short reclen; // Record length
  2424. unsigned short rectyp; // S_MANSLOT
  2425. unsigned long iSlot; // slot index
  2426. CV_typ_t typind; // Type index or Metadata token
  2427. CV_lvar_attr attr; // local var attributes
  2428. unsigned char name[1]; // Length-prefixed name
  2429. } ATTRSLOTSYM;
  2430. typedef struct ANNOTATIONSYM {
  2431. unsigned short reclen; // Record length
  2432. unsigned short rectyp; // S_ANNOTATION
  2433. CV_uoff32_t off;
  2434. unsigned short seg;
  2435. unsigned short csz; // Count of zero terminated annotation strings
  2436. unsigned char rgsz[1]; // Sequence of zero terminated annotation strings
  2437. } ANNOTATIONSYM;
  2438. typedef struct DATASYM32_16t {
  2439. unsigned short reclen; // Record length
  2440. unsigned short rectyp; // S_LDATA32_16t, S_GDATA32_16t or S_PUB32_16t
  2441. CV_uoff32_t off;
  2442. unsigned short seg;
  2443. CV_typ16_t typind; // Type index
  2444. unsigned char name[1]; // Length-prefixed name
  2445. } DATASYM32_16t;
  2446. typedef DATASYM32_16t PUBSYM32_16t;
  2447. typedef struct DATASYM32 {
  2448. unsigned short reclen; // Record length
  2449. unsigned short rectyp; // S_LDATA32, S_GDATA32 or S_PUB32, S_LMANDATA, S_GMANDATA
  2450. CV_typ_t typind; // Type index, or Metadata token if a managed symbol
  2451. CV_uoff32_t off;
  2452. unsigned short seg;
  2453. unsigned char name[1]; // Length-prefixed name
  2454. } DATASYM32;
  2455. typedef enum CV_PUBSYMFLAGS_e
  2456. {
  2457. cvpsfNone = 0,
  2458. cvpsfCode = 0x00000001,
  2459. cvpsfFunction = 0x00000002,
  2460. cvpsfManaged = 0x00000004,
  2461. cvpsfMSIL = 0x00000008,
  2462. } CV_PUBSYMFLAGS_e;
  2463. typedef union CV_PUBSYMFLAGS {
  2464. CV_pubsymflag_t grfFlags;
  2465. struct {
  2466. CV_pubsymflag_t fCode : 1; // set if public symbol refers to a code address
  2467. CV_pubsymflag_t fFunction : 1; // set if public symbol is a function
  2468. CV_pubsymflag_t fManaged : 1; // set if managed code (native or IL)
  2469. CV_pubsymflag_t fMSIL : 1; // set if managed IL code
  2470. CV_pubsymflag_t __unused :28; // must be zero
  2471. };
  2472. } CV_PUBSYMFLAGS;
  2473. typedef struct PUBSYM32 {
  2474. unsigned short reclen; // Record length
  2475. unsigned short rectyp; // S_PUB32
  2476. CV_PUBSYMFLAGS pubsymflags;
  2477. CV_uoff32_t off;
  2478. unsigned short seg;
  2479. unsigned char name[1]; // Length-prefixed name
  2480. } PUBSYM32;
  2481. typedef struct PROCSYM32_16t {
  2482. unsigned short reclen; // Record length
  2483. unsigned short rectyp; // S_GPROC32_16t or S_LPROC32_16t
  2484. unsigned long pParent; // pointer to the parent
  2485. unsigned long pEnd; // pointer to this blocks end
  2486. unsigned long pNext; // pointer to next symbol
  2487. unsigned long len; // Proc length
  2488. unsigned long DbgStart; // Debug start offset
  2489. unsigned long DbgEnd; // Debug end offset
  2490. CV_uoff32_t off;
  2491. unsigned short seg;
  2492. CV_typ16_t typind; // Type index
  2493. CV_PROCFLAGS flags; // Proc flags
  2494. unsigned char name[1]; // Length-prefixed name
  2495. } PROCSYM32_16t;
  2496. typedef struct PROCSYM32 {
  2497. unsigned short reclen; // Record length
  2498. unsigned short rectyp; // S_GPROC32 or S_LPROC32
  2499. unsigned long pParent; // pointer to the parent
  2500. unsigned long pEnd; // pointer to this blocks end
  2501. unsigned long pNext; // pointer to next symbol
  2502. unsigned long len; // Proc length
  2503. unsigned long DbgStart; // Debug start offset
  2504. unsigned long DbgEnd; // Debug end offset
  2505. CV_typ_t typind; // Type index
  2506. CV_uoff32_t off;
  2507. unsigned short seg;
  2508. CV_PROCFLAGS flags; // Proc flags
  2509. unsigned char name[1]; // Length-prefixed name
  2510. } PROCSYM32;
  2511. typedef struct MANPROCSYM {
  2512. unsigned short reclen; // Record length
  2513. unsigned short rectyp; // S_GMANPROC, S_LMANPROC, S_GMANPROCIA64 or S_LMANPROCIA64
  2514. unsigned long pParent; // pointer to the parent
  2515. unsigned long pEnd; // pointer to this blocks end
  2516. unsigned long pNext; // pointer to next symbol
  2517. unsigned long len; // Proc length
  2518. unsigned long DbgStart; // Debug start offset
  2519. unsigned long DbgEnd; // Debug end offset
  2520. CV_tkn_t token; // COM+ metadata token for method
  2521. CV_uoff32_t off;
  2522. unsigned short seg;
  2523. CV_PROCFLAGS flags; // Proc flags
  2524. unsigned short retReg; // Register return value is in (may not be used for all archs)
  2525. unsigned char name[1]; // optional name field
  2526. } MANPROCSYM;
  2527. typedef struct MANPROCSYMMIPS {
  2528. unsigned short reclen; // Record length
  2529. unsigned short rectyp; // S_GMANPROCMIPS or S_LMANPROCMIPS
  2530. unsigned long pParent; // pointer to the parent
  2531. unsigned long pEnd; // pointer to this blocks end
  2532. unsigned long pNext; // pointer to next symbol
  2533. unsigned long len; // Proc length
  2534. unsigned long DbgStart; // Debug start offset
  2535. unsigned long DbgEnd; // Debug end offset
  2536. unsigned long regSave; // int register save mask
  2537. unsigned long fpSave; // fp register save mask
  2538. CV_uoff32_t intOff; // int register save offset
  2539. CV_uoff32_t fpOff; // fp register save offset
  2540. CV_tkn_t token; // COM+ token type
  2541. CV_uoff32_t off;
  2542. unsigned short seg;
  2543. unsigned char retReg; // Register return value is in
  2544. unsigned char frameReg; // Frame pointer register
  2545. unsigned char name[1]; // optional name field
  2546. } MANPROCSYMMIPS;
  2547. typedef struct THUNKSYM32 {
  2548. unsigned short reclen; // Record length
  2549. unsigned short rectyp; // S_THUNK32
  2550. unsigned long pParent; // pointer to the parent
  2551. unsigned long pEnd; // pointer to this blocks end
  2552. unsigned long pNext; // pointer to next symbol
  2553. CV_uoff32_t off;
  2554. unsigned short seg;
  2555. unsigned short len; // length of thunk
  2556. unsigned char ord; // THUNK_ORDINAL specifying type of thunk
  2557. unsigned char name[1]; // Length-prefixed name
  2558. unsigned char variant[CV_ZEROLEN]; // variant portion of thunk
  2559. } THUNKSYM32;
  2560. typedef enum TRAMP_e { // Trampoline subtype
  2561. trampIncremental, // incremental thunks
  2562. trampBranchIsland, // Branch island thunks
  2563. } TRAMP_e;
  2564. typedef struct TRAMPOLINESYM { // Trampoline thunk symbol
  2565. unsigned short reclen; // Record length
  2566. unsigned short rectyp; // S_TRAMPOLINE
  2567. unsigned short trampType; // trampoline sym subtype
  2568. unsigned short cbThunk; // size of the thunk
  2569. CV_uoff32_t offThunk; // offset of the thunk
  2570. CV_uoff32_t offTarget; // offset of the target of the thunk
  2571. unsigned short sectThunk; // section index of the thunk
  2572. unsigned short sectTarget; // section index of the target of the thunk
  2573. } TRAMPOLINE;
  2574. typedef struct LABELSYM32 {
  2575. unsigned short reclen; // Record length
  2576. unsigned short rectyp; // S_LABEL32
  2577. CV_uoff32_t off;
  2578. unsigned short seg;
  2579. CV_PROCFLAGS flags; // flags
  2580. unsigned char name[1]; // Length-prefixed name
  2581. } LABELSYM32;
  2582. typedef struct BLOCKSYM32 {
  2583. unsigned short reclen; // Record length
  2584. unsigned short rectyp; // S_BLOCK32
  2585. unsigned long pParent; // pointer to the parent
  2586. unsigned long pEnd; // pointer to this blocks end
  2587. unsigned long len; // Block length
  2588. CV_uoff32_t off; // Offset in code segment
  2589. unsigned short seg; // segment of label
  2590. unsigned char name[1]; // Length-prefixed name
  2591. } BLOCKSYM32;
  2592. typedef struct WITHSYM32 {
  2593. unsigned short reclen; // Record length
  2594. unsigned short rectyp; // S_WITH32
  2595. unsigned long pParent; // pointer to the parent
  2596. unsigned long pEnd; // pointer to this blocks end
  2597. unsigned long len; // Block length
  2598. CV_uoff32_t off; // Offset in code segment
  2599. unsigned short seg; // segment of label
  2600. unsigned char expr[1]; // Length-prefixed expression string
  2601. } WITHSYM32;
  2602. typedef struct CEXMSYM32 {
  2603. unsigned short reclen; // Record length
  2604. unsigned short rectyp; // S_CEXMODEL32
  2605. CV_uoff32_t off; // offset of symbol
  2606. unsigned short seg; // segment of symbol
  2607. unsigned short model; // execution model
  2608. union {
  2609. struct {
  2610. CV_uoff32_t pcdtable; // offset to pcode function table
  2611. CV_uoff32_t pcdspi; // offset to segment pcode information
  2612. } pcode;
  2613. struct {
  2614. unsigned short subtype; // see CV_COBOL_e above
  2615. unsigned short flag;
  2616. } cobol;
  2617. struct {
  2618. CV_uoff32_t calltableOff; // offset to function table
  2619. unsigned short calltableSeg; // segment of function table
  2620. } pcode32Mac;
  2621. };
  2622. } CEXMSYM32;
  2623. typedef struct VPATHSYM32_16t {
  2624. unsigned short reclen; // record length
  2625. unsigned short rectyp; // S_VFTABLE32_16t
  2626. CV_uoff32_t off; // offset of virtual function table
  2627. unsigned short seg; // segment of virtual function table
  2628. CV_typ16_t root; // type index of the root of path
  2629. CV_typ16_t path; // type index of the path record
  2630. } VPATHSYM32_16t;
  2631. typedef struct VPATHSYM32 {
  2632. unsigned short reclen; // record length
  2633. unsigned short rectyp; // S_VFTABLE32
  2634. CV_typ_t root; // type index of the root of path
  2635. CV_typ_t path; // type index of the path record
  2636. CV_uoff32_t off; // offset of virtual function table
  2637. unsigned short seg; // segment of virtual function table
  2638. } VPATHSYM32;
  2639. typedef struct REGREL32_16t {
  2640. unsigned short reclen; // Record length
  2641. unsigned short rectyp; // S_REGREL32_16t
  2642. CV_uoff32_t off; // offset of symbol
  2643. unsigned short reg; // register index for symbol
  2644. CV_typ16_t typind; // Type index
  2645. unsigned char name[1]; // Length-prefixed name
  2646. } REGREL32_16t;
  2647. typedef struct REGREL32 {
  2648. unsigned short reclen; // Record length
  2649. unsigned short rectyp; // S_REGREL32
  2650. CV_uoff32_t off; // offset of symbol
  2651. CV_typ_t typind; // Type index or metadata token
  2652. unsigned short reg; // register index for symbol
  2653. unsigned char name[1]; // Length-prefixed name
  2654. } REGREL32;
  2655. typedef struct ATTRREGREL {
  2656. unsigned short reclen; // Record length
  2657. unsigned short rectyp; // S_MANREGREL | S_ATTR_REGREL
  2658. CV_uoff32_t off; // offset of symbol
  2659. CV_typ_t typind; // Type index or metadata token
  2660. unsigned short reg; // register index for symbol
  2661. CV_lvar_attr attr; // local var attributes
  2662. unsigned char name[1]; // Length-prefixed name
  2663. } ATTRREGREL;
  2664. typedef ATTRREGREL ATTRREGRELSYM;
  2665. typedef struct THREADSYM32_16t {
  2666. unsigned short reclen; // record length
  2667. unsigned short rectyp; // S_LTHREAD32_16t | S_GTHREAD32_16t
  2668. CV_uoff32_t off; // offset into thread storage
  2669. unsigned short seg; // segment of thread storage
  2670. CV_typ16_t typind; // type index
  2671. unsigned char name[1]; // length prefixed name
  2672. } THREADSYM32_16t;
  2673. typedef struct THREADSYM32 {
  2674. unsigned short reclen; // record length
  2675. unsigned short rectyp; // S_LTHREAD32 | S_GTHREAD32
  2676. CV_typ_t typind; // type index
  2677. CV_uoff32_t off; // offset into thread storage
  2678. unsigned short seg; // segment of thread storage
  2679. unsigned char name[1]; // length prefixed name
  2680. } THREADSYM32;
  2681. typedef struct SLINK32 {
  2682. unsigned short reclen; // record length
  2683. unsigned short rectyp; // S_SLINK32
  2684. unsigned long framesize; // frame size of parent procedure
  2685. CV_off32_t off; // signed offset where the static link was saved relative to the value of reg
  2686. unsigned short reg;
  2687. } SLINK32;
  2688. typedef struct PROCSYMMIPS_16t {
  2689. unsigned short reclen; // Record length
  2690. unsigned short rectyp; // S_GPROCMIPS_16t or S_LPROCMIPS_16t
  2691. unsigned long pParent; // pointer to the parent
  2692. unsigned long pEnd; // pointer to this blocks end
  2693. unsigned long pNext; // pointer to next symbol
  2694. unsigned long len; // Proc length
  2695. unsigned long DbgStart; // Debug start offset
  2696. unsigned long DbgEnd; // Debug end offset
  2697. unsigned long regSave; // int register save mask
  2698. unsigned long fpSave; // fp register save mask
  2699. CV_uoff32_t intOff; // int register save offset
  2700. CV_uoff32_t fpOff; // fp register save offset
  2701. CV_uoff32_t off; // Symbol offset
  2702. unsigned short seg; // Symbol segment
  2703. CV_typ16_t typind; // Type index
  2704. unsigned char retReg; // Register return value is in
  2705. unsigned char frameReg; // Frame pointer register
  2706. unsigned char name[1]; // Length-prefixed name
  2707. } PROCSYMMIPS_16t;
  2708. typedef struct PROCSYMMIPS {
  2709. unsigned short reclen; // Record length
  2710. unsigned short rectyp; // S_GPROCMIPS or S_LPROCMIPS
  2711. unsigned long pParent; // pointer to the parent
  2712. unsigned long pEnd; // pointer to this blocks end
  2713. unsigned long pNext; // pointer to next symbol
  2714. unsigned long len; // Proc length
  2715. unsigned long DbgStart; // Debug start offset
  2716. unsigned long DbgEnd; // Debug end offset
  2717. unsigned long regSave; // int register save mask
  2718. unsigned long fpSave; // fp register save mask
  2719. CV_uoff32_t intOff; // int register save offset
  2720. CV_uoff32_t fpOff; // fp register save offset
  2721. CV_typ_t typind; // Type index
  2722. CV_uoff32_t off; // Symbol offset
  2723. unsigned short seg; // Symbol segment
  2724. unsigned char retReg; // Register return value is in
  2725. unsigned char frameReg; // Frame pointer register
  2726. unsigned char name[1]; // Length-prefixed name
  2727. } PROCSYMMIPS;
  2728. typedef struct PROCSYMIA64 {
  2729. unsigned short reclen; // Record length
  2730. unsigned short rectyp; // S_GPROCIA64 or S_LPROCIA64
  2731. unsigned long pParent; // pointer to the parent
  2732. unsigned long pEnd; // pointer to this blocks end
  2733. unsigned long pNext; // pointer to next symbol
  2734. unsigned long len; // Proc length
  2735. unsigned long DbgStart; // Debug start offset
  2736. unsigned long DbgEnd; // Debug end offset
  2737. CV_typ_t typind; // Type index
  2738. CV_uoff32_t off; // Symbol offset
  2739. unsigned short seg; // Symbol segment
  2740. unsigned short retReg; // Register return value is in
  2741. CV_PROCFLAGS flags; // Proc flags
  2742. unsigned char name[1]; // Length-prefixed name
  2743. } PROCSYMIA64;
  2744. typedef struct REFSYM {
  2745. unsigned short reclen; // Record length
  2746. unsigned short rectyp; // S_PROCREF_ST, S_DATAREF_ST, or S_LPROCREF_ST
  2747. unsigned long sumName; // SUC of the name
  2748. unsigned long ibSym; // Offset of actual symbol in $$Symbols
  2749. unsigned short imod; // Module containing the actual symbol
  2750. unsigned short usFill; // align this record
  2751. } REFSYM;
  2752. typedef struct REFSYM2 {
  2753. unsigned short reclen; // Record length
  2754. unsigned short rectyp; // S_PROCREF, S_DATAREF, or S_LPROCREF
  2755. unsigned long sumName; // SUC of the name
  2756. unsigned long ibSym; // Offset of actual symbol in $$Symbols
  2757. unsigned short imod; // Module containing the actual symbol
  2758. unsigned char name[1]; // hidden name made a first class member
  2759. } REFSYM2;
  2760. typedef struct ALIGNSYM {
  2761. unsigned short reclen; // Record length
  2762. unsigned short rectyp; // S_ALIGN
  2763. } ALIGNSYM;
  2764. typedef struct OEMSYMBOL {
  2765. unsigned short reclen; // Record length
  2766. unsigned short rectyp; // S_OEM
  2767. unsigned char idOem[16]; // an oem ID (GUID)
  2768. CV_typ_t typind; // Type index
  2769. unsigned long rgl[]; // user data, force 4-byte alignment
  2770. } OEMSYMBOL;
  2771. // generic block definition symbols
  2772. // these are similar to the equivalent 16:16 or 16:32 symbols but
  2773. // only define the length, type and linkage fields
  2774. typedef struct PROCSYM {
  2775. unsigned short reclen; // Record length
  2776. unsigned short rectyp; // S_GPROC16 or S_LPROC16
  2777. unsigned long pParent; // pointer to the parent
  2778. unsigned long pEnd; // pointer to this blocks end
  2779. unsigned long pNext; // pointer to next symbol
  2780. } PROCSYM;
  2781. typedef struct THUNKSYM {
  2782. unsigned short reclen; // Record length
  2783. unsigned short rectyp; // S_THUNK
  2784. unsigned long pParent; // pointer to the parent
  2785. unsigned long pEnd; // pointer to this blocks end
  2786. unsigned long pNext; // pointer to next symbol
  2787. } THUNKSYM;
  2788. typedef struct BLOCKSYM {
  2789. unsigned short reclen; // Record length
  2790. unsigned short rectyp; // S_BLOCK16
  2791. unsigned long pParent; // pointer to the parent
  2792. unsigned long pEnd; // pointer to this blocks end
  2793. } BLOCKSYM;
  2794. typedef struct WITHSYM {
  2795. unsigned short reclen; // Record length
  2796. unsigned short rectyp; // S_WITH16
  2797. unsigned long pParent; // pointer to the parent
  2798. unsigned long pEnd; // pointer to this blocks end
  2799. } WITHSYM;
  2800. typedef struct FRAMEPROCSYM {
  2801. unsigned short reclen; // Record length
  2802. unsigned short rectyp; // S_FRAMEPROC
  2803. unsigned long cbFrame; // count of bytes of total frame of procedure
  2804. unsigned long cbPad; // count of bytes of padding in the frame
  2805. CV_uoff32_t offPad; // offset (relative to frame poniter) to where
  2806. // padding starts
  2807. unsigned long cbSaveRegs; // count of bytes of callee save registers
  2808. CV_uoff32_t offExHdlr; // offset of exception handler
  2809. unsigned short sectExHdlr; // section id of exception handler
  2810. struct {
  2811. unsigned long fHasAlloca : 1; // function uses _alloca()
  2812. unsigned long fHasSetJmp : 1; // function uses setjmp()
  2813. unsigned long fHasLongJmp : 1; // function uses longjmp()
  2814. unsigned long fHasInlAsm : 1; // function uses inline asm
  2815. unsigned long fHasEH : 1; // function has EH states
  2816. unsigned long fInlSpec : 1; // function was speced as inline
  2817. unsigned long fHasSEH : 1; // function has SEH
  2818. unsigned long fNaked : 1; // function is __declspec(naked)
  2819. unsigned long pad : 24; // must be zero
  2820. } flags;
  2821. } FRAMEPROCSYM;
  2822. typedef struct UNAMESPACE {
  2823. unsigned short reclen; // Record length
  2824. unsigned short rectyp; // S_UNAMESPACE
  2825. unsigned char name[1]; // name
  2826. } UNAMESPACE;
  2827. typedef struct SEPCODESYM {
  2828. unsigned short reclen; // Record length
  2829. unsigned short rectyp; // S_SEPCODE
  2830. unsigned long pParent; // pointer to the parent
  2831. unsigned long pEnd; // pointer to this block's end
  2832. unsigned long length; // count of bytes of this block
  2833. CV_SEPCODEFLAGS scf; // flags
  2834. CV_uoff32_t off; // sect:off of the separated code
  2835. CV_uoff32_t offParent; // sectParent:offParent of the enclosing scope
  2836. unsigned short sect; // (proc, block, or sepcode)
  2837. unsigned short sectParent;
  2838. } SEPCODESYM;
  2839. //
  2840. // V7 line number data types
  2841. //
  2842. enum DEBUG_S_SUBSECTION_TYPE {
  2843. DEBUG_S_IGNORE = 0x80000000, // if this bit is set in a subsection type then ignore the subsection contents
  2844. DEBUG_S_SYMBOLS = 0xf1,
  2845. DEBUG_S_LINES,
  2846. DEBUG_S_STRINGTABLE,
  2847. DEBUG_S_FILECHKSMS,
  2848. DEBUG_S_FRAMEDATA,
  2849. };
  2850. //
  2851. // Line flags (data present)
  2852. //
  2853. #define CV_LINES_HAVE_COLUMNS 0x0001
  2854. struct CV_Line_t {
  2855. unsigned long offset; // Offset to start of code bytes for line number
  2856. unsigned long linenumStart:24; // line where statement/expression starts
  2857. unsigned long deltaLineEnd:7; // delta to line where statement ends (optional)
  2858. unsigned long fStatement:1; // true if a statement linenumber, else an expression line num
  2859. };
  2860. typedef unsigned short CV_columnpos_t; // byte offset in a source line
  2861. struct CV_Column_t {
  2862. CV_columnpos_t offColumnStart;
  2863. CV_columnpos_t offColumnEnd;
  2864. };
  2865. struct tagFRAMEDATA {
  2866. unsigned long ulRvaStart;
  2867. unsigned long cbBlock;
  2868. unsigned long cbLocals;
  2869. unsigned long cbParams;
  2870. unsigned long cbStkMax;
  2871. unsigned long frameFunc;
  2872. unsigned short cbProlog;
  2873. unsigned short cbSavedRegs;
  2874. unsigned long fHasSEH:1;
  2875. unsigned long fHasEH:1;
  2876. unsigned long fIsFunctionStart:1;
  2877. unsigned long fHasBufferCheck:1;
  2878. unsigned long reserved:28;
  2879. };
  2880. typedef struct tagFRAMEDATA FRAMEDATA, * PFRAMEDATA;
  2881. typedef struct tagXFIXUP_DATA {
  2882. unsigned short wType;
  2883. unsigned short wExtra;
  2884. unsigned long rva;
  2885. unsigned long rvaTarget;
  2886. } XFIXUP_DATA;
  2887. #pragma pack ( pop )
  2888. #endif /* CV_INFO_INCLUDED */