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 152 153 154 155 156 157 158 159 160 161 162 163 164 165 166 167 168 169 170 171 172 173 174 175 176 177 178 179 180 181 182 183 184 185 186 187 188 189 190 191 192 193 194 195 196 197 198 199 200 201 202 203 204 205 206 207 208 209 210 211 212 213 214 215 216 217 218 219 220 221 222 223 224 225 226 227 228 229 230 231 232 233 234 235 236 237 238 239 240 241 242 243 244 245 246 247 248 249 250 251 252 253 254 255 256 257 258 259 260 261 262 263 264 265 266 267 268 269 270 271 272 273 274 275 276 277 278 279 280 281 282 283
|
# RUN: yaml2obj %p/Inputs/pdb1.yaml -o %t1.obj
# RUN: yaml2obj %p/Inputs/pdb2.yaml -o %t2.obj
# RUN: rm -f %t.dll %t.pdb
# RUN: lld-link /debug /pdb:%t.pdb /pdbaltpath:test.pdb /dll /out:%t.dll \
# RUN: /entry:main /nodefaultlib %t1.obj %t2.obj
# RUN: llvm-pdbutil pdb2yaml -stream-metadata -stream-directory -pdb-stream \
# RUN: -dbi-stream -ipi-stream -tpi-stream %t.pdb | FileCheck %s
# RUN: llvm-pdbutil dump -modules -section-map -section-contribs -section-headers \
# RUN: -publics -public-extras -types -ids -type-extras -id-extras %t.pdb \
# RUN: | FileCheck -check-prefix RAW %s
# CHECK: MSF:
# CHECK-NEXT: SuperBlock:
# CHECK-NEXT: BlockSize: 4096
# CHECK-NEXT: FreeBlockMap: 2
# CHECK-NEXT: NumBlocks:
# CHECK-NEXT: NumDirectoryBytes:
# CHECK-NEXT: Unknown1: 0
# CHECK-NEXT: BlockMapAddr:
# CHECK-NEXT: NumDirectoryBlocks:
# CHECK-NEXT: DirectoryBlocks:
# CHECK-NEXT: NumStreams:
# CHECK-NEXT: FileSize:
# CHECK-NEXT: StreamSizes:
# CHECK: StreamMap:
# CHECK: PdbStream:
# CHECK-NEXT: Age: 1
# CHECK-NEXT: Guid:
# CHECK-NEXT: Signature:
# CHECK-NEXT: Features: [ VC140 ]
# CHECK-NEXT: Version: VC70
# CHECK-NEXT: DbiStream:
# CHECK-NEXT: VerHeader: V70
# CHECK-NEXT: Age: 1
# CHECK-NEXT: BuildNumber: 36363
# CHECK-NEXT: PdbDllVersion: 0
# CHECK-NEXT: PdbDllRbld: 0
# CHECK-NEXT: Flags: 0
# CHECK-NEXT: MachineType: Amd64
# CHECK-NEXT: TpiStream:
# CHECK-NEXT: Version: VC80
# CHECK-NEXT: Records:
# CHECK-NEXT: - Kind: LF_ARGLIST
# CHECK-NEXT: ArgList:
# CHECK-NEXT: ArgIndices: [ ]
# CHECK-NEXT: - Kind: LF_PROCEDURE
# CHECK-NEXT: Procedure:
# CHECK-NEXT: ReturnType: 116
# CHECK-NEXT: CallConv: NearC
# CHECK-NEXT: Options: [ None ]
# CHECK-NEXT: ParameterCount: 0
# CHECK-NEXT: ArgumentList: 4096
# CHECK-NEXT: - Kind: LF_POINTER
# CHECK-NEXT: Pointer:
# CHECK-NEXT: ReferentType: 4097
# CHECK-NEXT: Attrs: 65548
# CHECK-NEXT: - Kind: LF_ARGLIST
# CHECK-NEXT: ArgList:
# CHECK-NEXT: ArgIndices: [ 0 ]
# CHECK-NEXT: - Kind: LF_PROCEDURE
# CHECK-NEXT: Procedure:
# CHECK-NEXT: ReturnType: 116
# CHECK-NEXT: CallConv: NearC
# CHECK-NEXT: Options: [ None ]
# CHECK-NEXT: ParameterCount: 0
# CHECK-NEXT: ArgumentList: 4099
# CHECK-NEXT: IpiStream:
# CHECK-NEXT: Version: VC80
# CHECK-NEXT: Records:
# CHECK-NEXT: - Kind: LF_FUNC_ID
# CHECK-NEXT: FuncId:
# CHECK-NEXT: ParentScope: 0
# CHECK-NEXT: FunctionType: 4100
# CHECK-NEXT: Name: main
# CHECK-NEXT: - Kind: LF_FUNC_ID
# CHECK-NEXT: FuncId:
# CHECK-NEXT: ParentScope: 0
# CHECK-NEXT: FunctionType: 4097
# CHECK-NEXT: Name: foo
# CHECK-NEXT: - Kind: LF_STRING_ID
# CHECK-NEXT: StringId:
# CHECK-NEXT: Id: 0
# CHECK-NEXT: String: 'D:\b'
# CHECK-NEXT: - Kind: LF_STRING_ID
# CHECK-NEXT: StringId:
# CHECK-NEXT: Id: 0
# CHECK-NEXT: String: 'C:\vs14\VC\BIN\amd64\cl.exe'
# CHECK-NEXT: - Kind: LF_STRING_ID
# CHECK-NEXT: StringId:
# CHECK-NEXT: Id: 0
# CHECK-NEXT: String: '-Z7 -c -MT -IC:\vs14\VC\INCLUDE -IC:\vs14\VC\ATLMFC\INCLUDE -I"C:\Program Files (x86)\Windows Kits\10\include\10.0.10150.0\ucrt" -I"C:\Program Files (x86)\Windows Kits\NETFXSDK\4.6\include\um" -I"C:\Program Files (x86)\Windows Kits\8.1\include\shared"'
# CHECK-NEXT: - Kind: LF_SUBSTR_LIST
# CHECK-NEXT: StringList:
# CHECK-NEXT: StringIndices: [ 4100 ]
# CHECK-NEXT: - Kind: LF_STRING_ID
# CHECK-NEXT: StringId:
# CHECK-NEXT: Id: 4101
# CHECK-NEXT: String: ' -I"C:\Program Files (x86)\Windows Kits\8.1\include\um" -I"C:\Program Files (x86)\Windows Kits\8.1\include\winrt" -TC -X'
# CHECK-NEXT: - Kind: LF_STRING_ID
# CHECK-NEXT: StringId:
# CHECK-NEXT: Id: 0
# CHECK-NEXT: String: ret42-main.c
# CHECK-NEXT: - Kind: LF_STRING_ID
# CHECK-NEXT: StringId:
# CHECK-NEXT: Id: 0
# CHECK-NEXT: String: 'D:\b\vc140.pdb'
# CHECK-NEXT: - Kind: LF_BUILDINFO
# CHECK-NEXT: BuildInfo:
# CHECK-NEXT: ArgIndices: [ 4098, 4099, 4103, 4104, 4102 ]
# CHECK-NEXT: - Kind: LF_STRING_ID
# CHECK-NEXT: StringId:
# CHECK-NEXT: Id: 0
# CHECK-NEXT: String: ret42-sub.c
# CHECK-NEXT: - Kind: LF_BUILDINFO
# CHECK-NEXT: BuildInfo:
# CHECK-NEXT: ArgIndices: [ 4098, 4099, 4106, 4104, 4102 ]
RAW: Modules
RAW-NEXT: ============================================================
RAW-NEXT: Mod 0000 | `{{.*}}pdb.test.tmp1.obj`:
RAW-NEXT: SC[.text] | mod = 0, 0001:0000, size = 14, data crc = 1682752513, reloc crc = 0
RAW-NEXT: IMAGE_SCN_CNT_CODE | IMAGE_SCN_ALIGN_16BYTES | IMAGE_SCN_MEM_EXECUTE |
RAW-NEXT: IMAGE_SCN_MEM_READ
RAW-NEXT: Obj: `{{.*}}pdb.test.tmp1.obj`:
RAW-NEXT: debug stream: 11, # files: 1, has ec info: false
RAW-NEXT: pdb file ni: 0 ``, src file ni: 0 ``
RAW-NEXT: Mod 0001 | `{{.*}}pdb.test.tmp2.obj`:
RAW-NEXT: SC[.text] | mod = 1, 0001:0016, size = 6, data crc = 2139436471, reloc crc = 0
RAW-NEXT: IMAGE_SCN_CNT_CODE | IMAGE_SCN_ALIGN_16BYTES | IMAGE_SCN_MEM_EXECUTE |
RAW-NEXT: IMAGE_SCN_MEM_READ
RAW-NEXT: Obj: `{{.*}}pdb.test.tmp2.obj`:
RAW-NEXT: debug stream: 12, # files: 1, has ec info: false
RAW-NEXT: pdb file ni: 0 ``, src file ni: 0 ``
RAW-NEXT: Mod 0002 | `* Linker *`:
RAW-NEXT: SC[???] | mod = 65535, 65535:0000, size = -1, data crc = 0, reloc crc = 0
RAW-NEXT: none
RAW-NEXT: Obj: ``:
RAW-NEXT: debug stream: 13, # files: 0, has ec info: false
RAW-NEXT: pdb file ni: 1 `{{.*pdb.test.tmp.pdb}}`, src file ni: 0 ``
RAW: Types (TPI Stream)
RAW-NEXT: ============================================================
RAW-NEXT: Showing 5 records
RAW-NEXT: 0x1000 | LF_ARGLIST [size = 8, hash = 0x32484]
RAW-NEXT: 0x1001 | LF_PROCEDURE [size = 16, hash = 0x27EE9]
RAW-NEXT: return type = 0x0074 (int), # args = 0, param list = 0x1000
RAW-NEXT: calling conv = cdecl, options = None
RAW-NEXT: 0x1002 | LF_POINTER [size = 12, hash = 0x39732]
RAW-NEXT: referent = 0x1001, mode = pointer, opts = None, kind = ptr64
RAW-NEXT: 0x1003 | LF_ARGLIST [size = 12, hash = 0x1FC10]
RAW-NEXT: <no type>: ``
RAW-NEXT: 0x1004 | LF_PROCEDURE [size = 16, hash = 0x1BD3]
RAW-NEXT: return type = 0x0074 (int), # args = 0, param list = 0x1003
RAW-NEXT: calling conv = cdecl, options = None
RAW: Types (IPI Stream)
RAW-NEXT: ============================================================
RAW-NEXT: Showing 12 records
RAW-NEXT: 0x1000 | LF_FUNC_ID [size = 20, hash = 0x38E5A]
RAW-NEXT: name = main, type = 0x1004, parent scope = <no type>
RAW-NEXT: 0x1001 | LF_FUNC_ID [size = 16, hash = 0xD08E]
RAW-NEXT: name = foo, type = 0x1001, parent scope = <no type>
RAW-NEXT: 0x1002 | LF_STRING_ID [size = 16, hash = 0x3EBD9] ID: <no type>, String: D:\b
RAW-NEXT: 0x1003 | LF_STRING_ID [size = 36, hash = 0xD327] ID: <no type>, String: C:\vs14\VC\BIN\amd64\cl.exe
RAW-NEXT: 0x1004 | LF_STRING_ID [size = 260, hash = 0x2FA6A] ID: <no type>, String: -Z7 -c -MT -IC:\vs14\VC\INCLUDE -IC:\vs14\VC\ATLMFC\INCLUDE -I"C:\Program Files (x86)\Windows Kits\10\include\10.0.10150.0\ucrt" -I"C:\Program Files (x86)\Windows Kits\NETFXSDK\4.6\include\um" -I"C:\Program Files (x86)\Windows Kits\8.1\include\shared"
RAW-NEXT: 0x1005 | LF_SUBSTR_LIST [size = 12, hash = 0x6053]
RAW-NEXT: 0x1004: `-Z7 -c -MT -IC:\vs14\VC\INCLUDE -IC:\vs14\VC\ATLMFC\INCLUDE -I"C:\Program Files (x86)\Windows Kits\10\include\10.0.10150.0\ucrt" -I"C:\Program Files (x86)\Windows Kits\NETFXSDK\4.6\include\um" -I"C:\Program Files (x86)\Windows Kits\8.1\include\shared"`
RAW-NEXT: 0x1006 | LF_STRING_ID [size = 132, hash = 0xCAC7] ID: 0x1005, String: -I"C:\Program Files (x86)\Windows Kits\8.1\include\um" -I"C:\Program Files (x86)\Windows Kits\8.1\include\winrt" -TC -X
RAW-NEXT: 0x1007 | LF_STRING_ID [size = 24, hash = 0x21783] ID: <no type>, String: ret42-main.c
RAW-NEXT: 0x1008 | LF_STRING_ID [size = 24, hash = 0x1DB87] ID: <no type>, String: D:\b\vc140.pdb
RAW-NEXT: 0x1009 | LF_BUILDINFO [size = 28, hash = 0x5E91]
RAW-NEXT: 0x1002: `D:\b`
RAW-NEXT: 0x1003: `C:\vs14\VC\BIN\amd64\cl.exe`
RAW-NEXT: 0x1007: `ret42-main.c`
RAW-NEXT: 0x1008: `D:\b\vc140.pdb`
RAW-NEXT: 0x1006: ` -I"C:\Program Files (x86)\Windows Kits\8.1\include\um" -I"C:\Program Files (x86)\Windows Kits\8.1\include\winrt" -TC -X`
RAW-NEXT: 0x100A | LF_STRING_ID [size = 20, hash = 0x7C68] ID: <no type>, String: ret42-sub.c
RAW-NEXT: 0x100B | LF_BUILDINFO [size = 28, hash = 0x254D2]
RAW-NEXT: 0x1002: `D:\b`
RAW-NEXT: 0x1003: `C:\vs14\VC\BIN\amd64\cl.exe`
RAW-NEXT: 0x100A: `ret42-sub.c`
RAW-NEXT: 0x1008: `D:\b\vc140.pdb`
RAW-NEXT: 0x1006: ` -I"C:\Program Files (x86)\Windows Kits\8.1\include\um" -I"C:\Program Files (x86)\Windows Kits\8.1\include\winrt" -TC -X`
RAW: Public Symbols
RAW-NEXT: ============================================================
RAW-NEXT: Publics Header
RAW-NEXT: sym hash = 556, thunk table addr = 0000:0000
RAW-NEXT: GSI Header
RAW-NEXT: sig = 0xFFFFFFFF, hdr = 0xF12F091A, hr size = 16, num buckets = 524
RAW-NEXT: Records
RAW-NEXT: 20 | S_PUB32 [size = 20] `main`
RAW-NEXT: flags = function, addr = 0001:0000
RAW-NEXT: 0 | S_PUB32 [size = 20] `foo`
RAW-NEXT: flags = function, addr = 0001:0016
RAW-NOT: S_PUB32
RAW-NEXT: Hash Entries
RAW-NEXT: off = 21, refcnt = 1
RAW-NEXT: off = 1, refcnt = 1
RAW-NEXT: Hash Buckets
RAW-NEXT: 0x00000000
RAW-NEXT: 0x0000000c
RAW-NEXT: Address Map
RAW-NEXT: off = 20
RAW-NEXT: off = 0
RAW: Section Headers
RAW-NEXT: ============================================================
RAW: SECTION HEADER #1
RAW-NEXT: .text name
RAW-NEXT: 16 virtual size
RAW-NEXT: 1000 virtual address
RAW-NEXT: 200 size of raw data
RAW-NEXT: 400 file pointer to raw data
RAW-NEXT: 0 file pointer to relocation table
RAW-NEXT: 0 file pointer to line numbers
RAW-NEXT: 0 number of relocations
RAW-NEXT: 0 number of line numbers
RAW-NEXT: 60000020 flags
RAW-NEXT: IMAGE_SCN_CNT_CODE
RAW-NEXT: IMAGE_SCN_MEM_EXECUTE
RAW-NEXT: IMAGE_SCN_MEM_READ
RAW: SECTION HEADER #2
RAW-NEXT: .rdata name
RAW-NEXT: virtual size
RAW-NEXT: 2000 virtual address
RAW-NEXT: 200 size of raw data
RAW-NEXT: 600 file pointer to raw data
RAW-NEXT: 0 file pointer to relocation table
RAW-NEXT: 0 file pointer to line numbers
RAW-NEXT: 0 number of relocations
RAW-NEXT: 0 number of line numbers
RAW-NEXT: 40000040 flags
RAW-NEXT: IMAGE_SCN_CNT_INITIALIZED_DATA
RAW-NEXT: IMAGE_SCN_MEM_READ
RAW: SECTION HEADER #3
RAW-NEXT: .pdata name
RAW-NEXT: C virtual size
RAW-NEXT: 3000 virtual address
RAW-NEXT: 200 size of raw data
RAW-NEXT: 800 file pointer to raw data
RAW-NEXT: 0 file pointer to relocation table
RAW-NEXT: 0 file pointer to line numbers
RAW-NEXT: 0 number of relocations
RAW-NEXT: 0 number of line numbers
RAW-NEXT: 40000040 flags
RAW-NEXT: IMAGE_SCN_CNT_INITIALIZED_DATA
RAW-NEXT: IMAGE_SCN_MEM_READ
RAW: Original Section Headers
RAW-NEXT: ============================================================
RAW-NEXT: PDB does not contain the requested image section header type
RAW: Section Contributions
RAW-NEXT: ============================================================
RAW-NEXT: SC[.text] | mod = 0, 0001:0000, size = 14, data crc = 1682752513, reloc crc = 0
RAW-NEXT: IMAGE_SCN_CNT_CODE | IMAGE_SCN_ALIGN_16BYTES | IMAGE_SCN_MEM_EXECUTE |
RAW-NEXT: IMAGE_SCN_MEM_READ
RAW-NEXT: SC[.text] | mod = 1, 0001:0016, size = 6, data crc = 2139436471, reloc crc = 0
RAW-NEXT: IMAGE_SCN_CNT_CODE | IMAGE_SCN_ALIGN_16BYTES | IMAGE_SCN_MEM_EXECUTE |
RAW-NEXT: IMAGE_SCN_MEM_READ
RAW-NEXT: SC[.rdata] | mod = 2, 0002:0000, size = {{[0-9]+}}, data crc = 0, reloc crc = 0
RAW-NEXT: IMAGE_SCN_CNT_INITIALIZED_DATA | IMAGE_SCN_MEM_READ
RAW-NEXT: SC[.rdata] | mod = 2, 0002:0028, size = {{[0-9]+}}, data crc = 0, reloc crc = 0
RAW-NEXT: IMAGE_SCN_CNT_INITIALIZED_DATA | IMAGE_SCN_MEM_READ
RAW-NEXT: SC[.rdata] | mod = 0, 0002:0064, size = {{[0-9]+}}, data crc = 264583633, reloc crc = 0
RAW-NEXT: IMAGE_SCN_CNT_INITIALIZED_DATA | IMAGE_SCN_ALIGN_4BYTES | IMAGE_SCN_MEM_READ
RAW-NEXT: SC[.pdata] | mod = 0, 0003:0000, size = 12, data crc = 361370162, reloc crc = 0
RAW-NEXT: IMAGE_SCN_CNT_INITIALIZED_DATA | IMAGE_SCN_ALIGN_4BYTES | IMAGE_SCN_MEM_READ
RAW-NOT: SC[
RAW: Section Map
RAW-NEXT: ============================================================
RAW-NEXT: Section 0000 | ovl = 0, group = 0, frame = 1, name = 65535
RAW-NEXT: class = 65535, offset = 0, size =
RAW-NEXT: flags = read | execute | 32 bit addr | selector
RAW-NEXT: Section 0001 | ovl = 0, group = 0, frame = 2, name = 65535
RAW-NEXT: class = 65535, offset = 0, size =
RAW-NEXT: flags = read | 32 bit addr | selector
RAW-NEXT: Section 0002 | ovl = 0, group = 0, frame = 3, name = 65535
RAW-NEXT: class = 65535, offset = 0, size =
RAW-NEXT: flags = read | 32 bit addr | selector
RAW-NEXT: Section 0003 | ovl = 0, group = 0, frame = 4, name = 65535
RAW-NEXT: class = 65535, offset = 0, size = 4294967295
RAW-NEXT: flags = 32 bit addr | absolute addr
|