GSOC 2017 - Crash Reporting - Report 2

Posted 7 years ago

I was able to compile breakpads client in windows environment with qmake(Qt creator) and mingw32 with this source code:
https://github.com/gsocnikos/musescore_crash/tree/master/windows_client

This is a simple example that generates a crash and creates a minidump file under c:\temp

The next step is to produce the symbol file from the executable. For this step breakpads comes with a precompiled tool called dump_syms. I tried all possibles ways using dump_syms to generate the sym file and I couldn't make it. dump_syms can not recognize an executable file compiled with mingw32.

Methods that I tried:
a) precompile tools
b) compiled tool using VC++ 2015
c) mingw32 where I could not make an executable due to missing header files that are only available on VC++ such as atlcomcli.h etc..

I noticed that the precompile tool dump_syms works with pdb files therefore I tried to take the executable and produce the pdb file but I also failed to do so. Ways that I tried was using:

a) https://github.com/rainers/cv2pdb
- I tried the precompile version and also the VC2015 and both failed
b) Dr Mingw: https://github.com/jrfonseca/drmingw
- I could not produce pdb files, the tool can read pdb but does not produce from the executable

Then I tried to compile the linux dump_syms version using mingw32 and I failed due to missing headers such as elf.h link.h, sys/mman.h, which are system headers.

I feel like that I was very lucky that the breakpad client can be compiled with mingw32 though due to the problem that mingw32 as a compiler does not have the option to produce the pdb file it makes it impossible to have fully functional breakpads using mingw32.

The fact is that both chromium web browser and the example https://github.com/JPNaude/dev_notes/wiki/Using-Google-Breakpad-with-Qt that it was provided from my mentor are compiled with VC++.

My conclusion is that both musescore and breakpads need to be compiled with VC++ similar to chromium web browser.

I made an example of the visual c++ 2015 implemention of the client and that generate a minidump file under c:\temp

https://github.com/gsocnikos/musescore_crash/tree/master/windows_client…

Also I uploaded my compiled version of dump_syms for VC++2015:
https://github.com/gsocnikos/musescore_crash/tree/master/dump_syms

Next I need to see if I can combine these two files using minidump_stalkwalk and generate the human readable stack trace