Source code of Windows XP (NT5)
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.

3804 lines
123 KiB

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