reference, declarationdefinition
definition → references, declarations, derived classes, virtual overrides
reference to multiple definitions → definitions
unreferenced
    1
    2
    3
    4
    5
    6
    7
    8
    9
   10
   11
   12
   13
   14
   15
   16
   17
   18
   19
   20
   21
   22
   23
   24
   25
   26
   27
   28
   29
   30
   31
   32
   33
   34
   35
   36
   37
   38
   39
   40
   41
   42
   43
   44
   45
   46
   47
   48
   49
   50
   51
   52
   53
   54
   55
   56
   57
   58
   59
   60
   61
   62
   63
   64
   65
   66
   67
   68
   69
   70
   71
   72
   73
   74
   75
   76
   77
   78
   79
   80
   81
   82
   83
   84
   85
   86
   87
   88
   89
   90
   91
   92
   93
   94
   95
   96
   97
   98
   99
  100
  101
  102
  103
  104
  105
  106
  107
  108
  109
  110
  111
  112
  113
# The idea is to set up some types in the TPI stream, and then have records in
# the IPI stream that refer to them.  There are three types of IPI records that
# can refer to TPI records.  They are:
# 1) LF_PROCEDURE - Referred to by LF_FUNC_ID
# 2) LF_STRUCTURE - Referred to by LF_UDT_MOD_SRC_LINE
#                   Referred to by LF_UDT_SRC_LINE
# 3) LF_MFUNCTION - Referred to by LF_MFUNC_ID
# We will set up one of each of these, and then create IPI records that refer to
# them.  We intentionally choose an unintuitive ordering of the records in both
# streams (while still maintaining the topological sorting required by CodeView
# type streams), to make sure the merging algorithm is sufficiently exercised.
# For easy understanding, a semantic representation of the types we will set up
# is as follows:
#  - int main(int, char**)
#
#  - struct FooBar {
#    public:
#      void *FooMember;
#      void FooMethod(int);
#    };
TpiStream:
  Records:
    # TypeIndex: 4096 (0x1000)
    # char**
    - Kind:            LF_POINTER
      Pointer:         
        ReferentType:    1136
        Attrs:           32778
    # TypeIndex: 4097 (0x1001)
    # public void *FooMember
    - Kind:            LF_FIELDLIST
      FieldList:       
        - Kind:            LF_MEMBER
          DataMember:      
            Attrs:           3           # public
            Type:            1027        # void*
            FieldOffset:     0
            Name:            FooMember   # FooMember
    # TypeIndex: 4098 (0x1002)
    # (int, char**)
    - Kind:            LF_ARGLIST
      ArgList:         
        ArgIndices:      [ 116, 4096 ]
    # TypeIndex: 4099 (0x1003)
    # struct FooBar {
    # public:
    #   void *FooMember;
    # };
    - Kind:            LF_STRUCTURE
      Class:           
        MemberCount:     1
        Options:         [ None, HasUniqueName ]
        FieldList:       4097
        Name:            FooBar
        UniqueName:      'FooBar'
        DerivationList:  0
        VTableShape:     0
        Size:            4
    # TypeIndex: 4100 (0x1004)
    # FooBar *
    - Kind:            LF_POINTER
      Pointer:         
        ReferentType:    4099       # FooBar
        Attrs:           32778
    # TypeIndex: 4101 (0x1005)
    # (int)
    - Kind:            LF_ARGLIST
      ArgList:         
        ArgIndices:      [ 116 ]
    # TypeIndex: 4102 (0x1006)
    - Kind:            LF_MFUNCTION
      MemberFunction:  
        ReturnType:      3                      # void
        ClassType:       4099                   # struct FooBar
        ThisType:        4100                   # FooBar *
        CallConv:        ThisCall
        Options:         [ None, Constructor ]
        ParameterCount:  1
        ArgumentList:    4101                   # (int)
        ThisPointerAdjustment: 0
    # TypeIndex: 4103 (0x1007)
    # int (int, char**)
    - Kind:            LF_PROCEDURE
      Procedure:       
        ReturnType:      116         # int
        CallConv:        NearC
        Options:         [ None ]
        ParameterCount:  2
        ArgumentList:    4098        # (int, char**)
IpiStream:
  Records:
    # TypeIndex: 4096 (0x1000)
    # int main(int, char **)
    - Kind:            LF_FUNC_ID
      FuncId:          
        ParentScope:     0
        FunctionType:    4103       # int main(int, char**)
        Name:            main
    # TypeIndex: 4097 (0x1001)
    # void FooBar::FooMethod(int)
    - Kind:            LF_MFUNC_ID
      MemberFuncId:    
        ClassType:       4099       # struct FooBar
        FunctionType:    4102       # void FooMethod(int)
        Name:            FooMethod
    # TypeIndex: 4098 (0x1002)
    # struct FooBar
    - Kind:            LF_UDT_MOD_SRC_LINE
      UdtModSourceLine: 
        UDT:             4099       # struct FooBar
        SourceFile:      0          # We don't support this yet
        LineNumber:      0
        Module:          0          # We don't support this yet