Closed luser closed 6 years ago
I don’t know anything at all about semantic contents but otherwise looks good to me!
Thanks for taking a look!
Also, I assume (like PE) the disk values are always little endian, right ?
I'm not sure this is actually documented anywhere, but the code Microsoft has released for reading PDB files just reads structs directly from the file, so it must be little-endian by default.
@luser Awesome! I will look through the code later tonight.
Also, I assume (like PE) the disk values are always little endian, right ?
I'm not sure this is actually documented anywhere, but the code Microsoft has released for reading PDB files just reads structs directly from the file, so it must be little-endian by default.
Right. As far as I know, the upstream code is the only documentation, and that code doesn't have any endian-switching. pdb::ParseBuffer
is 100% LE, so I'm happy to continue baking that assumption into this code.
Merged. Thanks!
You're welcome! It should be straightforward to convert other parts of the library now: just define structs the the on-disk format that derive Pread
, and use ParseBuffer::read
on them.
Hey! I got motivated to try out
scroll
so I started taking a crack at fixing https://github.com/willglynn/pdb/issues/10.This patch only changes over the code in
src/msf/mod.rs
, so it's mostly a wash since that code does a lot of reading individualu32
s, but it does make reading the PDB header nicer. If you like how this looks I can go through and convert the rest of the crate's I/O to use scroll.One thought: since we're going to wind up with a bunch of structs that define the on-disk PDB format, should those go in their own module?
cc @m4b