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:
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
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'
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
78 * The different flavors can coexist in the same file (is this really
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
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.
101 /* ======================================== *
103 * ======================================== */
107 unsigned char namelen
;
115 unsigned short int len
;
121 unsigned short int len
;
129 unsigned short int len
;
137 unsigned short int len
;
141 struct p_string p_name
;
146 unsigned short int len
;
148 unsigned int datatype
;
149 unsigned int attribute
;
150 struct p_string p_name
;
155 unsigned short int len
;
159 unsigned short int arrlen
; /* numeric leaf */
161 struct p_string p_name
;
167 unsigned short int len
;
169 unsigned int elemtype
;
170 unsigned int idxtype
;
171 unsigned short int arrlen
; /* numeric leaf */
173 struct p_string p_name
;
179 unsigned short int len
;
181 unsigned int elemtype
;
182 unsigned int idxtype
;
183 unsigned short int arrlen
; /* numeric leaf */
191 unsigned short int len
;
198 unsigned short int structlen
; /* numeric leaf */
200 struct p_string p_name
;
206 unsigned short int len
;
210 unsigned int fieldlist
;
211 unsigned int derived
;
213 unsigned short int structlen
; /* numeric leaf */
215 struct p_string p_name
;
221 unsigned short int len
;
225 unsigned int fieldlist
;
226 unsigned int derived
;
228 unsigned short int structlen
; /* numeric leaf */
236 unsigned short int len
;
241 unsigned short int un_len
; /* numeric leaf */
243 struct p_string p_name
;
249 unsigned short int len
;
253 unsigned int fieldlist
;
254 unsigned short int un_len
; /* numeric leaf */
256 struct p_string p_name
;
262 unsigned short int len
;
266 unsigned int fieldlist
;
267 unsigned short int un_len
; /* numeric leaf */
275 unsigned short int len
;
281 struct p_string p_name
;
286 unsigned short int len
;
291 unsigned int fieldlist
;
292 struct p_string p_name
;
297 unsigned short int len
;
302 unsigned int fieldlist
;
308 unsigned short int len
;
310 unsigned short int rvtype
;
312 unsigned char reserved
;
313 unsigned short int params
;
314 unsigned short int arglist
;
319 unsigned short int len
;
323 unsigned char reserved
;
324 unsigned short int params
;
325 unsigned int arglist
;
330 unsigned short int len
;
332 unsigned short int rvtype
;
333 unsigned short int class_type
;
334 unsigned short int this_type
;
336 unsigned char reserved
;
337 unsigned short int params
;
338 unsigned short int arglist
;
339 unsigned int this_adjust
;
344 unsigned short int len
;
347 unsigned int class_type
;
350 unsigned char reserved
;
351 unsigned short params
;
352 unsigned int arglist
;
353 unsigned int this_adjust
;
357 union codeview_reftype
361 unsigned short int len
;
367 unsigned short int len
;
369 unsigned char list
[1];
374 unsigned short int len
;
377 unsigned char bitoff
;
383 unsigned short int len
;
387 unsigned char bitoff
;
392 unsigned short int len
;
395 unsigned short args
[1];
400 unsigned short int len
;
408 unsigned short int len
;
411 unsigned short drvdcls
[1];
416 unsigned short int len
;
423 union codeview_fieldtype
435 unsigned short int offset
; /* numeric leaf */
443 unsigned short int offset
; /* numeric leaf */
452 unsigned short int vbpoff
; /* numeric leaf */
454 unsigned short int vboff
; /* numeric leaf */
464 unsigned short int vbpoff
; /* numeric leaf */
466 unsigned short int vboff
; /* numeric leaf */
474 unsigned short int value
; /* numeric leaf */
476 struct p_string p_name
;
484 unsigned short int value
; /* numeric leaf */
494 struct p_string p_name
;
502 struct p_string p_name
;
510 unsigned short int offset
; /* numeric leaf */
512 struct p_string p_name
;
521 unsigned short int offset
; /* numeric leaf */
523 struct p_string p_name
;
532 unsigned short int offset
; /* numeric leaf */
534 unsigned char name
[1];
544 struct p_string p_name
;
552 struct p_string p_name
;
568 struct p_string p_name
;
576 struct p_string p_name
;
591 struct p_string p_name
;
599 struct p_string p_name
;
641 struct p_string p_name
;
649 struct p_string p_name
;
665 unsigned int vtab_offset
;
666 struct p_string p_name
;
674 unsigned int vtab_offset
;
675 struct p_string p_name
;
683 unsigned int vtab_offset
;
707 struct p_string p_name
;
715 struct p_string p_name
;
723 struct p_string p_name
;
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
736 * Official MS documentation says that type (< 0x4000, so 12 bits) is made of:
737 * +----------+------+------+----------+------+
738 * | 11 | 10-8 | 7-4 | 3 | 2-0 |
739 * +----------+------+------+----------+------+
740 * | reserved | mode | type | reserved | size |
741 * +----------+------+------+----------+------+
742 * In recent PDB files, type 8 exists, and is seen as an HRESULT... So we've
743 * added this basic type... as if bit 3 had been integrated into the size field
746 /* the type number of a built-in type is a 16-bit value specified in the following format:
747 bit # | 11 | 10-8 | 7-4 | 3 | 2-0 |
748 field | reserved | mode | type | reserved | size |
751 <type> is one of the following types:
753 0x01 Signed integral value
754 0x02 Unsigned integral value
767 0x0f Reserved for debugger expression evaluator
769 <size> is an enumerated value for each of the types.
775 0x04 Basic 8-byte currency value
776 0x05 Near Basic string
777 0x06 Far Basic string
778 0x07 Untranslated type from previous Microsoft symbol formats
779 Type = signed/unsigned integral and Boolean values
788 Type = real and complex
803 0x02 2-byte signed integer
804 0x03 2-byte unsigned integer
805 0x04 4-byte signed integer
806 0x05 4-byte unsigned integer
807 0x06 8-byte signed integer
808 0x07 8-byte unsigned integer
810 <mode> is the pointer mode:
811 0x00 Direct; not a pointer
815 0x04 32-bit near pointer
816 0x05 32-bit far pointer
817 0x06 64-bit near pointer
822 #define T_NOTYPE 0x0000 /* Notype */
823 #define T_ABS 0x0001 /* Abs */
824 #define T_SEGMENT 0x0002 /* segment type */
825 #define T_VOID 0x0003 /* Void */
826 #define T_CURRENCY 0x0004 /* basic 8-byte currency value */
827 #define T_NBASICSTR 0x0005 /* near basic string */
828 #define T_FBASICSTR 0x0006 /* far basic string */
829 #define T_NOTTRANS 0x0007 /* untranslated type record from MS symbol format */
830 #define T_HRESULT 0x0008 /* HRESULT - or error code ??? */
831 #define T_CHAR 0x0010 /* signed char */
832 #define T_SHORT 0x0011 /* short */
833 #define T_LONG 0x0012 /* long */
834 #define T_QUAD 0x0013 /* long long */
835 #define T_UCHAR 0x0020 /* unsigned char */
836 #define T_USHORT 0x0021 /* unsigned short */
837 #define T_ULONG 0x0022 /* unsigned long */
838 #define T_UQUAD 0x0023 /* unsigned long long */
839 #define T_BOOL08 0x0030 /* 8-bit boolean */
840 #define T_BOOL16 0x0031 /* 16-bit boolean */
841 #define T_BOOL32 0x0032 /* 32-bit boolean */
842 #define T_BOOL64 0x0033 /* 64-bit boolean */
843 #define T_REAL32 0x0040 /* float */
844 #define T_REAL64 0x0041 /* double */
845 #define T_REAL80 0x0042 /* 80-bit real */
846 #define T_REAL128 0x0043 /* 128-bit real */
847 #define T_REAL48 0x0044 /* 48-bit real */
848 #define T_CPLX32 0x0050 /* 32-bit complex number */
849 #define T_CPLX64 0x0051 /* 64-bit complex number */
850 #define T_CPLX80 0x0052 /* 80-bit complex number */
851 #define T_CPLX128 0x0053 /* 128-bit complex number */
852 #define T_BIT 0x0060 /* bit */
853 #define T_PASCHAR 0x0061 /* pascal CHAR */
854 #define T_RCHAR 0x0070 /* real char */
855 #define T_WCHAR 0x0071 /* wide char */
856 #define T_INT2 0x0072 /* real 16-bit signed int */
857 #define T_UINT2 0x0073 /* real 16-bit unsigned int */
858 #define T_INT4 0x0074 /* int */
859 #define T_UINT4 0x0075 /* unsigned int */
860 #define T_INT8 0x0076 /* 64-bit signed int */
861 #define T_UINT8 0x0077 /* 64-bit unsigned int */
864 /* near pointers to basic types */
865 #define T_PVOID 0x0103 /* near pointer to void */
866 #define T_PCHAR 0x0110 /* Near pointer to 8-bit signed */
867 #define T_PSHORT 0x0111 /* Near pointer to 16-bit signed */
868 #define T_PLONG 0x0112 /* Near pointer to 32-bit signed */
869 #define T_PQUAD 0x0113 /* Near pointer to 64-bit signed */
870 #define T_PUCHAR 0x0120 /* Near pointer to 8-bit unsigned */
871 #define T_PUSHORT 0x0121 /* Near pointer to 16-bit unsigned */
872 #define T_PULONG 0x0122 /* Near pointer to 32-bit unsigned */
873 #define T_PUQUAD 0x0123 /* Near pointer to 64-bit unsigned */
874 #define T_PBOOL08 0x0130 /* Near pointer to 8-bit Boolean */
875 #define T_PBOOL16 0x0131 /* Near pointer to 16-bit Boolean */
876 #define T_PBOOL32 0x0132 /* Near pointer to 32-bit Boolean */
877 #define T_PBOOL64 0x0133 /* Near pointer to 64-bit Boolean */
878 #define T_PREAL32 0x0140 /* Near pointer to 32-bit real */
879 #define T_PREAL64 0x0141 /* Near pointer to 64-bit real */
880 #define T_PREAL80 0x0142 /* Near pointer to 80-bit real */
881 #define T_PREAL128 0x0143 /* Near pointer to 128-bit real */
882 #define T_PREAL48 0x0144 /* Near pointer to 48-bit real */
883 #define T_PCPLX32 0x0150 /* Near pointer to 32-bit complex */
884 #define T_PCPLX64 0x0151 /* Near pointer to 64-bit complex */
885 #define T_PCPLX80 0x0152 /* Near pointer to 80-bit complex */
886 #define T_PCPLX128 0x0153 /* Near pointer to 128-bit complex */
887 #define T_PRCHAR 0x0170 /* Near pointer to a real char */
888 #define T_PWCHAR 0x0171 /* Near pointer to a wide char */
889 #define T_PINT2 0x0172 /* Near pointer to 16-bit signed int */
890 #define T_PUINT2 0x0173 /* Near pointer to 16-bit unsigned int */
891 #define T_PINT4 0x0174 /* Near pointer to 32-bit signed int */
892 #define T_PUINT4 0x0175 /* Near pointer to 32-bit unsigned int */
893 #define T_PINT8 0x0176 /* Near pointer to 64-bit signed int */
894 #define T_PUINT8 0x0177 /* Near pointer to 64-bit unsigned int */
897 /* far pointers to basic types */
898 #define T_PFVOID 0x0203 /* Far pointer to void */
899 #define T_PFCHAR 0x0210 /* Far pointer to 8-bit signed */
900 #define T_PFSHORT 0x0211 /* Far pointer to 16-bit signed */
901 #define T_PFLONG 0x0212 /* Far pointer to 32-bit signed */
902 #define T_PFQUAD 0x0213 /* Far pointer to 64-bit signed */
903 #define T_PFUCHAR 0x0220 /* Far pointer to 8-bit unsigned */
904 #define T_PFUSHORT 0x0221 /* Far pointer to 16-bit unsigned */
905 #define T_PFULONG 0x0222 /* Far pointer to 32-bit unsigned */
906 #define T_PFUQUAD 0x0223 /* Far pointer to 64-bit unsigned */
907 #define T_PFBOOL08 0x0230 /* Far pointer to 8-bit Boolean */
908 #define T_PFBOOL16 0x0231 /* Far pointer to 16-bit Boolean */
909 #define T_PFBOOL32 0x0232 /* Far pointer to 32-bit Boolean */
910 #define T_PFBOOL64 0x0233 /* Far pointer to 64-bit Boolean */
911 #define T_PFREAL32 0x0240 /* Far pointer to 32-bit real */
912 #define T_PFREAL64 0x0241 /* Far pointer to 64-bit real */
913 #define T_PFREAL80 0x0242 /* Far pointer to 80-bit real */
914 #define T_PFREAL128 0x0243 /* Far pointer to 128-bit real */
915 #define T_PFREAL48 0x0244 /* Far pointer to 48-bit real */
916 #define T_PFCPLX32 0x0250 /* Far pointer to 32-bit complex */
917 #define T_PFCPLX64 0x0251 /* Far pointer to 64-bit complex */
918 #define T_PFCPLX80 0x0252 /* Far pointer to 80-bit complex */
919 #define T_PFCPLX128 0x0253 /* Far pointer to 128-bit complex */
920 #define T_PFRCHAR 0x0270 /* Far pointer to a real char */
921 #define T_PFWCHAR 0x0271 /* Far pointer to a wide char */
922 #define T_PFINT2 0x0272 /* Far pointer to 16-bit signed int */
923 #define T_PFUINT2 0x0273 /* Far pointer to 16-bit unsigned int */
924 #define T_PFINT4 0x0274 /* Far pointer to 32-bit signed int */
925 #define T_PFUINT4 0x0275 /* Far pointer to 32-bit unsigned int */
926 #define T_PFINT8 0x0276 /* Far pointer to 64-bit signed int */
927 #define T_PFUINT8 0x0277 /* Far pointer to 64-bit unsigned int */
930 /* huge pointers to basic types */
931 #define T_PHVOID 0x0303 /* Huge pointer to void */
932 #define T_PHCHAR 0x0310 /* Huge pointer to 8-bit signed */
933 #define T_PHSHORT 0x0311 /* Huge pointer to 16-bit signed */
934 #define T_PHLONG 0x0312 /* Huge pointer to 32-bit signed */
935 #define T_PHQUAD 0x0313 /* Huge pointer to 64-bit signed */
936 #define T_PHUCHAR 0x0320 /* Huge pointer to 8-bit unsigned */
937 #define T_PHUSHORT 0x0321 /* Huge pointer to 16-bit unsigned */
938 #define T_PHULONG 0x0322 /* Huge pointer to 32-bit unsigned */
939 #define T_PHUQUAD 0x0323 /* Huge pointer to 64-bit unsigned */
940 #define T_PHBOOL08 0x0330 /* Huge pointer to 8-bit Boolean */
941 #define T_PHBOOL16 0x0331 /* Huge pointer to 16-bit Boolean */
942 #define T_PHBOOL32 0x0332 /* Huge pointer to 32-bit Boolean */
943 #define T_PHBOOL64 0x0333 /* Huge pointer to 64-bit Boolean */
944 #define T_PHREAL32 0x0340 /* Huge pointer to 32-bit real */
945 #define T_PHREAL64 0x0341 /* Huge pointer to 64-bit real */
946 #define T_PHREAL80 0x0342 /* Huge pointer to 80-bit real */
947 #define T_PHREAL128 0x0343 /* Huge pointer to 128-bit real */
948 #define T_PHREAL48 0x0344 /* Huge pointer to 48-bit real */
949 #define T_PHCPLX32 0x0350 /* Huge pointer to 32-bit complex */
950 #define T_PHCPLX64 0x0351 /* Huge pointer to 64-bit complex */
951 #define T_PHCPLX80 0x0352 /* Huge pointer to 80-bit complex */
952 #define T_PHCPLX128 0x0353 /* Huge pointer to 128-bit real */
953 #define T_PHRCHAR 0x0370 /* Huge pointer to a real char */
954 #define T_PHWCHAR 0x0371 /* Huge pointer to a wide char */
955 #define T_PHINT2 0x0372 /* Huge pointer to 16-bit signed int */
956 #define T_PHUINT2 0x0373 /* Huge pointer to 16-bit unsigned int */
957 #define T_PHINT4 0x0374 /* Huge pointer to 32-bit signed int */
958 #define T_PHUINT4 0x0375 /* Huge pointer to 32-bit unsigned int */
959 #define T_PHINT8 0x0376 /* Huge pointer to 64-bit signed int */
960 #define T_PHUINT8 0x0377 /* Huge pointer to 64-bit unsigned int */
963 /* 32-bit near pointers to basic types */
964 #define T_32PVOID 0x0403 /* 32-bit near pointer to void */
965 #define T_32PHRESULT 0x0408 /* 16:32 near pointer to HRESULT - or error code ??? */
966 #define T_32PCHAR 0x0410 /* 16:32 near pointer to 8-bit signed */
967 #define T_32PSHORT 0x0411 /* 16:32 near pointer to 16-bit signed */
968 #define T_32PLONG 0x0412 /* 16:32 near pointer to 32-bit signed */
969 #define T_32PQUAD 0x0413 /* 16:32 near pointer to 64-bit signed */
970 #define T_32PUCHAR 0x0420 /* 16:32 near pointer to 8-bit unsigned */
971 #define T_32PUSHORT 0x0421 /* 16:32 near pointer to 16-bit unsigned */
972 #define T_32PULONG 0x0422 /* 16:32 near pointer to 32-bit unsigned */
973 #define T_32PUQUAD 0x0423 /* 16:32 near pointer to 64-bit unsigned */
974 #define T_32PBOOL08 0x0430 /* 16:32 near pointer to 8-bit Boolean */
975 #define T_32PBOOL16 0x0431 /* 16:32 near pointer to 16-bit Boolean */
976 #define T_32PBOOL32 0x0432 /* 16:32 near pointer to 32-bit Boolean */
977 #define T_32PBOOL64 0x0433 /* 16:32 near pointer to 64-bit Boolean */
978 #define T_32PREAL32 0x0440 /* 16:32 near pointer to 32-bit real */
979 #define T_32PREAL64 0x0441 /* 16:32 near pointer to 64-bit real */
980 #define T_32PREAL80 0x0442 /* 16:32 near pointer to 80-bit real */
981 #define T_32PREAL128 0x0443 /* 16:32 near pointer to 128-bit real */
982 #define T_32PREAL48 0x0444 /* 16:32 near pointer to 48-bit real */
983 #define T_32PCPLX32 0x0450 /* 16:32 near pointer to 32-bit complex */
984 #define T_32PCPLX64 0x0451 /* 16:32 near pointer to 64-bit complex */
985 #define T_32PCPLX80 0x0452 /* 16:32 near pointer to 80-bit complex */
986 #define T_32PCPLX128 0x0453 /* 16:32 near pointer to 128-bit complex */
987 #define T_32PRCHAR 0x0470 /* 16:32 near pointer to a real char */
988 #define T_32PWCHAR 0x0471 /* 16:32 near pointer to a wide char */
989 #define T_32PINT2 0x0472 /* 16:32 near pointer to 16-bit signed int */
990 #define T_32PUINT2 0x0473 /* 16:32 near pointer to 16-bit unsigned int */
991 #define T_32PINT4 0x0474 /* 16:32 near pointer to 32-bit signed int */
992 #define T_32PUINT4 0x0475 /* 16:32 near pointer to 32-bit unsigned int */
993 #define T_32PINT8 0x0476 /* 16:32 near pointer to 64-bit signed int */
994 #define T_32PUINT8 0x0477 /* 16:32 near pointer to 64-bit unsigned int */
997 /* 32-bit far pointers to basic types */
998 #define T_32PFVOID 0x0503 /* 32-bit far pointer to void */
999 #define T_32PFHRESULT 0x0508 /* 16:32 far pointer to HRESULT - or error code ??? */
1000 #define T_32PFCHAR 0x0510 /* 16:32 far pointer to 8-bit signed */
1001 #define T_32PFSHORT 0x0511 /* 16:32 far pointer to 16-bit signed */
1002 #define T_32PFLONG 0x0512 /* 16:32 far pointer to 32-bit signed */
1003 #define T_32PFQUAD 0x0513 /* 16:32 far pointer to 64-bit signed */
1004 #define T_32PFUCHAR 0x0520 /* 16:32 far pointer to 8-bit unsigned */
1005 #define T_32PFUSHORT 0x0521 /* 16:32 far pointer to 16-bit unsigned */
1006 #define T_32PFULONG 0x0522 /* 16:32 far pointer to 32-bit unsigned */
1007 #define T_32PFUQUAD 0x0523 /* 16:32 far pointer to 64-bit unsigned */
1008 #define T_32PFBOOL08 0x0530 /* 16:32 far pointer to 8-bit Boolean */
1009 #define T_32PFBOOL16 0x0531 /* 16:32 far pointer to 16-bit Boolean */
1010 #define T_32PFBOOL32 0x0532 /* 16:32 far pointer to 32-bit Boolean */
1011 #define T_32PFBOOL64 0x0533 /* 16:32 far pointer to 64-bit Boolean */
1012 #define T_32PFREAL32 0x0540 /* 16:32 far pointer to 32-bit real */
1013 #define T_32PFREAL64 0x0541 /* 16:32 far pointer to 64-bit real */
1014 #define T_32PFREAL80 0x0542 /* 16:32 far pointer to 80-bit real */
1015 #define T_32PFREAL128 0x0543 /* 16:32 far pointer to 128-bit real */
1016 #define T_32PFREAL48 0x0544 /* 16:32 far pointer to 48-bit real */
1017 #define T_32PFCPLX32 0x0550 /* 16:32 far pointer to 32-bit complex */
1018 #define T_32PFCPLX64 0x0551 /* 16:32 far pointer to 64-bit complex */
1019 #define T_32PFCPLX80 0x0552 /* 16:32 far pointer to 80-bit complex */
1020 #define T_32PFCPLX128 0x0553 /* 16:32 far pointer to 128-bit complex */
1021 #define T_32PFRCHAR 0x0570 /* 16:32 far pointer to a real char */
1022 #define T_32PFWCHAR 0x0571 /* 16:32 far pointer to a wide char */
1023 #define T_32PFINT2 0x0572 /* 16:32 far pointer to 16-bit signed int */
1024 #define T_32PFUINT2 0x0573 /* 16:32 far pointer to 16-bit unsigned int */
1025 #define T_32PFINT4 0x0574 /* 16:32 far pointer to 32-bit signed int */
1026 #define T_32PFUINT4 0x0575 /* 16:32 far pointer to 32-bit unsigned int */
1027 #define T_32PFINT8 0x0576 /* 16:32 far pointer to 64-bit signed int */
1028 #define T_32PFUINT8 0x0577 /* 16:32 far pointer to 64-bit unsigned int */
1030 /* 64-bit near pointers to basic types */
1031 #define T_64PVOID 0x0603 /* 64-bit near pointer to void */
1032 #define T_64PHRESULT 0x0608 /* 64 near pointer to HRESULT - or error code ??? */
1033 #define T_64PCHAR 0x0610 /* 64 near pointer to 8-bit signed */
1034 #define T_64PSHORT 0x0611 /* 64 near pointer to 16-bit signed */
1035 #define T_64PLONG 0x0612 /* 64 near pointer to 32-bit signed */
1036 #define T_64PQUAD 0x0613 /* 64 near pointer to 64-bit signed */
1037 #define T_64PUCHAR 0x0620 /* 64 near pointer to 8-bit unsigned */
1038 #define T_64PUSHORT 0x0621 /* 64 near pointer to 16-bit unsigned */
1039 #define T_64PULONG 0x0622 /* 64 near pointer to 32-bit unsigned */
1040 #define T_64PUQUAD 0x0623 /* 64 near pointer to 64-bit unsigned */
1041 #define T_64PBOOL08 0x0630 /* 64 near pointer to 8-bit Boolean */
1042 #define T_64PBOOL16 0x0631 /* 64 near pointer to 16-bit Boolean */
1043 #define T_64PBOOL32 0x0632 /* 64 near pointer to 32-bit Boolean */
1044 #define T_64PBOOL64 0x0633 /* 64 near pointer to 64-bit Boolean */
1045 #define T_64PREAL32 0x0640 /* 64 near pointer to 32-bit real */
1046 #define T_64PREAL64 0x0641 /* 64 near pointer to 64-bit real */
1047 #define T_64PREAL80 0x0642 /* 64 near pointer to 80-bit real */
1048 #define T_64PREAL128 0x0643 /* 64 near pointer to 128-bit real */
1049 #define T_64PREAL48 0x0644 /* 64 near pointer to 48-bit real */
1050 #define T_64PCPLX32 0x0650 /* 64 near pointer to 32-bit complex */
1051 #define T_64PCPLX64 0x0651 /* 64 near pointer to 64-bit complex */
1052 #define T_64PCPLX80 0x0652 /* 64 near pointer to 80-bit complex */
1053 #define T_64PCPLX128 0x0653 /* 64 near pointer to 128-bit complex */
1054 #define T_64PRCHAR 0x0670 /* 64 near pointer to a real char */
1055 #define T_64PWCHAR 0x0671 /* 64 near pointer to a wide char */
1056 #define T_64PINT2 0x0672 /* 64 near pointer to 16-bit signed int */
1057 #define T_64PUINT2 0x0673 /* 64 near pointer to 16-bit unsigned int */
1058 #define T_64PINT4 0x0674 /* 64 near pointer to 32-bit signed int */
1059 #define T_64PUINT4 0x0675 /* 64 near pointer to 32-bit unsigned int */
1060 #define T_64PINT8 0x0676 /* 64 near pointer to 64-bit signed int */
1061 #define T_64PUINT8 0x0677 /* 64 near pointer to 64-bit unsigned int */
1063 /* counts, bit masks, and shift values needed to access various parts of the built-in type numbers */
1064 #define T_MAXPREDEFINEDTYPE 0x0580 /* maximum type index for all built-in types */
1065 #define T_MAXBASICTYPE 0x0080 /* maximum type index all non-pointer built-in types */
1066 #define T_BASICTYPE_MASK 0x00ff /* mask of bits that can potentially identify a non-pointer basic type */
1067 #define T_BASICTYPE_SHIFT 8 /* shift count to push out the basic type bits from a type number */
1068 #define T_MODE_MASK 0x0700 /* type mode mask (ptr/non-ptr) */
1069 #define T_SIZE_MASK 0x0007 /* type size mask (depends on 'type' value) */
1070 #define T_TYPE_MASK 0x00f0 /* type type mask (data treatment mode) */
1072 /* bit patterns for the <mode> portion of a built-in type number */
1073 #define T_NEARPTR_BITS 0x0100
1074 #define T_FARPTR_BITS 0x0200
1075 #define T_HUGEPTR_BITS 0x0300
1076 #define T_NEAR32PTR_BITS 0x0400
1077 #define T_FAR32PTR_BITS 0x0500
1078 #define T_NEAR64PTR_BITS 0x0600
1080 #define LF_MODIFIER_V1 0x0001
1081 #define LF_POINTER_V1 0x0002
1082 #define LF_ARRAY_V1 0x0003
1083 #define LF_CLASS_V1 0x0004
1084 #define LF_STRUCTURE_V1 0x0005
1085 #define LF_UNION_V1 0x0006
1086 #define LF_ENUM_V1 0x0007
1087 #define LF_PROCEDURE_V1 0x0008
1088 #define LF_MFUNCTION_V1 0x0009
1089 #define LF_VTSHAPE_V1 0x000a
1090 #define LF_COBOL0_V1 0x000b
1091 #define LF_COBOL1_V1 0x000c
1092 #define LF_BARRAY_V1 0x000d
1093 #define LF_LABEL_V1 0x000e
1094 #define LF_NULL_V1 0x000f
1095 #define LF_NOTTRAN_V1 0x0010
1096 #define LF_DIMARRAY_V1 0x0011
1097 #define LF_VFTPATH_V1 0x0012
1098 #define LF_PRECOMP_V1 0x0013
1099 #define LF_ENDPRECOMP_V1 0x0014
1100 #define LF_OEM_V1 0x0015
1101 #define LF_TYPESERVER_V1 0x0016
1103 #define LF_MODIFIER_V2 0x1001 /* variants with new 32-bit type indices (V2) */
1104 #define LF_POINTER_V2 0x1002
1105 #define LF_ARRAY_V2 0x1003
1106 #define LF_CLASS_V2 0x1004
1107 #define LF_STRUCTURE_V2 0x1005
1108 #define LF_UNION_V2 0x1006
1109 #define LF_ENUM_V2 0x1007
1110 #define LF_PROCEDURE_V2 0x1008
1111 #define LF_MFUNCTION_V2 0x1009
1112 #define LF_COBOL0_V2 0x100a
1113 #define LF_BARRAY_V2 0x100b
1114 #define LF_DIMARRAY_V2 0x100c
1115 #define LF_VFTPATH_V2 0x100d
1116 #define LF_PRECOMP_V2 0x100e
1117 #define LF_OEM_V2 0x100f
1119 #define LF_SKIP_V1 0x0200
1120 #define LF_ARGLIST_V1 0x0201
1121 #define LF_DEFARG_V1 0x0202
1122 #define LF_LIST_V1 0x0203
1123 #define LF_FIELDLIST_V1 0x0204
1124 #define LF_DERIVED_V1 0x0205
1125 #define LF_BITFIELD_V1 0x0206
1126 #define LF_METHODLIST_V1 0x0207
1127 #define LF_DIMCONU_V1 0x0208
1128 #define LF_DIMCONLU_V1 0x0209
1129 #define LF_DIMVARU_V1 0x020a
1130 #define LF_DIMVARLU_V1 0x020b
1131 #define LF_REFSYM_V1 0x020c
1133 #define LF_SKIP_V2 0x1200 /* variants with new 32-bit type indices (V2) */
1134 #define LF_ARGLIST_V2 0x1201
1135 #define LF_DEFARG_V2 0x1202
1136 #define LF_FIELDLIST_V2 0x1203
1137 #define LF_DERIVED_V2 0x1204
1138 #define LF_BITFIELD_V2 0x1205
1139 #define LF_METHODLIST_V2 0x1206
1140 #define LF_DIMCONU_V2 0x1207
1141 #define LF_DIMCONLU_V2 0x1208
1142 #define LF_DIMVARU_V2 0x1209
1143 #define LF_DIMVARLU_V2 0x120a
1146 #define LF_BCLASS_V1 0x0400
1147 #define LF_VBCLASS_V1 0x0401
1148 #define LF_IVBCLASS_V1 0x0402
1149 #define LF_ENUMERATE_V1 0x0403
1150 #define LF_FRIENDFCN_V1 0x0404
1151 #define LF_INDEX_V1 0x0405
1152 #define LF_MEMBER_V1 0x0406
1153 #define LF_STMEMBER_V1 0x0407
1154 #define LF_METHOD_V1 0x0408
1155 #define LF_NESTTYPE_V1 0x0409
1156 #define LF_VFUNCTAB_V1 0x040a
1157 #define LF_FRIENDCLS_V1 0x040b
1158 #define LF_ONEMETHOD_V1 0x040c
1159 #define LF_VFUNCOFF_V1 0x040d
1160 #define LF_NESTTYPEEX_V1 0x040e
1161 #define LF_MEMBERMODIFY_V1 0x040f
1163 #define LF_BCLASS_V2 0x1400 /* variants with new 32-bit type indices (V2) */
1164 #define LF_VBCLASS_V2 0x1401
1165 #define LF_IVBCLASS_V2 0x1402
1166 #define LF_FRIENDFCN_V2 0x1403
1167 #define LF_INDEX_V2 0x1404
1168 #define LF_MEMBER_V2 0x1405
1169 #define LF_STMEMBER_V2 0x1406
1170 #define LF_METHOD_V2 0x1407
1171 #define LF_NESTTYPE_V2 0x1408
1172 #define LF_VFUNCTAB_V2 0x1409
1173 #define LF_FRIENDCLS_V2 0x140a
1174 #define LF_ONEMETHOD_V2 0x140b
1175 #define LF_VFUNCOFF_V2 0x140c
1176 #define LF_NESTTYPEEX_V2 0x140d
1178 #define LF_ENUMERATE_V3 0x1502
1179 #define LF_ARRAY_V3 0x1503
1180 #define LF_CLASS_V3 0x1504
1181 #define LF_STRUCTURE_V3 0x1505
1182 #define LF_UNION_V3 0x1506
1183 #define LF_ENUM_V3 0x1507
1184 #define LF_MEMBER_V3 0x150d
1185 #define LF_STMEMBER_V3 0x150e
1186 #define LF_METHOD_V3 0x150f
1187 #define LF_NESTTYPE_V3 0x1510
1188 #define LF_ONEMETHOD_V3 0x1511
1190 #define LF_NUMERIC 0x8000 /* numeric leaf types */
1191 #define LF_CHAR 0x8000
1192 #define LF_SHORT 0x8001
1193 #define LF_USHORT 0x8002
1194 #define LF_LONG 0x8003
1195 #define LF_ULONG 0x8004
1196 #define LF_REAL32 0x8005
1197 #define LF_REAL64 0x8006
1198 #define LF_REAL80 0x8007
1199 #define LF_REAL128 0x8008
1200 #define LF_QUADWORD 0x8009
1201 #define LF_UQUADWORD 0x800a
1202 #define LF_REAL48 0x800b
1203 #define LF_COMPLEX32 0x800c
1204 #define LF_COMPLEX64 0x800d
1205 #define LF_COMPLEX80 0x800e
1206 #define LF_COMPLEX128 0x800f
1207 #define LF_VARSTRING 0x8010
1209 /* ======================================== *
1210 * Symbol information
1211 * ======================================== */
1213 union codeview_symbol
1225 unsigned int offset
;
1226 unsigned short segment
;
1227 unsigned short symtype
;
1228 struct p_string p_name
;
1235 unsigned int symtype
;
1236 unsigned int offset
;
1237 unsigned short segment
;
1238 struct p_string p_name
;
1245 unsigned int symtype
;
1246 unsigned int offset
;
1247 unsigned short segment
;
1255 unsigned int pparent
;
1258 unsigned int offset
;
1259 unsigned short segment
;
1260 unsigned short thunk_len
;
1261 unsigned char thtype
;
1262 struct p_string p_name
;
1269 unsigned int pparent
;
1272 unsigned int offset
;
1273 unsigned short segment
;
1274 unsigned short thunk_len
;
1275 unsigned char thtype
;
1283 unsigned int pparent
;
1286 unsigned int proc_len
;
1287 unsigned int debug_start
;
1288 unsigned int debug_end
;
1289 unsigned int offset
;
1290 unsigned short segment
;
1291 unsigned short proctype
;
1292 unsigned char flags
;
1293 struct p_string p_name
;
1300 unsigned int pparent
;
1303 unsigned int proc_len
;
1304 unsigned int debug_start
;
1305 unsigned int debug_end
;
1306 unsigned int proctype
;
1307 unsigned int offset
;
1308 unsigned short segment
;
1309 unsigned char flags
;
1310 struct p_string p_name
;
1317 unsigned int pparent
;
1320 unsigned int proc_len
;
1321 unsigned int debug_start
;
1322 unsigned int debug_end
;
1323 unsigned int proctype
;
1324 unsigned int offset
;
1325 unsigned short segment
;
1326 unsigned char flags
;
1334 unsigned int symtype
;
1335 unsigned int offset
;
1336 unsigned short segment
;
1337 struct p_string p_name
;
1344 unsigned int symtype
;
1345 unsigned int offset
;
1346 unsigned short segment
;
1352 short int len
; /* Total length of this entry */
1353 short int id
; /* Always S_BPREL_V1 */
1354 unsigned int offset
; /* Stack offset relative to BP */
1355 unsigned short symtype
;
1356 struct p_string p_name
;
1361 short int len
; /* Total length of this entry */
1362 short int id
; /* Always S_BPREL_V2 */
1363 unsigned int offset
; /* Stack offset relative to EBP */
1364 unsigned int symtype
;
1365 struct p_string p_name
;
1370 short int len
; /* Total length of this entry */
1371 short int id
; /* Always S_BPREL_V3 */
1372 int offset
; /* Stack offset relative to BP */
1373 unsigned int symtype
;
1379 short int len
; /* Total length of this entry */
1380 short int id
; /* Always S_BPREL_V3 */
1381 int offset
; /* Stack offset relative to BP */
1382 unsigned int symtype
;
1389 short int len
; /* Total length of this entry */
1390 short int id
; /* Always S_REGISTER */
1391 unsigned short type
;
1393 struct p_string p_name
;
1394 /* don't handle register tracking */
1399 short int len
; /* Total length of this entry */
1400 short int id
; /* Always S_REGISTER_V2 */
1401 unsigned int type
; /* check whether type & reg are correct */
1403 struct p_string p_name
;
1404 /* don't handle register tracking */
1409 short int len
; /* Total length of this entry */
1410 short int id
; /* Always S_REGISTER_V3 */
1411 unsigned int type
; /* check whether type & reg are correct */
1414 /* don't handle register tracking */
1421 unsigned int parent
;
1423 unsigned int length
;
1424 unsigned int offset
;
1425 unsigned short segment
;
1426 struct p_string p_name
;
1433 unsigned int parent
;
1435 unsigned int length
;
1436 unsigned int offset
;
1437 unsigned short segment
;
1445 unsigned int offset
;
1446 unsigned short segment
;
1447 unsigned char flags
;
1448 struct p_string p_name
;
1455 unsigned int offset
;
1456 unsigned short segment
;
1457 unsigned char flags
;
1465 unsigned short type
;
1466 unsigned short cvalue
; /* numeric leaf */
1468 struct p_string p_name
;
1477 unsigned short cvalue
; /* numeric leaf */
1479 struct p_string p_name
;
1488 unsigned short cvalue
;
1498 unsigned short type
;
1499 struct p_string p_name
;
1507 struct p_string p_name
;
1523 struct p_string p_name
;
1530 unsigned int unknown
;
1531 struct p_string p_name
;
1538 unsigned unknown1
[4];
1539 unsigned short unknown2
;
1540 struct p_string p_name
;
1547 unsigned int unknown
;
1555 unsigned int offset
;
1556 unsigned short segment
;
1557 unsigned short symtype
;
1558 struct p_string p_name
;
1565 unsigned int symtype
;
1566 unsigned int offset
;
1567 unsigned short segment
;
1568 struct p_string p_name
;
1575 unsigned int symtype
;
1576 unsigned int offset
;
1577 unsigned short segment
;
1585 unsigned int offset
;
1586 unsigned short segment
;
1593 unsigned int offset
;
1594 unsigned int unknown
;
1595 } security_cookie_v3
;
1601 unsigned int sz_frame
; /* size of frame */
1602 unsigned int unknown2
;
1603 unsigned int unknown3
;
1604 unsigned int sz_saved_regs
; /* size of saved registers from callee */
1605 unsigned int eh_offset
; /* offset for exception handler */
1606 unsigned short eh_sect
; /* section for exception handler */
1611 #define S_COMPILAND_V1 0x0001
1612 #define S_REGISTER_V1 0x0002
1613 #define S_CONSTANT_V1 0x0003
1614 #define S_UDT_V1 0x0004
1615 #define S_SSEARCH_V1 0x0005
1616 #define S_END_V1 0x0006
1617 #define S_SKIP_V1 0x0007
1618 #define S_CVRESERVE_V1 0x0008
1619 #define S_OBJNAME_V1 0x0009
1620 #define S_ENDARG_V1 0x000a
1621 #define S_COBOLUDT_V1 0x000b
1622 #define S_MANYREG_V1 0x000c
1623 #define S_RETURN_V1 0x000d
1624 #define S_ENTRYTHIS_V1 0x000e
1626 #define S_BPREL_V1 0x0200
1627 #define S_LDATA_V1 0x0201
1628 #define S_GDATA_V1 0x0202
1629 #define S_PUB_V1 0x0203
1630 #define S_LPROC_V1 0x0204
1631 #define S_GPROC_V1 0x0205
1632 #define S_THUNK_V1 0x0206
1633 #define S_BLOCK_V1 0x0207
1634 #define S_WITH_V1 0x0208
1635 #define S_LABEL_V1 0x0209
1636 #define S_CEXMODEL_V1 0x020a
1637 #define S_VFTPATH_V1 0x020b
1638 #define S_REGREL_V1 0x020c
1639 #define S_LTHREAD_V1 0x020d
1640 #define S_GTHREAD_V1 0x020e
1642 #define S_PROCREF_V1 0x0400
1643 #define S_DATAREF_V1 0x0401
1644 #define S_ALIGN_V1 0x0402
1645 #define S_LPROCREF_V1 0x0403
1647 #define S_REGISTER_V2 0x1001 /* Variants with new 32-bit type indices */
1648 #define S_CONSTANT_V2 0x1002
1649 #define S_UDT_V2 0x1003
1650 #define S_COBOLUDT_V2 0x1004
1651 #define S_MANYREG_V2 0x1005
1652 #define S_BPREL_V2 0x1006
1653 #define S_LDATA_V2 0x1007
1654 #define S_GDATA_V2 0x1008
1655 #define S_PUB_V2 0x1009
1656 #define S_LPROC_V2 0x100a
1657 #define S_GPROC_V2 0x100b
1658 #define S_VFTTABLE_V2 0x100c
1659 #define S_REGREL_V2 0x100d
1660 #define S_LTHREAD_V2 0x100e
1661 #define S_GTHREAD_V2 0x100f
1662 #define S_FRAMEINFO_V2 0x1012
1663 #define S_COMPILAND_V2 0x1013
1665 #define S_COMPILAND_V3 0x1101
1666 #define S_THUNK_V3 0x1102
1667 #define S_BLOCK_V3 0x1103
1668 #define S_LABEL_V3 0x1105
1669 #define S_REGISTER_V3 0x1106
1670 #define S_CONSTANT_V3 0x1107
1671 #define S_UDT_V3 0x1108
1672 #define S_BPREL_V3 0x110B
1673 #define S_LDATA_V3 0x110C
1674 #define S_GDATA_V3 0x110D
1675 #define S_PUB_V3 0x110E
1676 #define S_LPROC_V3 0x110F
1677 #define S_GPROC_V3 0x1110
1678 #define S_REGREL_V3 0x1111
1679 #define S_LTHREAD_V3 0x1112
1680 #define S_GTHREAD_V3 0x1113
1681 #define S_MSTOOL_V3 0x1116 /* compiler command line options and build information */
1682 #define S_PUB_FUNC1_V3 0x1125 /* didn't get the difference between the two */
1683 #define S_PUB_FUNC2_V3 0x1127
1684 #define S_SECTINFO_V3 0x1136
1685 #define S_SUBSECTINFO_V3 0x1137
1686 #define S_ENTRYPOINT_V3 0x1138
1687 #define S_SECUCOOKIE_V3 0x113A
1688 #define S_MSTOOLINFO_V3 0x113C
1689 #define S_MSTOOLENV_V3 0x113D
1691 /* ======================================== *
1692 * Line number information
1693 * ======================================== */
1695 struct codeview_linetab_block
1698 unsigned short num_lines
;
1699 unsigned int offsets
[1]; /* in fact num_lines */
1700 /* unsigned short linenos[]; */
1709 #define LT2_LINES_BLOCK 0x000000f2
1710 #define LT2_FILES_BLOCK 0x000000f4
1712 /* there's a new line tab structure from MS Studio 2005 and after
1713 * it's made of a list of codeview_linetab2 blocks.
1714 * We've only seen (so far) list with a single LT2_FILES_BLOCK and several
1715 * LT2_LINES_BLOCK. The LT2_FILES block has been encountered either as first
1716 * or last block of the list.
1717 * A LT2_FILES contains one or several codeview_linetab2_file:s
1720 struct codeview_linetab2
1723 DWORD size_of_block
;
1726 static inline const struct codeview_linetab2
* codeview_linetab2_next_block(const struct codeview_linetab2
* lt2
)
1728 return (const struct codeview_linetab2
*)((const char*)(lt2
+ 1) + lt2
->size_of_block
);
1731 struct codeview_linetab2_file
1733 DWORD offset
; /* offset in string table for filename */
1734 WORD unk
; /* always 0x0110... type of following information ??? */
1735 BYTE md5
[16]; /* MD5 signature of file (signature on file's content or name ???) */
1736 WORD pad0
; /* always 0 */
1739 struct codeview_lt2blk_files
1741 struct codeview_linetab2 lt2
; /* LT2_FILES */
1742 struct codeview_linetab2_file file
[1];
1745 struct codeview_lt2blk_lines
1747 struct codeview_linetab2 lt2
; /* LT2_LINE_BLOCK */
1748 DWORD start
; /* start address of function with line numbers */
1749 DWORD seg
; /* segment of function with line numbers */
1750 DWORD size
; /* size of function with line numbers */
1751 DWORD file_offset
; /* offset for accessing corresponding codeview_linetab2_file */
1752 DWORD nlines
; /* number of lines in this block */
1753 DWORD size_lines
; /* number of bytes following for line number information */
1755 DWORD offset
; /* offset (from <seg>:<start>) for line number */
1756 DWORD lineno
; /* the line number (OR:ed with 0x80000000 why ???) */
1757 } l
[1]; /* actually array of <nlines> */
1760 /* ======================================== *
1761 * PDB file information
1762 * ======================================== */
1771 struct PDB_JG_HEADER
1778 struct PDB_FILE toc
;
1782 struct PDB_DS_HEADER
1796 struct PDB_FILE file
[1];
1808 DWORD TimeDateStamp
;
1817 DWORD TimeDateStamp
;
1824 typedef struct _PDB_TYPES_OLD
1832 } PDB_TYPES_OLD
, *PPDB_TYPES_OLD
;
1834 typedef struct _PDB_TYPES
1847 DWORD search_offset
;
1849 DWORD unknown_offset
;
1851 } PDB_TYPES
, *PPDB_TYPES
;
1853 typedef struct _PDB_SYMBOL_RANGE
1859 DWORD characteristics
;
1862 } PDB_SYMBOL_RANGE
, *PPDB_SYMBOL_RANGE
;
1864 typedef struct _PDB_SYMBOL_RANGE_EX
1870 DWORD characteristics
;
1875 } PDB_SYMBOL_RANGE_EX
, *PPDB_SYMBOL_RANGE_EX
;
1877 typedef struct _PDB_SYMBOL_FILE
1880 PDB_SYMBOL_RANGE range
;
1889 } PDB_SYMBOL_FILE
, *PPDB_SYMBOL_FILE
;
1891 typedef struct _PDB_SYMBOL_FILE_EX
1894 PDB_SYMBOL_RANGE_EX range
;
1904 } PDB_SYMBOL_FILE_EX
, *PPDB_SYMBOL_FILE_EX
;
1906 typedef struct _PDB_SYMBOL_SOURCE
1911 } PDB_SYMBOL_SOURCE
, *PPDB_SYMBOL_SOURCE
;
1913 typedef struct _PDB_SYMBOL_IMPORT
1917 DWORD TimeDateStamp
;
1920 } PDB_SYMBOL_IMPORT
, *PPDB_SYMBOL_IMPORT
;
1922 typedef struct _PDB_SYMBOLS_OLD
1931 DWORD srcmodule_size
;
1932 } PDB_SYMBOLS_OLD
, *PPDB_SYMBOLS_OLD
;
1934 typedef struct _PDB_SYMBOLS
1946 DWORD srcmodule_size
;
1947 DWORD pdbimport_size
;
1949 DWORD stream_index_size
;
1950 DWORD unknown2_size
;
1954 } PDB_SYMBOLS
, *PPDB_SYMBOLS
;
1964 } PDB_STREAM_INDEXES_OLD
;
1979 } PDB_STREAM_INDEXES
;
1981 typedef struct _PDB_FPO_DATA
1987 DWORD maxstack_size
;
1990 WORD savedregs_size
;
1991 #define PDB_FPO_DFL_SEH 0x00000001
1992 #define PDB_FPO_DFL_EH 0x00000002
1993 #define PDB_FPO_DFL_IN_BLOCK 0x00000004
1997 #include "poppack.h"
1999 /* ----------------------------------------------
2000 * Information used for parsing
2001 * ---------------------------------------------- */
2009 struct msc_debug_info
2011 struct module
* module
;
2013 const IMAGE_SECTION_HEADER
* sectp
;
2015 const OMAP_DATA
* omapp
;
2020 extern BOOL
coff_process_info(const struct msc_debug_info
* msc_dbg
);
2022 /* ===================================================
2023 * The old CodeView stuff (for NB09 and NB11)
2024 * =================================================== */
2026 #define sstModule 0x120
2027 #define sstTypes 0x121
2028 #define sstPublic 0x122
2029 #define sstPublicSym 0x123
2030 #define sstSymbols 0x124
2031 #define sstAlignSym 0x125
2032 #define sstSrcLnSeg 0x126
2033 #define sstSrcModule 0x127
2034 #define sstLibraries 0x128
2035 #define sstGlobalSym 0x129
2036 #define sstGlobalPub 0x12a
2037 #define sstGlobalTypes 0x12b
2038 #define sstMPC 0x12c
2039 #define sstSegMap 0x12d
2040 #define sstSegName 0x12e
2041 #define sstPreComp 0x12f
2042 #define sstFileIndex 0x133
2043 #define sstStaticSym 0x134
2045 /* overall structure information */
2046 typedef struct OMFSignature
2052 typedef struct OMFSignatureRSDS
2060 typedef struct _CODEVIEW_PDB_DATA
2067 } CODEVIEW_PDB_DATA
, *PCODEVIEW_PDB_DATA
;
2069 typedef struct OMFDirHeader
2078 typedef struct OMFDirEntry
2086 /* sstModule subsection */
2088 typedef struct OMFSegDesc
2096 typedef struct OMFModule
2103 OMFSegDesc SegInfo[cSeg];
2108 typedef struct OMFGlobalTypes
2113 DWORD offset[cTypes];
2118 /* sstGlobalPub section */
2120 /* Header for symbol table */
2121 typedef struct OMFSymHash
2123 unsigned short symhash
;
2124 unsigned short addrhash
;
2125 unsigned long cbSymbol
;
2126 unsigned long cbHSym
;
2127 unsigned long cbHAddr
;
2130 /* sstSegMap section */
2132 typedef struct OMFSegMapDesc
2134 unsigned short flags
;
2136 unsigned short group
;
2137 unsigned short frame
;
2138 unsigned short iSegName
;
2139 unsigned short iClassName
;
2140 unsigned long offset
;
2141 unsigned long cbSeg
;
2144 typedef struct OMFSegMap
2146 unsigned short cSeg
;
2147 unsigned short cSegLog
;
2148 /* OMFSegMapDesc rgDesc[0];*/
2152 /* sstSrcModule section */
2154 typedef struct OMFSourceLine
2157 unsigned short cLnOff
;
2158 unsigned long offset
[1];
2159 unsigned short lineNbr
[1];
2162 typedef struct OMFSourceFile
2164 unsigned short cSeg
;
2165 unsigned short reserved
;
2166 unsigned long baseSrcLn
[1];
2167 unsigned short cFName
;
2171 typedef struct OMFSourceModule
2173 unsigned short cFile
;
2174 unsigned short cSeg
;
2175 unsigned long baseSrcFile
[1];