DBI signature 20000404?
mountainstorm opened this issue · 2 comments
I've produced a python port of the MS CLR PDB parser and when running it across a large cache of real PDBs I'm seeing it fail to parse any where the DBI signature is 20000404 [DBI version varies but is normally something like 1308076843]. In all cases the PDB stream signature is 20000404.
Looking through the code in this repo it appears you handle DBI streams with a signature of 19990903 as the default, and with the new style header, and streams with any other signature using the old style header. I've tried replicating this but the data I've got in the DBi stream defiantly isn't in the old header format.
Does anyone have any pointers on how to handle DB streams with a signature of 20000404, or even newer ones like DBIImpvV110 (20091201).
Heres an example of the bytes from one of these DBI streams:
94 2e 31 01 2b ab f7 4d 01 00 00 00 99 44 fe 6b
00 7f 9b 49 b6 92 d0 a2 a6 90 6b fd 07 00 00 00
2f 6e 61 6d 65 73 00 01 00 00 00 02 00 00 00 01
00 00 00 02 00 00 00 00 00 00 00 00
Is it possible that what you're viewing is not, in fact, a DBI stream? You mention that the version is 1308076843, but the code in the repo only handles a version of -1. I think you're actually viewing a PDB stream. Why a PDB stream might appear in the index normally used for the DBI stream is an open question that I can't answer (and I don't have your PDB so all I can do is guess).
Note that the "signature" in a PDB stream is actually a value returned from time(), aka a unix epoch time, and this value of 1308076843 corresponds to Tue, 14 Jun 2011 18:40:43 GMT, which is certainly a reasonable time.
So I'm wagering that you are not looking at a DBI stream, and you will need to figure out why there is a PDB stream where you thought there should be a DBI Stream.
After further investigation it appeared to be because, in some cases, when a stream was empty, I ended up returning stale data rather than an empty stream. Hence every time it was a striped PDB which triggered this condition I was returning the wrong data and the parser sig check failed.
Thanks for the help