September 16, 2012

[MySQL 调试] 初试breakpad

breakpad是google开源的一个崩溃报告工具,按照其声称,生成的core file相当小,近日开始调研将其集成到我们线上MySQL的可行性,以下是初步的安装尝试 1. checkout 代码 svn co http://google-breakpad.googlecode.com/svn/trunk  breakpad 2. configure && make && make install 3.暴力cp src/client/linux/libbreakpad_client.a 4.测试程序 #include “client/linux/handler/exception_handler.h” #include <cstdio> static bool dumpCallback(const google_breakpad::MinidumpDescriptor &md, void* context, bool succeeded) { printf(“Dump path: %s\n”, md.path()); return succeeded; } void crash() { volatile int* a = (int*)(NULL); *a = 1; } int main() { google_breakpad::MinidumpDescriptor […]