microsoft / microsoft-pdb

Information from Microsoft about the PDB format. We'll try to keep this up to date. Just trying to help the CLANG/LLVM community get onto Windows.
Other
1.86k stars 273 forks source link

Breakpad Use Case #2

Closed Jake-Shadle closed 8 years ago

Jake-Shadle commented 9 years ago

The README noted you would like issues pertaining to use cases, so here is a slightly complicated one. :)

If you are not aware, Breakpad symbol files are a way to get cross platform support for decoding callstacks from crash dumps/bug reports etc. The Breakpad symbol files are also ~20% of the size of the PDB they are generated from since they only contain a subset of the information.

I helped create a PDB reader here that has most of the support needed, but there are some things missing, as well as edge cases that sometimes crop up due to slight differences between eg. the standard MSVC++ Windows compiler and the XBox 1 compiler. (Though this will hopefully be resolved once the XB1 uses the same exact compiler which is coming soon in VS2015).

The reason this was made was because of several reasons:

So basically I guess I am asking for...an almost full spec of the format. :) All of the information I used to reverse engineer parts of the format was either old, or only showed some of the pertinent data (eg. MS CCI.

luser commented 9 years ago

This is a great start! Some things that would be very useful but aren't currently present include:

AndrewPardoe commented 9 years ago

Thanks for the suggestions, Jack-Shadle and luser.

Jack-Shadle, an almost-full spec of the format is probably not going to come out in the near future : ) Are there specific items you'd like more information on? Does luser's list cover your needs?

Jake-Shadle commented 9 years ago

Yes, those probably cover the most important bits. There are also cases where data in some streams are back to back, and in other streams are padded to be aligned on eg. 4 byte boundaries, so any clarification on what the actual expectations are for different streams would help a lot since it would allow for better error detection rather than just "we think the data might be wrong, but we aren't sure because we wrote our own parser" :smile:

skochinsky commented 9 years ago

Some third-party documentation is available here

AndrewPardoe commented 9 years ago

Interesting, @skochinsky. I see this is BSD-3 licensed. I'll see if we can build from it or rehost it.

skochinsky commented 9 years ago

This overview should probably be added too. And maybe the original (16-bit) CodeView spec(ftp://ftp.openwatcom.org/pub/devel/docs/CodeView.pdf). And "Visual C++ 5.0 Symbolic Debug Information Specification" from MSDN 2001.

assarbad commented 8 years ago

Hope this is not out of line, but has anybody also considered this? In particular the PDF version from there? The link to the download seems to be dead, but I'm sure I can dig up a copy which I downloaded some years ago.

AndrewPardoe commented 8 years ago

@assarbad if you find a live link to the PDF I'll happily add it into the external resources doc. (Or you could just PR with the link.)

assarbad commented 8 years ago

@AndrewPardoe: hmm, that's the problem. I do have the files still (separate PDFs) and I also created a combined PDF which includes the two downloads. But there doesn't seem to be a live version of it around anymore.

However, this download is likely useful as documentation - and it's still live.

moyix commented 8 years ago

The site seems somewhat dubious, but the PDF is mirrored here:

[Link removed – not the official one that the author released]

assarbad commented 8 years ago

@moyix That's not the PDF, btw. The stuff that got released by the author himself were thirteen separate PDF files. The one you are linking is a scanned copy. The one by the author even included the cut marks in the index (the other PDF pages were already cropped).

This ZIP contains the stuff I downloaded in late 2009 from the author's website.