Details
Diff Detail
- Repository
- rL LLVM
Event Timeline
Good content. I have just a couple wording nits.
docs/PDB/DbiStream.rst | ||
---|---|---|
17 ↗ | (On Diff #77636) | "containing" here is redundant and a tad confusing. |
80 ↗ | (On Diff #77636) | Consistency nit: Elsewhere, you've been using e.g. and i.e. without a comma. |
87 ↗ | (On Diff #77636) | Bit-field syntax is ambiguous because bit-fields can be allocated left-to-right or right-to-left (implementation defined). There are also implementation-defined padding and alignment issues. |
129 ↗ | (On Diff #77636) | There's a wording problem here that makes this confusing. My first instinct would be to delete the of, but I'm not sure if that's exactly what you meant. Also, you probably should have a hyphens in fixed-size and variable-length. |
161 ↗ | (On Diff #77636) | hyphen: variable-length |
docs/PDB/DbiStream.rst | ||
---|---|---|
87 ↗ | (On Diff #77636) | While true, I need a concise way to express this since there are multiple bitfields defined throughout this file and in other files (some of which have not yet been written). If it was easy to insert images into RestructuredText, I could just draw it out, but I was hoping this could be understood to mean "the first 8 bits are X, the next 7 bits are Y, the final bit is Z", etc. |
docs/PDB/DbiStream.rst | ||
---|---|---|
87 ↗ | (On Diff #77636) | Why is this uint16? I wonder if this can be written as uint8_t MinorVersion; uint8_t MajorVersin : 7; uint8_t NewVersionFormat : 1; |
docs/PDB/DbiStream.rst | ||
---|---|---|
87 ↗ | (On Diff #77636) | No, because the bytes of the file are in little endian. If you run this code on a big endian machine, then one ulittle16_t is not the same as two uint8_t's. We read it into a ulittle16_t and then perform the bitwise operations on that. |
docs/PDB/DbiStream.rst | ||
---|---|---|
87 ↗ | (On Diff #77636) | Ah, right. But I found it a bit confusing (as I was confused) to use both uint16_t and ulittle16_t to mean little endian 16-bit integer. Maybe you might want to say at the beginning of the document that all values are in little endian and use uint{16,32}_t? |
87 ↗ | (On Diff #77636) | Or, something like ulittle16_t X : 1, though it's not syntactically correct. |
Add a note that all numeric values are little endian, and then use standard C types instead of endian types in struct definitions.