当前位置:网站首页>Breakpad usage and DMP analysis
Breakpad usage and DMP analysis
2022-06-25 14:58:00 【qq_ twenty-three million nine hundred and fifty-three thousand 】
breakpad compile
1,breakpad Source download path
https://chromium.googlesource.com/breakpad/breakpad
The latest version requires g++ Support c++11, If g++ I won't support it c++11, You can use a lower version breakpad, Choose... Here 42
2,./configure && make
3, There are few problems encountered during compilation lss file , Download here https://chromium.googlesource.com/linux-syscall-support/
4, If gcc Version is too low , Will be submitted to the -Werror Wait for several unrecognized error messages , At this time, you can Makefile in -Werror Relevant settings are commented out
breakpad Use
1, Include header file
“client/linux/handler/minidump_descriptor.h”
“client/linux/handler/exception_handler.h”
2, google_breakpad::MinidumpDescriptor descriptor("./tmp"); // Appoint minidump File write Directory
google_breakpad::ExceptionHandler eh(descriptor, NULL, breakpad_callback, NULL, true ,-1);
// finish writing sth. minidump Callback function after
static bool breakpad_callback(const google_breakpad::MinidumpDescriptor& descriptor,
void* context, bool succeeded)
{
printf("Dump path: %s\n", descriptor.path());
return succeeded;
}
int main()
{
google_breakpad::MinidumpDescriptor descriptor("./tmp"); // Appoint minidump File write Directory
google_breakpad::ExceptionHandler eh(descriptor, NULL, breakpad_callback, NULL, true ,-1);
char *p = NULL;
*p=1;
return 0;
}
}
dmp analysis
dmp File analysis requires two executable programs , The first is dump_syms, The second is minidump_stackwalk
1,dump_syms A symbol table used to generate executable programs , Such as
./dump_syms main >main.sym
./dump_syms libsecmodel.so > libsecmodel.so.sym
2, according to main.sym obtain version number
perform head main.sym -n 1
obtain MODULE Linux x86_64 0B3BFC770A76BCA18E2ECC7A19DF61DF0 main
Create folder symobols/main/0B3BFC770A76BCA18E2ECC7A19DF61DF0
3, take main.sym Copied to the symobols/main/0B3BFC770A76BCA18E2ECC7A19DF61DF0 Next
4, Suppose the program crashes and generates dmp File for 7f0a5ae5-4ea2-150e-55e9b70e-05c9ae40.dmp
5, Generate readable stack information
minidump_stackwalk 7f0a5ae5-4ea2-150e-55e9b70e-05c9ae40.dmp ./symbols > main.result
Stack information is stored in main.result In file
边栏推荐
- Jaspersoft studio adding MySQL database configuration
- Using Sphinx to automatically generate API documents from py source files
- For the first time in China, Chinatelecom 5g underground personnel positioning project is officially commercial: it can track the position in real time to ensure operation safety
- Mutationobserver listens for DOM changes
- One question per day, punch in
- 【中国海洋大学】考研初试复试资料分享
- 【HBZ分享】LockSupport的使用
- 分饼干问题
- JS to add elements to the header, or tail of an array
- Modal and modeless dialogs for QT
猜你喜欢

Std:: vector minutes

Kubernetes understands kubectl/ debugging

【Try to Hack】vulnhub DC1

开餐馆

How to make GIF animation online? Try this GIF online production tool

New good friend Pinia, leading the new era of state management

Dynamic memory allocation

About the problem of kicad stuck in win10 version, version 6 x

Master XSS completely from 0 to 1

Uniapp cloud packaging app
随机推荐
What moment makes you think there is a bug in the world?
Basic knowledge of pointer
In 2022, the score line of Guangdong college entrance examination was released, and several families were happy and several worried
Gif动图如何裁剪?收下这个图片在线裁剪工具
Using Sphinx to automatically generate API documents from py source files
User defined data type - structure
分饼干问题
Real variable instance
Add a string at the input and textarea cursors
关于win10 版本kicad 卡死的问题, 版本6.x
Iterator failure condition
About the problem of kicad stuck in win10 version, version 6 x
弹性布局(display:flex;)属性详解
Go语言Zap库Logger的定制化和封装使用详解
Learning notes on February 5, 2022 (C language)
Master XSS completely from 0 to 1
Daily question, magic square simulation
New good friend Pinia, leading the new era of state management
Yolov3 spp Darknet version to caffemodel and then to OM model
Qlogsystem log system configuration use