ubuntudebugginggdbminidump

Google crashpad on a cross-compilation platform application. Cannot read dmp file in Ubuntu


I have a small qt project with a segmentation fault that I want to track (this is an example and the segmentation fault is manually added for testing purposes, in the real project I do not know the segfaults left there). I decided to use google crashpad so I can create minidump files and then track the issues on my computer. I have been successful in doing so in windows with the example project. However, I am cannot open the dmp files in Linux to debug them.

I have tried using minidump-2-core as explained in this blog on the section Using minidump-2-core on Linux. However, when I run this command I get the following error: This minidump was not generated by Linux or NaCl. Obviously I am using the same computer with Ubuntu 18.04 for running the code that generates the dmp file and to convert it to a core file.

Any idea on how can I convert the dmp files into something that I can put into gdb for debugging? Or mor in general, how to proceed with tese files created by google crashpad in linus?


Solution

  • You'll want to build minidump_stackwalk which is a command line tool from the Breakpad repository. You'll also need to generate .sym files using dump_syms which is another tool from the Breakpad repository.

    Once you have generated the .sym files you'll need to lay them out on disk following the convention /path/to/symbols/folder/MODULE_NAME/MODULE_ID/MODULE_NAME.sym.

    Once the symbol files have been laid out in the correct folder structure you can invoke minidump_stackwalk which will output a symbolicated stack trace and a list of modules that were loaded at runtime:

    ./minidump_stackwalk -m /path/to/minidump.dmp /path/to/symbols/folder
    

    More information on how to use minidump_stackwalk can be found here.

    More information about how to use dump_syms can be found here.