Home | Info | Community | Development | myReactOS | Contact Us
ReactOS Development > Doxygenmscvpdb.h
Go to the documentation of this file.
00001 /* 00002 * MS debug information definitions. 00003 * 00004 * Copyright (C) 1996 Eric Youngdale 00005 * Copyright (C) 1999-2000 Ulrich Weigand 00006 * Copyright (C) 2004 Eric Pouech 00007 * 00008 * This library is free software; you can redistribute it and/or 00009 * modify it under the terms of the GNU Lesser General Public 00010 * License as published by the Free Software Foundation; either 00011 * version 2.1 of the License, or (at your option) any later version. 00012 * 00013 * This library is distributed in the hope that it will be useful, 00014 * but WITHOUT ANY WARRANTY; without even the implied warranty of 00015 * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU 00016 * Lesser General Public License for more details. 00017 * 00018 * You should have received a copy of the GNU Lesser General Public 00019 * License along with this library; if not, write to the Free Software 00020 * Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301, USA 00021 */ 00022 00023 /* MS has stored all its debug information in a set of structures 00024 * which has been rather consistent across the years (ie you can grasp 00025 * some continuity, and not so many drastic changes). 00026 * 00027 * A bit of history on the various formats 00028 * MSVC 1.0 PDB v1 (new format for debug info) 00029 * MSVC 2.0 Inclusion in link of debug info (PDB v2) 00030 * MSVC 5.0 Types are 24 bits (instead of 16 for <= 4.x) 00031 * MSVC x.0 PDB (change in internal streams layout) 00032 * 00033 * .DBG Contains COFF, FPO and Codeview info 00034 * .PDB New format for debug info (information is 00035 * derived from Codeview information) 00036 * VCx0.PDB x major MSVC number, stores types, while 00037 * <project>.PDB stores symbols. 00038 * 00039 * Debug information can either be found in the debug section of a PE 00040 * module (in something close to a .DBG file), or the debug section 00041 * can actually refer to an external file, which can be in turn, 00042 * either a .DBG or .PDB file. 00043 * 00044 * Regarding PDB files: 00045 * ------------------- 00046 * They are implemented as a set of internal files (as a small file 00047 * system). The file is split into blocks, an internal file is made 00048 * of a set of blocks. Internal files are accessed through 00049 * numbers. For example, 00050 * 1/ is the ROOT (basic information on the file) 00051 * 2/ is the Symbol information (global symbols, local variables...) 00052 * 3/ is the Type internal file (each the symbols can have type 00053 * information associated with it). 00054 * 00055 * Over the years, three formats existed for the PDB: 00056 * - ?? was rather linked to 16 bit code (our support shall be rather 00057 * bad) 00058 * - JG: it's the signature embedded in the file header. This format 00059 * has been used in MSVC 2.0 => 5.0. 00060 * - DS: it's the signature embedded in the file header. It's the 00061 * current format supported my MS. 00062 * 00063 * Types internal stream 00064 * --------------------- 00065 * Types (from the Type internal file) have existed in three flavors 00066 * (note that those flavors came as historical evolution, but there 00067 * isn't a one to one link between types evolution and PDB formats' 00068 * evolutions: 00069 * - the first flavor (suffixed by V1 in this file), where the types 00070 * and subtypes are 16 bit entities; and where strings are in Pascal 00071 * format (first char is their length and are not 0 terminated) 00072 * - the second flavor (suffixed by V2) differs from first flavor with 00073 * types and subtypes as 32 bit entities. This forced some 00074 * reordering of fields in some types 00075 * - the third flavor (suffixed by V3) differs from second flavor with 00076 * strings stored as C strings (ie are 0 terminated, instead of 00077 * length prefixed) 00078 * The different flavors can coexist in the same file (is this really 00079 * true ??) 00080 * 00081 * For the evolution of types, the need of the second flavor was the 00082 * number of types to be defined (limited to 0xFFFF, including the C 00083 * basic types); the need of the third flavor is the increase of 00084 * symbol size (to be greater than 256), which was likely needed for 00085 * complex C++ types (nested + templates). 00086 * 00087 * It's somehow difficult to represent the layout of those types on 00088 * disk because: 00089 * - some integral values are stored as numeric leaf, which size is 00090 * variable depending on its value 00091 * 00092 * Symbols internal stream 00093 * ----------------------- 00094 * Here also we find three flavors (that we've suffixed with _V1, _V2 00095 * and _V3) even if their evolution is closer to the evolution of 00096 * types, they are not completely linked together. 00097 */ 00098 00099 #include "pshpack1.h" 00100 00101 /* ======================================== * 00102 * Type information 00103 * ======================================== */ 00104 00105 struct p_string 00106 { 00107 unsigned char namelen; 00108 char name[1]; 00109 }; 00110 00111 union codeview_type 00112 { 00113 struct 00114 { 00115 unsigned short int len; 00116 short int id; 00117 } generic; 00118 00119 struct 00120 { 00121 unsigned short int len; 00122 short int id; 00123 short int attribute; 00124 short int type; 00125 } modifier_v1; 00126 00127 struct 00128 { 00129 unsigned short int len; 00130 short int id; 00131 int type; 00132 short int attribute; 00133 } modifier_v2; 00134 00135 struct 00136 { 00137 unsigned short int len; 00138 short int id; 00139 short int attribute; 00140 short int datatype; 00141 struct p_string p_name; 00142 } pointer_v1; 00143 00144 struct 00145 { 00146 unsigned short int len; 00147 short int id; 00148 unsigned int datatype; 00149 unsigned int attribute; 00150 struct p_string p_name; 00151 } pointer_v2; 00152 00153 struct 00154 { 00155 unsigned short int len; 00156 short int id; 00157 short int elemtype; 00158 short int idxtype; 00159 unsigned short int arrlen; /* numeric leaf */ 00160 #if 0 00161 struct p_string p_name; 00162 #endif 00163 } array_v1; 00164 00165 struct 00166 { 00167 unsigned short int len; 00168 short int id; 00169 unsigned int elemtype; 00170 unsigned int idxtype; 00171 unsigned short int arrlen; /* numeric leaf */ 00172 #if 0 00173 struct p_string p_name; 00174 #endif 00175 } array_v2; 00176 00177 struct 00178 { 00179 unsigned short int len; 00180 short int id; 00181 unsigned int elemtype; 00182 unsigned int idxtype; 00183 unsigned short int arrlen; /* numeric leaf */ 00184 #if 0 00185 char name[1]; 00186 #endif 00187 } array_v3; 00188 00189 struct 00190 { 00191 unsigned short int len; 00192 short int id; 00193 short int n_element; 00194 short int fieldlist; 00195 short int property; 00196 short int derived; 00197 short int vshape; 00198 unsigned short int structlen; /* numeric leaf */ 00199 #if 0 00200 struct p_string p_name; 00201 #endif 00202 } struct_v1; 00203 00204 struct 00205 { 00206 unsigned short int len; 00207 short int id; 00208 short int n_element; 00209 short int property; 00210 unsigned int fieldlist; 00211 unsigned int derived; 00212 unsigned int vshape; 00213 unsigned short int structlen; /* numeric leaf */ 00214 #if 0 00215 struct p_string p_name; 00216 #endif 00217 } struct_v2; 00218 00219 struct 00220 { 00221 unsigned short int len; 00222 short int id; 00223 short int n_element; 00224 short int property; 00225 unsigned int fieldlist; 00226 unsigned int derived; 00227 unsigned int vshape; 00228 unsigned short int structlen; /* numeric leaf */ 00229 #if 0 00230 char name[1]; 00231 #endif 00232 } struct_v3; 00233 00234 struct 00235 { 00236 unsigned short int len; 00237 short int id; 00238 short int count; 00239 short int fieldlist; 00240 short int property; 00241 unsigned short int un_len; /* numeric leaf */ 00242 #if 0 00243 struct p_string p_name; 00244 #endif 00245 } union_v1; 00246 00247 struct 00248 { 00249 unsigned short int len; 00250 short int id; 00251 short int count; 00252 short int property; 00253 unsigned int fieldlist; 00254 unsigned short int un_len; /* numeric leaf */ 00255 #if 0 00256 struct p_string p_name; 00257 #endif 00258 } union_v2; 00259 00260 struct 00261 { 00262 unsigned short int len; 00263 short int id; 00264 short int count; 00265 short int property; 00266 unsigned int fieldlist; 00267 unsigned short int un_len; /* numeric leaf */ 00268 #if 0 00269 char name[1]; 00270 #endif 00271 } union_v3; 00272 00273 struct 00274 { 00275 unsigned short int len; 00276 short int id; 00277 short int count; 00278 short int type; 00279 short int fieldlist; 00280 short int property; 00281 struct p_string p_name; 00282 } enumeration_v1; 00283 00284 struct 00285 { 00286 unsigned short int len; 00287 short int id; 00288 short int count; 00289 short int property; 00290 unsigned int type; 00291 unsigned int fieldlist; 00292 struct p_string p_name; 00293 } enumeration_v2; 00294 00295 struct 00296 { 00297 unsigned short int len; 00298 short int id; 00299 short int count; 00300 short int property; 00301 unsigned int type; 00302 unsigned int fieldlist; 00303 char name[1]; 00304 } enumeration_v3; 00305 00306 struct 00307 { 00308 unsigned short int len; 00309 short int id; 00310 unsigned short int rvtype; 00311 unsigned char call; 00312 unsigned char reserved; 00313 unsigned short int params; 00314 unsigned short int arglist; 00315 } procedure_v1; 00316 00317 struct 00318 { 00319 unsigned short int len; 00320 short int id; 00321 unsigned int rvtype; 00322 unsigned char call; 00323 unsigned char reserved; 00324 unsigned short int params; 00325 unsigned int arglist; 00326 } procedure_v2; 00327 00328 struct 00329 { 00330 unsigned short int len; 00331 short int id; 00332 unsigned short int rvtype; 00333 unsigned short int class_type; 00334 unsigned short int this_type; 00335 unsigned char call; 00336 unsigned char reserved; 00337 unsigned short int params; 00338 unsigned short int arglist; 00339 unsigned int this_adjust; 00340 } mfunction_v1; 00341 00342 struct 00343 { 00344 unsigned short int len; 00345 short int id; 00346 unsigned int rvtype; 00347 unsigned int class_type; 00348 unsigned this_type; 00349 unsigned char call; 00350 unsigned char reserved; 00351 unsigned short params; 00352 unsigned int arglist; 00353 unsigned int this_adjust; 00354 } mfunction_v2; 00355 }; 00356 00357 union codeview_reftype 00358 { 00359 struct 00360 { 00361 unsigned short int len; 00362 short int id; 00363 } generic; 00364 00365 struct 00366 { 00367 unsigned short int len; 00368 short int id; 00369 unsigned char list[1]; 00370 } fieldlist; 00371 00372 struct 00373 { 00374 unsigned short int len; 00375 short int id; 00376 unsigned char nbits; 00377 unsigned char bitoff; 00378 unsigned short type; 00379 } bitfield_v1; 00380 00381 struct 00382 { 00383 unsigned short int len; 00384 short int id; 00385 unsigned int type; 00386 unsigned char nbits; 00387 unsigned char bitoff; 00388 } bitfield_v2; 00389 00390 struct 00391 { 00392 unsigned short int len; 00393 short int id; 00394 unsigned short num; 00395 unsigned short args[1]; 00396 } arglist_v1; 00397 00398 struct 00399 { 00400 unsigned short int len; 00401 short int id; 00402 unsigned num; 00403 unsigned args[1]; 00404 } arglist_v2; 00405 00406 struct 00407 { 00408 unsigned short int len; 00409 short int id; 00410 unsigned short num; 00411 unsigned short drvdcls[1]; 00412 } derived_v1; 00413 00414 struct 00415 { 00416 unsigned short int len; 00417 short int id; 00418 unsigned num; 00419 unsigned drvdcls[1]; 00420 } derived_v2; 00421 }; 00422 00423 union codeview_fieldtype 00424 { 00425 struct 00426 { 00427 short int id; 00428 } generic; 00429 00430 struct 00431 { 00432 short int id; 00433 short int type; 00434 short int attribute; 00435 unsigned short int offset; /* numeric leaf */ 00436 } bclass_v1; 00437 00438 struct 00439 { 00440 short int id; 00441 short int attribute; 00442 unsigned int type; 00443 unsigned short int offset; /* numeric leaf */ 00444 } bclass_v2; 00445 00446 struct 00447 { 00448 short int id; 00449 short int btype; 00450 short int vbtype; 00451 short int attribute; 00452 unsigned short int vbpoff; /* numeric leaf */ 00453 #if 0 00454 unsigned short int vboff; /* numeric leaf */ 00455 #endif 00456 } vbclass_v1; 00457 00458 struct 00459 { 00460 short int id; 00461 short int attribute; 00462 unsigned int btype; 00463 unsigned int vbtype; 00464 unsigned short int vbpoff; /* numeric leaf */ 00465 #if 0 00466 unsigned short int vboff; /* numeric leaf */ 00467 #endif 00468 } vbclass_v2; 00469 00470 struct 00471 { 00472 short int id; 00473 short int attribute; 00474 unsigned short int value; /* numeric leaf */ 00475 #if 0 00476 struct p_string p_name; 00477 #endif 00478 } enumerate_v1; 00479 00480 struct 00481 { 00482 short int id; 00483 short int attribute; 00484 unsigned short int value; /* numeric leaf */ 00485 #if 0 00486 char name[1]; 00487 #endif 00488 } enumerate_v3; 00489 00490 struct 00491 { 00492 short int id; 00493 short int type; 00494 struct p_string p_name; 00495 } friendfcn_v1; 00496 00497 struct 00498 { 00499 short int id; 00500 short int _pad0; 00501 unsigned int type; 00502 struct p_string p_name; 00503 } friendfcn_v2; 00504 00505 struct 00506 { 00507 short int id; 00508 short int type; 00509 short int attribute; 00510 unsigned short int offset; /* numeric leaf */ 00511 #if 0 00512 struct p_string p_name; 00513 #endif 00514 } member_v1; 00515 00516 struct 00517 { 00518 short int id; 00519 short int attribute; 00520 unsigned int type; 00521 unsigned short int offset; /* numeric leaf */ 00522 #if 0 00523 struct p_string p_name; 00524 #endif 00525 } member_v2; 00526 00527 struct 00528 { 00529 short int id; 00530 short int attribute; 00531 unsigned int type; 00532 unsigned short int offset; /* numeric leaf */ 00533 #if 0 00534 unsigned char name[1]; 00535 #endif 00536 } 00537 member_v3; 00538 00539 struct 00540 { 00541 short int id; 00542 short int type; 00543 short int attribute; 00544 struct p_string p_name; 00545 } stmember_v1; 00546 00547 struct 00548 { 00549 short int id; 00550 short int attribute; 00551 unsigned int type; 00552 struct p_string p_name; 00553 } stmember_v2; 00554 00555 struct 00556 { 00557 short int id; 00558 short int attribute; 00559 unsigned int type; 00560 char name[1]; 00561 } stmember_v3; 00562 00563 struct 00564 { 00565 short int id; 00566 short int count; 00567 short int mlist; 00568 struct p_string p_name; 00569 } method_v1; 00570 00571 struct 00572 { 00573 short int id; 00574 short int count; 00575 unsigned int mlist; 00576 struct p_string p_name; 00577 } method_v2; 00578 00579 struct 00580 { 00581 short int id; 00582 short int count; 00583 unsigned int mlist; 00584 char name[1]; 00585 } method_v3; 00586 00587 struct 00588 { 00589 short int id; 00590 short int type; 00591 struct p_string p_name; 00592 } nesttype_v1; 00593 00594 struct 00595 { 00596 short int id; 00597 short int _pad0; 00598 unsigned int type; 00599 struct p_string p_name; 00600 } nesttype_v2; 00601 00602 struct 00603 { 00604 short int id; 00605 short int _pad0; 00606 unsigned int type; 00607 char name[1]; 00608 } nesttype_v3; 00609 00610 struct 00611 { 00612 short int id; 00613 short int type; 00614 } vfunctab_v1; 00615 00616 struct 00617 { 00618 short int id; 00619 short int _pad0; 00620 unsigned int type; 00621 } vfunctab_v2; 00622 00623 struct 00624 { 00625 short int id; 00626 short int type; 00627 } friendcls_v1; 00628 00629 struct 00630 { 00631 short int id; 00632 short int _pad0; 00633 unsigned int type; 00634 } friendcls_v2; 00635 00636 struct 00637 { 00638 short int id; 00639 short int attribute; 00640 short int type; 00641 struct p_string p_name; 00642 } onemethod_v1; 00643 00644 struct 00645 { 00646 short int id; 00647 short int attribute; 00648 unsigned int type; 00649 struct p_string p_name; 00650 } onemethod_v2; 00651 00652 struct 00653 { 00654 short int id; 00655 short int attribute; 00656 unsigned int type; 00657 char name[1]; 00658 } onemethod_v3; 00659 00660 struct 00661 { 00662 short int id; 00663 short int attribute; 00664 short int type; 00665 unsigned int vtab_offset; 00666 struct p_string p_name; 00667 } onemethod_virt_v1; 00668 00669 struct 00670 { 00671 short int id; 00672 short int attribute; 00673 unsigned int type; 00674 unsigned int vtab_offset; 00675 struct p_string p_name; 00676 } onemethod_virt_v2; 00677 00678 struct 00679 { 00680 short int id; 00681 short int attribute; 00682 unsigned int type; 00683 unsigned int vtab_offset; 00684 char name[1]; 00685 } onemethod_virt_v3; 00686 00687 struct 00688 { 00689 short int id; 00690 short int type; 00691 unsigned int offset; 00692 } vfuncoff_v1; 00693 00694 struct 00695 { 00696 short int id; 00697 short int _pad0; 00698 unsigned int type; 00699 unsigned int offset; 00700 } vfuncoff_v2; 00701 00702 struct 00703 { 00704 short int id; 00705 short int attribute; 00706 short int type; 00707 struct p_string p_name; 00708 } nesttypeex_v1; 00709 00710 struct 00711 { 00712 short int id; 00713 short int attribute; 00714 unsigned int type; 00715 struct p_string p_name; 00716 } nesttypeex_v2; 00717 00718 struct 00719 { 00720 short int id; 00721 short int attribute; 00722 unsigned int type; 00723 struct p_string p_name; 00724 } membermodify_v2; 00725 00726 }; 00727 00728 00729 /* 00730 * This covers the basic datatypes that VC++ seems to be using these days. 00731 * 32 bit mode only. There are additional numbers for the pointers in 16 00732 * bit mode. There are many other types listed in the documents, but these 00733 * are apparently not used by the compiler, or represent pointer types 00734 * that are not used. 00735 * 00736 * Official MS documentation says that type (< 0x4000, so 12 bits) is made of: 00737 * +----------+------+------+----------+------+ 00738 * | 11 | 10-8 | 7-4 | 3 | 2-0 | 00739 * +----------+------+------+----------+------+ 00740 * | reserved | mode | type | reserved | size | 00741 * +----------+------+------+----------+------+ 00742 * In recent PDB files, type 8 exists, and is seen as an HRESULT... So we've 00743 * added this basic type... as if bit 3 had been integrated into the size field 00744 */ 00745 00746 /* the type number of a built-in type is a 16-bit value specified in the following format: 00747 bit # | 11 | 10-8 | 7-4 | 3 | 2-0 | 00748 field | reserved | mode | type | reserved | size | 00749 00750 where 00751 <type> is one of the following types: 00752 0x00 Special 00753 0x01 Signed integral value 00754 0x02 Unsigned integral value 00755 0x03 Boolean 00756 0x04 Real 00757 0x05 Complex 00758 0x06 Special2 00759 0x07 Real int value 00760 0x08 Reserved 00761 0x09 Reserved 00762 0x0a Reserved 00763 0x0b Reserved 00764 0x0c Reserved 00765 0x0d Reserved 00766 0x0e Reserved 00767 0x0f Reserved for debugger expression evaluator 00768 00769 <size> is an enumerated value for each of the types. 00770 Type = special 00771 0x00 No type 00772 0x01 Absolute symbol 00773 0x02 Segment 00774 0x03 Void 00775 0x04 Basic 8-byte currency value 00776 0x05 Near Basic string 00777 0x06 Far Basic string 00778 0x07 Untranslated type from previous Microsoft symbol formats 00779 Type = signed/unsigned integral and Boolean values 00780 0x00 1 byte 00781 0x01 2 byte 00782 0x02 4 byte 00783 0x03 8 byte 00784 0x04 Reserved 00785 0x05 Reserved 00786 0x06 Reserved 00787 0x07 Reserved 00788 Type = real and complex 00789 0x00 32 bit 00790 0x01 64 bit 00791 0x02 80 bit 00792 0x03 128 bit 00793 0x04 48 bit 00794 0x05 Reserved 00795 0x06 Reserved 00796 0x07 Reserved 00797 Type = special2 00798 0x00 Bit 00799 0x01 Pascal CHAR 00800 Type = Real int 00801 0x00 Char 00802 0x01 Wide character 00803 0x02 2-byte signed integer 00804 0x03 2-byte unsigned integer 00805 0x04 4-byte signed integer 00806 0x05 4-byte unsigned integer 00807 0x06 8-byte signed integer 00808 0x07 8-byte unsigned integer 00809 00810 <mode> is the pointer mode: 00811 0x00 Direct; not a pointer 00812 0x01 Near pointer 00813 0x02 Far pointer 00814 0x03 Huge pointer 00815 0x04 32-bit near pointer 00816 0x05 32-bit far pointer 00817 0x06 64-bit near pointer 00818 0x07 Reserved 00819 */ 00820 00821 /* basic types */ 00822 #define T_NOTYPE 0x0000 /* Notype */ 00823 #define T_ABS 0x0001 /* Abs */ 00824 #define T_SEGMENT 0x0002 /* segment type */ 00825 #define T_VOID 0x0003 /* Void */ 00826 #define T_CURRENCY 0x0004 /* basic 8-byte currency value */ 00827 #define T_NBASICSTR 0x0005 /* near basic string */ 00828 #define T_FBASICSTR 0x0006 /* far basic string */ 00829 #define T_NOTTRANS 0x0007 /* untranslated type record from MS symbol format */ 00830 #define T_HRESULT 0x0008 /* HRESULT - or error code ??? */ 00831 #define T_CHAR 0x0010 /* signed char */ 00832 #define T_SHORT 0x0011 /* short */ 00833 #define T_LONG 0x0012 /* long */ 00834 #define T_QUAD 0x0013 /* long long */ 00835 #define T_UCHAR 0x0020 /* unsigned char */ 00836 #define T_USHORT 0x0021 /* unsigned short */ 00837 #define T_ULONG 0x0022 /* unsigned long */ 00838 #define T_UQUAD 0x0023 /* unsigned long long */ 00839 #define T_BOOL08 0x0030 /* 8-bit boolean */ 00840 #define T_BOOL16 0x0031 /* 16-bit boolean */ 00841 #define T_BOOL32 0x0032 /* 32-bit boolean */ 00842 #define T_BOOL64 0x0033 /* 64-bit boolean */ 00843 #define T_REAL32 0x0040 /* float */ 00844 #define T_REAL64 0x0041 /* double */ 00845 #define T_REAL80 0x0042 /* 80-bit real */ 00846 #define T_REAL128 0x0043 /* 128-bit real */ 00847 #define T_REAL48 0x0044 /* 48-bit real */ 00848 #define T_CPLX32 0x0050 /* 32-bit complex number */ 00849 #define T_CPLX64 0x0051 /* 64-bit complex number */ 00850 #define T_CPLX80 0x0052 /* 80-bit complex number */ 00851 #define T_CPLX128 0x0053 /* 128-bit complex number */ 00852 #define T_BIT 0x0060 /* bit */ 00853 #define T_PASCHAR 0x0061 /* pascal CHAR */ 00854 #define T_RCHAR 0x0070 /* real char */ 00855 #define T_WCHAR 0x0071 /* wide char */ 00856 #define T_INT2 0x0072 /* real 16-bit signed int */ 00857 #define T_UINT2 0x0073 /* real 16-bit unsigned int */ 00858 #define T_INT4 0x0074 /* int */ 00859 #define T_UINT4 0x0075 /* unsigned int */ 00860 #define T_INT8 0x0076 /* 64-bit signed int */ 00861 #define T_UINT8 0x0077 /* 64-bit unsigned int */ 00862 00863 00864 /* near pointers to basic types */ 00865 #define T_PVOID 0x0103 /* near pointer to void */ 00866 #define T_PCHAR 0x0110 /* Near pointer to 8-bit signed */ 00867 #define T_PSHORT 0x0111 /* Near pointer to 16-bit signed */ 00868 #define T_PLONG 0x0112 /* Near pointer to 32-bit signed */ 00869 #define T_PQUAD 0x0113 /* Near pointer to 64-bit signed */ 00870 #define T_PUCHAR 0x0120 /* Near pointer to 8-bit unsigned */ 00871 #define T_PUSHORT 0x0121 /* Near pointer to 16-bit unsigned */ 00872 #define T_PULONG 0x0122 /* Near pointer to 32-bit unsigned */ 00873 #define T_PUQUAD 0x0123 /* Near pointer to 64-bit unsigned */ 00874 #define T_PBOOL08 0x0130 /* Near pointer to 8-bit Boolean */ 00875 #define T_PBOOL16 0x0131 /* Near pointer to 16-bit Boolean */ 00876 #define T_PBOOL32 0x0132 /* Near pointer to 32-bit Boolean */ 00877 #define T_PBOOL64 0x0133 /* Near pointer to 64-bit Boolean */ 00878 #define T_PREAL32 0x0140 /* Near pointer to 32-bit real */ 00879 #define T_PREAL64 0x0141 /* Near pointer to 64-bit real */ 00880 #define T_PREAL80 0x0142 /* Near pointer to 80-bit real */ 00881 #define T_PREAL128 0x0143 /* Near pointer to 128-bit real */ 00882 #define T_PREAL48 0x0144 /* Near pointer to 48-bit real */ 00883 #define T_PCPLX32 0x0150 /* Near pointer to 32-bit complex */ 00884 #define T_PCPLX64 0x0151 /* Near pointer to 64-bit complex */ 00885 #define T_PCPLX80 0x0152 /* Near pointer to 80-bit complex */ 00886 #define T_PCPLX128 0x0153 /* Near pointer to 128-bit complex */ 00887 #define T_PRCHAR 0x0170 /* Near pointer to a real char */ 00888 #define T_PWCHAR 0x0171 /* Near pointer to a wide char */ 00889 #define T_PINT2 0x0172 /* Near pointer to 16-bit signed int */ 00890 #define T_PUINT2 0x0173 /* Near pointer to 16-bit unsigned int */ 00891 #define T_PINT4 0x0174 /* Near pointer to 32-bit signed int */ 00892 #define T_PUINT4 0x0175 /* Near pointer to 32-bit unsigned int */ 00893 #define T_PINT8 0x0176 /* Near pointer to 64-bit signed int */ 00894 #define T_PUINT8 0x0177 /* Near pointer to 64-bit unsigned int */ 00895 00896 00897 /* far pointers to basic types */ 00898 #define T_PFVOID 0x0203 /* Far pointer to void */ 00899 #define T_PFCHAR 0x0210 /* Far pointer to 8-bit signed */ 00900 #define T_PFSHORT 0x0211 /* Far pointer to 16-bit signed */ 00901 #define T_PFLONG 0x0212 /* Far pointer to 32-bit signed */ 00902 #define T_PFQUAD 0x0213 /* Far pointer to 64-bit signed */ 00903 #define T_PFUCHAR 0x0220 /* Far pointer to 8-bit unsigned */ 00904 #define T_PFUSHORT 0x0221 /* Far pointer to 16-bit unsigned */ 00905 #define T_PFULONG 0x0222 /* Far pointer to 32-bit unsigned */ 00906 #define T_PFUQUAD 0x0223 /* Far pointer to 64-bit unsigned */ 00907 #define T_PFBOOL08 0x0230 /* Far pointer to 8-bit Boolean */ 00908 #define T_PFBOOL16 0x0231 /* Far pointer to 16-bit Boolean */ 00909 #define T_PFBOOL32 0x0232 /* Far pointer to 32-bit Boolean */ 00910 #define T_PFBOOL64 0x0233 /* Far pointer to 64-bit Boolean */ 00911 #define T_PFREAL32 0x0240 /* Far pointer to 32-bit real */ 00912 #define T_PFREAL64 0x0241 /* Far pointer to 64-bit real */ 00913 #define T_PFREAL80 0x0242 /* Far pointer to 80-bit real */ 00914 #define T_PFREAL128 0x0243 /* Far pointer to 128-bit real */ 00915 #define T_PFREAL48 0x0244 /* Far pointer to 48-bit real */ 00916 #define T_PFCPLX32 0x0250 /* Far pointer to 32-bit complex */ 00917 #define T_PFCPLX64 0x0251 /* Far pointer to 64-bit complex */ 00918 #define T_PFCPLX80 0x0252 /* Far pointer to 80-bit complex */ 00919 #define T_PFCPLX128 0x0253 /* Far pointer to 128-bit complex */ 00920 #define T_PFRCHAR 0x0270 /* Far pointer to a real char */ 00921 #define T_PFWCHAR 0x0271 /* Far pointer to a wide char */ 00922 #define T_PFINT2 0x0272 /* Far pointer to 16-bit signed int */ 00923 #define T_PFUINT2 0x0273 /* Far pointer to 16-bit unsigned int */ 00924 #define T_PFINT4 0x0274 /* Far pointer to 32-bit signed int */ 00925 #define T_PFUINT4 0x0275 /* Far pointer to 32-bit unsigned int */ 00926 #define T_PFINT8 0x0276 /* Far pointer to 64-bit signed int */ 00927 #define T_PFUINT8 0x0277 /* Far pointer to 64-bit unsigned int */ 00928 00929 00930 /* huge pointers to basic types */ 00931 #define T_PHVOID 0x0303 /* Huge pointer to void */ 00932 #define T_PHCHAR 0x0310 /* Huge pointer to 8-bit signed */ 00933 #define T_PHSHORT 0x0311 /* Huge pointer to 16-bit signed */ 00934 #define T_PHLONG 0x0312 /* Huge pointer to 32-bit signed */ 00935 #define T_PHQUAD 0x0313 /* Huge pointer to 64-bit signed */ 00936 #define T_PHUCHAR 0x0320 /* Huge pointer to 8-bit unsigned */ 00937 #define T_PHUSHORT 0x0321 /* Huge pointer to 16-bit unsigned */ 00938 #define T_PHULONG 0x0322 /* Huge pointer to 32-bit unsigned */ 00939 #define T_PHUQUAD 0x0323 /* Huge pointer to 64-bit unsigned */ 00940 #define T_PHBOOL08 0x0330 /* Huge pointer to 8-bit Boolean */ 00941 #define T_PHBOOL16 0x0331 /* Huge pointer to 16-bit Boolean */ 00942 #define T_PHBOOL32 0x0332 /* Huge pointer to 32-bit Boolean */ 00943 #define T_PHBOOL64 0x0333 /* Huge pointer to 64-bit Boolean */ 00944 #define T_PHREAL32 0x0340 /* Huge pointer to 32-bit real */ 00945 #define T_PHREAL64 0x0341 /* Huge pointer to 64-bit real */ 00946 #define T_PHREAL80 0x0342 /* Huge pointer to 80-bit real */ 00947 #define T_PHREAL128 0x0343 /* Huge pointer to 128-bit real */ 00948 #define T_PHREAL48 0x0344 /* Huge pointer to 48-bit real */ 00949 #define T_PHCPLX32 0x0350 /* Huge pointer to 32-bit complex */ 00950 #define T_PHCPLX64 0x0351 /* Huge pointer to 64-bit complex */ 00951 #define T_PHCPLX80 0x0352 /* Huge pointer to 80-bit complex */ 00952 #define T_PHCPLX128 0x0353 /* Huge pointer to 128-bit real */ 00953 #define T_PHRCHAR 0x0370 /* Huge pointer to a real char */ 00954 #define T_PHWCHAR 0x0371 /* Huge pointer to a wide char */ 00955 #define T_PHINT2 0x0372 /* Huge pointer to 16-bit signed int */ 00956 #define T_PHUINT2 0x0373 /* Huge pointer to 16-bit unsigned int */ 00957 #define T_PHINT4 0x0374 /* Huge pointer to 32-bit signed int */ 00958 #define T_PHUINT4 0x0375 /* Huge pointer to 32-bit unsigned int */ 00959 #define T_PHINT8 0x0376 /* Huge pointer to 64-bit signed int */ 00960 #define T_PHUINT8 0x0377 /* Huge pointer to 64-bit unsigned int */ 00961 00962 00963 /* 32-bit near pointers to basic types */ 00964 #define T_32PVOID 0x0403 /* 32-bit near pointer to void */ 00965 #define T_32PHRESULT 0x0408 /* 16:32 near pointer to HRESULT - or error code ??? */ 00966 #define T_32PCHAR 0x0410 /* 16:32 near pointer to 8-bit signed */ 00967 #define T_32PSHORT 0x0411 /* 16:32 near pointer to 16-bit signed */ 00968 #define T_32PLONG 0x0412 /* 16:32 near pointer to 32-bit signed */ 00969 #define T_32PQUAD 0x0413 /* 16:32 near pointer to 64-bit signed */ 00970 #define T_32PUCHAR 0x0420 /* 16:32 near pointer to 8-bit unsigned */ 00971 #define T_32PUSHORT 0x0421 /* 16:32 near pointer to 16-bit unsigned */ 00972 #define T_32PULONG 0x0422 /* 16:32 near pointer to 32-bit unsigned */ 00973 #define T_32PUQUAD 0x0423 /* 16:32 near pointer to 64-bit unsigned */ 00974 #define T_32PBOOL08 0x0430 /* 16:32 near pointer to 8-bit Boolean */ 00975 #define T_32PBOOL16 0x0431 /* 16:32 near pointer to 16-bit Boolean */ 00976 #define T_32PBOOL32 0x0432 /* 16:32 near pointer to 32-bit Boolean */ 00977 #define T_32PBOOL64 0x0433 /* 16:32 near pointer to 64-bit Boolean */ 00978 #define T_32PREAL32 0x0440 /* 16:32 near pointer to 32-bit real */ 00979 #define T_32PREAL64 0x0441 /* 16:32 near pointer to 64-bit real */ 00980 #define T_32PREAL80 0x0442 /* 16:32 near pointer to 80-bit real */ 00981 #define T_32PREAL128 0x0443 /* 16:32 near pointer to 128-bit real */ 00982 #define T_32PREAL48 0x0444 /* 16:32 near pointer to 48-bit real */ 00983 #define T_32PCPLX32 0x0450 /* 16:32 near pointer to 32-bit complex */ 00984 #define T_32PCPLX64 0x0451 /* 16:32 near pointer to 64-bit complex */ 00985 #define T_32PCPLX80 0x0452 /* 16:32 near pointer to 80-bit complex */ 00986 #define T_32PCPLX128 0x0453 /* 16:32 near pointer to 128-bit complex */ 00987 #define T_32PRCHAR 0x0470 /* 16:32 near pointer to a real char */ 00988 #define T_32PWCHAR 0x0471 /* 16:32 near pointer to a wide char */ 00989 #define T_32PINT2 0x0472 /* 16:32 near pointer to 16-bit signed int */ 00990 #define T_32PUINT2 0x0473 /* 16:32 near pointer to 16-bit unsigned int */ 00991 #define T_32PINT4 0x0474 /* 16:32 near pointer to 32-bit signed int */ 00992 #define T_32PUINT4 0x0475 /* 16:32 near pointer to 32-bit unsigned int */ 00993 #define T_32PINT8 0x0476 /* 16:32 near pointer to 64-bit signed int */ 00994 #define T_32PUINT8 0x0477 /* 16:32 near pointer to 64-bit unsigned int */ 00995 00996 00997 /* 32-bit far pointers to basic types */ 00998 #define T_32PFVOID 0x0503 /* 32-bit far pointer to void */ 00999 #define T_32PFHRESULT 0x0508 /* 16:32 far pointer to HRESULT - or error code ??? */ 01000 #define T_32PFCHAR 0x0510 /* 16:32 far pointer to 8-bit signed */ 01001 #define T_32PFSHORT 0x0511 /* 16:32 far pointer to 16-bit signed */ 01002 #define T_32PFLONG 0x0512 /* 16:32 far pointer to 32-bit signed */ 01003 #define T_32PFQUAD 0x0513 /* 16:32 far pointer to 64-bit signed */ 01004 #define T_32PFUCHAR 0x0520 /* 16:32 far pointer to 8-bit unsigned */ 01005 #define T_32PFUSHORT 0x0521 /* 16:32 far pointer to 16-bit unsigned */ 01006 #define T_32PFULONG 0x0522 /* 16:32 far pointer to 32-bit unsigned */ 01007 #define T_32PFUQUAD 0x0523 /* 16:32 far pointer to 64-bit unsigned */ 01008 #define T_32PFBOOL08 0x0530 /* 16:32 far pointer to 8-bit Boolean */ 01009 #define T_32PFBOOL16 0x0531 /* 16:32 far pointer to 16-bit Boolean */ 01010 #define T_32PFBOOL32 0x0532 /* 16:32 far pointer to 32-bit Boolean */ 01011 #define T_32PFBOOL64 0x0533 /* 16:32 far pointer to 64-bit Boolean */ 01012 #define T_32PFREAL32 0x0540 /* 16:32 far pointer to 32-bit real */ 01013 #define T_32PFREAL64 0x0541 /* 16:32 far pointer to 64-bit real */ 01014 #define T_32PFREAL80 0x0542 /* 16:32 far pointer to 80-bit real */ 01015 #define T_32PFREAL128 0x0543 /* 16:32 far pointer to 128-bit real */ 01016 #define T_32PFREAL48 0x0544 /* 16:32 far pointer to 48-bit real */ 01017 #define T_32PFCPLX32 0x0550 /* 16:32 far pointer to 32-bit complex */ 01018 #define T_32PFCPLX64 0x0551 /* 16:32 far pointer to 64-bit complex */ 01019 #define T_32PFCPLX80 0x0552 /* 16:32 far pointer to 80-bit complex */ 01020 #define T_32PFCPLX128 0x0553 /* 16:32 far pointer to 128-bit complex */ 01021 #define T_32PFRCHAR 0x0570 /* 16:32 far pointer to a real char */ 01022 #define T_32PFWCHAR 0x0571 /* 16:32 far pointer to a wide char */ 01023 #define T_32PFINT2 0x0572 /* 16:32 far pointer to 16-bit signed int */ 01024 #define T_32PFUINT2 0x0573 /* 16:32 far pointer to 16-bit unsigned int */ 01025 #define T_32PFINT4 0x0574 /* 16:32 far pointer to 32-bit signed int */ 01026 #define T_32PFUINT4 0x0575 /* 16:32 far pointer to 32-bit unsigned int */ 01027 #define T_32PFINT8 0x0576 /* 16:32 far pointer to 64-bit signed int */ 01028 #define T_32PFUINT8 0x0577 /* 16:32 far pointer to 64-bit unsigned int */ 01029 01030 /* 64-bit near pointers to basic types */ 01031 #define T_64PVOID 0x0603 /* 64-bit near pointer to void */ 01032 #define T_64PHRESULT 0x0608 /* 64 near pointer to HRESULT - or error code ??? */ 01033 #define T_64PCHAR 0x0610 /* 64 near pointer to 8-bit signed */ 01034 #define T_64PSHORT 0x0611 /* 64 near pointer to 16-bit signed */ 01035 #define T_64PLONG 0x0612 /* 64 near pointer to 32-bit signed */ 01036 #define T_64PQUAD 0x0613 /* 64 near pointer to 64-bit signed */ 01037 #define T_64PUCHAR 0x0620 /* 64 near pointer to 8-bit unsigned */ 01038 #define T_64PUSHORT 0x0621 /* 64 near pointer to 16-bit unsigned */ 01039 #define T_64PULONG 0x0622 /* 64 near pointer to 32-bit unsigned */ 01040 #define T_64PUQUAD 0x0623 /* 64 near pointer to 64-bit unsigned */ 01041 #define T_64PBOOL08 0x0630 /* 64 near pointer to 8-bit Boolean */ 01042 #define T_64PBOOL16 0x0631 /* 64 near pointer to 16-bit Boolean */ 01043 #define T_64PBOOL32 0x0632 /* 64 near pointer to 32-bit Boolean */ 01044 #define T_64PBOOL64 0x0633 /* 64 near pointer to 64-bit Boolean */ 01045 #define T_64PREAL32 0x0640 /* 64 near pointer to 32-bit real */ 01046 #define T_64PREAL64 0x0641 /* 64 near pointer to 64-bit real */ 01047 #define T_64PREAL80 0x0642 /* 64 near pointer to 80-bit real */ 01048 #define T_64PREAL128 0x0643 /* 64 near pointer to 128-bit real */ 01049 #define T_64PREAL48 0x0644 /* 64 near pointer to 48-bit real */ 01050 #define T_64PCPLX32 0x0650 /* 64 near pointer to 32-bit complex */ 01051 #define T_64PCPLX64 0x0651 /* 64 near pointer to 64-bit complex */ 01052 #define T_64PCPLX80 0x0652 /* 64 near pointer to 80-bit complex */ 01053 #define T_64PCPLX128 0x0653 /* 64 near pointer to 128-bit complex */ 01054 #define T_64PRCHAR 0x0670 /* 64 near pointer to a real char */ 01055 #define T_64PWCHAR 0x0671 /* 64 near pointer to a wide char */ 01056 #define T_64PINT2 0x0672 /* 64 near pointer to 16-bit signed int */ 01057 #define T_64PUINT2 0x0673 /* 64 near pointer to 16-bit unsigned int */ 01058 #define T_64PINT4 0x0674 /* 64 near pointer to 32-bit signed int */ 01059 #define T_64PUINT4 0x0675 /* 64 near pointer to 32-bit unsigned int */ 01060 #define T_64PINT8 0x0676 /* 64 near pointer to 64-bit signed int */ 01061 #define T_64PUINT8 0x0677 /* 64 near pointer to 64-bit unsigned int */ 01062 01063 /* counts, bit masks, and shift values needed to access various parts of the built-in type numbers */ 01064 #define T_MAXPREDEFINEDTYPE 0x0580 /* maximum type index for all built-in types */ 01065 #define T_MAXBASICTYPE 0x0080 /* maximum type index all non-pointer built-in types */ 01066 #define T_BASICTYPE_MASK 0x00ff /* mask of bits that can potentially identify a non-pointer basic type */ 01067 #define T_BASICTYPE_SHIFT 8 /* shift count to push out the basic type bits from a type number */ 01068 #define T_MODE_MASK 0x0700 /* type mode mask (ptr/non-ptr) */ 01069 #define T_SIZE_MASK 0x0007 /* type size mask (depends on 'type' value) */ 01070 #define T_TYPE_MASK 0x00f0 /* type type mask (data treatment mode) */ 01071 01072 /* bit patterns for the <mode> portion of a built-in type number */ 01073 #define T_NEARPTR_BITS 0x0100 01074 #define T_FARPTR_BITS 0x0200 01075 #define T_HUGEPTR_BITS 0x0300 01076 #define T_NEAR32PTR_BITS 0x0400 01077 #define T_FAR32PTR_BITS 0x0500 01078 #define T_NEAR64PTR_BITS 0x0600 01079 01080 #define LF_MODIFIER_V1 0x0001 01081 #define LF_POINTER_V1 0x0002 01082 #define LF_ARRAY_V1 0x0003 01083 #define LF_CLASS_V1 0x0004 01084 #define LF_STRUCTURE_V1 0x0005 01085 #define LF_UNION_V1 0x0006 01086 #define LF_ENUM_V1 0x0007 01087 #define LF_PROCEDURE_V1 0x0008 01088 #define LF_MFUNCTION_V1 0x0009 01089 #define LF_VTSHAPE_V1 0x000a 01090 #define LF_COBOL0_V1 0x000b 01091 #define LF_COBOL1_V1 0x000c 01092 #define LF_BARRAY_V1 0x000d 01093 #define LF_LABEL_V1 0x000e 01094 #define LF_NULL_V1 0x000f 01095 #define LF_NOTTRAN_V1 0x0010 01096 #define LF_DIMARRAY_V1 0x0011 01097 #define LF_VFTPATH_V1 0x0012 01098 #define LF_PRECOMP_V1 0x0013 01099 #define LF_ENDPRECOMP_V1 0x0014 01100 #define LF_OEM_V1 0x0015 01101 #define LF_TYPESERVER_V1 0x0016 01102 01103 #define LF_MODIFIER_V2 0x1001 /* variants with new 32-bit type indices (V2) */ 01104 #define LF_POINTER_V2 0x1002 01105 #define LF_ARRAY_V2 0x1003 01106 #define LF_CLASS_V2 0x1004 01107 #define LF_STRUCTURE_V2 0x1005 01108 #define LF_UNION_V2 0x1006 01109 #define LF_ENUM_V2 0x1007 01110 #define LF_PROCEDURE_V2 0x1008 01111 #define LF_MFUNCTION_V2 0x1009 01112 #define LF_COBOL0_V2 0x100a 01113 #define LF_BARRAY_V2 0x100b 01114 #define LF_DIMARRAY_V2 0x100c 01115 #define LF_VFTPATH_V2 0x100d 01116 #define LF_PRECOMP_V2 0x100e 01117 #define LF_OEM_V2 0x100f 01118 01119 #define LF_SKIP_V1 0x0200 01120 #define LF_ARGLIST_V1 0x0201 01121 #define LF_DEFARG_V1 0x0202 01122 #define LF_LIST_V1 0x0203 01123 #define LF_FIELDLIST_V1 0x0204 01124 #define LF_DERIVED_V1 0x0205 01125 #define LF_BITFIELD_V1 0x0206 01126 #define LF_METHODLIST_V1 0x0207 01127 #define LF_DIMCONU_V1 0x0208 01128 #define LF_DIMCONLU_V1 0x0209 01129 #define LF_DIMVARU_V1 0x020a 01130 #define LF_DIMVARLU_V1 0x020b 01131 #define LF_REFSYM_V1 0x020c 01132 01133 #define LF_SKIP_V2 0x1200 /* variants with new 32-bit type indices (V2) */ 01134 #define LF_ARGLIST_V2 0x1201 01135 #define LF_DEFARG_V2 0x1202 01136 #define LF_FIELDLIST_V2 0x1203 01137 #define LF_DERIVED_V2 0x1204 01138 #define LF_BITFIELD_V2 0x1205 01139 #define LF_METHODLIST_V2 0x1206 01140 #define LF_DIMCONU_V2 0x1207 01141 #define LF_DIMCONLU_V2 0x1208 01142 #define LF_DIMVARU_V2 0x1209 01143 #define LF_DIMVARLU_V2 0x120a 01144 01145 /* Field lists */ 01146 #define LF_BCLASS_V1 0x0400 01147 #define LF_VBCLASS_V1 0x0401 01148 #define LF_IVBCLASS_V1 0x0402 01149 #define LF_ENUMERATE_V1 0x0403 01150 #define LF_FRIENDFCN_V1 0x0404 01151 #define LF_INDEX_V1 0x0405 01152 #define LF_MEMBER_V1 0x0406 01153 #define LF_STMEMBER_V1 0x0407 01154 #define LF_METHOD_V1 0x0408 01155 #define LF_NESTTYPE_V1 0x0409 01156 #define LF_VFUNCTAB_V1 0x040a 01157 #define LF_FRIENDCLS_V1 0x040b 01158 #define LF_ONEMETHOD_V1 0x040c 01159 #define LF_VFUNCOFF_V1 0x040d 01160 #define LF_NESTTYPEEX_V1 0x040e 01161 #define LF_MEMBERMODIFY_V1 0x040f 01162 01163 #define LF_BCLASS_V2 0x1400 /* variants with new 32-bit type indices (V2) */ 01164 #define LF_VBCLASS_V2 0x1401 01165 #define LF_IVBCLASS_V2 0x1402 01166 #define LF_FRIENDFCN_V2 0x1403 01167 #define LF_INDEX_V2 0x1404 01168 #define LF_MEMBER_V2 0x1405 01169 #define LF_STMEMBER_V2 0x1406 01170 #define LF_METHOD_V2 0x1407 01171 #define LF_NESTTYPE_V2 0x1408 01172 #define LF_VFUNCTAB_V2 0x1409 01173 #define LF_FRIENDCLS_V2 0x140a 01174 #define LF_ONEMETHOD_V2 0x140b 01175 #define LF_VFUNCOFF_V2 0x140c 01176 #define LF_NESTTYPEEX_V2 0x140d 01177 01178 #define LF_ENUMERATE_V3 0x1502 01179 #define LF_ARRAY_V3 0x1503 01180 #define LF_CLASS_V3 0x1504 01181 #define LF_STRUCTURE_V3 0x1505 01182 #define LF_UNION_V3 0x1506 01183 #define LF_ENUM_V3 0x1507 01184 #define LF_MEMBER_V3 0x150d 01185 #define LF_STMEMBER_V3 0x150e 01186 #define LF_METHOD_V3 0x150f 01187 #define LF_NESTTYPE_V3 0x1510 01188 #define LF_ONEMETHOD_V3 0x1511 01189 01190 #define LF_NUMERIC 0x8000 /* numeric leaf types */ 01191 #define LF_CHAR 0x8000 01192 #define LF_SHORT 0x8001 01193 #define LF_USHORT 0x8002 01194 #define LF_LONG 0x8003 01195 #define LF_ULONG 0x8004 01196 #define LF_REAL32 0x8005 01197 #define LF_REAL64 0x8006 01198 #define LF_REAL80 0x8007 01199 #define LF_REAL128 0x8008 01200 #define LF_QUADWORD 0x8009 01201 #define LF_UQUADWORD 0x800a 01202 #define LF_REAL48 0x800b 01203 #define LF_COMPLEX32 0x800c 01204 #define LF_COMPLEX64 0x800d 01205 #define LF_COMPLEX80 0x800e 01206 #define LF_COMPLEX128 0x800f 01207 #define LF_VARSTRING 0x8010 01208 01209 /* ======================================== * 01210 * Symbol information 01211 * ======================================== */ 01212 01213 union codeview_symbol 01214 { 01215 struct 01216 { 01217 short int len; 01218 short int id; 01219 } generic; 01220 01221 struct 01222 { 01223 short int len; 01224 short int id; 01225 unsigned int offset; 01226 unsigned short segment; 01227 unsigned short symtype; 01228 struct p_string p_name; 01229 } data_v1; 01230 01231 struct 01232 { 01233 short int len; 01234 short int id; 01235 unsigned int symtype; 01236 unsigned int offset; 01237 unsigned short segment; 01238 struct p_string p_name; 01239 } data_v2; 01240 01241 struct 01242 { 01243 short int len; 01244 short int id; 01245 unsigned int symtype; 01246 unsigned int offset; 01247 unsigned short segment; 01248 char name[1]; 01249 } data_v3; 01250 01251 struct 01252 { 01253 short int len; 01254 short int id; 01255 unsigned int pparent; 01256 unsigned int pend; 01257 unsigned int next; 01258 unsigned int offset; 01259 unsigned short segment; 01260 unsigned short thunk_len; 01261 unsigned char thtype; 01262 struct p_string p_name; 01263 } thunk_v1; 01264 01265 struct 01266 { 01267 short int len; 01268 short int id; 01269 unsigned int pparent; 01270 unsigned int pend; 01271 unsigned int next; 01272 unsigned int offset; 01273 unsigned short segment; 01274 unsigned short thunk_len; 01275 unsigned char thtype; 01276 char name[1]; 01277 } thunk_v3; 01278 01279 struct 01280 { 01281 short int len; 01282 short int id; 01283 unsigned int pparent; 01284 unsigned int pend; 01285 unsigned int next; 01286 unsigned int proc_len; 01287 unsigned int debug_start; 01288 unsigned int debug_end; 01289 unsigned int offset; 01290 unsigned short segment; 01291 unsigned short proctype; 01292 unsigned char flags; 01293 struct p_string p_name; 01294 } proc_v1; 01295 01296 struct 01297 { 01298 short int len; 01299 short int id; 01300 unsigned int pparent; 01301 unsigned int pend; 01302 unsigned int next; 01303 unsigned int proc_len; 01304 unsigned int debug_start; 01305 unsigned int debug_end; 01306 unsigned int proctype; 01307 unsigned int offset; 01308 unsigned short segment; 01309 unsigned char flags; 01310 struct p_string p_name; 01311 } proc_v2; 01312 01313 struct 01314 { 01315 short int len; 01316 short int id; 01317 unsigned int pparent; 01318 unsigned int pend; 01319 unsigned int next; 01320 unsigned int proc_len; 01321 unsigned int debug_start; 01322 unsigned int debug_end; 01323 unsigned int proctype; 01324 unsigned int offset; 01325 unsigned short segment; 01326 unsigned char flags; 01327 char name[1]; 01328 } proc_v3; 01329 01330 struct 01331 { 01332 short int len; 01333 short int id; 01334 unsigned int symtype; 01335 unsigned int offset; 01336 unsigned short segment; 01337 struct p_string p_name; 01338 } public_v2; 01339 01340 struct 01341 { 01342 short int len; 01343 short int id; 01344 unsigned int symtype; 01345 unsigned int offset; 01346 unsigned short segment; 01347 char name[1]; 01348 } public_v3; 01349 01350 struct 01351 { 01352 short int len; /* Total length of this entry */ 01353 short int id; /* Always S_BPREL_V1 */ 01354 unsigned int offset; /* Stack offset relative to BP */ 01355 unsigned short symtype; 01356 struct p_string p_name; 01357 } stack_v1; 01358 01359 struct 01360 { 01361 short int len; /* Total length of this entry */ 01362 short int id; /* Always S_BPREL_V2 */ 01363 unsigned int offset; /* Stack offset relative to EBP */ 01364 unsigned int symtype; 01365 struct p_string p_name; 01366 } stack_v2; 01367 01368 struct 01369 { 01370 short int len; /* Total length of this entry */ 01371 short int id; /* Always S_BPREL_V3 */ 01372 int offset; /* Stack offset relative to BP */ 01373 unsigned int symtype; 01374 char name[1]; 01375 } stack_v3; 01376 01377 struct 01378 { 01379 short int len; /* Total length of this entry */ 01380 short int id; /* Always S_BPREL_V3 */ 01381 int offset; /* Stack offset relative to BP */ 01382 unsigned int symtype; 01383 unsigned short reg; 01384 char name[1]; 01385 } regrel_v3; 01386 01387 struct 01388 { 01389 short int len; /* Total length of this entry */ 01390 short int id; /* Always S_REGISTER */ 01391 unsigned short type; 01392 unsigned short reg; 01393 struct p_string p_name; 01394 /* don't handle register tracking */ 01395 } register_v1; 01396 01397 struct 01398 { 01399 short int len; /* Total length of this entry */ 01400 short int id; /* Always S_REGISTER_V2 */ 01401 unsigned int type; /* check whether type & reg are correct */ 01402 unsigned short reg; 01403 struct p_string p_name; 01404 /* don't handle register tracking */ 01405 } register_v2; 01406 01407 struct 01408 { 01409 short int len; /* Total length of this entry */ 01410 short int id; /* Always S_REGISTER_V3 */ 01411 unsigned int type; /* check whether type & reg are correct */ 01412 unsigned short reg; 01413 char name[1]; 01414 /* don't handle register tracking */ 01415 } register_v3; 01416 01417 struct 01418 { 01419 short int len; 01420 short int id; 01421 unsigned int parent; 01422 unsigned int end; 01423 unsigned int length; 01424 unsigned int offset; 01425 unsigned short segment; 01426 struct p_string p_name; 01427 } block_v1; 01428 01429 struct 01430 { 01431 short int len; 01432 short int id; 01433 unsigned int parent; 01434 unsigned int end; 01435 unsigned int length; 01436 unsigned int offset; 01437 unsigned short segment; 01438 char name[1]; 01439 } block_v3; 01440 01441 struct 01442 { 01443 short int len; 01444 short int id; 01445 unsigned int offset; 01446 unsigned short segment; 01447 unsigned char flags; 01448 struct p_string p_name; 01449 } label_v1; 01450 01451 struct 01452 { 01453 short int len; 01454 short int id; 01455 unsigned int offset; 01456 unsigned short segment; 01457 unsigned char flags; 01458 char name[1]; 01459 } label_v3; 01460 01461 struct 01462 { 01463 short int len; 01464 short int id; 01465 unsigned short type; 01466 unsigned short cvalue; /* numeric leaf */ 01467 #if 0 01468 struct p_string p_name; 01469 #endif 01470 } constant_v1; 01471 01472 struct 01473 { 01474 short int len; 01475 short int id; 01476 unsigned type; 01477 unsigned short cvalue; /* numeric leaf */ 01478 #if 0 01479 struct p_string p_name; 01480 #endif 01481 } constant_v2; 01482 01483 struct 01484 { 01485 short int len; 01486 short int id; 01487 unsigned type; 01488 unsigned short cvalue; 01489 #if 0 01490 char name[1]; 01491 #endif 01492 } constant_v3; 01493 01494 struct 01495 { 01496 short int len; 01497 short int id; 01498 unsigned short type; 01499 struct p_string p_name; 01500 } udt_v1; 01501 01502 struct 01503 { 01504 short int len; 01505 short int id; 01506 unsigned type; 01507 struct p_string p_name; 01508 } udt_v2; 01509 01510 struct 01511 { 01512 short int len; 01513 short int id; 01514 unsigned int type; 01515 char name[1]; 01516 } udt_v3; 01517 01518 struct 01519 { 01520 short int len; 01521 short int id; 01522 char signature[4]; 01523 struct p_string p_name; 01524 } objname_v1; 01525 01526 struct 01527 { 01528 short int len; 01529 short int id; 01530 unsigned int unknown; 01531 struct p_string p_name; 01532 } compiland_v1; 01533 01534 struct 01535 { 01536 short int len; 01537 short int id; 01538 unsigned unknown1[4]; 01539 unsigned short unknown2; 01540 struct p_string p_name; 01541 } compiland_v2; 01542 01543 struct 01544 { 01545 short int len; 01546 short int id; 01547 unsigned int unknown; 01548 char name[1]; 01549 } compiland_v3; 01550 01551 struct 01552 { 01553 short int len; 01554 short int id; 01555 unsigned int offset; 01556 unsigned short segment; 01557 unsigned short symtype; 01558 struct p_string p_name; 01559 } thread_v1; 01560 01561 struct 01562 { 01563 short int len; 01564 short int id; 01565 unsigned int symtype; 01566 unsigned int offset; 01567 unsigned short segment; 01568 struct p_string p_name; 01569 } thread_v2; 01570 01571 struct 01572 { 01573 short int len; 01574 short int id; 01575 unsigned int symtype; 01576 unsigned int offset; 01577 unsigned short segment; 01578 char name[1]; 01579 } thread_v3; 01580 01581 struct 01582 { 01583 short int len; 01584 short int id; 01585 unsigned int offset; 01586 unsigned short segment; 01587 } ssearch_v1; 01588 01589 struct 01590 { 01591 short int len; 01592 short int id; 01593 unsigned int offset; 01594 unsigned int unknown; 01595 } security_cookie_v3; 01596 01597 struct 01598 { 01599 short int len; 01600 short int id; 01601 unsigned int sz_frame; /* size of frame */ 01602 unsigned int unknown2; 01603 unsigned int unknown3; 01604 unsigned int sz_saved_regs; /* size of saved registers from callee */ 01605 unsigned int eh_offset; /* offset for exception handler */ 01606 unsigned short eh_sect; /* section for exception handler */ 01607 unsigned int flags; 01608 } frame_info_v2; 01609 }; 01610 01611 #define S_COMPILAND_V1 0x0001 01612 #define S_REGISTER_V1 0x0002 01613 #define S_CONSTANT_V1 0x0003 01614 #define S_UDT_V1 0x0004 01615 #define S_SSEARCH_V1 0x0005 01616 #define S_END_V1 0x0006 01617 #define S_SKIP_V1 0x0007 01618 #define S_CVRESERVE_V1 0x0008 01619 #define S_OBJNAME_V1 0x0009 01620 #define S_ENDARG_V1 0x000a 01621 #define S_COBOLUDT_V1 0x000b 01622 #define S_MANYREG_V1 0x000c 01623 #define S_RETURN_V1 0x000d 01624 #define S_ENTRYTHIS_V1 0x000e 01625 01626 #define S_BPREL_V1 0x0200 01627 #define S_LDATA_V1 0x0201 01628 #define S_GDATA_V1 0x0202 01629 #define S_PUB_V1 0x0203 01630 #define S_LPROC_V1 0x0204 01631 #define S_GPROC_V1 0x0205 01632 #define S_THUNK_V1 0x0206 01633 #define S_BLOCK_V1 0x0207 01634 #define S_WITH_V1 0x0208 01635 #define S_LABEL_V1 0x0209 01636 #define S_CEXMODEL_V1 0x020a 01637 #define S_VFTPATH_V1 0x020b 01638 #define S_REGREL_V1 0x020c 01639 #define S_LTHREAD_V1 0x020d 01640 #define S_GTHREAD_V1 0x020e 01641 01642 #define S_PROCREF_V1 0x0400 01643 #define S_DATAREF_V1 0x0401 01644 #define S_ALIGN_V1 0x0402 01645 #define S_LPROCREF_V1 0x0403 01646 01647 #define S_REGISTER_V2 0x1001 /* Variants with new 32-bit type indices */ 01648 #define S_CONSTANT_V2 0x1002 01649 #define S_UDT_V2 0x1003 01650 #define S_COBOLUDT_V2 0x1004 01651 #define S_MANYREG_V2 0x1005 01652 #define S_BPREL_V2 0x1006 01653 #define S_LDATA_V2 0x1007 01654 #define S_GDATA_V2 0x1008 01655 #define S_PUB_V2 0x1009 01656 #define S_LPROC_V2 0x100a 01657 #define S_GPROC_V2 0x100b 01658 #define S_VFTTABLE_V2 0x100c 01659 #define S_REGREL_V2 0x100d 01660 #define S_LTHREAD_V2 0x100e 01661 #define S_GTHREAD_V2 0x100f 01662 #define S_FRAMEINFO_V2 0x1012 01663 #define S_COMPILAND_V2 0x1013 01664 01665 #define S_COMPILAND_V3 0x1101 01666 #define S_THUNK_V3 0x1102 01667 #define S_BLOCK_V3 0x1103 01668 #define S_LABEL_V3 0x1105 01669 #define S_REGISTER_V3 0x1106 01670 #define S_CONSTANT_V3 0x1107 01671 #define S_UDT_V3 0x1108 01672 #define S_BPREL_V3 0x110B 01673 #define S_LDATA_V3 0x110C 01674 #define S_GDATA_V3 0x110D 01675 #define S_PUB_V3 0x110E 01676 #define S_LPROC_V3 0x110F 01677 #define S_GPROC_V3 0x1110 01678 #define S_REGREL_V3 0x1111 01679 #define S_LTHREAD_V3 0x1112 01680 #define S_GTHREAD_V3 0x1113 01681 #define S_MSTOOL_V3 0x1116 /* compiler command line options and build information */ 01682 #define S_PUB_FUNC1_V3 0x1125 /* didn't get the difference between the two */ 01683 #define S_PUB_FUNC2_V3 0x1127 01684 #define S_SECTINFO_V3 0x1136 01685 #define S_SUBSECTINFO_V3 0x1137 01686 #define S_ENTRYPOINT_V3 0x1138 01687 #define S_SECUCOOKIE_V3 0x113A 01688 #define S_MSTOOLINFO_V3 0x113C 01689 #define S_MSTOOLENV_V3 0x113D 01690 01691 /* ======================================== * 01692 * Line number information 01693 * ======================================== */ 01694 01695 struct codeview_linetab_block 01696 { 01697 unsigned short seg; 01698 unsigned short num_lines; 01699 unsigned int offsets[1]; /* in fact num_lines */ 01700 /* unsigned short linenos[]; */ 01701 }; 01702 01703 struct startend 01704 { 01705 unsigned int start; 01706 unsigned int end; 01707 }; 01708 01709 #define LT2_LINES_BLOCK 0x000000f2 01710 #define LT2_FILES_BLOCK 0x000000f4 01711 01712 /* there's a new line tab structure from MS Studio 2005 and after 01713 * it's made of a list of codeview_linetab2 blocks. 01714 * We've only seen (so far) list with a single LT2_FILES_BLOCK and several 01715 * LT2_LINES_BLOCK. The LT2_FILES block has been encountered either as first 01716 * or last block of the list. 01717 * A LT2_FILES contains one or several codeview_linetab2_file:s 01718 */ 01719 01720 struct codeview_linetab2 01721 { 01722 DWORD header; 01723 DWORD size_of_block; 01724 }; 01725 01726 static inline const struct codeview_linetab2* codeview_linetab2_next_block(const struct codeview_linetab2* lt2) 01727 { 01728 return (const struct codeview_linetab2*)((const char*)(lt2 + 1) + lt2->size_of_block); 01729 } 01730 01731 struct codeview_linetab2_file 01732 { 01733 DWORD offset; /* offset in string table for filename */ 01734 WORD unk; /* always 0x0110... type of following information ??? */ 01735 BYTE md5[16]; /* MD5 signature of file (signature on file's content or name ???) */ 01736 WORD pad0; /* always 0 */ 01737 }; 01738 01739 struct codeview_lt2blk_files 01740 { 01741 struct codeview_linetab2 lt2; /* LT2_FILES */ 01742 struct codeview_linetab2_file file[1]; 01743 }; 01744 01745 struct codeview_lt2blk_lines 01746 { 01747 struct codeview_linetab2 lt2; /* LT2_LINE_BLOCK */ 01748 DWORD start; /* start address of function with line numbers */ 01749 DWORD seg; /* segment of function with line numbers */ 01750 DWORD size; /* size of function with line numbers */ 01751 DWORD file_offset; /* offset for accessing corresponding codeview_linetab2_file */ 01752 DWORD nlines; /* number of lines in this block */ 01753 DWORD size_lines; /* number of bytes following for line number information */ 01754 struct { 01755 DWORD offset; /* offset (from <seg>:<start>) for line number */ 01756 DWORD lineno; /* the line number (OR:ed with 0x80000000 why ???) */ 01757 } l[1]; /* actually array of <nlines> */ 01758 }; 01759 01760 /* ======================================== * 01761 * PDB file information 01762 * ======================================== */ 01763 01764 01765 struct PDB_FILE 01766 { 01767 DWORD size; 01768 DWORD unknown; 01769 }; 01770 01771 struct PDB_JG_HEADER 01772 { 01773 CHAR ident[40]; 01774 DWORD signature; 01775 DWORD block_size; 01776 WORD free_list; 01777 WORD total_alloc; 01778 struct PDB_FILE toc; 01779 WORD toc_block[1]; 01780 }; 01781 01782 struct PDB_DS_HEADER 01783 { 01784 char signature[32]; 01785 DWORD block_size; 01786 DWORD unknown1; 01787 DWORD num_pages; 01788 DWORD toc_size; 01789 DWORD unknown2; 01790 DWORD toc_page; 01791 }; 01792 01793 struct PDB_JG_TOC 01794 { 01795 DWORD num_files; 01796 struct PDB_FILE file[1]; 01797 }; 01798 01799 struct PDB_DS_TOC 01800 { 01801 DWORD num_files; 01802 DWORD file_size[1]; 01803 }; 01804 01805 struct PDB_JG_ROOT 01806 { 01807 DWORD Version; 01808 DWORD TimeDateStamp; 01809 DWORD Age; 01810 DWORD cbNames; 01811 CHAR names[1]; 01812 }; 01813 01814 struct PDB_DS_ROOT 01815 { 01816 DWORD Version; 01817 DWORD TimeDateStamp; 01818 DWORD Age; 01819 GUID guid; 01820 DWORD cbNames; 01821 CHAR names[1]; 01822 }; 01823 01824 typedef struct _PDB_TYPES_OLD 01825 { 01826 DWORD version; 01827 WORD first_index; 01828 WORD last_index; 01829 DWORD type_size; 01830 WORD file; 01831 WORD pad; 01832 } PDB_TYPES_OLD, *PPDB_TYPES_OLD; 01833 01834 typedef struct _PDB_TYPES 01835 { 01836 DWORD version; 01837 DWORD type_offset; 01838 DWORD first_index; 01839 DWORD last_index; 01840 DWORD type_size; 01841 WORD file; 01842 WORD pad; 01843 DWORD hash_size; 01844 DWORD hash_base; 01845 DWORD hash_offset; 01846 DWORD hash_len; 01847 DWORD search_offset; 01848 DWORD search_len; 01849 DWORD unknown_offset; 01850 DWORD unknown_len; 01851 } PDB_TYPES, *PPDB_TYPES; 01852 01853 typedef struct _PDB_SYMBOL_RANGE 01854 { 01855 WORD segment; 01856 WORD pad1; 01857 DWORD offset; 01858 DWORD size; 01859 DWORD characteristics; 01860 WORD index; 01861 WORD pad2; 01862 } PDB_SYMBOL_RANGE, *PPDB_SYMBOL_RANGE; 01863 01864 typedef struct _PDB_SYMBOL_RANGE_EX 01865 { 01866 WORD segment; 01867 WORD pad1; 01868 DWORD offset; 01869 DWORD size; 01870 DWORD characteristics; 01871 WORD index; 01872 WORD pad2; 01873 DWORD timestamp; 01874 DWORD unknown; 01875 } PDB_SYMBOL_RANGE_EX, *PPDB_SYMBOL_RANGE_EX; 01876 01877 typedef struct _PDB_SYMBOL_FILE 01878 { 01879 DWORD unknown1; 01880 PDB_SYMBOL_RANGE range; 01881 WORD flag; 01882 WORD file; 01883 DWORD symbol_size; 01884 DWORD lineno_size; 01885 DWORD unknown2; 01886 DWORD nSrcFiles; 01887 DWORD attribute; 01888 CHAR filename[1]; 01889 } PDB_SYMBOL_FILE, *PPDB_SYMBOL_FILE; 01890 01891 typedef struct _PDB_SYMBOL_FILE_EX 01892 { 01893 DWORD unknown1; 01894 PDB_SYMBOL_RANGE_EX range; 01895 WORD flag; 01896 WORD file; 01897 DWORD symbol_size; 01898 DWORD lineno_size; 01899 DWORD unknown2; 01900 DWORD nSrcFiles; 01901 DWORD attribute; 01902 DWORD reserved[2]; 01903 CHAR filename[1]; 01904 } PDB_SYMBOL_FILE_EX, *PPDB_SYMBOL_FILE_EX; 01905 01906 typedef struct _PDB_SYMBOL_SOURCE 01907 { 01908 WORD nModules; 01909 WORD nSrcFiles; 01910 WORD table[1]; 01911 } PDB_SYMBOL_SOURCE, *PPDB_SYMBOL_SOURCE; 01912 01913 typedef struct _PDB_SYMBOL_IMPORT 01914 { 01915 DWORD unknown1; 01916 DWORD unknown2; 01917 DWORD TimeDateStamp; 01918 DWORD Age; 01919 CHAR filename[1]; 01920 } PDB_SYMBOL_IMPORT, *PPDB_SYMBOL_IMPORT; 01921 01922 typedef struct _PDB_SYMBOLS_OLD 01923 { 01924 WORD hash1_file; 01925 WORD hash2_file; 01926 WORD gsym_file; 01927 WORD pad; 01928 DWORD module_size; 01929 DWORD offset_size; 01930 DWORD hash_size; 01931 DWORD srcmodule_size; 01932 } PDB_SYMBOLS_OLD, *PPDB_SYMBOLS_OLD; 01933 01934 typedef struct _PDB_SYMBOLS 01935 { 01936 DWORD signature; 01937 DWORD version; 01938 DWORD unknown; 01939 DWORD hash1_file; 01940 DWORD hash2_file; 01941 WORD gsym_file; 01942 WORD unknown1; 01943 DWORD module_size; 01944 DWORD offset_size; 01945 DWORD hash_size; 01946 DWORD srcmodule_size; 01947 DWORD pdbimport_size; 01948 DWORD resvd0; 01949 DWORD stream_index_size; 01950 DWORD unknown2_size; 01951 WORD resvd3; 01952 WORD machine; 01953 DWORD resvd4; 01954 } PDB_SYMBOLS, *PPDB_SYMBOLS; 01955 01956 typedef struct 01957 { 01958 WORD FPO; 01959 WORD unk0; 01960 WORD unk1; 01961 WORD unk2; 01962 WORD unk3; 01963 WORD segments; 01964 } PDB_STREAM_INDEXES_OLD; 01965 01966 typedef struct 01967 { 01968 WORD FPO; 01969 WORD unk0; 01970 WORD unk1; 01971 WORD unk2; 01972 WORD unk3; 01973 WORD segments; 01974 WORD unk4; 01975 WORD unk5; 01976 WORD unk6; 01977 WORD FPO_EXT; 01978 WORD unk7; 01979 } PDB_STREAM_INDEXES; 01980 01981 typedef struct _PDB_FPO_DATA 01982 { 01983 DWORD start; 01984 DWORD func_size; 01985 DWORD locals_size; 01986 DWORD params_size; 01987 DWORD maxstack_size; 01988 DWORD str_offset; 01989 WORD prolog_size; 01990 WORD savedregs_size; 01991 #define PDB_FPO_DFL_SEH 0x00000001 01992 #define PDB_FPO_DFL_EH 0x00000002 01993 #define PDB_FPO_DFL_IN_BLOCK 0x00000004 01994 DWORD flags; 01995 } PDB_FPO_DATA; 01996 01997 #include "poppack.h" 01998 01999 /* ---------------------------------------------- 02000 * Information used for parsing 02001 * ---------------------------------------------- */ 02002 02003 typedef struct 02004 { 02005 DWORD from; 02006 DWORD to; 02007 } OMAP_DATA; 02008 02009 struct msc_debug_info 02010 { 02011 struct module* module; 02012 int nsect; 02013 const IMAGE_SECTION_HEADER* sectp; 02014 int nomap; 02015 const OMAP_DATA* omapp; 02016 const BYTE* root; 02017 }; 02018 02019 /* coff.c */ 02020 extern BOOL coff_process_info(const struct msc_debug_info* msc_dbg); 02021 02022 /* =================================================== 02023 * The old CodeView stuff (for NB09 and NB11) 02024 * =================================================== */ 02025 02026 #define sstModule 0x120 02027 #define sstTypes 0x121 02028 #define sstPublic 0x122 02029 #define sstPublicSym 0x123 02030 #define sstSymbols 0x124 02031 #define sstAlignSym 0x125 02032 #define sstSrcLnSeg 0x126 02033 #define sstSrcModule 0x127 02034 #define sstLibraries 0x128 02035 #define sstGlobalSym 0x129 02036 #define sstGlobalPub 0x12a 02037 #define sstGlobalTypes 0x12b 02038 #define sstMPC 0x12c 02039 #define sstSegMap 0x12d 02040 #define sstSegName 0x12e 02041 #define sstPreComp 0x12f 02042 #define sstFileIndex 0x133 02043 #define sstStaticSym 0x134 02044 02045 /* overall structure information */ 02046 typedef struct OMFSignature 02047 { 02048 char Signature[4]; 02049 long filepos; 02050 } OMFSignature; 02051 02052 typedef struct OMFSignatureRSDS 02053 { 02054 char Signature[4]; 02055 GUID guid; 02056 DWORD age; 02057 CHAR name[1]; 02058 } OMFSignatureRSDS; 02059 02060 typedef struct _CODEVIEW_PDB_DATA 02061 { 02062 char Signature[4]; 02063 long filepos; 02064 DWORD timestamp; 02065 DWORD age; 02066 CHAR name[1]; 02067 } CODEVIEW_PDB_DATA, *PCODEVIEW_PDB_DATA; 02068 02069 typedef struct OMFDirHeader 02070 { 02071 WORD cbDirHeader; 02072 WORD cbDirEntry; 02073 DWORD cDir; 02074 DWORD lfoNextDir; 02075 DWORD flags; 02076 } OMFDirHeader; 02077 02078 typedef struct OMFDirEntry 02079 { 02080 WORD SubSection; 02081 WORD iMod; 02082 DWORD lfo; 02083 DWORD cb; 02084 } OMFDirEntry; 02085 02086 /* sstModule subsection */ 02087 02088 typedef struct OMFSegDesc 02089 { 02090 WORD Seg; 02091 WORD pad; 02092 DWORD Off; 02093 DWORD cbSeg; 02094 } OMFSegDesc; 02095 02096 typedef struct OMFModule 02097 { 02098 WORD ovlNumber; 02099 WORD iLib; 02100 WORD cSeg; 02101 char Style[2]; 02102 /* 02103 OMFSegDesc SegInfo[cSeg]; 02104 p_string Name; 02105 */ 02106 } OMFModule; 02107 02108 typedef struct OMFGlobalTypes 02109 { 02110 DWORD flags; 02111 DWORD cTypes; 02112 /* 02113 DWORD offset[cTypes]; 02114 types_record[]; 02115 */ 02116 } OMFGlobalTypes; 02117 02118 /* sstGlobalPub section */ 02119 02120 /* Header for symbol table */ 02121 typedef struct OMFSymHash 02122 { 02123 unsigned short symhash; 02124 unsigned short addrhash; 02125 unsigned long cbSymbol; 02126 unsigned long cbHSym; 02127 unsigned long cbHAddr; 02128 } OMFSymHash; 02129 02130 /* sstSegMap section */ 02131 02132 typedef struct OMFSegMapDesc 02133 { 02134 unsigned short flags; 02135 unsigned short ovl; 02136 unsigned short group; 02137 unsigned short frame; 02138 unsigned short iSegName; 02139 unsigned short iClassName; 02140 unsigned long offset; 02141 unsigned long cbSeg; 02142 } OMFSegMapDesc; 02143 02144 typedef struct OMFSegMap 02145 { 02146 unsigned short cSeg; 02147 unsigned short cSegLog; 02148 /* OMFSegMapDesc rgDesc[0];*/ 02149 } OMFSegMap; 02150 02151 02152 /* sstSrcModule section */ 02153 02154 typedef struct OMFSourceLine 02155 { 02156 unsigned short Seg; 02157 unsigned short cLnOff; 02158 unsigned long offset[1]; 02159 unsigned short lineNbr[1]; 02160 } OMFSourceLine; 02161 02162 typedef struct OMFSourceFile 02163 { 02164 unsigned short cSeg; 02165 unsigned short reserved; 02166 unsigned long baseSrcLn[1]; 02167 unsigned short cFName; 02168 char Name; 02169 } OMFSourceFile; 02170 02171 typedef struct OMFSourceModule 02172 { 02173 unsigned short cFile; 02174 unsigned short cSeg; 02175 unsigned long baseSrcFile[1]; 02176 } OMFSourceModule; Generated on Sun May 27 2012 04:33:19 for ReactOS by
1.7.6.1
|