server: Support using a name to destroy a window class too.
[wine] / include / wine / mscvpdb.h
1 /*
2  * MS debug information definitions.
3  *
4  * Copyright (C) 1996 Eric Youngdale
5  * Copyright (C) 1999-2000 Ulrich Weigand
6  * Copyright (C) 2004 Eric Pouech
7  *
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.
12  *
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.
17  *
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
21  */
22
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).
26  *
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)
32  *
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.
38  *
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.
43  *
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).
54  *
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.
62  *
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 ??)
80  *
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 greated than 256), which was likely needed for
85  * complex C++ types (nested + templates).
86  *
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
91  *
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.
97  */
98
99 #include "pshpack1.h"
100
101 /* ======================================== *
102  *             Type information
103  * ======================================== */
104
105 struct p_string
106 {
107     unsigned char               namelen;
108     char                        name[1];
109 };
110
111 union codeview_type
112 {
113     struct
114     {
115         unsigned short int      len;
116         short int               id;
117     } generic;
118
119     struct
120     {
121         unsigned short int      len;
122         short int               id;
123         short int               attribute;
124         short int               type;
125     } modifier_v1;
126
127     struct
128     {
129         unsigned short int      len;
130         short int               id;
131         int                     type;
132         short int               attribute;
133     } modifier_v2;
134
135     struct
136     {
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;
143
144     struct
145     {
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;
152
153     struct
154     {
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;
164
165     struct
166     {
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;
176
177     struct
178     {
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;
188
189     struct
190     {
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;
203
204     struct
205     {
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;
218
219     struct
220     {
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;
233
234     struct
235     {
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;
246
247     struct
248     {
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;
259
260     struct
261     {
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;
272
273     struct
274     {
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;
283
284     struct
285     {
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;
294
295     struct
296     {
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;
305
306     struct
307     {
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;
316
317     struct
318     {
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;
327
328     struct
329     {
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;
341
342     struct
343     {
344         unsigned short int      len;
345         short int               id;
346         unsigned                this_type;
347         unsigned int            class_type;
348         unsigned int            rvtype;
349         unsigned char           call;
350         unsigned char           reserved;
351         unsigned short          params;
352         unsigned int            arglist;
353         unsigned int            this_adjust;
354     } mfunction_v2;
355 };
356
357 union codeview_reftype
358 {
359     struct
360     {
361         unsigned short int      len;
362         short int               id;
363     } generic;
364
365     struct
366     {
367         unsigned short int      len;
368         short int               id;
369         unsigned char           list[1];
370     } fieldlist;
371
372     struct
373     {
374         unsigned short int      len;
375         short int               id;
376         unsigned char           nbits;
377         unsigned char           bitoff;
378         unsigned short          type;
379     } bitfield_v1;
380
381     struct
382     {
383         unsigned short int      len;
384         short int               id;
385         unsigned int            type;
386         unsigned char           nbits;
387         unsigned char           bitoff;
388     } bitfield_v2;
389
390     struct
391     {
392         unsigned short int      len;
393         short int               id;
394         unsigned short          num;
395         unsigned short          args[1];
396     } arglist_v1;
397
398     struct
399     {
400         unsigned short int      len;
401         short int               id;
402         unsigned                num;
403         unsigned                args[1];
404     } arglist_v2;
405
406     struct
407     {
408         unsigned short int      len;
409         short int               id;
410         unsigned short          num;
411         unsigned short          drvdcls[1];
412     } derived_v1;
413
414     struct
415     {
416         unsigned short int      len;
417         short int               id;
418         unsigned                num;
419         unsigned                drvdcls[1];
420     } derived_v2;
421 };
422
423 union codeview_fieldtype
424 {
425     struct
426     {
427         short int               id;
428     } generic;
429
430     struct
431     {
432         short int               id;
433         short int               type;
434         short int               attribute;
435         unsigned short int      offset;     /* numeric leaf */
436     } bclass_v1;
437
438     struct
439     {
440         short int               id;
441         short int               attribute;
442         unsigned int            type;
443         unsigned short int      offset;     /* numeric leaf */
444     } bclass_v2;
445
446     struct
447     {
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;
457
458     struct
459     {
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;
469
470     struct
471     {
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;
479
480    struct
481     {
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;
489
490     struct
491     {
492         short int               id;
493         short int               type;
494         struct p_string         p_name;
495     } friendfcn_v1;
496
497     struct
498     {
499         short int               id;
500         short int               _pad0;
501         unsigned int            type;
502         struct p_string         p_name;
503     } friendfcn_v2;
504
505     struct
506     {
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;
515
516     struct
517     {
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;
526
527     struct
528     {
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
536     }
537     member_v3;
538
539     struct
540     {
541         short int               id;
542         short int               type;
543         short int               attribute;
544         struct p_string         p_name;
545     } stmember_v1;
546
547     struct
548     {
549         short int               id;
550         short int               attribute;
551         unsigned int            type;
552         struct p_string         p_name;
553     } stmember_v2;
554
555     struct
556     {
557         short int               id;
558         short int               attribute;
559         unsigned int            type;
560         char                    name[1];
561     } stmember_v3;
562
563     struct
564     {
565         short int               id;
566         short int               count;
567         short int               mlist;
568         struct p_string         p_name;
569     } method_v1;
570
571     struct
572     {
573         short int               id;
574         short int               count;
575         unsigned int            mlist;
576         struct p_string         p_name;
577     } method_v2;
578
579     struct
580     {
581         short int               id;
582         short int               count;
583         unsigned int            mlist;
584         char                    name[1];
585     } method_v3;
586
587     struct
588     {
589         short int               id;
590         short int               type;
591         struct p_string         p_name;
592     } nesttype_v1;
593
594     struct
595     {
596         short int               id;
597         short int               _pad0;
598         unsigned int            type;
599         struct p_string         p_name;
600     } nesttype_v2;
601
602     struct
603     {
604         short int               id;
605         short int               _pad0;
606         unsigned int            type;
607         char                    name[1];
608     } nesttype_v3;
609
610     struct
611     {
612         short int               id;
613         short int               type;
614     } vfunctab_v1;
615
616     struct
617     {
618         short int               id;
619         short int               _pad0;
620         unsigned int            type;
621     } vfunctab_v2;
622
623     struct
624     {
625         short int               id;
626         short int               type;
627     } friendcls_v1;
628
629     struct
630     {
631         short int               id;
632         short int               _pad0;
633         unsigned int            type;
634     } friendcls_v2;
635
636     struct
637     {
638         short int               id;
639         short int               attribute;
640         short int               type;
641         struct p_string         p_name;
642     } onemethod_v1;
643
644     struct
645     {
646         short int               id;
647         short int               attribute;
648         unsigned int            type;
649         struct p_string         p_name;
650     } onemethod_v2;
651
652     struct
653     {
654         short int               id;
655         short int               attribute;
656         unsigned int            type;
657         char                    name[1];
658     } onemethod_v3;
659
660     struct
661     {
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;
668
669     struct
670     {
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;
677
678     struct
679     {
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;
686
687     struct
688     {
689         short int               id;
690         short int               type;
691         unsigned int            offset;
692     } vfuncoff_v1;
693
694     struct
695     {
696         short int               id;
697         short int               _pad0;
698         unsigned int            type;
699         unsigned int            offset;
700     } vfuncoff_v2;
701
702     struct
703     {
704         short int               id;
705         short int               attribute;
706         short int               type;
707         struct p_string         p_name;
708     } nesttypeex_v1;
709
710     struct
711     {
712         short int               id;
713         short int               attribute;
714         unsigned int            type;
715         struct p_string         p_name;
716     } nesttypeex_v2;
717
718     struct
719     {
720         short int               id;
721         short int               attribute;
722         unsigned int            type;
723         struct p_string         p_name;
724     } membermodify_v2;
725
726 };
727
728
729 /*
730  * This covers the basic datatypes that VC++ seems to be using these days.
731  * 32 bit mode only.  There are additional numbers for the pointers in 16
732  * bit mode.  There are many other types listed in the documents, but these
733  * are apparently not used by the compiler, or represent pointer types
734  * that are not used.
735  */
736 #define T_NOTYPE                0x0000  /* Notype */
737 #define T_ABS                   0x0001  /* Abs */
738 #define T_VOID                  0x0003  /* Void */
739 #define T_CHAR                  0x0010  /* signed char */
740 #define T_SHORT                 0x0011  /* short */
741 #define T_LONG                  0x0012  /* long */
742 #define T_QUAD                  0x0013  /* long long */
743 #define T_UCHAR                 0x0020  /* unsigned  char */
744 #define T_USHORT                0x0021  /* unsigned short */
745 #define T_ULONG                 0x0022  /* unsigned long */
746 #define T_UQUAD                 0x0023  /* unsigned long long */
747 #define T_REAL32                0x0040  /* float */
748 #define T_REAL64                0x0041  /* double */
749 #define T_RCHAR                 0x0070  /* real char */
750 #define T_WCHAR                 0x0071  /* wide char */
751 #define T_INT4                  0x0074  /* int */
752 #define T_UINT4                 0x0075  /* unsigned int */
753
754 #define T_32PVOID               0x0403  /* 32 bit near pointer to void */
755 #define T_32PCHAR               0x0410  /* 16:32 near pointer to signed char */
756 #define T_32PSHORT              0x0411  /* 16:32 near pointer to short */
757 #define T_32PLONG               0x0412  /* 16:32 near pointer to int */
758 #define T_32PQUAD               0x0413  /* 16:32 near pointer to long long */
759 #define T_32PUCHAR              0x0420  /* 16:32 near pointer to unsigned char */
760 #define T_32PUSHORT             0x0421  /* 16:32 near pointer to unsigned short */
761 #define T_32PULONG              0x0422  /* 16:32 near pointer to unsigned int */
762 #define T_32PUQUAD              0x0423  /* 16:32 near pointer to long long */
763 #define T_32PREAL32             0x0440  /* 16:32 near pointer to float */
764 #define T_32PREAL64             0x0441  /* 16:32 near pointer to float */
765 #define T_32PRCHAR              0x0470  /* 16:32 near pointer to real char */
766 #define T_32PWCHAR              0x0471  /* 16:32 near pointer to real char */
767 #define T_32PINT4               0x0474  /* 16:32 near pointer to int */
768 #define T_32PUINT4              0x0475  /* 16:32 near pointer to unsigned int */
769
770
771 #define LF_MODIFIER_V1          0x0001
772 #define LF_POINTER_V1           0x0002
773 #define LF_ARRAY_V1             0x0003
774 #define LF_CLASS_V1             0x0004
775 #define LF_STRUCTURE_V1         0x0005
776 #define LF_UNION_V1             0x0006
777 #define LF_ENUM_V1              0x0007
778 #define LF_PROCEDURE_V1         0x0008
779 #define LF_MFUNCTION_V1         0x0009
780 #define LF_VTSHAPE_V1           0x000a
781 #define LF_COBOL0_V1            0x000b
782 #define LF_COBOL1_V1            0x000c
783 #define LF_BARRAY_V1            0x000d
784 #define LF_LABEL_V1             0x000e
785 #define LF_NULL_V1              0x000f
786 #define LF_NOTTRAN_V1           0x0010
787 #define LF_DIMARRAY_V1          0x0011
788 #define LF_VFTPATH_V1           0x0012
789 #define LF_PRECOMP_V1           0x0013
790 #define LF_ENDPRECOMP_V1        0x0014
791 #define LF_OEM_V1               0x0015
792 #define LF_TYPESERVER_V1        0x0016
793
794 #define LF_MODIFIER_V2          0x1001     /* variants with new 32-bit type indices (V2) */
795 #define LF_POINTER_V2           0x1002
796 #define LF_ARRAY_V2             0x1003
797 #define LF_CLASS_V2             0x1004
798 #define LF_STRUCTURE_V2         0x1005
799 #define LF_UNION_V2             0x1006
800 #define LF_ENUM_V2              0x1007
801 #define LF_PROCEDURE_V2         0x1008
802 #define LF_MFUNCTION_V2         0x1009
803 #define LF_COBOL0_V2            0x100a
804 #define LF_BARRAY_V2            0x100b
805 #define LF_DIMARRAY_V2          0x100c
806 #define LF_VFTPATH_V2           0x100d
807 #define LF_PRECOMP_V2           0x100e
808 #define LF_OEM_V2               0x100f
809
810 #define LF_SKIP_V1              0x0200
811 #define LF_ARGLIST_V1           0x0201
812 #define LF_DEFARG_V1            0x0202
813 #define LF_LIST_V1              0x0203
814 #define LF_FIELDLIST_V1         0x0204
815 #define LF_DERIVED_V1           0x0205
816 #define LF_BITFIELD_V1          0x0206
817 #define LF_METHODLIST_V1        0x0207
818 #define LF_DIMCONU_V1           0x0208
819 #define LF_DIMCONLU_V1          0x0209
820 #define LF_DIMVARU_V1           0x020a
821 #define LF_DIMVARLU_V1          0x020b
822 #define LF_REFSYM_V1            0x020c
823
824 #define LF_SKIP_V2              0x1200    /* variants with new 32-bit type indices (V2) */
825 #define LF_ARGLIST_V2           0x1201
826 #define LF_DEFARG_V2            0x1202
827 #define LF_FIELDLIST_V2         0x1203
828 #define LF_DERIVED_V2           0x1204
829 #define LF_BITFIELD_V2          0x1205
830 #define LF_METHODLIST_V2        0x1206
831 #define LF_DIMCONU_V2           0x1207
832 #define LF_DIMCONLU_V2          0x1208
833 #define LF_DIMVARU_V2           0x1209
834 #define LF_DIMVARLU_V2          0x120a
835
836 /* Field lists */
837 #define LF_BCLASS_V1            0x0400
838 #define LF_VBCLASS_V1           0x0401
839 #define LF_IVBCLASS_V1          0x0402
840 #define LF_ENUMERATE_V1         0x0403
841 #define LF_FRIENDFCN_V1         0x0404
842 #define LF_INDEX_V1             0x0405
843 #define LF_MEMBER_V1            0x0406
844 #define LF_STMEMBER_V1          0x0407
845 #define LF_METHOD_V1            0x0408
846 #define LF_NESTTYPE_V1          0x0409
847 #define LF_VFUNCTAB_V1          0x040a
848 #define LF_FRIENDCLS_V1         0x040b
849 #define LF_ONEMETHOD_V1         0x040c
850 #define LF_VFUNCOFF_V1          0x040d
851 #define LF_NESTTYPEEX_V1        0x040e
852 #define LF_MEMBERMODIFY_V1      0x040f
853
854 #define LF_BCLASS_V2            0x1400    /* variants with new 32-bit type indices (V2) */
855 #define LF_VBCLASS_V2           0x1401
856 #define LF_IVBCLASS_V2          0x1402
857 #define LF_FRIENDFCN_V2         0x1403
858 #define LF_INDEX_V2             0x1404
859 #define LF_MEMBER_V2            0x1405
860 #define LF_STMEMBER_V2          0x1406
861 #define LF_METHOD_V2            0x1407
862 #define LF_NESTTYPE_V2          0x1408
863 #define LF_VFUNCTAB_V2          0x1409
864 #define LF_FRIENDCLS_V2         0x140a
865 #define LF_ONEMETHOD_V2         0x140b
866 #define LF_VFUNCOFF_V2          0x140c
867 #define LF_NESTTYPEEX_V2        0x140d
868
869 #define LF_ENUMERATE_V3         0x1502
870 #define LF_ARRAY_V3             0x1503
871 #define LF_CLASS_V3             0x1504
872 #define LF_STRUCTURE_V3         0x1505
873 #define LF_UNION_V3             0x1506
874 #define LF_ENUM_V3              0x1507
875 #define LF_MEMBER_V3            0x150d
876 #define LF_STMEMBER_V3          0x150e
877 #define LF_METHOD_V3            0x150f
878 #define LF_NESTTYPE_V3          0x1510
879 #define LF_ONEMETHOD_V3         0x1511
880
881 #define LF_NUMERIC              0x8000    /* numeric leaf types */
882 #define LF_CHAR                 0x8000
883 #define LF_SHORT                0x8001
884 #define LF_USHORT               0x8002
885 #define LF_LONG                 0x8003
886 #define LF_ULONG                0x8004
887 #define LF_REAL32               0x8005
888 #define LF_REAL64               0x8006
889 #define LF_REAL80               0x8007
890 #define LF_REAL128              0x8008
891 #define LF_QUADWORD             0x8009
892 #define LF_UQUADWORD            0x800a
893 #define LF_REAL48               0x800b
894 #define LF_COMPLEX32            0x800c
895 #define LF_COMPLEX64            0x800d
896 #define LF_COMPLEX80            0x800e
897 #define LF_COMPLEX128           0x800f
898 #define LF_VARSTRING            0x8010
899
900 /* ======================================== *
901  *            Symbol information
902  * ======================================== */
903
904 union codeview_symbol
905 {
906     struct
907     {
908         short int               len;
909         short int               id;
910     } generic;
911
912     struct
913     {
914         short int               len;
915         short int               id;
916         unsigned int            offset;
917         unsigned short          segment;
918         unsigned short          symtype;
919         struct p_string         p_name;
920     } data_v1;
921
922     struct
923     {
924         short int               len;
925         short int               id;
926         unsigned int            symtype;
927         unsigned int            offset;
928         unsigned short          segment;
929         struct p_string         p_name;
930     } data_v2;
931
932     struct
933     {
934         short int               len;
935         short int               id;
936         unsigned int            symtype;
937         unsigned int            offset;
938         unsigned short          segment;
939         char                    name[1];
940     } data_v3;
941
942     struct
943     {
944         short int               len;
945         short int               id;
946         unsigned int            pparent;
947         unsigned int            pend;
948         unsigned int            next;
949         unsigned int            offset;
950         unsigned short          segment;
951         unsigned short          thunk_len;
952         unsigned char           thtype;
953         struct p_string         p_name;
954     } thunk_v1;
955
956     struct
957     {
958         short int               len;
959         short int               id;
960         unsigned int            pparent;
961         unsigned int            pend;
962         unsigned int            next;
963         unsigned int            offset;
964         unsigned short          segment;
965         unsigned short          thunk_len;
966         unsigned char           thtype;
967         char                    name[1];
968     } thunk_v3;
969
970     struct
971     {
972         short int               len;
973         short int               id;
974         unsigned int            pparent;
975         unsigned int            pend;
976         unsigned int            next;
977         unsigned int            proc_len;
978         unsigned int            debug_start;
979         unsigned int            debug_end;
980         unsigned int            offset;
981         unsigned short          segment;
982         unsigned short          proctype;
983         unsigned char           flags;
984         struct p_string         p_name;
985     } proc_v1;
986
987     struct
988     {
989         short int               len;
990         short int               id;
991         unsigned int            pparent;
992         unsigned int            pend;
993         unsigned int            next;
994         unsigned int            proc_len;
995         unsigned int            debug_start;
996         unsigned int            debug_end;
997         unsigned int            proctype;
998         unsigned int            offset;
999         unsigned short          segment;
1000         unsigned char           flags;
1001         struct p_string         p_name;
1002     } proc_v2;
1003
1004     struct
1005     {
1006         short int               len;
1007         short int               id;
1008         unsigned int            pparent;
1009         unsigned int            pend;
1010         unsigned int            next;
1011         unsigned int            proc_len;
1012         unsigned int            debug_start;
1013         unsigned int            debug_end;
1014         unsigned int            proctype;
1015         unsigned int            offset;
1016         unsigned short          segment;
1017         unsigned char           flags;
1018         char                    name[1];
1019     } proc_v3;
1020
1021     struct
1022     {
1023         short int               len;
1024         short int               id;
1025         unsigned int            symtype;
1026         unsigned int            offset;
1027         unsigned short          segment;
1028         struct p_string         p_name;
1029     } public_v2;
1030
1031     struct
1032     {
1033         short int               len;
1034         short int               id;
1035         unsigned int            symtype;
1036         unsigned int            offset;
1037         unsigned short          segment;
1038         char                    name[1];
1039     } public_v3;
1040
1041     struct
1042     {
1043         short int               len;            /* Total length of this entry */
1044         short int               id;             /* Always S_BPREL_V1 */
1045         unsigned int            offset;         /* Stack offset relative to BP */
1046         unsigned short          symtype;
1047         struct p_string         p_name;
1048     } stack_v1;
1049
1050     struct
1051     {
1052         short int               len;            /* Total length of this entry */
1053         short int               id;             /* Always S_BPREL_V2 */
1054         unsigned int            offset;         /* Stack offset relative to EBP */
1055         unsigned int            symtype;
1056         struct p_string         p_name;
1057     } stack_v2;
1058
1059     struct
1060     {
1061         short int               len;            /* Total length of this entry */
1062         short int               id;             /* Always S_BPREL_V3 */
1063         int                     offset;         /* Stack offset relative to BP */
1064         unsigned int            symtype;
1065         char                    name[1];
1066     } stack_v3;
1067
1068     struct
1069     {
1070         short int               len;            /* Total length of this entry */
1071         short int               id;             /* Always S_REGISTER */
1072         unsigned short          type;
1073         unsigned short          reg;
1074         struct p_string         p_name;
1075         /* don't handle register tracking */
1076     } register_v1;
1077
1078     struct
1079     {
1080         short int               len;            /* Total length of this entry */
1081         short int               id;             /* Always S_REGISTER_V2 */
1082         unsigned int            type;           /* check whether type & reg are correct */
1083         unsigned short          reg;
1084         struct p_string         p_name;
1085         /* don't handle register tracking */
1086     } register_v2;
1087
1088     struct
1089     {
1090         short int               len;            /* Total length of this entry */
1091         short int               id;             /* Always S_REGISTER_V3 */
1092         unsigned int            type;           /* check whether type & reg are correct */
1093         unsigned short          reg;
1094         char                    name[1];
1095         /* don't handle register tracking */
1096     } register_v3;
1097
1098     struct
1099     {
1100         short int               len;
1101         short int               id;
1102         unsigned int            parent;
1103         unsigned int            end;
1104         unsigned int            length;
1105         unsigned int            offset;
1106         unsigned short          segment;
1107         struct p_string         p_name;
1108     } block_v1;
1109
1110     struct
1111     {
1112         short int               len;
1113         short int               id;
1114         unsigned int            parent;
1115         unsigned int            end;
1116         unsigned int            length;
1117         unsigned int            offset;
1118         unsigned short          segment;
1119         char                    name[1];
1120     } block_v3;
1121
1122     struct
1123     {
1124         short int               len;
1125         short int               id;
1126         unsigned int            offset;
1127         unsigned short          segment;
1128         unsigned char           flags;
1129         struct p_string         p_name;
1130     } label_v1;
1131
1132     struct
1133     {
1134         short int               len;
1135         short int               id;
1136         unsigned int            offset;
1137         unsigned short          segment;
1138         unsigned char           flags;
1139         char                    name[1];
1140     } label_v3;
1141
1142     struct
1143     {
1144         short int               len;
1145         short int               id;
1146         unsigned short          type;
1147         unsigned short          cvalue;         /* numeric leaf */
1148 #if 0
1149         struct p_string         p_name;
1150 #endif
1151     } constant_v1;
1152
1153     struct
1154     {
1155         short int               len;
1156         short int               id;
1157         unsigned                type;
1158         unsigned short          cvalue;         /* numeric leaf */
1159 #if 0
1160         struct p_string         p_name;
1161 #endif
1162     } constant_v2;
1163
1164     struct
1165     {
1166         short int               len;
1167         short int               id;
1168         unsigned                type;
1169         unsigned short          cvalue;
1170 #if 0
1171         char                    name[1];
1172 #endif
1173     } constant_v3;
1174
1175     struct
1176     {
1177         short int               len;
1178         short int               id;
1179         unsigned short          type;
1180         struct p_string         p_name;
1181     } udt_v1;
1182
1183     struct
1184     {
1185         short int               len;
1186         short int               id;
1187         unsigned                type;
1188         struct p_string         p_name;
1189     } udt_v2;
1190
1191     struct
1192     {
1193         short int               len;
1194         short int               id;
1195         unsigned int            type;
1196         char                    name[1];
1197     } udt_v3;
1198
1199     struct
1200     {
1201         short int               len;
1202         short int               id;
1203         char                    signature[4];
1204         struct p_string         p_name;
1205     } objname_v1;
1206
1207     struct
1208     {
1209         short int               len;
1210         short int               id;
1211         unsigned int            unknown;
1212         struct p_string         p_name;
1213     } compiland_v1;
1214
1215     struct
1216     {
1217         short int               len;
1218         short int               id;
1219         unsigned                unknown1[4];
1220         unsigned short          unknown2;
1221         struct p_string         p_name;
1222     } compiland_v2;
1223
1224     struct
1225     {
1226         short int               len;
1227         short int               id;
1228         unsigned int            unknown;
1229         char                    name[1];
1230     } compiland_v3;
1231
1232     struct
1233     {
1234         short int               len;
1235         short int               id;
1236         unsigned int            offset;
1237         unsigned short          segment;
1238     } ssearch_v1;
1239 };
1240
1241 #define S_COMPILAND_V1  0x0001
1242 #define S_REGISTER_V1   0x0002
1243 #define S_CONSTANT_V1   0x0003
1244 #define S_UDT_V1        0x0004
1245 #define S_SSEARCH_V1    0x0005
1246 #define S_END_V1        0x0006
1247 #define S_SKIP_V1       0x0007
1248 #define S_CVRESERVE_V1  0x0008
1249 #define S_OBJNAME_V1    0x0009
1250 #define S_ENDARG_V1     0x000a
1251 #define S_COBOLUDT_V1   0x000b
1252 #define S_MANYREG_V1    0x000c
1253 #define S_RETURN_V1     0x000d
1254 #define S_ENTRYTHIS_V1  0x000e
1255
1256 #define S_BPREL_V1      0x0200
1257 #define S_LDATA_V1      0x0201
1258 #define S_GDATA_V1      0x0202
1259 #define S_PUB_V1        0x0203
1260 #define S_LPROC_V1      0x0204
1261 #define S_GPROC_V1      0x0205
1262 #define S_THUNK_V1      0x0206
1263 #define S_BLOCK_V1      0x0207
1264 #define S_WITH_V1       0x0208
1265 #define S_LABEL_V1      0x0209
1266 #define S_CEXMODEL_V1   0x020a
1267 #define S_VFTPATH_V1    0x020b
1268 #define S_REGREL_V1     0x020c
1269 #define S_LTHREAD_V1    0x020d
1270 #define S_GTHREAD_V1    0x020e
1271
1272 #define S_PROCREF_V1    0x0400
1273 #define S_DATAREF_V1    0x0401
1274 #define S_ALIGN_V1      0x0402
1275 #define S_LPROCREF_V1   0x0403
1276
1277 #define S_REGISTER_V2   0x1001 /* Variants with new 32-bit type indices */
1278 #define S_CONSTANT_V2   0x1002
1279 #define S_UDT_V2        0x1003
1280 #define S_COBOLUDT_V2   0x1004
1281 #define S_MANYREG_V2    0x1005
1282 #define S_BPREL_V2      0x1006
1283 #define S_LDATA_V2      0x1007
1284 #define S_GDATA_V2      0x1008
1285 #define S_PUB_V2        0x1009
1286 #define S_LPROC_V2      0x100a
1287 #define S_GPROC_V2      0x100b
1288 #define S_VFTTABLE_V2   0x100c
1289 #define S_REGREL_V2     0x100d
1290 #define S_LTHREAD_V2    0x100e
1291 #define S_GTHREAD_V2    0x100f
1292 #if 0
1293 #define S_XXXXXXXXX_32  0x1012  /* seems linked to a function, content unknown */
1294 #endif
1295 #define S_COMPILAND_V2  0x1013
1296
1297 #define S_COMPILAND_V3  0x1101
1298 #define S_THUNK_V3      0x1102
1299 #define S_BLOCK_V3      0x1103
1300 #define S_LABEL_V3      0x1105
1301 #define S_REGISTER_V3   0x1106
1302 #define S_CONSTANT_V3   0x1107
1303 #define S_UDT_V3        0x1108
1304 #define S_BPREL_V3      0x110B
1305 #define S_LDATA_V3      0x110C
1306 #define S_GDATA_V3      0x110D
1307 #define S_PUB_V3        0x110E
1308 #define S_LPROC_V3      0x110F
1309 #define S_GPROC_V3      0x1110
1310 #define S_MSTOOL_V3     0x1116  /* not really understood */
1311 #define S_PUB_FUNC1_V3  0x1125  /* didn't get the difference between the two */
1312 #define S_PUB_FUNC2_V3  0x1127
1313
1314 /* ======================================== *
1315  *          Line number information
1316  * ======================================== */
1317
1318 union any_size
1319 {
1320     const char*                 c;
1321     const unsigned char*        uc;
1322     const short*                s;
1323     const int*                  i;
1324     const unsigned int*         ui;
1325 };
1326
1327 struct startend
1328 {
1329     unsigned int                start;
1330     unsigned int                end;
1331 };
1332
1333 struct codeview_linetab
1334 {
1335     unsigned int                nline;
1336     unsigned int                segno;
1337     unsigned int                start;
1338     unsigned int                end;
1339     unsigned int                source;
1340     const unsigned short*       linetab;
1341     const unsigned int*         offtab;
1342 };
1343
1344
1345 /* ======================================== *
1346  *            PDB file information
1347  * ======================================== */
1348
1349
1350 struct PDB_FILE
1351 {
1352     DWORD               size;
1353     DWORD               unknown;
1354 };
1355
1356 struct PDB_JG_HEADER
1357 {
1358     CHAR                ident[40];
1359     DWORD               signature;
1360     DWORD               block_size;
1361     WORD                free_list;
1362     WORD                total_alloc;
1363     struct PDB_FILE     toc;
1364     WORD                toc_block[1];
1365 };
1366
1367 struct PDB_DS_HEADER
1368 {
1369     char                signature[32];
1370     DWORD               block_size;
1371     DWORD               unknown1;
1372     DWORD               num_pages;
1373     DWORD               toc_size;
1374     DWORD               unknown2;
1375     DWORD               toc_page;
1376 };
1377
1378 struct PDB_JG_TOC
1379 {
1380     DWORD               num_files;
1381     struct PDB_FILE     file[1];
1382 };
1383
1384 struct PDB_DS_TOC
1385 {
1386     DWORD               num_files;
1387     DWORD               file_size[1];
1388 };
1389
1390 struct PDB_JG_ROOT
1391 {
1392     DWORD               Version;
1393     DWORD               TimeDateStamp;
1394     DWORD               Age;
1395     DWORD               cbNames;
1396     CHAR                names[1];
1397 };
1398
1399 struct PDB_DS_ROOT
1400 {
1401     DWORD               Version;
1402     DWORD               TimeDateStamp;
1403     DWORD               Age;
1404     GUID                guid;
1405     DWORD               cbNames;
1406     CHAR                names[1];
1407 };
1408
1409 typedef struct _PDB_TYPES_OLD
1410 {
1411     DWORD       version;
1412     WORD        first_index;
1413     WORD        last_index;
1414     DWORD       type_size;
1415     WORD        file;
1416     WORD        pad;
1417 } PDB_TYPES_OLD, *PPDB_TYPES_OLD;
1418
1419 typedef struct _PDB_TYPES
1420 {
1421     DWORD       version;
1422     DWORD       type_offset;
1423     DWORD       first_index;
1424     DWORD       last_index;
1425     DWORD       type_size;
1426     WORD        file;
1427     WORD        pad;
1428     DWORD       hash_size;
1429     DWORD       hash_base;
1430     DWORD       hash_offset;
1431     DWORD       hash_len;
1432     DWORD       search_offset;
1433     DWORD       search_len;
1434     DWORD       unknown_offset;
1435     DWORD       unknown_len;
1436 } PDB_TYPES, *PPDB_TYPES;
1437
1438 typedef struct _PDB_SYMBOL_RANGE
1439 {
1440     WORD        segment;
1441     WORD        pad1;
1442     DWORD       offset;
1443     DWORD       size;
1444     DWORD       characteristics;
1445     WORD        index;
1446     WORD        pad2;
1447 } PDB_SYMBOL_RANGE, *PPDB_SYMBOL_RANGE;
1448
1449 typedef struct _PDB_SYMBOL_RANGE_EX
1450 {
1451     WORD        segment;
1452     WORD        pad1;
1453     DWORD       offset;
1454     DWORD       size;
1455     DWORD       characteristics;
1456     WORD        index;
1457     WORD        pad2;
1458     DWORD       timestamp;
1459     DWORD       unknown;
1460 } PDB_SYMBOL_RANGE_EX, *PPDB_SYMBOL_RANGE_EX;
1461
1462 typedef struct _PDB_SYMBOL_FILE
1463 {
1464     DWORD       unknown1;
1465     PDB_SYMBOL_RANGE range;
1466     WORD        flag;
1467     WORD        file;
1468     DWORD       symbol_size;
1469     DWORD       lineno_size;
1470     DWORD       unknown2;
1471     DWORD       nSrcFiles;
1472     DWORD       attribute;
1473     CHAR        filename[1];
1474 } PDB_SYMBOL_FILE, *PPDB_SYMBOL_FILE;
1475
1476 typedef struct _PDB_SYMBOL_FILE_EX
1477 {
1478     DWORD       unknown1;
1479     PDB_SYMBOL_RANGE_EX range;
1480     WORD        flag;
1481     WORD        file;
1482     DWORD       symbol_size;
1483     DWORD       lineno_size;
1484     DWORD       unknown2;
1485     DWORD       nSrcFiles;
1486     DWORD       attribute;
1487     DWORD       reserved[2];
1488     CHAR        filename[1];
1489 } PDB_SYMBOL_FILE_EX, *PPDB_SYMBOL_FILE_EX;
1490
1491 typedef struct _PDB_SYMBOL_SOURCE
1492 {
1493     WORD        nModules;
1494     WORD        nSrcFiles;
1495     WORD        table[1];
1496 } PDB_SYMBOL_SOURCE, *PPDB_SYMBOL_SOURCE;
1497
1498 typedef struct _PDB_SYMBOL_IMPORT
1499 {
1500     DWORD       unknown1;
1501     DWORD       unknown2;
1502     DWORD       TimeDateStamp;
1503     DWORD       Age;
1504     CHAR        filename[1];
1505 } PDB_SYMBOL_IMPORT, *PPDB_SYMBOL_IMPORT;
1506
1507 typedef struct _PDB_SYMBOLS_OLD
1508 {
1509     WORD        hash1_file;
1510     WORD        hash2_file;
1511     WORD        gsym_file;
1512     WORD        pad;
1513     DWORD       module_size;
1514     DWORD       offset_size;
1515     DWORD       hash_size;
1516     DWORD       srcmodule_size;
1517 } PDB_SYMBOLS_OLD, *PPDB_SYMBOLS_OLD;
1518
1519 typedef struct _PDB_SYMBOLS
1520 {
1521     DWORD       signature;
1522     DWORD       version;
1523     DWORD       unknown;
1524     DWORD       hash1_file;
1525     DWORD       hash2_file;
1526     DWORD       gsym_file;
1527     DWORD       module_size;
1528     DWORD       offset_size;
1529     DWORD       hash_size;
1530     DWORD       srcmodule_size;
1531     DWORD       pdbimport_size;
1532     DWORD       resvd[5];
1533 } PDB_SYMBOLS, *PPDB_SYMBOLS;
1534
1535 #include "poppack.h"
1536
1537 /* ----------------------------------------------
1538  * Information used for parsing
1539  * ---------------------------------------------- */
1540
1541 typedef struct
1542 {
1543     DWORD  from;
1544     DWORD  to;
1545 } OMAP_DATA;
1546
1547 struct msc_debug_info
1548 {
1549     struct module*              module;
1550     int                         nsect;
1551     const IMAGE_SECTION_HEADER* sectp;
1552     int                         nomap;
1553     const OMAP_DATA*            omapp;
1554     const BYTE*                 root;
1555 };
1556
1557 /* coff.c */
1558 extern BOOL coff_process_info(const struct msc_debug_info* msc_dbg);
1559
1560 /* ===================================================
1561  * The old CodeView stuff (for NB09 and NB11)
1562  * =================================================== */
1563
1564 #define sstModule      0x120
1565 #define sstTypes       0x121
1566 #define sstPublic      0x122
1567 #define sstPublicSym   0x123
1568 #define sstSymbols     0x124
1569 #define sstAlignSym    0x125
1570 #define sstSrcLnSeg    0x126
1571 #define sstSrcModule   0x127
1572 #define sstLibraries   0x128
1573 #define sstGlobalSym   0x129
1574 #define sstGlobalPub   0x12a
1575 #define sstGlobalTypes 0x12b
1576 #define sstMPC         0x12c
1577 #define sstSegMap      0x12d
1578 #define sstSegName     0x12e
1579 #define sstPreComp     0x12f
1580 #define sstFileIndex   0x133
1581 #define sstStaticSym   0x134
1582
1583 /* overall structure information */
1584 typedef struct OMFSignature
1585 {
1586     char        Signature[4];
1587     long        filepos;
1588 } OMFSignature;
1589
1590 typedef struct OMFSignatureRSDS
1591 {
1592     char        Signature[4];
1593     GUID        guid;
1594     DWORD       unknown;
1595     CHAR        name[1];
1596 } OMFSignatureRSDS;
1597
1598 typedef struct _CODEVIEW_PDB_DATA
1599 {
1600     char        Signature[4];
1601     long        filepos;
1602     DWORD       timestamp;
1603     DWORD       unknown;
1604     CHAR        name[1];
1605 } CODEVIEW_PDB_DATA, *PCODEVIEW_PDB_DATA;
1606
1607 typedef struct OMFDirHeader
1608 {
1609     WORD        cbDirHeader;
1610     WORD        cbDirEntry;
1611     DWORD       cDir;
1612     DWORD       lfoNextDir;
1613     DWORD       flags;
1614 } OMFDirHeader;
1615
1616 typedef struct OMFDirEntry
1617 {
1618     WORD        SubSection;
1619     WORD        iMod;
1620     DWORD       lfo;
1621     DWORD       cb;
1622 } OMFDirEntry;
1623
1624 /* sstModule subsection */
1625
1626 typedef struct OMFSegDesc
1627 {
1628     WORD        Seg;
1629     WORD        pad;
1630     DWORD       Off;
1631     DWORD       cbSeg;
1632 } OMFSegDesc;
1633
1634 typedef struct OMFModule
1635 {
1636     WORD        ovlNumber;
1637     WORD        iLib;
1638     WORD        cSeg;
1639     char        Style[2];
1640 /*
1641     OMFSegDesc  SegInfo[cSeg];
1642     p_string    Name;
1643 */
1644 } OMFModule;
1645
1646 typedef struct OMFGlobalTypes
1647 {
1648     DWORD       flags;
1649     DWORD       cTypes;
1650 /*
1651     DWORD       offset[cTypes];
1652                 types_record[];
1653 */
1654 } OMFGlobalTypes;
1655
1656 /* sstGlobalPub section */
1657
1658 /* Header for symbol table */
1659 typedef struct OMFSymHash
1660 {
1661     unsigned short  symhash;
1662     unsigned short  addrhash;
1663     unsigned long   cbSymbol;
1664     unsigned long   cbHSym;
1665     unsigned long   cbHAddr;
1666 } OMFSymHash;
1667
1668 /* sstSegMap section */
1669
1670 typedef struct OMFSegMapDesc
1671 {
1672     unsigned short  flags;
1673     unsigned short  ovl;
1674     unsigned short  group;
1675     unsigned short  frame;
1676     unsigned short  iSegName;
1677     unsigned short  iClassName;
1678     unsigned long   offset;
1679     unsigned long   cbSeg;
1680 } OMFSegMapDesc;
1681
1682 typedef struct OMFSegMap
1683 {
1684     unsigned short  cSeg;
1685     unsigned short  cSegLog;
1686 /*    OMFSegMapDesc   rgDesc[0];*/
1687 } OMFSegMap;
1688
1689
1690 /* sstSrcModule section */
1691
1692 typedef struct OMFSourceLine
1693 {
1694     unsigned short  Seg;
1695     unsigned short  cLnOff;
1696     unsigned long   offset[1];
1697     unsigned short  lineNbr[1];
1698 } OMFSourceLine;
1699
1700 typedef struct OMFSourceFile
1701 {
1702     unsigned short  cSeg;
1703     unsigned short  reserved;
1704     unsigned long   baseSrcLn[1];
1705     unsigned short  cFName;
1706     char            Name;
1707 } OMFSourceFile;
1708
1709 typedef struct OMFSourceModule
1710 {
1711     unsigned short  cFile;
1712     unsigned short  cSeg;
1713     unsigned long   baseSrcFile[1];
1714 } OMFSourceModule;