Google breakpad for Linux step by step
2013-03-30 22:09
1786 查看
Google breakpad for Linux step by step ====================================== $ ( cd google-breakpad; ./configure; make; ) $ ( cd google-breakpad/src/tools/linux/dump_syms/; make; ) # remove "-m32" in dump_syms/Makefile if on 64-bit OS $ ( cd google-breakpad/src/tools/linux/md2core/; g++ -I http://www.cnblogs.com/../ -o md2core minidump-2-core.cc; ) $ cat test.cpp #include <iostream> #include "client/linux/handler/exception_handler.h" static bool dumpCallback(const char* dump_path, const char* minidump_id, void* context, bool succeeded) { std::cerr << "Minidump file created: " << dump_path << "/" << minidump_id << ".dmp\n"; return succeeded; } void hello() { int a = 2/0; } int main(int argc, char* argv[]) { google_breakpad::ExceptionHandler eh(".", NULL, dumpCallback, NULL, true); hello(); return 0; } $ g++ -g -I google-breakpad/src -o test test.cpp google-breakpad/src/client/linux/libbreakpad_client.a $ ./test $ google-breakpad/src/tools/linux/md2core/md2core ./test > core $ gdb ./test core (gdb) bt or $ google-breakpad/src/tools/linux/dump_syms/dump_syms ./test | head -1 MODULE Linux x86_64 6EDC6ACDB282125843FD59DA9C81BD830 test $ mkdir -p ./symbols/test/6EDC6ACDB282125843FD59DA9C81BD830 $ google-breakpad/src/tools/linux/dump_syms/dump_syms ./test > symbols/test/6EDC6ACDB282125843FD59DA9C81BD830/test.sym $ google-breakpad/src/processor/minidump_stackwalk ./328eaddc-c1d5-9eee-3ca1e6a4-0ce3f6a6.dmp symbols or (see http://groups.google.com/group/google-breakpad-discuss/browse_thread/thread/153ba641904d95ec ) $ wget -O symbolstore.py http://mxr.mozilla.org/mozilla-central/source/toolkit/crashreporter/tools/symbolstore.py?raw=1 $ python ./symbolstore.py google-breakpad/src/tools/linux/dump_syms/dump_syms ./symbols ./test $ google-breakpad/src/processor/minidump_stackwalk ./328eaddc-c1d5-9eee-3ca1e6a4-0ce3f6a6.dmp symbols Also reference: http://mxr.mozilla.org/mozilla-central/source/toolkit/crashreporter/
相关文章推荐
- 编译Linux 2.6内核for ARM step by step
- Step by Step Installation of the Subversion 1.x Server for Linux and Solaris 8/9/10 (English)
- Step by step build KOffice for Embedded Linux
- #step by step# Linux command line and explanation for NGS data
- google breakpad for linux(1)
- Linux Booting Process: A step by step tutorial for understanding Linux boot sequence
- Mstr for linux安装Step by Step
- Android—Step by step - Compile kernel module for Samsung Galaxy S3 (Linux)
- google breakpad for linux(2)
- Note For Linux By Jes(13)-认识与分析日志文件
- Linux驱动编程 step-by-step (九)字符设备模拟pipe的驱动程序
- SAP Ehancement Package 7 for ERP 6.0 Install Step By Step -04
- Enable WebGL Support For Google Chrome In Linux
- step by step 安装svn for ubuntu
- linux-0.11调试教程,fdisk for linux-0.11 by chenghao0511
- debug python step by step on linux ubuntu with ipdb
- Step By Step制作软盘上的Linux(V0.04)zz
- Note For Linux By Jes(4)-文件的压缩与打包
- Debug Native c/c++ Application for Android(Step by Step)
- Step-by-Step搭建Linux下的java开发环境