跨编译平台应用程序上的Googlerashpad.无法在Ubuntu中读取dmp文件 [英] Google crashpad on a cross-compilation platform application. Cannot read dmp file in Ubuntu

查看:175
本文介绍了跨编译平台应用程序上的Googlerashpad.无法在Ubuntu中读取dmp文件的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

我有一个 qt项目,其中有一个我要跟踪的细分错误(这是一个示例,并且为了测试目的而手动添加了分段错误,在实际项目中,我不知道剩下的段错误.我决定使用Googlerashpad,以便创建小型转储文件,然后在计算机上跟踪问题.我已经在Windows中使用示例项目成功地做到了这一点.但是,我无法在Linux中打开 dmp 文件进行调试.

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.

我尝试使用 minidump-2 -core ,如此博客中所述在Linux上使用minidump-2-core 部分.但是,当我运行此命令时,出现以下错误:This minidump was not generated by Linux or NaCl.显然,我使用的是与Ubuntu 18.04相同的计算机,用于运行生成 dmp 文件并将其转换为核心文件的代码. .

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.

关于如何将 dmp 文件转换为可放入gdb进行调试的任何想法?还是一般来说,如何处理由linus中的Googlerashpad创建的tese文件?

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?

推荐答案

您将要构建minidump_stackwalk,这是Breakpad存储库中的命令行工具.您还需要使用dump_syms生成.sym文件,这是Breakpad存储库中的另一种工具.

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.

生成.sym文件后,需要按照约定/path/to/symbols/folder/MODULE_NAME/MODULE_ID/MODULE_NAME.sym将它们放在磁盘上.

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.

将符号文件放置在正确的文件夹结构中后,您可以调用minidump_stackwalk,这将输出带符号的堆栈跟踪以及在运行时加载的模块列表:

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

可在此处.

有关如何使用dump_syms的更多信息,请参见这里.

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

这篇关于跨编译平台应用程序上的Googlerashpad.无法在Ubuntu中读取dmp文件的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

查看全文
登录 关闭
扫码关注1秒登录
发送“验证码”获取 | 15天全站免登陆