microsoft / microsoft-pdb

Information from Microsoft about the PDB format. We'll try to keep this up to date. Just trying to help the CLANG/LLVM community get onto Windows.
Other
1.85k stars 271 forks source link

Update cvinfo.h #50

Open bfiete opened 3 years ago

bfiete commented 3 years ago

@AndrewPardoe There appear to be some undocumented additions in VS2019 that are not covered in cvinfo.h

Known undocumented nodes: Leaf 0x1609 Sym 0x1167 (S_FASTLINK) Sym 0x1168 (S_INLINEES) Sym 0x1176 Sym 0x1179

Tools such as llvm-pdbutil are unable to parse pdb files containing those undocumented nodes. Would it be possible to update cvinfo.h?

avakar commented 3 years ago

The 0x1609 leaf seems to be LF_STRUCT but with property extended to 32-bits and some field realignment. I'd guess that member count is now encoded in the same way as structure length.

struct lfClass2 {
    unsigned short  leaf;           // LF_CLASS, LF_STRUCT, LF_INTERFACE
    CV_prop32_t       property;       // property attribute field (prop_t)
    CV_typ_t        field;          // type index of LF_FIELD descriptor list
    CV_typ_t        derived;        // type index of derived from list if not zero
    CV_typ_t        vshape;         // type index of vshape table for this class

    varint count;
    varint length;
    string name;
    string mangled_name;
};