src\client\windows\tests\crash_generation_app下的例子编译失败,看了看,有些地方需要更改一下(以release为例)
1.C++ -> Code Generation -> Runtime Library-> Multi-threaded (/MT)
2. Linker -> Additional Library Directories -> ..\..\$(ConfigurationName)\lib
3. Linker -> Input -> Additional Dependencies -> common.lib exception_handler.lib crash_report_sender.lib crash_generation_client.lib crash_generation_server.lib
4.crash_generation_app.cc 中将dump路径"C:\\Dump"之类的改成"."
从网上找了个两个图简单解释一下breakpad的流程
进程外Dump :由独立的Crash Handle Process处理Dump的生成过程,主进程产生异常时,通过IPC方式通知Crash Handle Process。由Crash Handle Process中的crash_generation_server负责写Dump文件。大致流程如下:

进程内Dump :与进程外方式类似,只不过在Browser进程中增加了一个crash_handle_thread线程,由此线程负责写dump.基本流程如下:

// This is needed for CRT to not show dialog for invalid param
// failures and instead let the code handle it.
_CrtSetReportMode(_CRT_ASSERT, 0);
handler = new ExceptionHandler(L".",
NULL,
google_breakpad::ShowDumpResults,
NULL,
ExceptionHandler::HANDLER_ALL,
MiniDumpNormal,
kPipeName,
&custom_info );
// This is needed for CRT to not show dialog for invalid param
// failures and instead let the code handle it.
_CrtSetReportMode(_CRT_ASSERT, 0);
handler = new ExceptionHandler(L".",
NULL,
google_breakpad::ShowDumpResults,
NULL,
ExceptionHandler::HANDLER_ALL);