This is a first step towards getting complete documentation of the PDB format. I plan to fill out the additional files in an equal amount of detail to what you see in the MSF documentation in later iterations, but for now I wanted to define the documentation hierarchy, and fill out the high level details of the format and get one page filled out.
Details
Diff Detail
Event Timeline
I've noted a couple of nits and possibilities for clarifications, but a nice start. Thanks for writing this.
docs/PDB/MsfFile.rst | ||
---|---|---|
50 | Wording nit: "describing the layout of the Stream Directory" doesn't seem to capture what I think you mean. How about "listing the blocks that contain the Stream Directory"? | |
56 | Did you mean `[NumDirectoryBytes / 4]`? | |
57 | I assume the space between the header and the next block is just 0-filled padding? | |
docs/PDB/index.rst | ||
18 | grammar nit: s/have/has/ because "ecosystem" is singular. | |
25 | delete "with" |
docs/PDB/MsfFile.rst | ||
---|---|---|
56 | No, this is correct. For starters, that's intentionally a mathematical ceiling operator and not a square bracket :) That aside though, Suppose your directory is magically exactly 4KiB and your block size is also 4KiB. Then your directory fits on a single block, and thus you only need a single ulittle32 to describe the list of blocks that it lies on. |
Content and layout looks good. Let's let Adrian finish reviewing the wording.
docs/PDB/index.rst | ||
---|---|---|
157 | I wrote some CV stuff here: It should probably be split out and moved in here. I'll take a shot at that after this lands, and then hook up these links. |
docs/PDB/MsfFile.rst | ||
---|---|---|
21 | I think this name would be a little more self-descriptive if it were called FreeBlockMapAddr. This would also make it consistent with BlockMapAddr. | |
25 | Looking at the microsoft-pdb sources, isn't this technically an array of addresses? |
docs/PDB/MsfFile.rst | ||
---|---|---|
25 | It's more like a pointer to an array. It's a single uint32 which is the index of a block, and at that block is an array. |
docs/PDB/MsfFile.rst | ||
---|---|---|
25 | My reading of the PDB sources makes me thing that its an array of pointers to arrays. I don't think we ever encountered this in the wild because our PDBs were not large enough. |
docs/PDB/MsfFile.rst | ||
---|---|---|
56 | Ah, got it. Thanks for the clarification. The ceiling operators in monospace font are really hard to distinguish from square brackets. Given that we don't have full TeX capabilities, maybe it would be better to make it more code-like: ceil(NumDirectoryBytes / BlockSize). |
I think this name would be a little more self-descriptive if it were called FreeBlockMapAddr. This would also make it consistent with BlockMapAddr.