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

别来无恙 提交于 2020-06-27 16:36:08

问题


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?


回答1:


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.



来源:https://stackoverflow.com/questions/60394317/google-crashpad-on-a-cross-compilation-platform-application-cannot-read-dmp-fil

易学教程内所有资源均来自网络或用户发布的内容,如有违反法律规定的内容欢迎反馈
该文章没有解决你所遇到的问题?点击提问,说说你的问题,让更多的人一起探讨吧!