当前位置:网站首页>google_ Breakpad crash detection
google_ Breakpad crash detection
2022-06-25 15:07:00 【Knowledge first】
1 breakpad Introduce
google_breakpad It's a by google Leading open source projects , The official introduction is :An open-source multi-platform crash reporting system, namely Open source multi platform crash reporting system .
This is from google Employees in the work 20% The freedom to create works created by time , People who really love technology will change the world in free time , A man who only finishes his work can always make a gun that is thrown after being used up .
Introduction to official documents :https://github.com/google/breakpad/blob/main/docs/getting_started_with_breakpad.md
2 Support
google breakpad Support iOS linux windows, But notice , I won't support it mingw64.
3 Source code
1 download
Download address :https://code.google.com/p/google-breakpad/ If you can't access it, please hang up VPN
github Address :https://github.com/google/breakpad
2 Project source structure ( Mainly in the src Under the directory of )
- build: Compile the script
- client: It mainly includes capture and dump Code
- common: General support code
- google_breakpad: breakpad Public support code used
- processor: Crash handling core code
- testing: Test code
- third_party: Third party support library
- tools: Some gadgets , Used for processing dump Document and symbol table
4 compile
4.1、window Compiling method
Reference link : https://blog.csdn.net/a844651990/article/details/85316627
4.2、linuxu(buntu desktop )
After downloading the source code , Execute the following command :
./configure
qmake -j4
4.3、linux( The embedded arm)
./configure --host=[arm-linux-gnueabihf]
qmake -j4
notes : --host The parameters carried are modified according to the cross compilation used by the platform
5 Use
5.1 Join the project
Use dynamic library to add projects , With qt For example , You need to add the compiled dynamic libraries and header files to the project folder , And then in the project pro Add code to file , As shown in the figure below :
5.2 Function call
// Add header file
#include "client/linux/handler/exception_handler.h"
//crash Callback function
static bool dumpCallback(const google_breakpad::MinidumpDescriptor &descriptor,
void *context,
bool succeeded)
{
Q_UNUSED(context)
printf("Dump path: %s\n", descriptor.path());
return succeeded;
}
int main(int argc, char *argv[])
{
// Load crash information capture
QString curDateTime = QDateTime::currentDateTime().toString("yyyyMMddhhmmss");
QDir dir(DMP_ROOT + curDateTime);
if(!dir.exists())
{
dir.mkpath(DMP_ROOT + curDateTime);
}
google_breakpad::MinidumpDescriptor descriptor(QString(DMP_ROOT + curDateTime).toStdString());
google_breakpad::ExceptionHandler eh(descriptor,
NULL,
dumpCallback,
NULL,
true,
-1);
// Your other code
return a.exec();
}
5.3 dmp File to readable file
The following is only about linux Next operation .
1、 Use dump_syms Generate symbol table :
dump_syms project > project.sym
notes : project by Run the program
2、 Create a hierarchical debug symbols folder
- View file hierarchy
head -n1 project.sym
- Create folder
mkdir -p ./symbols/project/ 5F5A4C932BFF6581E5AB30B67D9AA5180/
- take project.sym Copy to the folder in the previous step
cp project.sym symbols/project/ 5F5A4C932BFF6581E5AB30B67D9AA5180/
3、 utilize minidump_stackwalk analysis dump file
minidump_stackwalk f35daf9d-25a4-4706-d3f62d89-72d1b3c7.dmp ./symbols > result_f35daf9d.log
Finally generated result_f35daf9d.log Is a readable file .
边栏推荐
- Remove interval (greedy)
- 开餐馆
- Learning C language today is the first time to learn C language. In college, C linguistics is not good, but I want to make progress, so I found a beep video on the Internet to learn C language
- 14 -- 验证回文字符串 Ⅱ
- System Verilog — interface
- HMS Core机器学习服务实现同声传译,支持中英文互译和多种音色语音播报
- Common dynamic memory errors
- 如何裁剪动图大小?试试这个在线照片裁剪工具
- Vs2019 scanf error
- Design and implementation of timer
猜你喜欢

2022年广东高考分数线出炉,一个几家欢喜几家愁

Power automatic test system nsat-8000, accurate, high-speed and reliable power test equipment

如何裁剪动图大小?试试这个在线照片裁剪工具

ffmpeg protocol concat 进行ts流合并视频的时间戳计算及其音画同步方式一点浅析
![[Ocean University of China] information sharing for the first and second examinations of postgraduate entrance examination](/img/d8/a367c26b51d9dbaf53bf4fe2a13917.png)
[Ocean University of China] information sharing for the first and second examinations of postgraduate entrance examination

From 408 to independent proposition, 211 to postgraduate entrance examination of Guizhou University

Build a minimalist gb28181 gatekeeper and gateway server, establish AI reasoning and 3D service scenarios, and then open source code (I)

What moment makes you think there is a bug in the world?

定位position(5种方式)

Arithmetic operations and expressions
随机推荐
14 -- 验证回文字符串 Ⅱ
2.18 codeforces supplement
iconv_ Open returns error code 22
Source code analysis of synergetics and ntyco
User defined data type - structure
Using Visual Studio
Jaspersoft studio adding MySQL database configuration
Introduction to flexible array
AB string interchange
Arithmetic operations and expressions
Learning notes on February 18, 2022 (C language)
多张动图怎样合成一张gif?仅需三步快速生成gif动画图片
QT file reading -qfile
Function of getinstance() method
Build a minimalist gb28181 gatekeeper and gateway server, establish AI reasoning and 3D service scenarios, and then open source code (I)
One question per day,
开餐馆
QT database connection
定位position(5种方式)
One code per day - day one