llvm.org GIT mirror llvm / 055ae72
[llvm-pdbutil] Show what blocks a stream occupies. This is useful when you want to look at a specific chunk of a stream or look for discontinuities, and you need to know the list of blocks occupied by a stream. git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@306150 91177308-0d34-0410-b5e6-96231b3b80d8 Zachary Turner 2 years ago
4 changed file(s) with 47 addition(s) and 17 deletion(s). Raw diff Collapse all Expand all
2121 ALL-NEXT: Is stripped: false
2222 ALL: Streams
2323 ALL-NEXT: ============================================================
24 ALL-NEXT: Stream 0: [Old MSF Directory] (40 bytes)
25 ALL-NEXT: Stream 1: [PDB Stream] (118 bytes)
26 ALL-NEXT: Stream 2: [TPI Stream] (5392 bytes)
27 ALL-NEXT: Stream 3: [DBI Stream] (739 bytes)
28 ALL-NEXT: Stream 4: [IPI Stream] (784 bytes)
29 ALL-NEXT: Stream 5: [Named Stream "/LinkInfo"] (0 bytes)
30 ALL-NEXT: Stream 6: [Global Symbol Hash] (556 bytes)
31 ALL-NEXT: Stream 7: [Public Symbol Hash] (604 bytes)
32 ALL-NEXT: Stream 8: [Public Symbol Records] (104 bytes)
33 ALL-NEXT: Stream 9: [Named Stream "/src/headerblock"] (0 bytes)
34 ALL-NEXT: Stream 10: [Section Header Data] (160 bytes)
35 ALL-NEXT: Stream 11: [New FPO Data] (32 bytes)
36 ALL-NEXT: Stream 12: [Module "d:\src\llvm\test\DebugInfo\PDB\Inputs\empty.obj"] (308 bytes)
37 ALL-NEXT: Stream 13: [Named Stream "/names"] (239 bytes)
38 ALL-NEXT: Stream 14: [Module "* Linker *"] (520 bytes)
39 ALL-NEXT: Stream 15: [TPI Hash] (308 bytes)
40 ALL-NEXT: Stream 16: [IPI Hash] (68 bytes)
24 ALL-NEXT: Stream 0: [Old MSF Directory] (40 bytes)
25 ALL-NEXT: Blocks: [8]
26 ALL-NEXT: Stream 1: [PDB Stream] (118 bytes)
27 ALL-NEXT: Blocks: [19]
28 ALL-NEXT: Stream 2: [TPI Stream] (5392 bytes)
29 ALL-NEXT: Blocks: [18, 17]
30 ALL-NEXT: Stream 3: [DBI Stream] (739 bytes)
31 ALL-NEXT: Blocks: [14]
32 ALL-NEXT: Stream 4: [IPI Stream] (784 bytes)
33 ALL-NEXT: Blocks: [20]
34 ALL-NEXT: Stream 5: [Named Stream "/LinkInfo"] (0 bytes)
35 ALL-NEXT: Blocks: []
36 ALL-NEXT: Stream 6: [Global Symbol Hash] (556 bytes)
37 ALL-NEXT: Blocks: [11]
38 ALL-NEXT: Stream 7: [Public Symbol Hash] (604 bytes)
39 ALL-NEXT: Blocks: [13]
40 ALL-NEXT: Stream 8: [Public Symbol Records] (104 bytes)
41 ALL-NEXT: Blocks: [12]
42 ALL-NEXT: Stream 9: [Named Stream "/src/headerblock"] (0 bytes)
43 ALL-NEXT: Blocks: []
44 ALL-NEXT: Stream 10: [Section Header Data] (160 bytes)
45 ALL-NEXT: Blocks: [10]
46 ALL-NEXT: Stream 11: [New FPO Data] (32 bytes)
47 ALL-NEXT: Blocks: [15]
48 ALL-NEXT: Stream 12: [Module "d:\src\llvm\test\DebugInfo\PDB\Inputs\empty.obj"] (308 bytes)
49 ALL-NEXT: Blocks: [6]
50 ALL-NEXT: Stream 13: [Named Stream "/names"] (239 bytes)
51 ALL-NEXT: Blocks: [16]
52 ALL-NEXT: Stream 14: [Module "* Linker *"] (520 bytes)
53 ALL-NEXT: Blocks: [7]
54 ALL-NEXT: Stream 15: [TPI Hash] (308 bytes)
55 ALL-NEXT: Blocks: [21]
56 ALL-NEXT: Stream 16: [IPI Hash] (68 bytes)
57 ALL-NEXT: Blocks: [22]
4158 ALL: String Table
4259 ALL-NEXT: ============================================================
4360 ALL-NEXT: ID | String
198198 "Stream {0}: [{1}] ({2} bytes)",
199199 fmt_align(StreamIdx, AlignStyle::Right, NumDigits(StreamCount)),
200200 StreamPurposes[StreamIdx], File.getStreamByteSize(StreamIdx));
201 if (opts::dump::DumpStreamBlocks) {
202 auto Blocks = File.getStreamBlockList(StreamIdx);
203 std::vector BV(Blocks.begin(), Blocks.end());
204 P.formatLine(" {0} Blocks: [{1}]",
205 fmt_repeat(' ', NumDigits(StreamCount)),
206 make_range(BV.begin(), BV.end()));
207 }
201208 }
202209
203210 return Error::success();
307307 cl::opt DumpStreams("streams",
308308 cl::desc("dump summary of the PDB streams"),
309309 cl::cat(MsfOptions), cl::sub(DumpSubcommand));
310 cl::opt DumpStreamBlocks(
311 "stream-blocks",
312 cl::desc("Add block information to the output of -streams"),
313 cl::cat(MsfOptions), cl::sub(DumpSubcommand));
310314
311315 // TYPE OPTIONS
312316 cl::opt DumpTypes("types",
977981 opts::dump::DumpSectionContribs = true;
978982 opts::dump::DumpSectionMap = true;
979983 opts::dump::DumpStreams = true;
984 opts::dump::DumpStreamBlocks = true;
980985 opts::dump::DumpStringTable = true;
981986 opts::dump::DumpSummary = true;
982987 opts::dump::DumpSymbols = true;
107107
108108 extern llvm::cl::opt DumpSummary;
109109 extern llvm::cl::opt DumpStreams;
110 extern llvm::cl::opt DumpStreamBlocks;
110111
111112 extern llvm::cl::opt DumpLines;
112113 extern llvm::cl::opt DumpInlineeLines;