[PATCH] D33996: Improve consistency and flexibility with llvm-pdbdump subcommands
Zachary Turner via Phabricator via llvm-commits
llvm-commits at lists.llvm.org
Thu Jun 8 11:13:48 PDT 2017
zturner added a comment.
In https://reviews.llvm.org/D33996#776225, @inglorion wrote:
> While we're at it - how much value is there in having both yaml and raw that is almost the same, but with slightly different syntax? I've added some code to dump things in raw format before we understood what they meant, but I think now that we can dump pretty much everything as YAML, we should consider removing raw.
I've been thinking about what to do here, and I think there is a better option. We should change `raw` mode to be more concise. raw was originally supposed to be for human consumption while yaml was for machine consumption. But they are equally verbose, and there's no clear argument that raw is more readable than yaml. It might even be worse. So what I've been thinking about is changing raw to be very compressed. For example, instead of this:
D:\foo> llvm-pdbdump raw -all foo.pdb
FileHeaders {
BlockSize: 4096
FreeBlockMap: 2
NumBlocks: 1145
NumDirectoryBytes: 5484
Unknown1: 0
BlockMapAddr: 1143
NumDirectoryBlocks: 2
DirectoryBlocks: [1141, 1142]
NumStreams: 236
}
Streams [
Stream 0: [Old MSF Directory] (40 bytes)
Stream 1: [PDB Stream] (118 bytes)
Stream 2: [TPI Stream] (407284 bytes)
Stream 3: [DBI Stream] (210538 bytes)
Stream 4: [IPI Stream] (496844 bytes)
Stream 5: [Named Stream "/LinkInfo"] (0 bytes)
...
PDB Stream {
Version: 20000404
Signature: 0x59303684
Age: 2
Guid: {6EE2E173-08F2-BF4D-AA11-4734E99F4974}
Features: 0x1
Named Streams {
/names: 6
/LinkInfo: 5
/src/headerblock: 233
}
}
Type Info Stream (TPI) {
TPI Version: 20040203
Record count: 8478
Records [
{
ArgList (0x1000) {
TypeLeafKind: LF_ARGLIST (0x1201)
NumArgs: 0
Arguments [
]
}
}
{
Procedure (0x1001) {
TypeLeafKind: LF_PROCEDURE (0x1008)
ReturnType: void (0x3)
CallingConvention: NearC (0x0)
FunctionOptions [ (0x0)
]
NumParameters: 0
ArgListType: () (0x1000)
}
}
We print this:
D:\foo> llvm-pdbdump raw -all foo.pdb
MSF [BlockSize=4096, FreeBlockMap=2, NumBlocks=1145, DirSize=5484, BlockMapAddr=1143, NumDirBlocks=2, Streams=236]
Streams [
Stream 0: [Old MSF Directory] (40 bytes)
Stream 1: [PDB Stream] (118 bytes)
Stream 2: [TPI Stream] (407284 bytes)
Stream 3: [DBI Stream] (210538 bytes)
Stream 4: [IPI Stream] (496844 bytes)
Stream 5: [Named Stream "/LinkInfo"] (0 bytes)
...
]
PDB Stream [Ver: 20000404, Sig: 0x59303684, Age: 2, Guid: {6EE2E173-08F2-BF4D-AA11-4734E99F4974}, Features: 0x1]
Named Streams {
/names: 6
/LinkInfo: 5
/src/headerblock: 233
}
TPI Stream [Ver: 20040203]
Records [
TI: 0x1000 - LF_ARGLIST (0x1201) {}
TI: 0x1001 - LF_PROCEDURE (0x1001) { Ret: void (0x03), Conv: NearC (0x0), Options: 0x0, Args: () (0x1000)}
...
]
or some such.
https://reviews.llvm.org/D33996
More information about the llvm-commits
mailing list