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 greated 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 #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 */
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 */
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
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
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
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
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
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
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
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
900 /* ======================================== *
902 * ======================================== */
904 union codeview_symbol
917 unsigned short segment;
918 unsigned short symtype;
919 struct p_string p_name;
926 unsigned int symtype;
928 unsigned short segment;
929 struct p_string p_name;
936 unsigned int symtype;
938 unsigned short segment;
946 unsigned int pparent;
950 unsigned short segment;
951 unsigned short thunk_len;
952 unsigned char thtype;
953 struct p_string p_name;
960 unsigned int pparent;
964 unsigned short segment;
965 unsigned short thunk_len;
966 unsigned char thtype;
974 unsigned int pparent;
977 unsigned int proc_len;
978 unsigned int debug_start;
979 unsigned int debug_end;
981 unsigned short segment;
982 unsigned short proctype;
984 struct p_string p_name;
991 unsigned int pparent;
994 unsigned int proc_len;
995 unsigned int debug_start;
996 unsigned int debug_end;
997 unsigned int proctype;
999 unsigned short segment;
1000 unsigned char flags;
1001 struct p_string p_name;
1008 unsigned int pparent;
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;
1025 unsigned int symtype;
1026 unsigned int offset;
1027 unsigned short segment;
1028 struct p_string p_name;
1035 unsigned int symtype;
1036 unsigned int offset;
1037 unsigned short segment;
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;
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;
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;
1070 short int len; /* Total length of this entry */
1071 short int id; /* Always S_REGISTER */
1072 unsigned short type;
1074 struct p_string p_name;
1075 /* don't handle register tracking */
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 */
1084 struct p_string p_name;
1085 /* don't handle register tracking */
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 */
1095 /* don't handle register tracking */
1102 unsigned int parent;
1104 unsigned int length;
1105 unsigned int offset;
1106 unsigned short segment;
1107 struct p_string p_name;
1114 unsigned int parent;
1116 unsigned int length;
1117 unsigned int offset;
1118 unsigned short segment;
1126 unsigned int offset;
1127 unsigned short segment;
1128 unsigned char flags;
1129 struct p_string p_name;
1136 unsigned int offset;
1137 unsigned short segment;
1138 unsigned char flags;
1146 unsigned short type;
1147 unsigned short cvalue; /* numeric leaf */
1149 struct p_string p_name;
1158 unsigned short cvalue; /* numeric leaf */
1160 struct p_string p_name;
1169 unsigned short cvalue;
1179 unsigned short type;
1180 struct p_string p_name;
1188 struct p_string p_name;
1204 struct p_string p_name;
1211 unsigned int unknown;
1212 struct p_string p_name;
1219 unsigned unknown1[4];
1220 unsigned short unknown2;
1221 struct p_string p_name;
1228 unsigned int unknown;
1236 unsigned int offset;
1237 unsigned short segment;
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
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
1272 #define S_PROCREF_V1 0x0400
1273 #define S_DATAREF_V1 0x0401
1274 #define S_ALIGN_V1 0x0402
1275 #define S_LPROCREF_V1 0x0403
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
1293 #define S_XXXXXXXXX_32 0x1012 /* seems linked to a function, content unknown */
1295 #define S_COMPILAND_V2 0x1013
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
1314 /* ======================================== *
1315 * Line number information
1316 * ======================================== */
1321 const unsigned char* uc;
1324 const unsigned int* ui;
1333 struct codeview_linetab
1339 unsigned int source;
1340 const unsigned short* linetab;
1341 const unsigned int* offtab;
1345 /* ======================================== *
1346 * PDB file information
1347 * ======================================== */
1356 struct PDB_JG_HEADER
1363 struct PDB_FILE toc;
1367 struct PDB_DS_HEADER
1381 struct PDB_FILE file[1];
1393 DWORD TimeDateStamp;
1402 DWORD TimeDateStamp;
1409 typedef struct _PDB_TYPES_OLD
1417 } PDB_TYPES_OLD, *PPDB_TYPES_OLD;
1419 typedef struct _PDB_TYPES
1432 DWORD search_offset;
1434 DWORD unknown_offset;
1436 } PDB_TYPES, *PPDB_TYPES;
1438 typedef struct _PDB_SYMBOL_RANGE
1444 DWORD characteristics;
1447 } PDB_SYMBOL_RANGE, *PPDB_SYMBOL_RANGE;
1449 typedef struct _PDB_SYMBOL_RANGE_EX
1455 DWORD characteristics;
1460 } PDB_SYMBOL_RANGE_EX, *PPDB_SYMBOL_RANGE_EX;
1462 typedef struct _PDB_SYMBOL_FILE
1465 PDB_SYMBOL_RANGE range;
1474 } PDB_SYMBOL_FILE, *PPDB_SYMBOL_FILE;
1476 typedef struct _PDB_SYMBOL_FILE_EX
1479 PDB_SYMBOL_RANGE_EX range;
1489 } PDB_SYMBOL_FILE_EX, *PPDB_SYMBOL_FILE_EX;
1491 typedef struct _PDB_SYMBOL_SOURCE
1496 } PDB_SYMBOL_SOURCE, *PPDB_SYMBOL_SOURCE;
1498 typedef struct _PDB_SYMBOL_IMPORT
1502 DWORD TimeDateStamp;
1505 } PDB_SYMBOL_IMPORT, *PPDB_SYMBOL_IMPORT;
1507 typedef struct _PDB_SYMBOLS_OLD
1516 DWORD srcmodule_size;
1517 } PDB_SYMBOLS_OLD, *PPDB_SYMBOLS_OLD;
1519 typedef struct _PDB_SYMBOLS
1530 DWORD srcmodule_size;
1531 DWORD pdbimport_size;
1533 } PDB_SYMBOLS, *PPDB_SYMBOLS;
1535 #include "poppack.h"
1537 /* ----------------------------------------------
1538 * Information used for parsing
1539 * ---------------------------------------------- */
1547 struct msc_debug_info
1549 struct module* module;
1551 const IMAGE_SECTION_HEADER* sectp;
1553 const OMAP_DATA* omapp;
1558 extern BOOL coff_process_info(const struct msc_debug_info* msc_dbg);
1560 /* ===================================================
1561 * The old CodeView stuff (for NB09 and NB11)
1562 * =================================================== */
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
1583 /* overall structure information */
1584 typedef struct OMFSignature
1590 typedef struct OMFSignatureRSDS
1598 typedef struct _CODEVIEW_PDB_DATA
1605 } CODEVIEW_PDB_DATA, *PCODEVIEW_PDB_DATA;
1607 typedef struct OMFDirHeader
1616 typedef struct OMFDirEntry
1624 /* sstModule subsection */
1626 typedef struct OMFSegDesc
1634 typedef struct OMFModule
1641 OMFSegDesc SegInfo[cSeg];
1646 typedef struct OMFGlobalTypes
1651 DWORD offset[cTypes];
1656 /* sstGlobalPub section */
1658 /* Header for symbol table */
1659 typedef struct OMFSymHash
1661 unsigned short symhash;
1662 unsigned short addrhash;
1663 unsigned long cbSymbol;
1664 unsigned long cbHSym;
1665 unsigned long cbHAddr;
1668 /* sstSegMap section */
1670 typedef struct OMFSegMapDesc
1672 unsigned short flags;
1674 unsigned short group;
1675 unsigned short frame;
1676 unsigned short iSegName;
1677 unsigned short iClassName;
1678 unsigned long offset;
1679 unsigned long cbSeg;
1682 typedef struct OMFSegMap
1684 unsigned short cSeg;
1685 unsigned short cSegLog;
1686 /* OMFSegMapDesc rgDesc[0];*/
1690 /* sstSrcModule section */
1692 typedef struct OMFSourceLine
1695 unsigned short cLnOff;
1696 unsigned long offset[1];
1697 unsigned short lineNbr[1];
1700 typedef struct OMFSourceFile
1702 unsigned short cSeg;
1703 unsigned short reserved;
1704 unsigned long baseSrcLn[1];
1705 unsigned short cFName;
1709 typedef struct OMFSourceModule
1711 unsigned short cFile;
1712 unsigned short cSeg;
1713 unsigned long baseSrcFile[1];