File: pdb-invalid-func-type-2.yaml

package info (click to toggle)
swiftlang 6.0.3-2
  • links: PTS, VCS
  • area: main
  • in suites: forky, sid, trixie
  • size: 2,519,992 kB
  • sloc: cpp: 9,107,863; ansic: 2,040,022; asm: 1,135,751; python: 296,500; objc: 82,456; f90: 60,502; lisp: 34,951; pascal: 19,946; sh: 18,133; perl: 7,482; ml: 4,937; javascript: 4,117; makefile: 3,840; awk: 3,535; xml: 914; fortran: 619; cs: 573; ruby: 573
file content (151 lines) | stat: -rw-r--r-- 5,378 bytes parent folder | download | duplicates (21)
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
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
138
139
140
141
142
143
144
145
146
147
148
149
150
151
# This test has an S_GPROC32_ID symbol that doesn't refer to an LF_FUNC_ID
# record. Make sure we have reasonable behavior.

# RUN: yaml2obj %s -o %t.obj
# RUN: lld-link %t.obj -out:%t.exe -debug -pdb:%t.pdb -nodefaultlib -entry:main 2>&1 | FileCheck %s --check-prefix=WARNING
# RUN: llvm-pdbutil dump -symbols %t.pdb | FileCheck %s
# RUN: lld-link %t.obj -out:%t.exe -debug -debug:ghash -pdb:%t.pdb -nodefaultlib -entry:main 2>&1 | FileCheck %s --check-prefix=WARNING
# RUN: llvm-pdbutil dump -symbols %t.pdb | FileCheck %s

# WARNING: warning: procedure symbol record for `main` in {{.*}}.tmp.obj refers to PDB item index 0x{{.*}} which is not a valid function ID record

# CHECK: Mod 0000 | `{{.*}}pdb-invalid-func-type{{.*}}.tmp.obj`:
# CHECK:      4 | S_GPROC32 [size = 44] `main`
# CHECK:          parent = 0, end = 80, addr = 0001:0000, code size = 3
# CHECK:          type = `0x0007 (<not translated>)`, debug start = 0, debug end = 2, flags = none
# CHECK:     48 | S_FRAMEPROC [size = 32]
# CHECK:     80 | S_END [size = 4]

--- !COFF
header:
  Machine:         IMAGE_FILE_MACHINE_AMD64
  Characteristics: [  ]
sections:
  - Name:            '.debug$S'
    Characteristics: [ IMAGE_SCN_CNT_INITIALIZED_DATA, IMAGE_SCN_MEM_DISCARDABLE, IMAGE_SCN_MEM_READ ]
    Alignment:       1
    Subsections:
      - !Symbols
        Records:
          - Kind:            S_GPROC32_ID
            ProcSym:
              CodeSize:        3
              DbgStart:        0
              DbgEnd:          2
              # Refers to the wrong kind of type record (LF_PROCEDURE vs
              # LF_FUNC_ID).
              FunctionType:    4097
              Flags:           [  ]
              DisplayName:     main
          - Kind:            S_FRAMEPROC
            FrameProcSym:
              TotalFrameBytes: 0
              PaddingFrameBytes: 0
              OffsetToPadding: 0
              BytesOfCalleeSavedRegisters: 0
              OffsetOfExceptionHandler: 0
              SectionIdOfExceptionHandler: 0
              Flags:           [ AsynchronousExceptionHandling, OptimizedForSpeed ]
          - Kind:            S_PROC_ID_END
            ScopeEndSym:
      - !Lines
        CodeSize:        3
        Flags:           [  ]
        RelocOffset:     0
        RelocSegment:    0
        Blocks:
          - FileName:        'c:\src\llvm-project\build\t.c'
            Lines:
              - Offset:          0
                LineStart:       1
                IsStatement:     true
                EndDelta:        0
            Columns:
      - !FileChecksums
        Checksums:
          - FileName:        'c:\src\llvm-project\build\t.c'
            Kind:            MD5
            Checksum:        270A878DCC1B845655B162F56C4F5020
      - !StringTable
        Strings:
          - 'c:\src\llvm-project\build\t.c'
    Relocations:
      - VirtualAddress:  44
        SymbolName:      main
        Type:            IMAGE_REL_AMD64_SECREL
      - VirtualAddress:  48
        SymbolName:      main
        Type:            IMAGE_REL_AMD64_SECTION
      - VirtualAddress:  100
        SymbolName:      main
        Type:            IMAGE_REL_AMD64_SECREL
      - VirtualAddress:  104
        SymbolName:      main
        Type:            IMAGE_REL_AMD64_SECTION
  - Name:            '.debug$T'
    Characteristics: [ IMAGE_SCN_CNT_INITIALIZED_DATA, IMAGE_SCN_MEM_DISCARDABLE, IMAGE_SCN_MEM_READ ]
    Alignment:       1
    Types:
      - Kind:            LF_ARGLIST
        ArgList:
          ArgIndices:      [ 0 ]
      - Kind:            LF_PROCEDURE
        Procedure:
          ReturnType:      116
          CallConv:        NearC
          Options:         [ None ]
          ParameterCount:  0
          ArgumentList:    4096
      - Kind:            LF_FUNC_ID
        FuncId:
          ParentScope:     0
          FunctionType:    4097
          Name:            main
  - Name:            '.text$mn'
    Characteristics: [ IMAGE_SCN_CNT_CODE, IMAGE_SCN_MEM_EXECUTE, IMAGE_SCN_MEM_READ ]
    Alignment:       16
    SectionData:     33C0C3
symbols:
  - Name:            '.debug$S'
    Value:           0
    SectionNumber:   1
    SimpleType:      IMAGE_SYM_TYPE_NULL
    ComplexType:     IMAGE_SYM_DTYPE_NULL
    StorageClass:    IMAGE_SYM_CLASS_STATIC
    SectionDefinition:
      Length:          328
      NumberOfRelocations: 4
      NumberOfLinenumbers: 0
      CheckSum:        0
      Number:          0
  - Name:            '.debug$T'
    Value:           0
    SectionNumber:   2
    SimpleType:      IMAGE_SYM_TYPE_NULL
    ComplexType:     IMAGE_SYM_DTYPE_NULL
    StorageClass:    IMAGE_SYM_CLASS_STATIC
    SectionDefinition:
      Length:          564
      NumberOfRelocations: 0
      NumberOfLinenumbers: 0
      CheckSum:        0
      Number:          0
  - Name:            '.text$mn'
    Value:           0
    SectionNumber:   3
    SimpleType:      IMAGE_SYM_TYPE_NULL
    ComplexType:     IMAGE_SYM_DTYPE_NULL
    StorageClass:    IMAGE_SYM_CLASS_STATIC
    SectionDefinition:
      Length:          3
      NumberOfRelocations: 0
      NumberOfLinenumbers: 0
      CheckSum:        4021952397
      Number:          0
  - Name:            main
    Value:           0
    SectionNumber:   3
    SimpleType:      IMAGE_SYM_TYPE_NULL
    ComplexType:     IMAGE_SYM_DTYPE_FUNCTION
    StorageClass:    IMAGE_SYM_CLASS_EXTERNAL
...