Coverage for /Syzygy/pe/cvinfo_ext.h

CoverageLines executed / instrumented / missingexe / inst / missLanguageGroup
0.0%00448.C++source

Line-by-line coverage:

   1    :  // Copyright 2012 Google Inc. All Rights Reserved.
   2    :  //
   3    :  // Licensed under the Apache License, Version 2.0 (the "License");
   4    :  // you may not use this file except in compliance with the License.
   5    :  // You may obtain a copy of the License at
   6    :  //
   7    :  //     http://www.apache.org/licenses/LICENSE-2.0
   8    :  //
   9    :  // Unless required by applicable law or agreed to in writing, software
  10    :  // distributed under the License is distributed on an "AS IS" BASIS,
  11    :  // WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
  12    :  // See the License for the specific language governing permissions and
  13    :  // limitations under the License.
  14    :  //
  15    :  // This header is an extension to the cvinfo.h file from the CCI project.
  16    :  
  17    :  #ifndef SYZYGY_PE_CVINFO_EXT_H_
  18    :  #define SYZYGY_PE_CVINFO_EXT_H_
  19    :  
  20    :  #include <windows.h>
  21    :  
  22    :  #include "base/basictypes.h"
  23    :  #include "syzygy/common/assertions.h"
  24    :  #include "third_party/cci/files/cvinfo.h"
  25    :  
  26  m :  namespace Microsoft_Cci_Pdb {
  27    :  
  28    :  // CodeView2 symbols. These are superseded in CodeView4 symbol streams.
  29    :  // Taken from the Visual C++ 5.0 Symbolic Debug Information Specification.
  30  m :  const uint16 S_COMPILE_CV2 = 0x0001;  // Compile flags symbol.
  31  m :  const uint16 S_SSEARCH = 0x0005;  // Start search.
  32  m :  const uint16 S_SKIP = 0x0007;  // Skip - Reserve symbol space.
  33  m :  const uint16 S_CVRESERVE = 0x0008;  // Reserved for CodeView internal use.
  34  m :  const uint16 S_OBJNAME_CV2 = 0x0009;  // Name of object file.
  35  m :  const uint16 S_ENDARG = 0x000A;  // End of arguments in function symbols.
  36  m :  const uint16 S_COBOLUDT_CV2 = 0x000B;  // Microfocus COBOL user-defined type.
  37  m :  const uint16 S_MANYREG_CV2 = 0x000C;  // Many register symbol.
  38  m :  const uint16 S_RETURN = 0x000D;  // Function return description.
  39  m :  const uint16 S_ENTRYTHIS = 0x000E;  // Description of this pointer at entry.
  40    :  
  41    :  // Symbols that are not in the enum in the cv_info file.
  42  m :  const uint16 S_COMPILE3 = 0x113C;
  43  m :  const uint16 S_MSTOOLENV_V3 = 0x113D;
  44    :  
  45    :  // Since VS2013 it seems that the compiler isn't emitting the same value as
  46    :  // those in cvinfo.h for the S_GPROC32 and S_LPROC32 types, the following 2
  47    :  // values should be used instead.
  48  m :  const uint16 S_LPROC32_VS2013 = 0x1146;
  49  m :  const uint16 S_GPROC32_VS2013 = 0x1147;
  50    :  
  51  m :  }  // namespace Microsoft_Cci_Pdb
  52    :  
  53    :  // This macro allow the easy construction of switch statements over the symbol
  54    :  // type enum. It define the case table, the first parameter of each entry is the
  55    :  // type of the symbol and the second one is the type of structure used to
  56    :  // represent this symbol.
  57    :  // NOTE: All _ST suffixed symbols are identical to those symbols without the _ST
  58    :  //       suffix. However, the trailing string they contain is encoded as uint16
  59    :  //       length prefixed string, versus a zero-terminated string.
  60    :  #define SYM_TYPE_CASE_TABLE(decl) \
  61  m :      decl(S_COMPILE_CV2, CompileSymCV2) \
  62  m :      decl(S_SSEARCH, SearchSym) \
  63  m :      decl(S_SKIP, Unknown) \
  64  m :      decl(S_CVRESERVE, Unknown) \
  65  m :      decl(S_OBJNAME_CV2, ObjNameSym) \
  66  m :      decl(S_ENDARG, EndArgSym) \
  67  m :      decl(S_COBOLUDT_CV2, UdtSym) \
  68  m :      decl(S_MANYREG_CV2, ManyRegSym) \
  69  m :      decl(S_RETURN, ReturnSym) \
  70  m :      decl(S_ENTRYTHIS, EntryThisSym) \
  71  m :      decl(S_END, Unknown) \
  72  m :      decl(S_OEM, OemSymbol) \
  73  m :      decl(S_REGISTER_ST, Unknown) \
  74  m :      decl(S_CONSTANT_ST, Unknown) \
  75  m :      decl(S_UDT_ST, UdtSym) \
  76  m :      decl(S_COBOLUDT_ST, Unknown) \
  77  m :      decl(S_MANYREG_ST, Unknown) \
  78  m :      decl(S_BPREL32_ST, BpRelSym32) \
  79  m :      decl(S_LDATA32_ST, DatasSym32) \
  80  m :      decl(S_GDATA32_ST, DatasSym32) \
  81  m :      decl(S_PUB32_ST, DatasSym32) \
  82  m :      decl(S_LPROC32_ST, ProcSym32) \
  83  m :      decl(S_GPROC32_ST, ProcSym32) \
  84  m :      decl(S_VFTABLE32, VpathSym32) \
  85  m :      decl(S_REGREL32_ST, Unknown) \
  86  m :      decl(S_LTHREAD32_ST, Unknown) \
  87  m :      decl(S_GTHREAD32_ST, Unknown) \
  88  m :      decl(S_LPROCMIPS_ST, Unknown) \
  89  m :      decl(S_GPROCMIPS_ST, Unknown) \
  90  m :      decl(S_FRAMEPROC, FrameProcSym) \
  91  m :      decl(S_COMPILE2_ST, Unknown) \
  92  m :      decl(S_MANYREG2_ST, Unknown) \
  93  m :      decl(S_LPROCIA64_ST, Unknown) \
  94  m :      decl(S_GPROCIA64_ST, Unknown) \
  95  m :      decl(S_LOCALSLOT_ST, Unknown) \
  96  m :      decl(S_PARAMSLOT_ST, Unknown) \
  97  m :      decl(S_ANNOTATION, AnnotationSym) \
  98  m :      decl(S_GMANPROC_ST, Unknown) \
  99  m :      decl(S_LMANPROC_ST, Unknown) \
 100  m :      decl(S_RESERVED1, Unknown) \
 101  m :      decl(S_RESERVED2, Unknown) \
 102  m :      decl(S_RESERVED3, Unknown) \
 103  m :      decl(S_RESERVED4, Unknown) \
 104  m :      decl(S_LMANDATA_ST, Unknown) \
 105  m :      decl(S_GMANDATA_ST, Unknown) \
 106  m :      decl(S_MANFRAMEREL_ST, Unknown) \
 107  m :      decl(S_MANREGISTER_ST, Unknown) \
 108  m :      decl(S_MANSLOT_ST, Unknown) \
 109  m :      decl(S_MANMANYREG_ST, Unknown) \
 110  m :      decl(S_MANREGREL_ST, Unknown) \
 111  m :      decl(S_MANMANYREG2_ST, Unknown) \
 112  m :      decl(S_MANTYPREF, ManyTypRef) \
 113  m :      decl(S_UNAMESPACE_ST, Unknown) \
 114  m :      decl(S_ST_MAX, Unknown) \
 115  m :      decl(S_OBJNAME, ObjNameSym) \
 116  m :      decl(S_THUNK32, ThunkSym32) \
 117  m :      decl(S_BLOCK32, BlockSym32) \
 118  m :      decl(S_WITH32, WithSym32) \
 119  m :      decl(S_LABEL32, LabelSym32) \
 120  m :      decl(S_REGISTER, RegSym) \
 121  m :      decl(S_CONSTANT, ConstSym) \
 122  m :      decl(S_UDT, UdtSym) \
 123  m :      decl(S_COBOLUDT, UdtSym) \
 124  m :      decl(S_MANYREG, ManyRegSym) \
 125  m :      decl(S_BPREL32, BpRelSym32) \
 126  m :      decl(S_LDATA32, DatasSym32) \
 127  m :      decl(S_GDATA32, DatasSym32) \
 128  m :      decl(S_PUB32, DatasSym32) \
 129  m :      decl(S_LPROC32, ProcSym32) \
 130  m :      decl(S_GPROC32, ProcSym32) \
 131  m :      decl(S_REGREL32, RegRel32) \
 132  m :      decl(S_LTHREAD32, ThreadSym32) \
 133  m :      decl(S_GTHREAD32, ThreadSym32) \
 134  m :      decl(S_LPROCMIPS, ProcSymMips) \
 135  m :      decl(S_GPROCMIPS, ProcSymMips) \
 136  m :      decl(S_COMPILE2, CompileSym) \
 137  m :      decl(S_MANYREG2, ManyRegSym2) \
 138  m :      decl(S_LPROCIA64, ProcSymIa64) \
 139  m :      decl(S_GPROCIA64, ProcSymIa64) \
 140  m :      decl(S_LOCALSLOT, SlotSym32) \
 141  m :      decl(S_PARAMSLOT, SlotSym32) \
 142  m :      decl(S_LMANDATA, DatasSym32) \
 143  m :      decl(S_GMANDATA, DatasSym32) \
 144  m :      decl(S_MANFRAMEREL, FrameRelSym) \
 145  m :      decl(S_MANREGISTER, AttrRegSym) \
 146  m :      decl(S_MANSLOT, AttrSlotSym) \
 147  m :      decl(S_MANMANYREG, AttrManyRegSym) \
 148  m :      decl(S_MANREGREL, AttrRegRel) \
 149  m :      decl(S_MANMANYREG2, AttrManyRegSym2) \
 150  m :      decl(S_UNAMESPACE, UnamespaceSym) \
 151  m :      decl(S_PROCREF, RefSym2) \
 152  m :      decl(S_DATAREF, RefSym2) \
 153  m :      decl(S_LPROCREF, RefSym2) \
 154  m :      decl(S_ANNOTATIONREF, Unknown) \
 155  m :      decl(S_TOKENREF, Unknown) \
 156  m :      decl(S_GMANPROC, ManProcSym) \
 157  m :      decl(S_LMANPROC, ManProcSym) \
 158  m :      decl(S_TRAMPOLINE, TrampolineSym) \
 159  m :      decl(S_MANCONSTANT, ConstSym) \
 160  m :      decl(S_ATTR_FRAMEREL, FrameRelSym) \
 161  m :      decl(S_ATTR_REGISTER, AttrRegSym) \
 162  m :      decl(S_ATTR_REGREL, AttrRegRel) \
 163  m :      decl(S_ATTR_MANYREG, AttrManyRegSym2) \
 164  m :      decl(S_SEPCODE, SepCodSym) \
 165  m :      decl(S_LOCAL, LocalSym) \
 166  m :      decl(S_DEFRANGE, DefRangeSym) \
 167  m :      decl(S_DEFRANGE2, DefRangeSym2) \
 168  m :      decl(S_SECTION, SectionSym) \
 169  m :      decl(S_COFFGROUP, CoffGroupSym) \
 170  m :      decl(S_EXPORT, ExportSym) \
 171  m :      decl(S_CALLSITEINFO, CallsiteInfo) \
 172  m :      decl(S_FRAMECOOKIE, FrameCookie) \
 173  m :      decl(S_DISCARDED, DiscardedSym) \
 174  m :      decl(S_COMPILE3, CompileSym2) \
 175  m :      decl(S_MSTOOLENV_V3, MSToolEnvV3) \
 176  m :      decl(S_LPROC32_VS2013, ProcSym32) \
 177  m :      decl(S_GPROC32_VS2013, ProcSym32)
 178    :  
 179    :  // This macro allows the easy construction of switch statements over the
 180    :  // numeric leaves types.
 181    :  #define NUMERIC_LEAVES_CASE_TABLE(decl) \
 182  m :      decl(LF_CHAR, LeafChar) \
 183  m :      decl(LF_SHORT, LeafShort) \
 184  m :      decl(LF_USHORT, LeafUShort) \
 185  m :      decl(LF_LONG, LeafLong) \
 186  m :      decl(LF_ULONG, LeafULong) \
 187  m :      decl(LF_REAL32, LeafReal32) \
 188  m :      decl(LF_REAL64, LeafReal64) \
 189  m :      decl(LF_REAL80, LeafReal80) \
 190  m :      decl(LF_REAL128, LeafReal128) \
 191  m :      decl(LF_QUADWORD, LeafQuad) \
 192  m :      decl(LF_UQUADWORD, LeafUQuad) \
 193  m :      decl(LF_COMPLEX32, LeafCmplx32) \
 194  m :      decl(LF_COMPLEX64, LeafCmplx64) \
 195  m :      decl(LF_COMPLEX80, LeafCmplx80) \
 196  m :      decl(LF_COMPLEX128, LeafCmplx128)
 197    :  
 198    :  // This macro allow the easy construction of switch statements over the leaf
 199    :  // enum. It define the case table, the first parameter of each entry is the type
 200    :  // of the leaf record and the second one is the type of structure used to
 201    :  // represent this leaf.
 202    :  #define LEAF_CASE_TABLE(decl) \
 203  m :      decl(LF_VTSHAPE, LeafVTShape) \
 204  m :      decl(LF_COBOL1, LeafCobol1) \
 205  m :      decl(LF_LABEL, LeafLabel) \
 206  m :      decl(LF_NULL, UnknownLeaf) \
 207  m :      decl(LF_NOTTRAN, UnknownLeaf) \
 208  m :      decl(LF_ENDPRECOMP, LeafEndPreComp) \
 209  m :      decl(LF_TYPESERVER_ST, UnknownLeaf) \
 210  m :      decl(LF_LIST, LeafList) \
 211  m :      decl(LF_REFSYM, LeafRefSym) \
 212  m :      decl(LF_ENUMERATE_ST, UnknownLeaf) \
 213  m :      decl(LF_TI16_MAX, UnknownLeaf) \
 214  m :      decl(LF_MODIFIER, LeafModifier) \
 215  m :      decl(LF_POINTER, LeafPointer) \
 216  m :      decl(LF_ARRAY_ST, UnknownLeaf) \
 217  m :      decl(LF_CLASS_ST, UnknownLeaf) \
 218  m :      decl(LF_STRUCTURE_ST, UnknownLeaf) \
 219  m :      decl(LF_UNION_ST, UnknownLeaf) \
 220  m :      decl(LF_ENUM_ST, UnknownLeaf) \
 221  m :      decl(LF_PROCEDURE, LeafProc) \
 222  m :      decl(LF_MFUNCTION, LeafMFunc) \
 223  m :      decl(LF_COBOL0, LeafCobol0) \
 224  m :      decl(LF_BARRAY, LeafBArray) \
 225  m :      decl(LF_DIMARRAY_ST, UnknownLeaf) \
 226  m :      decl(LF_VFTPATH, LeafVFTPath) \
 227  m :      decl(LF_PRECOMP_ST, UnknownLeaf) \
 228  m :      decl(LF_OEM, LeafOEM) \
 229  m :      decl(LF_ALIAS_ST, UnknownLeaf) \
 230  m :      decl(LF_OEM2, LeafOEM2) \
 231  m :      decl(LF_SKIP, LeafSkip) \
 232  m :      decl(LF_ARGLIST, LeafArgList) \
 233  m :      decl(LF_DEFARG_ST, UnknownLeaf) \
 234  m :      decl(LF_FIELDLIST, LeafFieldList) \
 235  m :      decl(LF_DERIVED, LeafDerived) \
 236  m :      decl(LF_BITFIELD, LeafBitfield) \
 237  m :      decl(LF_METHODLIST, LeafMethodList) \
 238  m :      decl(LF_DIMCONU, LeafDimCon) \
 239  m :      decl(LF_DIMCONLU, LeafDimCon) \
 240  m :      decl(LF_DIMVARU, LeafDimVar) \
 241  m :      decl(LF_DIMVARLU, LeafDimVar) \
 242  m :      decl(LF_BCLASS, LeafBClass) \
 243  m :      decl(LF_VBCLASS, LeafVBClass) \
 244  m :      decl(LF_IVBCLASS, LeafVBClass) \
 245  m :      decl(LF_FRIENDFCN_ST, UnknownLeaf) \
 246  m :      decl(LF_INDEX, LeafIndex) \
 247  m :      decl(LF_MEMBER_ST, UnknownLeaf) \
 248  m :      decl(LF_STMEMBER_ST, UnknownLeaf) \
 249  m :      decl(LF_METHOD_ST, UnknownLeaf) \
 250  m :      decl(LF_NESTTYPE_ST, UnknownLeaf) \
 251  m :      decl(LF_VFUNCTAB, LeafVFuncTab) \
 252  m :      decl(LF_FRIENDCLS, UnknownLeaf) \
 253  m :      decl(LF_ONEMETHOD_ST, UnknownLeaf) \
 254  m :      decl(LF_VFUNCOFF, LeafVFuncOff) \
 255  m :      decl(LF_NESTTYPEEX_ST, UnknownLeaf) \
 256  m :      decl(LF_MEMBERMODIFY_ST, UnknownLeaf) \
 257  m :      decl(LF_MANAGED_ST, UnknownLeaf) \
 258  m :      decl(LF_TYPESERVER, LeafTypeServer) \
 259  m :      decl(LF_ENUMERATE, LeafEnumerate) \
 260  m :      decl(LF_ARRAY, LeafArray) \
 261  m :      decl(LF_CLASS, LeafClass) \
 262  m :      decl(LF_STRUCTURE, LeafClass) \
 263  m :      decl(LF_UNION, LeafUnion) \
 264  m :      decl(LF_ENUM, LeafEnum) \
 265  m :      decl(LF_DIMARRAY, LeafDimArray) \
 266  m :      decl(LF_PRECOMP, LeafPreComp) \
 267  m :      decl(LF_ALIAS, LeafAlias) \
 268  m :      decl(LF_DEFARG, LeafDefArg) \
 269  m :      decl(LF_FRIENDFCN, LeafFriendFcn) \
 270  m :      decl(LF_MEMBER, LeafMember) \
 271  m :      decl(LF_STMEMBER, LeafSTMember) \
 272  m :      decl(LF_METHOD, LeafMethod) \
 273  m :      decl(LF_NESTTYPE, LeafNestType) \
 274  m :      decl(LF_ONEMETHOD, LeafOneMethod) \
 275  m :      decl(LF_NESTTYPEEX, LeafNestTypeEx) \
 276  m :      decl(LF_MEMBERMODIFY, LeafMemberModify) \
 277  m :      decl(LF_MANAGED, LeafManaged) \
 278  m :      decl(LF_TYPESERVER2, LeafTypeServer2) \
 279  m :      decl(LF_VARSTRING, LeafVarString)
 280    :  
 281    :  // This macro allow the easy construction of switch statements over the special
 282    :  // types enum. It define the case table, the parameter of each entry is the type
 283    :  // of the special type record.
 284    :  #define SPECIAL_TYPE_CASE_TABLE(decl) \
 285  m :      decl(T_NOTYPE) \
 286  m :      decl(T_ABS) \
 287  m :      decl(T_SEGMENT) \
 288  m :      decl(T_VOID) \
 289  m :      decl(T_HRESULT) \
 290  m :      decl(T_32PHRESULT) \
 291  m :      decl(T_64PHRESULT) \
 292  m :      decl(T_PVOID) \
 293  m :      decl(T_PFVOID) \
 294  m :      decl(T_PHVOID) \
 295  m :      decl(T_32PVOID) \
 296  m :      decl(T_64PVOID) \
 297  m :      decl(T_CURRENCY) \
 298  m :      decl(T_NOTTRANS) \
 299  m :      decl(T_BIT) \
 300  m :      decl(T_PASCHAR) \
 301  m :      decl(T_CHAR) \
 302  m :      decl(T_32PCHAR) \
 303  m :      decl(T_64PCHAR) \
 304  m :      decl(T_UCHAR) \
 305  m :      decl(T_32PUCHAR) \
 306  m :      decl(T_64PUCHAR) \
 307  m :      decl(T_RCHAR) \
 308  m :      decl(T_32PRCHAR) \
 309  m :      decl(T_64PRCHAR) \
 310  m :      decl(T_WCHAR) \
 311  m :      decl(T_32PWCHAR) \
 312  m :      decl(T_64PWCHAR) \
 313  m :      decl(T_INT1) \
 314  m :      decl(T_32PINT1) \
 315  m :      decl(T_64PINT1) \
 316  m :      decl(T_UINT1) \
 317  m :      decl(T_32PUINT1) \
 318  m :      decl(T_64PUINT1) \
 319  m :      decl(T_SHORT) \
 320  m :      decl(T_32PSHORT) \
 321  m :      decl(T_64PSHORT) \
 322  m :      decl(T_USHORT) \
 323  m :      decl(T_32PUSHORT) \
 324  m :      decl(T_64PUSHORT) \
 325  m :      decl(T_INT2) \
 326  m :      decl(T_32PINT2) \
 327  m :      decl(T_64PINT2) \
 328  m :      decl(T_UINT2) \
 329  m :      decl(T_32PUINT2) \
 330  m :      decl(T_64PUINT2) \
 331  m :      decl(T_LONG) \
 332  m :      decl(T_ULONG) \
 333  m :      decl(T_32PLONG) \
 334  m :      decl(T_32PULONG) \
 335  m :      decl(T_64PLONG) \
 336  m :      decl(T_64PULONG) \
 337  m :      decl(T_INT4) \
 338  m :      decl(T_32PINT4) \
 339  m :      decl(T_64PINT4) \
 340  m :      decl(T_UINT4) \
 341  m :      decl(T_32PUINT4) \
 342  m :      decl(T_64PUINT4) \
 343  m :      decl(T_QUAD) \
 344  m :      decl(T_32PQUAD) \
 345  m :      decl(T_64PQUAD) \
 346  m :      decl(T_UQUAD) \
 347  m :      decl(T_32PUQUAD) \
 348  m :      decl(T_64PUQUAD) \
 349  m :      decl(T_INT8) \
 350  m :      decl(T_32PINT8) \
 351  m :      decl(T_64PINT8) \
 352  m :      decl(T_UINT8) \
 353  m :      decl(T_32PUINT8) \
 354  m :      decl(T_64PUINT8) \
 355  m :      decl(T_OCT) \
 356  m :      decl(T_32POCT) \
 357  m :      decl(T_64POCT) \
 358  m :      decl(T_UOCT) \
 359  m :      decl(T_32PUOCT) \
 360  m :      decl(T_64PUOCT) \
 361  m :      decl(T_INT16) \
 362  m :      decl(T_32PINT16) \
 363  m :      decl(T_64PINT16) \
 364  m :      decl(T_UINT16) \
 365  m :      decl(T_32PUINT16) \
 366  m :      decl(T_64PUINT16) \
 367  m :      decl(T_REAL32) \
 368  m :      decl(T_32PREAL32) \
 369  m :      decl(T_64PREAL32) \
 370  m :      decl(T_REAL64) \
 371  m :      decl(T_32PREAL64) \
 372  m :      decl(T_64PREAL64) \
 373  m :      decl(T_REAL80) \
 374  m :      decl(T_32PREAL80) \
 375  m :      decl(T_64PREAL80) \
 376  m :      decl(T_REAL128) \
 377  m :      decl(T_32PREAL128) \
 378  m :      decl(T_64PREAL128) \
 379  m :      decl(T_CPLX32) \
 380  m :      decl(T_32PCPLX32) \
 381  m :      decl(T_64PCPLX32) \
 382  m :      decl(T_CPLX64) \
 383  m :      decl(T_32PCPLX64) \
 384  m :      decl(T_64PCPLX64) \
 385  m :      decl(T_CPLX80) \
 386  m :      decl(T_32PCPLX80) \
 387  m :      decl(T_64PCPLX80) \
 388  m :      decl(T_CPLX128) \
 389  m :      decl(T_32PCPLX128) \
 390  m :      decl(T_64PCPLX128) \
 391  m :      decl(T_BOOL08) \
 392  m :      decl(T_32PBOOL08) \
 393  m :      decl(T_64PBOOL08) \
 394  m :      decl(T_BOOL16) \
 395  m :      decl(T_32PBOOL16) \
 396  m :      decl(T_64PBOOL16) \
 397  m :      decl(T_BOOL32) \
 398  m :      decl(T_32PBOOL32) \
 399  m :      decl(T_64PBOOL32) \
 400  m :      decl(T_BOOL64) \
 401  m :      decl(T_32PBOOL64) \
 402  m :      decl(T_64PBOOL64)
 403    :  
 404    :  // All of the data structures below need to have tight alignment so that they
 405    :  // can be overlaid directly onto byte streams.
 406    :  #pragma pack(push, 1)
 407    :  
 408    :  // This structure represent a bitfields for a leaf member attribute field as
 409    :  // it is describet in the document "Microsoft Symbol and Type Information". Here
 410    :  // is the bit format:
 411    :  // mprop       :3 Specifies the properties for methods
 412    :  //             0 Vanilla method
 413    :  //             1 Virtual method
 414    :  //             2 Static method
 415    :  //             3 Friend method
 416    :  //             4 Introducing virtual method
 417    :  //             5 Pure virtual method
 418    :  //             6 Pure introducing virtual method
 419    :  //             7 Reserved
 420    :  // pseudo      :1 True if the method is never instantiated by the compiler
 421    :  // noinherit   :1 True if the class cannot be inherited
 422    :  // noconstruct :1 True if the class cannot be constructed
 423    :  // reserved    :8
 424  m :  union LeafMemberAttributeField {
 425    :    // This is effectively the same as CV_access_e in cvconst.h, but with a value
 426    :    // defined for 0.
 427  m :    enum AccessProtection {
 428  m :      no_access_protection = 0,
 429  m :      private_access = 1,
 430  m :      protected_access = 2,
 431  m :      public_access = 3,
 432  m :    };
 433  m :    uint16 raw;
 434  m :    struct {
 435  m :      uint16 access      : 2;  // Of type AccessProtection.
 436  m :      uint16 mprop       : 3;  // Of type CV_methodprop.
 437  m :      uint16 pseudo      : 1;
 438  m :      uint16 noinherit   : 1;
 439  m :      uint16 noconstruct : 1;
 440  m :      uint16 compgenx    : 1;
 441  m :      uint16 reserved    : 7;
 442  m :    };
 443  m :  };
 444    :  // We coerce a stream of bytes to this structure, so we require it to be
 445    :  // exactly 2 bytes in size.
 446  m :  COMPILE_ASSERT_IS_POD_OF_SIZE(LeafMemberAttributeField, 2);
 447    :  
 448    :  // This structure represent a bitfield for a leaf property field.
 449  m :  union LeafPropertyField {
 450  m :    uint16 raw;
 451  m :    struct {
 452  m :      uint16 packed : 1;
 453  m :      uint16 ctor : 1;
 454  m :      uint16 ovlops : 1;
 455  m :      uint16 isnested : 1;
 456  m :      uint16 cnested : 1;
 457  m :      uint16 opassign : 1;
 458  m :      uint16 opcast : 1;
 459  m :      uint16 fwdref : 1;
 460  m :      uint16 scoped : 1;
 461  m :      uint16 decorated_name_present : 1;
 462  m :      uint16 reserved : 6;
 463  m :    };
 464  m :  };
 465    :  // We coerce a stream of bytes to this structure, so we require it to be
 466    :  // exactly 2 bytes in size.
 467  m :  COMPILE_ASSERT_IS_POD_OF_SIZE(LeafPropertyField, 2);
 468    :  
 469    :  // This structure represent a bitfield for a leaf modifier attribute.
 470  m :  union LeafModifierAttribute {
 471  m :    uint16 raw;
 472  m :    struct {
 473  m :      uint16 mod_const : 1;
 474  m :      uint16 mod_volatile : 1;
 475  m :      uint16 mod_unaligned : 1;
 476  m :      uint16 reserved : 13;
 477  m :    };
 478  m :  };
 479    :  // We coerce a stream of bytes to this structure, so we require it to be
 480    :  // exactly 2 bytes in size.
 481  m :  COMPILE_ASSERT_IS_POD_OF_SIZE(LeafModifierAttribute, 2);
 482    :  
 483    :  // This defines flags used in compiland details. See COMPILANDSYM_FLAGS for
 484    :  // detail.
 485  m :  union CompileSymFlags {
 486  m :    uint32 raw;
 487  m :    struct {
 488    :      // Language index. See CV_CFL_LANG.
 489  m :      uint16 iLanguage : 8;
 490    :      // Compiled with edit and continue support.
 491  m :      uint16 fEC : 1;
 492    :      // Not compiled with debug info.
 493  m :      uint16 fNoDbgInfo : 1;
 494    :      // Compiled with LTCG.
 495  m :      uint16 fLTCG : 1;
 496    :      // Compiled with -Bzalign.
 497  m :      uint16 fNoDataAlign : 1;
 498    :      // Managed code/data present.
 499  m :      uint16 fManagedPresent : 1;
 500    :      // Compiled with /GS.
 501  m :      uint16 fSecurityChecks : 1;
 502    :      // Compiled with /hotpatch.
 503  m :      uint16 fHotPatch : 1;
 504    :      // Converted with CVTCIL.
 505  m :      uint16 fCVTCIL : 1;
 506    :      // MSIL netmodule
 507  m :      uint16 fMSILModule : 1;
 508  m :      uint16 reserved : 15;
 509  m :    };
 510  m :  };
 511    :  // We coerce a stream of bytes to this structure, so we require it to be
 512    :  // exactly 4 bytes in size.
 513  m :  COMPILE_ASSERT_IS_POD_OF_SIZE(CompileSymFlags, 4);
 514    :  
 515    :  // This is a new compiland details symbol type seen in MSVS 2010 and later.
 516  m :  struct CompileSym2 {
 517    :    // uint16 reclen;  // Record length.
 518    :    // uint16 rectyp;  // S_COMPILE3.
 519  m :    CompileSymFlags flags;
 520    :    // Target processor. See CV_CPU_TYPE_e enum.
 521  m :    uint16 machine;
 522    :    // Front-end major version number.
 523  m :    uint16 verFEMajor;
 524    :    // Front-end minor version number.
 525  m :    uint16 verFEMinor;
 526    :    // Front-end build version number.
 527  m :    uint16 verFEBuild;
 528    :    // Front-end revision number.
 529  m :    uint16 verFERevision;
 530    :    // Back-end major version number.
 531  m :    uint16 verMajor;
 532    :    // Back-end minor version number.
 533  m :    uint16 verMinor;
 534    :    // Back-end build version number.
 535  m :    uint16 verBuild;
 536    :    // Back-end revision number.
 537  m :    uint16 verRevision;
 538    :    // Zero-terminated compiler version string. This is followed by zero or more
 539    :    // zero-terminated strings 'verArgs'. The whole list is terminated by an
 540    :    // empty verArg string (a double-zero).
 541  m :    char verSt[1];
 542  m :  };
 543  m :  COMPILE_ASSERT_IS_POD_OF_SIZE(CompileSym2, 23);
 544    :  
 545    :  // This is a new compiland details symbol type seen in MSVS 2010 and later.
 546  m :  struct MSToolEnvV3 {
 547    :    // uint16 reclen;  // Record length.
 548    :    // uint16 rectyp;  // S_MSTOOLENV_V3.
 549  m :    char leading_zero;
 550    :    // An array of key-value pairs, encoded as null terminated strings.
 551  m :    char key_values[1];
 552  m :  };
 553  m :  COMPILE_ASSERT_IS_POD_OF_SIZE(MSToolEnvV3, 2);
 554    :  
 555    :  // Length prefixed string.
 556  m :  struct LPString {
 557  m :    uint8 length;
 558  m :    uint8 string[1];
 559  m :  };
 560  m :  COMPILE_ASSERT_IS_POD_OF_SIZE(LPString, 2);
 561    :  
 562    :  // Symbols seen in CodeView2 symbol streams.
 563  m :  struct CompileSymCV2 {
 564    :    // Machine type. See CV_CPU_TYPE_e enum.
 565  m :    uint8 machine;
 566  m :    union {
 567    :      // Raw flags.
 568  m :      uint8 flags[3];
 569    :      // Parsed flags.
 570  m :      struct {
 571    :        // Language index. See CV_CFL_LANG.
 572  m :        uint8 language : 8;
 573  m :        uint8 pcode_present : 1;
 574    :        // 0: ???
 575    :        // 1: ANSI C floating point rules.
 576    :        // 2-3: Reserved.
 577  m :        uint8 float_precision : 2;
 578    :        // 0: Hardware processor.
 579    :        // 1: Emulator.
 580    :        // 2: Altmath.
 581    :        // 3: Reserved.
 582  m :        uint8 float_package : 2;
 583    :        // 0: Near.
 584    :        // 1: Far.
 585    :        // 2: Huge.
 586    :        // 3-7: Reserved.
 587  m :        uint8 ambient_data : 3;
 588  m :        uint8 ambient_code : 3;
 589    :        // Compiled for 32-bit addresses.
 590  m :        uint8 mode32 : 1;
 591  m :        uint8 reserved : 4;
 592  m :      };
 593  m :    };
 594    :    // Length-prefixed version string.
 595  m :    LPString version;
 596  m :  };
 597  m :  COMPILE_ASSERT_IS_POD_OF_SIZE(CompileSymCV2, 6);
 598    :  
 599    :  #pragma pack(pop)
 600    :  
 601    :  #endif  // SYZYGY_PE_CVINFO_EXT_H_

Coverage information generated Thu Mar 26 16:15:41 2015.