ole2disp.dll16: Implement SafeArrayGet[UBound|LBound].
[wine.git] / include / wine / mscvpdb.h
blob2f0b47998fae98282fcbae4d45bbc4132a36e3c4
1 /*
2 * MS debug information definitions.
4 * Copyright (C) 1996 Eric Youngdale
5 * Copyright (C) 1999-2000 Ulrich Weigand
6 * Copyright (C) 2004 Eric Pouech
8 * This library is free software; you can redistribute it and/or
9 * modify it under the terms of the GNU Lesser General Public
10 * License as published by the Free Software Foundation; either
11 * version 2.1 of the License, or (at your option) any later version.
13 * This library is distributed in the hope that it will be useful,
14 * but WITHOUT ANY WARRANTY; without even the implied warranty of
15 * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
16 * Lesser General Public License for more details.
18 * You should have received a copy of the GNU Lesser General Public
19 * License along with this library; if not, write to the Free Software
20 * Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301, USA
23 /* MS has stored all its debug information in a set of structures
24 * which has been rather consistent across the years (ie you can grasp
25 * some continuity, and not so many drastic changes).
27 * A bit of history on the various formats
28 * MSVC 1.0 PDB v1 (new format for debug info)
29 * MSVC 2.0 Inclusion in link of debug info (PDB v2)
30 * MSVC 5.0 Types are 24 bits (instead of 16 for <= 4.x)
31 * MSVC x.0 PDB (change in internal streams layout)
33 * .DBG Contains COFF, FPO and Codeview info
34 * .PDB New format for debug info (information is
35 * derived from Codeview information)
36 * VCx0.PDB x major MSVC number, stores types, while
37 * <project>.PDB stores symbols.
39 * Debug information can either be found in the debug section of a PE
40 * module (in something close to a .DBG file), or the debug section
41 * can actually refer to an external file, which can be in turn,
42 * either a .DBG or .PDB file.
44 * Regarding PDB files:
45 * -------------------
46 * They are implemented as a set of internal files (as a small file
47 * system). The file is split into blocks, an internal file is made
48 * of a set of blocks. Internal files are accessed through
49 * numbers. For example,
50 * 1/ is the ROOT (basic information on the file)
51 * 2/ is the Symbol information (global symbols, local variables...)
52 * 3/ is the Type internal file (each the symbols can have type
53 * information associated with it).
55 * Over the years, three formats existed for the PDB:
56 * - ?? was rather linked to 16 bit code (our support shall be rather
57 * bad)
58 * - JG: it's the signature embedded in the file header. This format
59 * has been used in MSVC 2.0 => 5.0.
60 * - DS: it's the signature embedded in the file header. It's the
61 * current format supported my MS.
63 * Types internal stream
64 * ---------------------
65 * Types (from the Type internal file) have existed in three flavors
66 * (note that those flavors came as historical evolution, but there
67 * isn't a one to one link between types evolution and PDB formats'
68 * evolutions:
69 * - the first flavor (suffixed by V1 in this file), where the types
70 * and subtypes are 16 bit entities; and where strings are in Pascal
71 * format (first char is their length and are not 0 terminated)
72 * - the second flavor (suffixed by V2) differs from first flavor with
73 * types and subtypes as 32 bit entities. This forced some
74 * reordering of fields in some types
75 * - the third flavor (suffixed by V3) differs from second flavor with
76 * strings stored as C strings (ie are 0 terminated, instead of
77 * length prefixed)
78 * The different flavors can coexist in the same file (is this really
79 * true ??)
81 * For the evolution of types, the need of the second flavor was the
82 * number of types to be defined (limited to 0xFFFF, including the C
83 * basic types); the need of the third flavor is the increase of
84 * symbol size (to be greater than 256), which was likely needed for
85 * complex C++ types (nested + templates).
87 * It's somehow difficult to represent the layout of those types on
88 * disk because:
89 * - some integral values are stored as numeric leaf, which size is
90 * variable depending on its value
92 * Symbols internal stream
93 * -----------------------
94 * Here also we find three flavors (that we've suffixed with _V1, _V2
95 * and _V3) even if their evolution is closer to the evolution of
96 * types, they are not completely linked together.
99 #include "pshpack1.h"
101 /* ======================================== *
102 * Type information
103 * ======================================== */
105 struct p_string
107 unsigned char namelen;
108 char name[1];
111 union codeview_type
113 struct
115 unsigned short int len;
116 short int id;
117 } generic;
119 struct
121 unsigned short int len;
122 short int id;
123 short int attribute;
124 short int type;
125 } modifier_v1;
127 struct
129 unsigned short int len;
130 short int id;
131 int type;
132 short int attribute;
133 } modifier_v2;
135 struct
137 unsigned short int len;
138 short int id;
139 short int attribute;
140 short int datatype;
141 struct p_string p_name;
142 } pointer_v1;
144 struct
146 unsigned short int len;
147 short int id;
148 unsigned int datatype;
149 unsigned int attribute;
150 struct p_string p_name;
151 } pointer_v2;
153 struct
155 unsigned short int len;
156 short int id;
157 short int elemtype;
158 short int idxtype;
159 unsigned short int arrlen; /* numeric leaf */
160 #if 0
161 struct p_string p_name;
162 #endif
163 } array_v1;
165 struct
167 unsigned short int len;
168 short int id;
169 unsigned int elemtype;
170 unsigned int idxtype;
171 unsigned short int arrlen; /* numeric leaf */
172 #if 0
173 struct p_string p_name;
174 #endif
175 } array_v2;
177 struct
179 unsigned short int len;
180 short int id;
181 unsigned int elemtype;
182 unsigned int idxtype;
183 unsigned short int arrlen; /* numeric leaf */
184 #if 0
185 char name[1];
186 #endif
187 } array_v3;
189 struct
191 unsigned short int len;
192 short int id;
193 short int n_element;
194 short int fieldlist;
195 short int property;
196 short int derived;
197 short int vshape;
198 unsigned short int structlen; /* numeric leaf */
199 #if 0
200 struct p_string p_name;
201 #endif
202 } struct_v1;
204 struct
206 unsigned short int len;
207 short int id;
208 short int n_element;
209 short int property;
210 unsigned int fieldlist;
211 unsigned int derived;
212 unsigned int vshape;
213 unsigned short int structlen; /* numeric leaf */
214 #if 0
215 struct p_string p_name;
216 #endif
217 } struct_v2;
219 struct
221 unsigned short int len;
222 short int id;
223 short int n_element;
224 short int property;
225 unsigned int fieldlist;
226 unsigned int derived;
227 unsigned int vshape;
228 unsigned short int structlen; /* numeric leaf */
229 #if 0
230 char name[1];
231 #endif
232 } struct_v3;
234 struct
236 unsigned short int len;
237 short int id;
238 short int count;
239 short int fieldlist;
240 short int property;
241 unsigned short int un_len; /* numeric leaf */
242 #if 0
243 struct p_string p_name;
244 #endif
245 } union_v1;
247 struct
249 unsigned short int len;
250 short int id;
251 short int count;
252 short int property;
253 unsigned int fieldlist;
254 unsigned short int un_len; /* numeric leaf */
255 #if 0
256 struct p_string p_name;
257 #endif
258 } union_v2;
260 struct
262 unsigned short int len;
263 short int id;
264 short int count;
265 short int property;
266 unsigned int fieldlist;
267 unsigned short int un_len; /* numeric leaf */
268 #if 0
269 char name[1];
270 #endif
271 } union_v3;
273 struct
275 unsigned short int len;
276 short int id;
277 short int count;
278 short int type;
279 short int fieldlist;
280 short int property;
281 struct p_string p_name;
282 } enumeration_v1;
284 struct
286 unsigned short int len;
287 short int id;
288 short int count;
289 short int property;
290 unsigned int type;
291 unsigned int fieldlist;
292 struct p_string p_name;
293 } enumeration_v2;
295 struct
297 unsigned short int len;
298 short int id;
299 short int count;
300 short int property;
301 unsigned int type;
302 unsigned int fieldlist;
303 char name[1];
304 } enumeration_v3;
306 struct
308 unsigned short int len;
309 short int id;
310 unsigned short int rvtype;
311 unsigned char call;
312 unsigned char reserved;
313 unsigned short int params;
314 unsigned short int arglist;
315 } procedure_v1;
317 struct
319 unsigned short int len;
320 short int id;
321 unsigned int rvtype;
322 unsigned char call;
323 unsigned char reserved;
324 unsigned short int params;
325 unsigned int arglist;
326 } procedure_v2;
328 struct
330 unsigned short int len;
331 short int id;
332 unsigned short int rvtype;
333 unsigned short int class_type;
334 unsigned short int this_type;
335 unsigned char call;
336 unsigned char reserved;
337 unsigned short int params;
338 unsigned short int arglist;
339 unsigned int this_adjust;
340 } mfunction_v1;
342 struct
344 unsigned short int len;
345 short int id;
346 unsigned int rvtype;
347 unsigned int class_type;
348 unsigned this_type;
349 unsigned char call;
350 unsigned char reserved;
351 unsigned short params;
352 unsigned int arglist;
353 unsigned int this_adjust;
354 } mfunction_v2;
357 union codeview_reftype
359 struct
361 unsigned short int len;
362 short int id;
363 } generic;
365 struct
367 unsigned short int len;
368 short int id;
369 unsigned char list[1];
370 } fieldlist;
372 struct
374 unsigned short int len;
375 short int id;
376 unsigned char nbits;
377 unsigned char bitoff;
378 unsigned short type;
379 } bitfield_v1;
381 struct
383 unsigned short int len;
384 short int id;
385 unsigned int type;
386 unsigned char nbits;
387 unsigned char bitoff;
388 } bitfield_v2;
390 struct
392 unsigned short int len;
393 short int id;
394 unsigned short num;
395 unsigned short args[1];
396 } arglist_v1;
398 struct
400 unsigned short int len;
401 short int id;
402 unsigned num;
403 unsigned args[1];
404 } arglist_v2;
406 struct
408 unsigned short int len;
409 short int id;
410 unsigned short num;
411 unsigned short drvdcls[1];
412 } derived_v1;
414 struct
416 unsigned short int len;
417 short int id;
418 unsigned num;
419 unsigned drvdcls[1];
420 } derived_v2;
423 union codeview_fieldtype
425 struct
427 short int id;
428 } generic;
430 struct
432 short int id;
433 short int type;
434 short int attribute;
435 unsigned short int offset; /* numeric leaf */
436 } bclass_v1;
438 struct
440 short int id;
441 short int attribute;
442 unsigned int type;
443 unsigned short int offset; /* numeric leaf */
444 } bclass_v2;
446 struct
448 short int id;
449 short int btype;
450 short int vbtype;
451 short int attribute;
452 unsigned short int vbpoff; /* numeric leaf */
453 #if 0
454 unsigned short int vboff; /* numeric leaf */
455 #endif
456 } vbclass_v1;
458 struct
460 short int id;
461 short int attribute;
462 unsigned int btype;
463 unsigned int vbtype;
464 unsigned short int vbpoff; /* numeric leaf */
465 #if 0
466 unsigned short int vboff; /* numeric leaf */
467 #endif
468 } vbclass_v2;
470 struct
472 short int id;
473 short int attribute;
474 unsigned short int value; /* numeric leaf */
475 #if 0
476 struct p_string p_name;
477 #endif
478 } enumerate_v1;
480 struct
482 short int id;
483 short int attribute;
484 unsigned short int value; /* numeric leaf */
485 #if 0
486 char name[1];
487 #endif
488 } enumerate_v3;
490 struct
492 short int id;
493 short int type;
494 struct p_string p_name;
495 } friendfcn_v1;
497 struct
499 short int id;
500 short int _pad0;
501 unsigned int type;
502 struct p_string p_name;
503 } friendfcn_v2;
505 struct
507 short int id;
508 short int type;
509 short int attribute;
510 unsigned short int offset; /* numeric leaf */
511 #if 0
512 struct p_string p_name;
513 #endif
514 } member_v1;
516 struct
518 short int id;
519 short int attribute;
520 unsigned int type;
521 unsigned short int offset; /* numeric leaf */
522 #if 0
523 struct p_string p_name;
524 #endif
525 } member_v2;
527 struct
529 short int id;
530 short int attribute;
531 unsigned int type;
532 unsigned short int offset; /* numeric leaf */
533 #if 0
534 unsigned char name[1];
535 #endif
537 member_v3;
539 struct
541 short int id;
542 short int type;
543 short int attribute;
544 struct p_string p_name;
545 } stmember_v1;
547 struct
549 short int id;
550 short int attribute;
551 unsigned int type;
552 struct p_string p_name;
553 } stmember_v2;
555 struct
557 short int id;
558 short int attribute;
559 unsigned int type;
560 char name[1];
561 } stmember_v3;
563 struct
565 short int id;
566 short int count;
567 short int mlist;
568 struct p_string p_name;
569 } method_v1;
571 struct
573 short int id;
574 short int count;
575 unsigned int mlist;
576 struct p_string p_name;
577 } method_v2;
579 struct
581 short int id;
582 short int count;
583 unsigned int mlist;
584 char name[1];
585 } method_v3;
587 struct
589 short int id;
590 short int type;
591 struct p_string p_name;
592 } nesttype_v1;
594 struct
596 short int id;
597 short int _pad0;
598 unsigned int type;
599 struct p_string p_name;
600 } nesttype_v2;
602 struct
604 short int id;
605 short int _pad0;
606 unsigned int type;
607 char name[1];
608 } nesttype_v3;
610 struct
612 short int id;
613 short int type;
614 } vfunctab_v1;
616 struct
618 short int id;
619 short int _pad0;
620 unsigned int type;
621 } vfunctab_v2;
623 struct
625 short int id;
626 short int type;
627 } friendcls_v1;
629 struct
631 short int id;
632 short int _pad0;
633 unsigned int type;
634 } friendcls_v2;
636 struct
638 short int id;
639 short int attribute;
640 short int type;
641 struct p_string p_name;
642 } onemethod_v1;
644 struct
646 short int id;
647 short int attribute;
648 unsigned int type;
649 struct p_string p_name;
650 } onemethod_v2;
652 struct
654 short int id;
655 short int attribute;
656 unsigned int type;
657 char name[1];
658 } onemethod_v3;
660 struct
662 short int id;
663 short int attribute;
664 short int type;
665 unsigned int vtab_offset;
666 struct p_string p_name;
667 } onemethod_virt_v1;
669 struct
671 short int id;
672 short int attribute;
673 unsigned int type;
674 unsigned int vtab_offset;
675 struct p_string p_name;
676 } onemethod_virt_v2;
678 struct
680 short int id;
681 short int attribute;
682 unsigned int type;
683 unsigned int vtab_offset;
684 char name[1];
685 } onemethod_virt_v3;
687 struct
689 short int id;
690 short int type;
691 unsigned int offset;
692 } vfuncoff_v1;
694 struct
696 short int id;
697 short int _pad0;
698 unsigned int type;
699 unsigned int offset;
700 } vfuncoff_v2;
702 struct
704 short int id;
705 short int attribute;
706 short int type;
707 struct p_string p_name;
708 } nesttypeex_v1;
710 struct
712 short int id;
713 short int attribute;
714 unsigned int type;
715 struct p_string p_name;
716 } nesttypeex_v2;
718 struct
720 short int id;
721 short int attribute;
722 unsigned int type;
723 struct p_string p_name;
724 } membermodify_v2;
726 struct
728 short int id;
729 short int ref;
730 } index_v1;
732 struct
734 short int id;
735 short int unk;
736 unsigned int ref;
737 } index_v2;
742 * This covers the basic datatypes that VC++ seems to be using these days.
743 * 32 bit mode only. There are additional numbers for the pointers in 16
744 * bit mode. There are many other types listed in the documents, but these
745 * are apparently not used by the compiler, or represent pointer types
746 * that are not used.
748 * Official MS documentation says that type (< 0x4000, so 12 bits) is made of:
749 * +----------+------+------+----------+------+
750 * | 11 | 10-8 | 7-4 | 3 | 2-0 |
751 * +----------+------+------+----------+------+
752 * | reserved | mode | type | reserved | size |
753 * +----------+------+------+----------+------+
754 * In recent PDB files, type 8 exists, and is seen as an HRESULT... So we've
755 * added this basic type... as if bit 3 had been integrated into the size field
758 /* the type number of a built-in type is a 16-bit value specified in the following format:
759 bit # | 11 | 10-8 | 7-4 | 3 | 2-0 |
760 field | reserved | mode | type | reserved | size |
762 where
763 <type> is one of the following types:
764 0x00 Special
765 0x01 Signed integral value
766 0x02 Unsigned integral value
767 0x03 Boolean
768 0x04 Real
769 0x05 Complex
770 0x06 Special2
771 0x07 Real int value
772 0x08 Reserved
773 0x09 Reserved
774 0x0a Reserved
775 0x0b Reserved
776 0x0c Reserved
777 0x0d Reserved
778 0x0e Reserved
779 0x0f Reserved for debugger expression evaluator
781 <size> is an enumerated value for each of the types.
782 Type = special
783 0x00 No type
784 0x01 Absolute symbol
785 0x02 Segment
786 0x03 Void
787 0x04 Basic 8-byte currency value
788 0x05 Near Basic string
789 0x06 Far Basic string
790 0x07 Untranslated type from previous Microsoft symbol formats
791 Type = signed/unsigned integral and Boolean values
792 0x00 1 byte
793 0x01 2 byte
794 0x02 4 byte
795 0x03 8 byte
796 0x04 Reserved
797 0x05 Reserved
798 0x06 Reserved
799 0x07 Reserved
800 Type = real and complex
801 0x00 32 bit
802 0x01 64 bit
803 0x02 80 bit
804 0x03 128 bit
805 0x04 48 bit
806 0x05 Reserved
807 0x06 Reserved
808 0x07 Reserved
809 Type = special2
810 0x00 Bit
811 0x01 Pascal CHAR
812 Type = Real int
813 0x00 Char
814 0x01 Wide character
815 0x02 2-byte signed integer
816 0x03 2-byte unsigned integer
817 0x04 4-byte signed integer
818 0x05 4-byte unsigned integer
819 0x06 8-byte signed integer
820 0x07 8-byte unsigned integer
822 <mode> is the pointer mode:
823 0x00 Direct; not a pointer
824 0x01 Near pointer
825 0x02 Far pointer
826 0x03 Huge pointer
827 0x04 32-bit near pointer
828 0x05 32-bit far pointer
829 0x06 64-bit near pointer
830 0x07 Reserved
833 /* basic types */
834 #define T_NOTYPE 0x0000 /* Notype */
835 #define T_ABS 0x0001 /* Abs */
836 #define T_SEGMENT 0x0002 /* segment type */
837 #define T_VOID 0x0003 /* Void */
838 #define T_CURRENCY 0x0004 /* basic 8-byte currency value */
839 #define T_NBASICSTR 0x0005 /* near basic string */
840 #define T_FBASICSTR 0x0006 /* far basic string */
841 #define T_NOTTRANS 0x0007 /* untranslated type record from MS symbol format */
842 #define T_HRESULT 0x0008 /* HRESULT - or error code ??? */
843 #define T_CHAR 0x0010 /* signed char */
844 #define T_SHORT 0x0011 /* short */
845 #define T_LONG 0x0012 /* long */
846 #define T_QUAD 0x0013 /* long long */
847 #define T_UCHAR 0x0020 /* unsigned char */
848 #define T_USHORT 0x0021 /* unsigned short */
849 #define T_ULONG 0x0022 /* unsigned long */
850 #define T_UQUAD 0x0023 /* unsigned long long */
851 #define T_BOOL08 0x0030 /* 8-bit boolean */
852 #define T_BOOL16 0x0031 /* 16-bit boolean */
853 #define T_BOOL32 0x0032 /* 32-bit boolean */
854 #define T_BOOL64 0x0033 /* 64-bit boolean */
855 #define T_REAL32 0x0040 /* float */
856 #define T_REAL64 0x0041 /* double */
857 #define T_REAL80 0x0042 /* 80-bit real */
858 #define T_REAL128 0x0043 /* 128-bit real */
859 #define T_REAL48 0x0044 /* 48-bit real */
860 #define T_CPLX32 0x0050 /* 32-bit complex number */
861 #define T_CPLX64 0x0051 /* 64-bit complex number */
862 #define T_CPLX80 0x0052 /* 80-bit complex number */
863 #define T_CPLX128 0x0053 /* 128-bit complex number */
864 #define T_BIT 0x0060 /* bit */
865 #define T_PASCHAR 0x0061 /* pascal CHAR */
866 #define T_RCHAR 0x0070 /* real char */
867 #define T_WCHAR 0x0071 /* wide char */
868 #define T_INT2 0x0072 /* real 16-bit signed int */
869 #define T_UINT2 0x0073 /* real 16-bit unsigned int */
870 #define T_INT4 0x0074 /* int */
871 #define T_UINT4 0x0075 /* unsigned int */
872 #define T_INT8 0x0076 /* 64-bit signed int */
873 #define T_UINT8 0x0077 /* 64-bit unsigned int */
874 #define T_CHAR16 0x007a /* 16-bit unicode char */
875 #define T_CHAR32 0x007b /* 32-bit unicode char */
877 /* near pointers to basic types */
878 #define T_PVOID 0x0103 /* near pointer to void */
879 #define T_PCHAR 0x0110 /* Near pointer to 8-bit signed */
880 #define T_PSHORT 0x0111 /* Near pointer to 16-bit signed */
881 #define T_PLONG 0x0112 /* Near pointer to 32-bit signed */
882 #define T_PQUAD 0x0113 /* Near pointer to 64-bit signed */
883 #define T_PUCHAR 0x0120 /* Near pointer to 8-bit unsigned */
884 #define T_PUSHORT 0x0121 /* Near pointer to 16-bit unsigned */
885 #define T_PULONG 0x0122 /* Near pointer to 32-bit unsigned */
886 #define T_PUQUAD 0x0123 /* Near pointer to 64-bit unsigned */
887 #define T_PBOOL08 0x0130 /* Near pointer to 8-bit Boolean */
888 #define T_PBOOL16 0x0131 /* Near pointer to 16-bit Boolean */
889 #define T_PBOOL32 0x0132 /* Near pointer to 32-bit Boolean */
890 #define T_PBOOL64 0x0133 /* Near pointer to 64-bit Boolean */
891 #define T_PREAL32 0x0140 /* Near pointer to 32-bit real */
892 #define T_PREAL64 0x0141 /* Near pointer to 64-bit real */
893 #define T_PREAL80 0x0142 /* Near pointer to 80-bit real */
894 #define T_PREAL128 0x0143 /* Near pointer to 128-bit real */
895 #define T_PREAL48 0x0144 /* Near pointer to 48-bit real */
896 #define T_PCPLX32 0x0150 /* Near pointer to 32-bit complex */
897 #define T_PCPLX64 0x0151 /* Near pointer to 64-bit complex */
898 #define T_PCPLX80 0x0152 /* Near pointer to 80-bit complex */
899 #define T_PCPLX128 0x0153 /* Near pointer to 128-bit complex */
900 #define T_PRCHAR 0x0170 /* Near pointer to a real char */
901 #define T_PWCHAR 0x0171 /* Near pointer to a wide char */
902 #define T_PINT2 0x0172 /* Near pointer to 16-bit signed int */
903 #define T_PUINT2 0x0173 /* Near pointer to 16-bit unsigned int */
904 #define T_PINT4 0x0174 /* Near pointer to 32-bit signed int */
905 #define T_PUINT4 0x0175 /* Near pointer to 32-bit unsigned int */
906 #define T_PINT8 0x0176 /* Near pointer to 64-bit signed int */
907 #define T_PUINT8 0x0177 /* Near pointer to 64-bit unsigned int */
908 #define T_PCHAR16 0x017a /* Near pointer to 16-bit unicode char */
909 #define T_PCHAR32 0x017b /* Near pointer to 32-bit unicode char */
911 /* far pointers to basic types */
912 #define T_PFVOID 0x0203 /* Far pointer to void */
913 #define T_PFCHAR 0x0210 /* Far pointer to 8-bit signed */
914 #define T_PFSHORT 0x0211 /* Far pointer to 16-bit signed */
915 #define T_PFLONG 0x0212 /* Far pointer to 32-bit signed */
916 #define T_PFQUAD 0x0213 /* Far pointer to 64-bit signed */
917 #define T_PFUCHAR 0x0220 /* Far pointer to 8-bit unsigned */
918 #define T_PFUSHORT 0x0221 /* Far pointer to 16-bit unsigned */
919 #define T_PFULONG 0x0222 /* Far pointer to 32-bit unsigned */
920 #define T_PFUQUAD 0x0223 /* Far pointer to 64-bit unsigned */
921 #define T_PFBOOL08 0x0230 /* Far pointer to 8-bit Boolean */
922 #define T_PFBOOL16 0x0231 /* Far pointer to 16-bit Boolean */
923 #define T_PFBOOL32 0x0232 /* Far pointer to 32-bit Boolean */
924 #define T_PFBOOL64 0x0233 /* Far pointer to 64-bit Boolean */
925 #define T_PFREAL32 0x0240 /* Far pointer to 32-bit real */
926 #define T_PFREAL64 0x0241 /* Far pointer to 64-bit real */
927 #define T_PFREAL80 0x0242 /* Far pointer to 80-bit real */
928 #define T_PFREAL128 0x0243 /* Far pointer to 128-bit real */
929 #define T_PFREAL48 0x0244 /* Far pointer to 48-bit real */
930 #define T_PFCPLX32 0x0250 /* Far pointer to 32-bit complex */
931 #define T_PFCPLX64 0x0251 /* Far pointer to 64-bit complex */
932 #define T_PFCPLX80 0x0252 /* Far pointer to 80-bit complex */
933 #define T_PFCPLX128 0x0253 /* Far pointer to 128-bit complex */
934 #define T_PFRCHAR 0x0270 /* Far pointer to a real char */
935 #define T_PFWCHAR 0x0271 /* Far pointer to a wide char */
936 #define T_PFINT2 0x0272 /* Far pointer to 16-bit signed int */
937 #define T_PFUINT2 0x0273 /* Far pointer to 16-bit unsigned int */
938 #define T_PFINT4 0x0274 /* Far pointer to 32-bit signed int */
939 #define T_PFUINT4 0x0275 /* Far pointer to 32-bit unsigned int */
940 #define T_PFINT8 0x0276 /* Far pointer to 64-bit signed int */
941 #define T_PFUINT8 0x0277 /* Far pointer to 64-bit unsigned int */
942 #define T_PFCHAR16 0x027a /* Far pointer to 16-bit unicode char */
943 #define T_PFCHAR32 0x027b /* Far pointer to 32-bit unicode char */
945 /* huge pointers to basic types */
946 #define T_PHVOID 0x0303 /* Huge pointer to void */
947 #define T_PHCHAR 0x0310 /* Huge pointer to 8-bit signed */
948 #define T_PHSHORT 0x0311 /* Huge pointer to 16-bit signed */
949 #define T_PHLONG 0x0312 /* Huge pointer to 32-bit signed */
950 #define T_PHQUAD 0x0313 /* Huge pointer to 64-bit signed */
951 #define T_PHUCHAR 0x0320 /* Huge pointer to 8-bit unsigned */
952 #define T_PHUSHORT 0x0321 /* Huge pointer to 16-bit unsigned */
953 #define T_PHULONG 0x0322 /* Huge pointer to 32-bit unsigned */
954 #define T_PHUQUAD 0x0323 /* Huge pointer to 64-bit unsigned */
955 #define T_PHBOOL08 0x0330 /* Huge pointer to 8-bit Boolean */
956 #define T_PHBOOL16 0x0331 /* Huge pointer to 16-bit Boolean */
957 #define T_PHBOOL32 0x0332 /* Huge pointer to 32-bit Boolean */
958 #define T_PHBOOL64 0x0333 /* Huge pointer to 64-bit Boolean */
959 #define T_PHREAL32 0x0340 /* Huge pointer to 32-bit real */
960 #define T_PHREAL64 0x0341 /* Huge pointer to 64-bit real */
961 #define T_PHREAL80 0x0342 /* Huge pointer to 80-bit real */
962 #define T_PHREAL128 0x0343 /* Huge pointer to 128-bit real */
963 #define T_PHREAL48 0x0344 /* Huge pointer to 48-bit real */
964 #define T_PHCPLX32 0x0350 /* Huge pointer to 32-bit complex */
965 #define T_PHCPLX64 0x0351 /* Huge pointer to 64-bit complex */
966 #define T_PHCPLX80 0x0352 /* Huge pointer to 80-bit complex */
967 #define T_PHCPLX128 0x0353 /* Huge pointer to 128-bit real */
968 #define T_PHRCHAR 0x0370 /* Huge pointer to a real char */
969 #define T_PHWCHAR 0x0371 /* Huge pointer to a wide char */
970 #define T_PHINT2 0x0372 /* Huge pointer to 16-bit signed int */
971 #define T_PHUINT2 0x0373 /* Huge pointer to 16-bit unsigned int */
972 #define T_PHINT4 0x0374 /* Huge pointer to 32-bit signed int */
973 #define T_PHUINT4 0x0375 /* Huge pointer to 32-bit unsigned int */
974 #define T_PHINT8 0x0376 /* Huge pointer to 64-bit signed int */
975 #define T_PHUINT8 0x0377 /* Huge pointer to 64-bit unsigned int */
976 #define T_PHCHAR16 0x037a /* Huge pointer to 16-bit unicode char */
977 #define T_PHCHAR32 0x037b /* Huge pointer to 32-bit unicode char */
979 /* 32-bit near pointers to basic types */
980 #define T_32PVOID 0x0403 /* 32-bit near pointer to void */
981 #define T_32PHRESULT 0x0408 /* 16:32 near pointer to HRESULT - or error code ??? */
982 #define T_32PCHAR 0x0410 /* 16:32 near pointer to 8-bit signed */
983 #define T_32PSHORT 0x0411 /* 16:32 near pointer to 16-bit signed */
984 #define T_32PLONG 0x0412 /* 16:32 near pointer to 32-bit signed */
985 #define T_32PQUAD 0x0413 /* 16:32 near pointer to 64-bit signed */
986 #define T_32PUCHAR 0x0420 /* 16:32 near pointer to 8-bit unsigned */
987 #define T_32PUSHORT 0x0421 /* 16:32 near pointer to 16-bit unsigned */
988 #define T_32PULONG 0x0422 /* 16:32 near pointer to 32-bit unsigned */
989 #define T_32PUQUAD 0x0423 /* 16:32 near pointer to 64-bit unsigned */
990 #define T_32PBOOL08 0x0430 /* 16:32 near pointer to 8-bit Boolean */
991 #define T_32PBOOL16 0x0431 /* 16:32 near pointer to 16-bit Boolean */
992 #define T_32PBOOL32 0x0432 /* 16:32 near pointer to 32-bit Boolean */
993 #define T_32PBOOL64 0x0433 /* 16:32 near pointer to 64-bit Boolean */
994 #define T_32PREAL32 0x0440 /* 16:32 near pointer to 32-bit real */
995 #define T_32PREAL64 0x0441 /* 16:32 near pointer to 64-bit real */
996 #define T_32PREAL80 0x0442 /* 16:32 near pointer to 80-bit real */
997 #define T_32PREAL128 0x0443 /* 16:32 near pointer to 128-bit real */
998 #define T_32PREAL48 0x0444 /* 16:32 near pointer to 48-bit real */
999 #define T_32PCPLX32 0x0450 /* 16:32 near pointer to 32-bit complex */
1000 #define T_32PCPLX64 0x0451 /* 16:32 near pointer to 64-bit complex */
1001 #define T_32PCPLX80 0x0452 /* 16:32 near pointer to 80-bit complex */
1002 #define T_32PCPLX128 0x0453 /* 16:32 near pointer to 128-bit complex */
1003 #define T_32PRCHAR 0x0470 /* 16:32 near pointer to a real char */
1004 #define T_32PWCHAR 0x0471 /* 16:32 near pointer to a wide char */
1005 #define T_32PINT2 0x0472 /* 16:32 near pointer to 16-bit signed int */
1006 #define T_32PUINT2 0x0473 /* 16:32 near pointer to 16-bit unsigned int */
1007 #define T_32PINT4 0x0474 /* 16:32 near pointer to 32-bit signed int */
1008 #define T_32PUINT4 0x0475 /* 16:32 near pointer to 32-bit unsigned int */
1009 #define T_32PINT8 0x0476 /* 16:32 near pointer to 64-bit signed int */
1010 #define T_32PUINT8 0x0477 /* 16:32 near pointer to 64-bit unsigned int */
1011 #define T_32PCHAR16 0x047a /* 16:32 near pointer to 16-bit unicode char */
1012 #define T_32PCHAR32 0x047b /* 16:32 near pointer to 32-bit unicode char */
1014 /* 32-bit far pointers to basic types */
1015 #define T_32PFVOID 0x0503 /* 32-bit far pointer to void */
1016 #define T_32PFHRESULT 0x0508 /* 16:32 far pointer to HRESULT - or error code ??? */
1017 #define T_32PFCHAR 0x0510 /* 16:32 far pointer to 8-bit signed */
1018 #define T_32PFSHORT 0x0511 /* 16:32 far pointer to 16-bit signed */
1019 #define T_32PFLONG 0x0512 /* 16:32 far pointer to 32-bit signed */
1020 #define T_32PFQUAD 0x0513 /* 16:32 far pointer to 64-bit signed */
1021 #define T_32PFUCHAR 0x0520 /* 16:32 far pointer to 8-bit unsigned */
1022 #define T_32PFUSHORT 0x0521 /* 16:32 far pointer to 16-bit unsigned */
1023 #define T_32PFULONG 0x0522 /* 16:32 far pointer to 32-bit unsigned */
1024 #define T_32PFUQUAD 0x0523 /* 16:32 far pointer to 64-bit unsigned */
1025 #define T_32PFBOOL08 0x0530 /* 16:32 far pointer to 8-bit Boolean */
1026 #define T_32PFBOOL16 0x0531 /* 16:32 far pointer to 16-bit Boolean */
1027 #define T_32PFBOOL32 0x0532 /* 16:32 far pointer to 32-bit Boolean */
1028 #define T_32PFBOOL64 0x0533 /* 16:32 far pointer to 64-bit Boolean */
1029 #define T_32PFREAL32 0x0540 /* 16:32 far pointer to 32-bit real */
1030 #define T_32PFREAL64 0x0541 /* 16:32 far pointer to 64-bit real */
1031 #define T_32PFREAL80 0x0542 /* 16:32 far pointer to 80-bit real */
1032 #define T_32PFREAL128 0x0543 /* 16:32 far pointer to 128-bit real */
1033 #define T_32PFREAL48 0x0544 /* 16:32 far pointer to 48-bit real */
1034 #define T_32PFCPLX32 0x0550 /* 16:32 far pointer to 32-bit complex */
1035 #define T_32PFCPLX64 0x0551 /* 16:32 far pointer to 64-bit complex */
1036 #define T_32PFCPLX80 0x0552 /* 16:32 far pointer to 80-bit complex */
1037 #define T_32PFCPLX128 0x0553 /* 16:32 far pointer to 128-bit complex */
1038 #define T_32PFRCHAR 0x0570 /* 16:32 far pointer to a real char */
1039 #define T_32PFWCHAR 0x0571 /* 16:32 far pointer to a wide char */
1040 #define T_32PFINT2 0x0572 /* 16:32 far pointer to 16-bit signed int */
1041 #define T_32PFUINT2 0x0573 /* 16:32 far pointer to 16-bit unsigned int */
1042 #define T_32PFINT4 0x0574 /* 16:32 far pointer to 32-bit signed int */
1043 #define T_32PFUINT4 0x0575 /* 16:32 far pointer to 32-bit unsigned int */
1044 #define T_32PFINT8 0x0576 /* 16:32 far pointer to 64-bit signed int */
1045 #define T_32PFUINT8 0x0577 /* 16:32 far pointer to 64-bit unsigned int */
1046 #define T_32PFCHAR16 0x057a /* 16:32 far pointer to 16-bit unicode char */
1047 #define T_32PFCHAR32 0x057b /* 16:32 far pointer to 32-bit unicode char */
1049 /* 64-bit near pointers to basic types */
1050 #define T_64PVOID 0x0603 /* 64-bit near pointer to void */
1051 #define T_64PHRESULT 0x0608 /* 64 near pointer to HRESULT - or error code ??? */
1052 #define T_64PCHAR 0x0610 /* 64 near pointer to 8-bit signed */
1053 #define T_64PSHORT 0x0611 /* 64 near pointer to 16-bit signed */
1054 #define T_64PLONG 0x0612 /* 64 near pointer to 32-bit signed */
1055 #define T_64PQUAD 0x0613 /* 64 near pointer to 64-bit signed */
1056 #define T_64PUCHAR 0x0620 /* 64 near pointer to 8-bit unsigned */
1057 #define T_64PUSHORT 0x0621 /* 64 near pointer to 16-bit unsigned */
1058 #define T_64PULONG 0x0622 /* 64 near pointer to 32-bit unsigned */
1059 #define T_64PUQUAD 0x0623 /* 64 near pointer to 64-bit unsigned */
1060 #define T_64PBOOL08 0x0630 /* 64 near pointer to 8-bit Boolean */
1061 #define T_64PBOOL16 0x0631 /* 64 near pointer to 16-bit Boolean */
1062 #define T_64PBOOL32 0x0632 /* 64 near pointer to 32-bit Boolean */
1063 #define T_64PBOOL64 0x0633 /* 64 near pointer to 64-bit Boolean */
1064 #define T_64PREAL32 0x0640 /* 64 near pointer to 32-bit real */
1065 #define T_64PREAL64 0x0641 /* 64 near pointer to 64-bit real */
1066 #define T_64PREAL80 0x0642 /* 64 near pointer to 80-bit real */
1067 #define T_64PREAL128 0x0643 /* 64 near pointer to 128-bit real */
1068 #define T_64PREAL48 0x0644 /* 64 near pointer to 48-bit real */
1069 #define T_64PCPLX32 0x0650 /* 64 near pointer to 32-bit complex */
1070 #define T_64PCPLX64 0x0651 /* 64 near pointer to 64-bit complex */
1071 #define T_64PCPLX80 0x0652 /* 64 near pointer to 80-bit complex */
1072 #define T_64PCPLX128 0x0653 /* 64 near pointer to 128-bit complex */
1073 #define T_64PRCHAR 0x0670 /* 64 near pointer to a real char */
1074 #define T_64PWCHAR 0x0671 /* 64 near pointer to a wide char */
1075 #define T_64PINT2 0x0672 /* 64 near pointer to 16-bit signed int */
1076 #define T_64PUINT2 0x0673 /* 64 near pointer to 16-bit unsigned int */
1077 #define T_64PINT4 0x0674 /* 64 near pointer to 32-bit signed int */
1078 #define T_64PUINT4 0x0675 /* 64 near pointer to 32-bit unsigned int */
1079 #define T_64PINT8 0x0676 /* 64 near pointer to 64-bit signed int */
1080 #define T_64PUINT8 0x0677 /* 64 near pointer to 64-bit unsigned int */
1081 #define T_64PCHAR16 0x067a /* 64 near pointer to 16-bit unicode char */
1082 #define T_64PCHAR32 0x067b /* 64 near pointer to 32-bit unicode char */
1084 /* counts, bit masks, and shift values needed to access various parts of the built-in type numbers */
1085 #define T_MAXPREDEFINEDTYPE 0x0580 /* maximum type index for all built-in types */
1086 #define T_MAXBASICTYPE 0x0080 /* maximum type index all non-pointer built-in types */
1087 #define T_BASICTYPE_MASK 0x00ff /* mask of bits that can potentially identify a non-pointer basic type */
1088 #define T_BASICTYPE_SHIFT 8 /* shift count to push out the basic type bits from a type number */
1089 #define T_MODE_MASK 0x0700 /* type mode mask (ptr/non-ptr) */
1090 #define T_SIZE_MASK 0x0007 /* type size mask (depends on 'type' value) */
1091 #define T_TYPE_MASK 0x00f0 /* type type mask (data treatment mode) */
1093 /* bit patterns for the <mode> portion of a built-in type number */
1094 #define T_NEARPTR_BITS 0x0100
1095 #define T_FARPTR_BITS 0x0200
1096 #define T_HUGEPTR_BITS 0x0300
1097 #define T_NEAR32PTR_BITS 0x0400
1098 #define T_FAR32PTR_BITS 0x0500
1099 #define T_NEAR64PTR_BITS 0x0600
1101 #define LF_MODIFIER_V1 0x0001
1102 #define LF_POINTER_V1 0x0002
1103 #define LF_ARRAY_V1 0x0003
1104 #define LF_CLASS_V1 0x0004
1105 #define LF_STRUCTURE_V1 0x0005
1106 #define LF_UNION_V1 0x0006
1107 #define LF_ENUM_V1 0x0007
1108 #define LF_PROCEDURE_V1 0x0008
1109 #define LF_MFUNCTION_V1 0x0009
1110 #define LF_VTSHAPE_V1 0x000a
1111 #define LF_COBOL0_V1 0x000b
1112 #define LF_COBOL1_V1 0x000c
1113 #define LF_BARRAY_V1 0x000d
1114 #define LF_LABEL_V1 0x000e
1115 #define LF_NULL_V1 0x000f
1116 #define LF_NOTTRAN_V1 0x0010
1117 #define LF_DIMARRAY_V1 0x0011
1118 #define LF_VFTPATH_V1 0x0012
1119 #define LF_PRECOMP_V1 0x0013
1120 #define LF_ENDPRECOMP_V1 0x0014
1121 #define LF_OEM_V1 0x0015
1122 #define LF_TYPESERVER_V1 0x0016
1124 #define LF_MODIFIER_V2 0x1001 /* variants with new 32-bit type indices (V2) */
1125 #define LF_POINTER_V2 0x1002
1126 #define LF_ARRAY_V2 0x1003
1127 #define LF_CLASS_V2 0x1004
1128 #define LF_STRUCTURE_V2 0x1005
1129 #define LF_UNION_V2 0x1006
1130 #define LF_ENUM_V2 0x1007
1131 #define LF_PROCEDURE_V2 0x1008
1132 #define LF_MFUNCTION_V2 0x1009
1133 #define LF_COBOL0_V2 0x100a
1134 #define LF_BARRAY_V2 0x100b
1135 #define LF_DIMARRAY_V2 0x100c
1136 #define LF_VFTPATH_V2 0x100d
1137 #define LF_PRECOMP_V2 0x100e
1138 #define LF_OEM_V2 0x100f
1140 #define LF_SKIP_V1 0x0200
1141 #define LF_ARGLIST_V1 0x0201
1142 #define LF_DEFARG_V1 0x0202
1143 #define LF_LIST_V1 0x0203
1144 #define LF_FIELDLIST_V1 0x0204
1145 #define LF_DERIVED_V1 0x0205
1146 #define LF_BITFIELD_V1 0x0206
1147 #define LF_METHODLIST_V1 0x0207
1148 #define LF_DIMCONU_V1 0x0208
1149 #define LF_DIMCONLU_V1 0x0209
1150 #define LF_DIMVARU_V1 0x020a
1151 #define LF_DIMVARLU_V1 0x020b
1152 #define LF_REFSYM_V1 0x020c
1154 #define LF_SKIP_V2 0x1200 /* variants with new 32-bit type indices (V2) */
1155 #define LF_ARGLIST_V2 0x1201
1156 #define LF_DEFARG_V2 0x1202
1157 #define LF_FIELDLIST_V2 0x1203
1158 #define LF_DERIVED_V2 0x1204
1159 #define LF_BITFIELD_V2 0x1205
1160 #define LF_METHODLIST_V2 0x1206
1161 #define LF_DIMCONU_V2 0x1207
1162 #define LF_DIMCONLU_V2 0x1208
1163 #define LF_DIMVARU_V2 0x1209
1164 #define LF_DIMVARLU_V2 0x120a
1166 /* Field lists */
1167 #define LF_BCLASS_V1 0x0400
1168 #define LF_VBCLASS_V1 0x0401
1169 #define LF_IVBCLASS_V1 0x0402
1170 #define LF_ENUMERATE_V1 0x0403
1171 #define LF_FRIENDFCN_V1 0x0404
1172 #define LF_INDEX_V1 0x0405
1173 #define LF_MEMBER_V1 0x0406
1174 #define LF_STMEMBER_V1 0x0407
1175 #define LF_METHOD_V1 0x0408
1176 #define LF_NESTTYPE_V1 0x0409
1177 #define LF_VFUNCTAB_V1 0x040a
1178 #define LF_FRIENDCLS_V1 0x040b
1179 #define LF_ONEMETHOD_V1 0x040c
1180 #define LF_VFUNCOFF_V1 0x040d
1181 #define LF_NESTTYPEEX_V1 0x040e
1182 #define LF_MEMBERMODIFY_V1 0x040f
1184 #define LF_BCLASS_V2 0x1400 /* variants with new 32-bit type indices (V2) */
1185 #define LF_VBCLASS_V2 0x1401
1186 #define LF_IVBCLASS_V2 0x1402
1187 #define LF_FRIENDFCN_V2 0x1403
1188 #define LF_INDEX_V2 0x1404
1189 #define LF_MEMBER_V2 0x1405
1190 #define LF_STMEMBER_V2 0x1406
1191 #define LF_METHOD_V2 0x1407
1192 #define LF_NESTTYPE_V2 0x1408
1193 #define LF_VFUNCTAB_V2 0x1409
1194 #define LF_FRIENDCLS_V2 0x140a
1195 #define LF_ONEMETHOD_V2 0x140b
1196 #define LF_VFUNCOFF_V2 0x140c
1197 #define LF_NESTTYPEEX_V2 0x140d
1199 #define LF_ENUMERATE_V3 0x1502
1200 #define LF_ARRAY_V3 0x1503
1201 #define LF_CLASS_V3 0x1504
1202 #define LF_STRUCTURE_V3 0x1505
1203 #define LF_UNION_V3 0x1506
1204 #define LF_ENUM_V3 0x1507
1205 #define LF_MEMBER_V3 0x150d
1206 #define LF_STMEMBER_V3 0x150e
1207 #define LF_METHOD_V3 0x150f
1208 #define LF_NESTTYPE_V3 0x1510
1209 #define LF_ONEMETHOD_V3 0x1511
1211 #define LF_NUMERIC 0x8000 /* numeric leaf types */
1212 #define LF_CHAR 0x8000
1213 #define LF_SHORT 0x8001
1214 #define LF_USHORT 0x8002
1215 #define LF_LONG 0x8003
1216 #define LF_ULONG 0x8004
1217 #define LF_REAL32 0x8005
1218 #define LF_REAL64 0x8006
1219 #define LF_REAL80 0x8007
1220 #define LF_REAL128 0x8008
1221 #define LF_QUADWORD 0x8009
1222 #define LF_UQUADWORD 0x800a
1223 #define LF_REAL48 0x800b
1224 #define LF_COMPLEX32 0x800c
1225 #define LF_COMPLEX64 0x800d
1226 #define LF_COMPLEX80 0x800e
1227 #define LF_COMPLEX128 0x800f
1228 #define LF_VARSTRING 0x8010
1230 /* ======================================== *
1231 * Symbol information
1232 * ======================================== */
1234 union codeview_symbol
1236 struct
1238 short int len;
1239 short int id;
1240 } generic;
1242 struct
1244 short int len;
1245 short int id;
1246 unsigned int offset;
1247 unsigned short segment;
1248 unsigned short symtype;
1249 struct p_string p_name;
1250 } data_v1;
1252 struct
1254 short int len;
1255 short int id;
1256 unsigned int symtype;
1257 unsigned int offset;
1258 unsigned short segment;
1259 struct p_string p_name;
1260 } data_v2;
1262 struct
1264 short int len;
1265 short int id;
1266 unsigned int symtype;
1267 unsigned int offset;
1268 unsigned short segment;
1269 char name[1];
1270 } data_v3;
1272 struct
1274 short int len;
1275 short int id;
1276 unsigned int pparent;
1277 unsigned int pend;
1278 unsigned int next;
1279 unsigned int offset;
1280 unsigned short segment;
1281 unsigned short thunk_len;
1282 unsigned char thtype;
1283 struct p_string p_name;
1284 } thunk_v1;
1286 struct
1288 short int len;
1289 short int id;
1290 unsigned int pparent;
1291 unsigned int pend;
1292 unsigned int next;
1293 unsigned int offset;
1294 unsigned short segment;
1295 unsigned short thunk_len;
1296 unsigned char thtype;
1297 char name[1];
1298 } thunk_v3;
1300 struct
1302 short int len;
1303 short int id;
1304 unsigned int pparent;
1305 unsigned int pend;
1306 unsigned int next;
1307 unsigned int proc_len;
1308 unsigned int debug_start;
1309 unsigned int debug_end;
1310 unsigned int offset;
1311 unsigned short segment;
1312 unsigned short proctype;
1313 unsigned char flags;
1314 struct p_string p_name;
1315 } proc_v1;
1317 struct
1319 short int len;
1320 short int id;
1321 unsigned int pparent;
1322 unsigned int pend;
1323 unsigned int next;
1324 unsigned int proc_len;
1325 unsigned int debug_start;
1326 unsigned int debug_end;
1327 unsigned int proctype;
1328 unsigned int offset;
1329 unsigned short segment;
1330 unsigned char flags;
1331 struct p_string p_name;
1332 } proc_v2;
1334 struct
1336 short int len;
1337 short int id;
1338 unsigned int pparent;
1339 unsigned int pend;
1340 unsigned int next;
1341 unsigned int proc_len;
1342 unsigned int debug_start;
1343 unsigned int debug_end;
1344 unsigned int proctype;
1345 unsigned int offset;
1346 unsigned short segment;
1347 unsigned char flags;
1348 char name[1];
1349 } proc_v3;
1351 struct
1353 short int len;
1354 short int id;
1355 unsigned int symtype;
1356 unsigned int offset;
1357 unsigned short segment;
1358 struct p_string p_name;
1359 } public_v2;
1361 struct
1363 short int len;
1364 short int id;
1365 unsigned int symtype;
1366 unsigned int offset;
1367 unsigned short segment;
1368 char name[1];
1369 } public_v3;
1371 struct
1373 short int len; /* Total length of this entry */
1374 short int id; /* Always S_BPREL_V1 */
1375 unsigned int offset; /* Stack offset relative to BP */
1376 unsigned short symtype;
1377 struct p_string p_name;
1378 } stack_v1;
1380 struct
1382 short int len; /* Total length of this entry */
1383 short int id; /* Always S_BPREL_V2 */
1384 unsigned int offset; /* Stack offset relative to EBP */
1385 unsigned int symtype;
1386 struct p_string p_name;
1387 } stack_v2;
1389 struct
1391 short int len; /* Total length of this entry */
1392 short int id; /* Always S_BPREL_V3 */
1393 int offset; /* Stack offset relative to BP */
1394 unsigned int symtype;
1395 char name[1];
1396 } stack_v3;
1398 struct
1400 short int len; /* Total length of this entry */
1401 short int id; /* Always S_BPREL_V3 */
1402 int offset; /* Stack offset relative to BP */
1403 unsigned int symtype;
1404 unsigned short reg;
1405 char name[1];
1406 } regrel_v3;
1408 struct
1410 short int len; /* Total length of this entry */
1411 short int id; /* Always S_REGISTER */
1412 unsigned short type;
1413 unsigned short reg;
1414 struct p_string p_name;
1415 /* don't handle register tracking */
1416 } register_v1;
1418 struct
1420 short int len; /* Total length of this entry */
1421 short int id; /* Always S_REGISTER_V2 */
1422 unsigned int type; /* check whether type & reg are correct */
1423 unsigned short reg;
1424 struct p_string p_name;
1425 /* don't handle register tracking */
1426 } register_v2;
1428 struct
1430 short int len; /* Total length of this entry */
1431 short int id; /* Always S_REGISTER_V3 */
1432 unsigned int type; /* check whether type & reg are correct */
1433 unsigned short reg;
1434 char name[1];
1435 /* don't handle register tracking */
1436 } register_v3;
1438 struct
1440 short int len;
1441 short int id;
1442 unsigned int parent;
1443 unsigned int end;
1444 unsigned int length;
1445 unsigned int offset;
1446 unsigned short segment;
1447 struct p_string p_name;
1448 } block_v1;
1450 struct
1452 short int len;
1453 short int id;
1454 unsigned int parent;
1455 unsigned int end;
1456 unsigned int length;
1457 unsigned int offset;
1458 unsigned short segment;
1459 char name[1];
1460 } block_v3;
1462 struct
1464 short int len;
1465 short int id;
1466 unsigned int offset;
1467 unsigned short segment;
1468 unsigned char flags;
1469 struct p_string p_name;
1470 } label_v1;
1472 struct
1474 short int len;
1475 short int id;
1476 unsigned int offset;
1477 unsigned short segment;
1478 unsigned char flags;
1479 char name[1];
1480 } label_v3;
1482 struct
1484 short int len;
1485 short int id;
1486 unsigned short type;
1487 unsigned short cvalue; /* numeric leaf */
1488 #if 0
1489 struct p_string p_name;
1490 #endif
1491 } constant_v1;
1493 struct
1495 short int len;
1496 short int id;
1497 unsigned type;
1498 unsigned short cvalue; /* numeric leaf */
1499 #if 0
1500 struct p_string p_name;
1501 #endif
1502 } constant_v2;
1504 struct
1506 short int len;
1507 short int id;
1508 unsigned type;
1509 unsigned short cvalue;
1510 #if 0
1511 char name[1];
1512 #endif
1513 } constant_v3;
1515 struct
1517 short int len;
1518 short int id;
1519 unsigned short type;
1520 struct p_string p_name;
1521 } udt_v1;
1523 struct
1525 short int len;
1526 short int id;
1527 unsigned type;
1528 struct p_string p_name;
1529 } udt_v2;
1531 struct
1533 short int len;
1534 short int id;
1535 unsigned int type;
1536 char name[1];
1537 } udt_v3;
1539 struct
1541 short int len;
1542 short int id;
1543 char signature[4];
1544 struct p_string p_name;
1545 } objname_v1;
1547 struct
1549 short int len;
1550 short int id;
1551 unsigned int unknown;
1552 struct p_string p_name;
1553 } compiland_v1;
1555 struct
1557 short int len;
1558 short int id;
1559 unsigned unknown1[4];
1560 unsigned short unknown2;
1561 struct p_string p_name;
1562 } compiland_v2;
1564 struct
1566 short int len;
1567 short int id;
1568 unsigned int unknown;
1569 char name[1];
1570 } compiland_v3;
1572 struct
1574 short int len;
1575 short int id;
1576 unsigned int offset;
1577 unsigned short segment;
1578 unsigned short symtype;
1579 struct p_string p_name;
1580 } thread_v1;
1582 struct
1584 short int len;
1585 short int id;
1586 unsigned int symtype;
1587 unsigned int offset;
1588 unsigned short segment;
1589 struct p_string p_name;
1590 } thread_v2;
1592 struct
1594 short int len;
1595 short int id;
1596 unsigned int symtype;
1597 unsigned int offset;
1598 unsigned short segment;
1599 char name[1];
1600 } thread_v3;
1602 struct
1604 short int len;
1605 short int id;
1606 unsigned int offset;
1607 unsigned short segment;
1608 } ssearch_v1;
1610 struct
1612 short int len;
1613 short int id;
1614 unsigned int offset;
1615 unsigned int unknown;
1616 } security_cookie_v3;
1618 struct
1620 short int len;
1621 short int id;
1622 unsigned int sz_frame; /* size of frame */
1623 unsigned int unknown2;
1624 unsigned int unknown3;
1625 unsigned int sz_saved_regs; /* size of saved registers from callee */
1626 unsigned int eh_offset; /* offset for exception handler */
1627 unsigned short eh_sect; /* section for exception handler */
1628 unsigned int flags;
1629 } frame_info_v2;
1632 #define S_COMPILAND_V1 0x0001
1633 #define S_REGISTER_V1 0x0002
1634 #define S_CONSTANT_V1 0x0003
1635 #define S_UDT_V1 0x0004
1636 #define S_SSEARCH_V1 0x0005
1637 #define S_END_V1 0x0006
1638 #define S_SKIP_V1 0x0007
1639 #define S_CVRESERVE_V1 0x0008
1640 #define S_OBJNAME_V1 0x0009
1641 #define S_ENDARG_V1 0x000a
1642 #define S_COBOLUDT_V1 0x000b
1643 #define S_MANYREG_V1 0x000c
1644 #define S_RETURN_V1 0x000d
1645 #define S_ENTRYTHIS_V1 0x000e
1647 #define S_BPREL_V1 0x0200
1648 #define S_LDATA_V1 0x0201
1649 #define S_GDATA_V1 0x0202
1650 #define S_PUB_V1 0x0203
1651 #define S_LPROC_V1 0x0204
1652 #define S_GPROC_V1 0x0205
1653 #define S_THUNK_V1 0x0206
1654 #define S_BLOCK_V1 0x0207
1655 #define S_WITH_V1 0x0208
1656 #define S_LABEL_V1 0x0209
1657 #define S_CEXMODEL_V1 0x020a
1658 #define S_VFTPATH_V1 0x020b
1659 #define S_REGREL_V1 0x020c
1660 #define S_LTHREAD_V1 0x020d
1661 #define S_GTHREAD_V1 0x020e
1663 #define S_PROCREF_V1 0x0400
1664 #define S_DATAREF_V1 0x0401
1665 #define S_ALIGN_V1 0x0402
1666 #define S_LPROCREF_V1 0x0403
1668 #define S_REGISTER_V2 0x1001 /* Variants with new 32-bit type indices */
1669 #define S_CONSTANT_V2 0x1002
1670 #define S_UDT_V2 0x1003
1671 #define S_COBOLUDT_V2 0x1004
1672 #define S_MANYREG_V2 0x1005
1673 #define S_BPREL_V2 0x1006
1674 #define S_LDATA_V2 0x1007
1675 #define S_GDATA_V2 0x1008
1676 #define S_PUB_V2 0x1009
1677 #define S_LPROC_V2 0x100a
1678 #define S_GPROC_V2 0x100b
1679 #define S_VFTTABLE_V2 0x100c
1680 #define S_REGREL_V2 0x100d
1681 #define S_LTHREAD_V2 0x100e
1682 #define S_GTHREAD_V2 0x100f
1683 #define S_FRAMEINFO_V2 0x1012
1684 #define S_COMPILAND_V2 0x1013
1686 #define S_COMPILAND_V3 0x1101
1687 #define S_THUNK_V3 0x1102
1688 #define S_BLOCK_V3 0x1103
1689 #define S_WITH_V3 0x1104
1690 #define S_LABEL_V3 0x1105
1691 #define S_REGISTER_V3 0x1106
1692 #define S_CONSTANT_V3 0x1107
1693 #define S_UDT_V3 0x1108
1694 #define S_COBOLUDT_V3 0x1109
1695 #define S_MANYREG_V3 0x110A
1696 #define S_BPREL_V3 0x110B
1697 #define S_LDATA_V3 0x110C
1698 #define S_GDATA_V3 0x110D
1699 #define S_PUB_V3 0x110E
1700 #define S_LPROC_V3 0x110F
1701 #define S_GPROC_V3 0x1110
1702 #define S_REGREL_V3 0x1111
1703 #define S_LTHREAD_V3 0x1112
1704 #define S_GTHREAD_V3 0x1113
1705 #define S_LPROCMIPS 0x1114
1706 #define S_GPROCMIPS 0x1115
1707 #define S_MSTOOL_V3 0x1116 /* compiler command line options and build information */
1708 #define S_MANYREG2 0x1117
1709 #define S_LPROCIA64 0x1118
1710 #define S_GPROCIA64 0x1119
1711 #define S_LOCALSLOT 0x111A
1712 #define S_PARAMSLOT 0x111B
1713 #define S_LMANDATA 0x111C
1714 #define S_GMANDATA 0x111D
1715 #define S_MANFRAMEREL 0x111E
1716 #define S_MANREGISTER 0x111F
1717 #define S_MANSLOT 0x1120
1718 #define S_MANMANYREG 0x1121
1719 #define S_MANREGREL 0x1122
1720 #define S_MANMANYREG2 0x1123
1721 #define S_UNAMESPACE 0x1124
1722 #define S_PUB_FUNC1_V3 0x1125 /* didn't get the difference between the two */
1723 #define S_DATAREF_V3 0x1126
1724 #define S_PUB_FUNC2_V3 0x1127
1725 #define S_ANNOTATIONREF 0x1128
1726 #define S_TOKENREF 0x1129
1727 #define S_GMANPROC 0x112A
1728 #define S_LMANPROC 0x112B
1729 #define S_TRAMPOLINE 0x112C
1730 #define S_MANCONSTANT 0x112D
1731 #define S_ATTR_FRAMEREL 0x112E
1732 #define S_ATTR_REGISTER 0x112F
1733 #define S_ATTR_REGREL 0x1130
1734 #define S_ATTR_MANYREG 0x1131
1735 #define S_SEPCODE 0x1132
1736 #define S_LOCAL_2005 0x1133
1737 #define S_DEFRANGE_2005 0x1134
1738 #define S_DEFRANGE2_2005 0x1135
1739 #define S_SECTINFO_V3 0x1136
1740 #define S_SUBSECTINFO_V3 0x1137
1741 #define S_ENTRYPOINT_V3 0x1138
1742 #define S_CALLSITEINFO 0x1139
1743 #define S_SECUCOOKIE_V3 0x113A
1744 #define S_DISCARDED 0x113B
1745 #define S_MSTOOLINFO_V3 0x113C
1746 #define S_MSTOOLENV_V3 0x113D
1748 #define S_LOCAL_VS2013 0x113E
1749 #define S_DEFRANGE_VS2013 0x113F
1750 #define S_DEFRANGE_SUBFIELD 0x1140
1751 #define S_DEFRANGE_REGISTER 0x1141
1752 #define S_DEFRANGE_FRAMEPOINTER_REL 0x1142
1753 #define S_DEFRANGE_SUBFIELD_REGISTER 0x1143
1754 #define S_FPOFF_VS2013 0x1144
1755 #define S_DEFRANGE_REGISTER_REL 0x1145
1756 #define S_LPROC32_VS2013 0x1146
1757 #define S_GPROC32_VS2013 0x1147
1758 #define S_LPROCMIPS_ID 0x1148
1759 #define S_GPROCMIPS_ID 0x1149
1760 #define S_LPROCIA64_ID 0x114A
1761 #define S_GPROCIA64_ID 0x114B
1762 #define S_BUILDINFO 0x114C
1763 #define S_INLINESITE 0x114D
1764 #define S_INLINESITE_END 0x114E
1765 #define S_PROC_ID_END 0x114F
1766 #define S_DEFRANGE_HLSL 0x1150
1767 #define S_GDATA_HLSL 0x1151
1768 #define S_LDATA_HLSL 0x1152
1770 #define S_FILESTATIC 0x1153
1771 #define S_ARMSWITCHTABLE 0x1159
1772 #define S_CALLEES 0x115A
1773 #define S_CALLERS 0x115B
1774 #define S_POGODATA 0x115C
1775 #define S_INLINESITE2 0x115D
1776 #define S_HEAPALLOCSITE 0x115E
1777 #define S_MOD_TYPEREF 0x115F
1778 #define S_REF_MINIPDB 0x1160
1779 #define S_PDBMAP 0x1161
1780 #define S_GDATA_HLSL32 0x1162
1781 #define S_LDATA_HLSL32 0x1163
1782 #define S_GDATA_HLSL32_EX 0x1164
1783 #define S_LDATA_HLSL32_EX 0x1165
1785 /* ======================================== *
1786 * Line number information
1787 * ======================================== */
1789 struct codeview_linetab_block
1791 unsigned short seg;
1792 unsigned short num_lines;
1793 unsigned int offsets[1]; /* in fact num_lines */
1794 /* unsigned short linenos[]; */
1797 struct startend
1799 unsigned int start;
1800 unsigned int end;
1803 #define LT2_LINES_BLOCK 0x000000f2
1804 #define LT2_FILES_BLOCK 0x000000f4
1806 /* there's a new line tab structure from MS Studio 2005 and after
1807 * it's made of a list of codeview_linetab2 blocks.
1808 * We've only seen (so far) list with a single LT2_FILES_BLOCK and several
1809 * LT2_LINES_BLOCK. The LT2_FILES block has been encountered either as first
1810 * or last block of the list.
1811 * A LT2_FILES contains one or several codeview_linetab2_file:s
1814 struct codeview_linetab2
1816 DWORD header;
1817 DWORD size_of_block;
1820 static inline const struct codeview_linetab2* codeview_linetab2_next_block(const struct codeview_linetab2* lt2)
1822 return (const struct codeview_linetab2*)((const char*)(lt2 + 1) + lt2->size_of_block);
1825 struct codeview_linetab2_file
1827 DWORD offset; /* offset in string table for filename */
1828 WORD unk; /* always 0x0110... type of following information ??? */
1829 BYTE md5[16]; /* MD5 signature of file (signature on file's content or name ???) */
1830 WORD pad0; /* always 0 */
1833 struct codeview_lt2blk_files
1835 struct codeview_linetab2 lt2; /* LT2_FILES */
1836 struct codeview_linetab2_file file[1];
1839 struct codeview_lt2blk_lines
1841 struct codeview_linetab2 lt2; /* LT2_LINE_BLOCK */
1842 DWORD start; /* start address of function with line numbers */
1843 DWORD seg; /* segment of function with line numbers */
1844 DWORD size; /* size of function with line numbers */
1845 DWORD file_offset; /* offset for accessing corresponding codeview_linetab2_file */
1846 DWORD nlines; /* number of lines in this block */
1847 DWORD size_lines; /* number of bytes following for line number information */
1848 struct {
1849 DWORD offset; /* offset (from <seg>:<start>) for line number */
1850 DWORD lineno; /* the line number (OR:ed with 0x80000000 why ???) */
1851 } l[1]; /* actually array of <nlines> */
1854 /* ======================================== *
1855 * PDB file information
1856 * ======================================== */
1859 struct PDB_FILE
1861 DWORD size;
1862 DWORD unknown;
1865 struct PDB_JG_HEADER
1867 CHAR ident[40];
1868 DWORD signature;
1869 DWORD block_size;
1870 WORD free_list;
1871 WORD total_alloc;
1872 struct PDB_FILE toc;
1873 WORD toc_block[1];
1876 struct PDB_DS_HEADER
1878 char signature[32];
1879 DWORD block_size;
1880 DWORD unknown1;
1881 DWORD num_pages;
1882 DWORD toc_size;
1883 DWORD unknown2;
1884 DWORD toc_page;
1887 struct PDB_JG_TOC
1889 DWORD num_files;
1890 struct PDB_FILE file[1];
1893 struct PDB_DS_TOC
1895 DWORD num_files;
1896 DWORD file_size[1];
1899 struct PDB_JG_ROOT
1901 DWORD Version;
1902 DWORD TimeDateStamp;
1903 DWORD Age;
1904 DWORD cbNames;
1905 CHAR names[1];
1908 struct PDB_DS_ROOT
1910 DWORD Version;
1911 DWORD TimeDateStamp;
1912 DWORD Age;
1913 GUID guid;
1914 DWORD cbNames;
1915 CHAR names[1];
1918 typedef struct _PDB_TYPES_OLD
1920 DWORD version;
1921 WORD first_index;
1922 WORD last_index;
1923 DWORD type_size;
1924 WORD file;
1925 WORD pad;
1926 } PDB_TYPES_OLD, *PPDB_TYPES_OLD;
1928 typedef struct _PDB_TYPES
1930 DWORD version;
1931 DWORD type_offset;
1932 DWORD first_index;
1933 DWORD last_index;
1934 DWORD type_size;
1935 WORD file;
1936 WORD pad;
1937 DWORD hash_size;
1938 DWORD hash_base;
1939 DWORD hash_offset;
1940 DWORD hash_len;
1941 DWORD search_offset;
1942 DWORD search_len;
1943 DWORD unknown_offset;
1944 DWORD unknown_len;
1945 } PDB_TYPES, *PPDB_TYPES;
1947 typedef struct _PDB_SYMBOL_RANGE
1949 WORD segment;
1950 WORD pad1;
1951 DWORD offset;
1952 DWORD size;
1953 DWORD characteristics;
1954 WORD index;
1955 WORD pad2;
1956 } PDB_SYMBOL_RANGE, *PPDB_SYMBOL_RANGE;
1958 typedef struct _PDB_SYMBOL_RANGE_EX
1960 WORD segment;
1961 WORD pad1;
1962 DWORD offset;
1963 DWORD size;
1964 DWORD characteristics;
1965 WORD index;
1966 WORD pad2;
1967 DWORD timestamp;
1968 DWORD unknown;
1969 } PDB_SYMBOL_RANGE_EX, *PPDB_SYMBOL_RANGE_EX;
1971 typedef struct _PDB_SYMBOL_FILE
1973 DWORD unknown1;
1974 PDB_SYMBOL_RANGE range;
1975 WORD flag;
1976 WORD file;
1977 DWORD symbol_size;
1978 DWORD lineno_size;
1979 DWORD unknown2;
1980 DWORD nSrcFiles;
1981 DWORD attribute;
1982 CHAR filename[1];
1983 } PDB_SYMBOL_FILE, *PPDB_SYMBOL_FILE;
1985 typedef struct _PDB_SYMBOL_FILE_EX
1987 DWORD unknown1;
1988 PDB_SYMBOL_RANGE_EX range;
1989 WORD flag;
1990 WORD file;
1991 DWORD symbol_size;
1992 DWORD lineno_size;
1993 DWORD unknown2;
1994 DWORD nSrcFiles;
1995 DWORD attribute;
1996 DWORD reserved[2];
1997 CHAR filename[1];
1998 } PDB_SYMBOL_FILE_EX, *PPDB_SYMBOL_FILE_EX;
2000 typedef struct _PDB_SYMBOL_SOURCE
2002 WORD nModules;
2003 WORD nSrcFiles;
2004 WORD table[1];
2005 } PDB_SYMBOL_SOURCE, *PPDB_SYMBOL_SOURCE;
2007 typedef struct _PDB_SYMBOL_IMPORT
2009 DWORD unknown1;
2010 DWORD unknown2;
2011 DWORD TimeDateStamp;
2012 DWORD Age;
2013 CHAR filename[1];
2014 } PDB_SYMBOL_IMPORT, *PPDB_SYMBOL_IMPORT;
2016 typedef struct _PDB_SYMBOLS_OLD
2018 WORD hash1_file;
2019 WORD hash2_file;
2020 WORD gsym_file;
2021 WORD pad;
2022 DWORD module_size;
2023 DWORD offset_size;
2024 DWORD hash_size;
2025 DWORD srcmodule_size;
2026 } PDB_SYMBOLS_OLD, *PPDB_SYMBOLS_OLD;
2028 typedef struct _PDB_SYMBOLS
2030 DWORD signature;
2031 DWORD version;
2032 DWORD unknown;
2033 DWORD hash1_file;
2034 DWORD hash2_file;
2035 WORD gsym_file;
2036 WORD unknown1;
2037 DWORD module_size;
2038 DWORD offset_size;
2039 DWORD hash_size;
2040 DWORD srcmodule_size;
2041 DWORD pdbimport_size;
2042 DWORD resvd0;
2043 DWORD stream_index_size;
2044 DWORD unknown2_size;
2045 WORD resvd3;
2046 WORD machine;
2047 DWORD resvd4;
2048 } PDB_SYMBOLS, *PPDB_SYMBOLS;
2050 typedef struct
2052 WORD FPO;
2053 WORD unk0;
2054 WORD unk1;
2055 WORD unk2;
2056 WORD unk3;
2057 WORD segments;
2058 } PDB_STREAM_INDEXES_OLD;
2060 typedef struct
2062 WORD FPO;
2063 WORD unk0;
2064 WORD unk1;
2065 WORD unk2;
2066 WORD unk3;
2067 WORD segments;
2068 WORD unk4;
2069 WORD unk5;
2070 WORD unk6;
2071 WORD FPO_EXT;
2072 WORD unk7;
2073 } PDB_STREAM_INDEXES;
2075 typedef struct _PDB_FPO_DATA
2077 DWORD start;
2078 DWORD func_size;
2079 DWORD locals_size;
2080 DWORD params_size;
2081 DWORD maxstack_size;
2082 DWORD str_offset;
2083 WORD prolog_size;
2084 WORD savedregs_size;
2085 #define PDB_FPO_DFL_SEH 0x00000001
2086 #define PDB_FPO_DFL_EH 0x00000002
2087 #define PDB_FPO_DFL_IN_BLOCK 0x00000004
2088 DWORD flags;
2089 } PDB_FPO_DATA;
2091 #include "poppack.h"
2093 /* ----------------------------------------------
2094 * Information used for parsing
2095 * ---------------------------------------------- */
2097 typedef struct
2099 DWORD from;
2100 DWORD to;
2101 } OMAP_DATA;
2103 struct msc_debug_info
2105 struct module* module;
2106 int nsect;
2107 const IMAGE_SECTION_HEADER* sectp;
2108 int nomap;
2109 const OMAP_DATA* omapp;
2110 const BYTE* root;
2113 /* coff.c */
2114 extern BOOL coff_process_info(const struct msc_debug_info* msc_dbg);
2116 /* ===================================================
2117 * The old CodeView stuff (for NB09 and NB11)
2118 * =================================================== */
2120 #define sstModule 0x120
2121 #define sstTypes 0x121
2122 #define sstPublic 0x122
2123 #define sstPublicSym 0x123
2124 #define sstSymbols 0x124
2125 #define sstAlignSym 0x125
2126 #define sstSrcLnSeg 0x126
2127 #define sstSrcModule 0x127
2128 #define sstLibraries 0x128
2129 #define sstGlobalSym 0x129
2130 #define sstGlobalPub 0x12a
2131 #define sstGlobalTypes 0x12b
2132 #define sstMPC 0x12c
2133 #define sstSegMap 0x12d
2134 #define sstSegName 0x12e
2135 #define sstPreComp 0x12f
2136 #define sstFileIndex 0x133
2137 #define sstStaticSym 0x134
2139 /* overall structure information */
2140 typedef struct OMFSignature
2142 char Signature[4];
2143 long filepos;
2144 } OMFSignature;
2146 typedef struct OMFSignatureRSDS
2148 char Signature[4];
2149 GUID guid;
2150 DWORD age;
2151 CHAR name[1];
2152 } OMFSignatureRSDS;
2154 typedef struct _CODEVIEW_PDB_DATA
2156 char Signature[4];
2157 long filepos;
2158 DWORD timestamp;
2159 DWORD age;
2160 CHAR name[1];
2161 } CODEVIEW_PDB_DATA, *PCODEVIEW_PDB_DATA;
2163 typedef struct OMFDirHeader
2165 WORD cbDirHeader;
2166 WORD cbDirEntry;
2167 DWORD cDir;
2168 DWORD lfoNextDir;
2169 DWORD flags;
2170 } OMFDirHeader;
2172 typedef struct OMFDirEntry
2174 WORD SubSection;
2175 WORD iMod;
2176 DWORD lfo;
2177 DWORD cb;
2178 } OMFDirEntry;
2180 /* sstModule subsection */
2182 typedef struct OMFSegDesc
2184 WORD Seg;
2185 WORD pad;
2186 DWORD Off;
2187 DWORD cbSeg;
2188 } OMFSegDesc;
2190 typedef struct OMFModule
2192 WORD ovlNumber;
2193 WORD iLib;
2194 WORD cSeg;
2195 char Style[2];
2197 OMFSegDesc SegInfo[cSeg];
2198 p_string Name;
2200 } OMFModule;
2202 typedef struct OMFGlobalTypes
2204 DWORD flags;
2205 DWORD cTypes;
2207 DWORD offset[cTypes];
2208 types_record[];
2210 } OMFGlobalTypes;
2212 /* sstGlobalPub section */
2214 /* Header for symbol table */
2215 typedef struct OMFSymHash
2217 unsigned short symhash;
2218 unsigned short addrhash;
2219 unsigned long cbSymbol;
2220 unsigned long cbHSym;
2221 unsigned long cbHAddr;
2222 } OMFSymHash;
2224 /* sstSegMap section */
2226 typedef struct OMFSegMapDesc
2228 unsigned short flags;
2229 unsigned short ovl;
2230 unsigned short group;
2231 unsigned short frame;
2232 unsigned short iSegName;
2233 unsigned short iClassName;
2234 unsigned long offset;
2235 unsigned long cbSeg;
2236 } OMFSegMapDesc;
2238 typedef struct OMFSegMap
2240 unsigned short cSeg;
2241 unsigned short cSegLog;
2242 /* OMFSegMapDesc rgDesc[0];*/
2243 } OMFSegMap;
2246 /* sstSrcModule section */
2248 typedef struct OMFSourceLine
2250 unsigned short Seg;
2251 unsigned short cLnOff;
2252 unsigned long offset[1];
2253 unsigned short lineNbr[1];
2254 } OMFSourceLine;
2256 typedef struct OMFSourceFile
2258 unsigned short cSeg;
2259 unsigned short reserved;
2260 unsigned long baseSrcLn[1];
2261 unsigned short cFName;
2262 char Name;
2263 } OMFSourceFile;
2265 typedef struct OMFSourceModule
2267 unsigned short cFile;
2268 unsigned short cSeg;
2269 unsigned long baseSrcFile[1];
2270 } OMFSourceModule;