Google Breakpad part 1 : Getting Started With Windows Client
准备
1、Python
2、Visual Studio
3、svn checkout http://google-breakpad.googlecode.com/svn/trunk/ source code
编译
Traceback (most recent call last):
File "D:\google_breakpad\src\tools\gyp\/gyp", line , in <module>
sys.exit(gyp.main(sys.argv[:]))
File "D:\google_breakpad\src\tools\gyp\pylib\gyp\__init__.py", line , in main
return gyp_main(args)
File "D:\google_breakpad\src\tools\gyp\pylib\gyp\__init__.py", line , in gyp_main
options.circular_check)
File "D:\google_breakpad\src\tools\gyp\pylib\gyp\__init__.py", line , in Load
depth, generator_input_info, check, circular_check)
File "D:\google_breakpad\src\tools\gyp\pylib\gyp\input.py", line , in Load
VerifyNoGYPFileCircularDependencies(targets)
File "D:\google_breakpad\src\tools\gyp\pylib\gyp\input.py", line , in Veri
fyNoGYPFileCircularDependencies
' '.join(bad_files)
gyp.input.CircularException: Some files not reachable, cycle in .gyp file depend
ency graph detected involving some or all of: src\client\windows\handler\excepti
on_handler.gyp src\client\windows\tests\crash_generation_app\crash_generation_ap
p.gyp src\client\windows\breakpad_client.gyp src\client\windows\sender\crash_rep
ort_sender.gyp src\client\windows\unittests\client_tests.gyp src\client\windows\
crash_generation\crash_generation.gyp
2、运行之后在 src\client\windows目录下会生成一个solution,开打solution,F7生成。
注意:Debug版生成的时候一切正常,但切换到Release版本之后,生成的时候会遇到一个错误:
>------ 已启动生成: 项目: crash_generation_server, 配置: Release Win32 ------
>生成启动时间为 // ::。
>生成启动时间为 // ::。
>InitializeBuildStatus:
> 正在创建“D:\google_breakpad\src\client\windows\Release\obj\crash_generation_server\crash_generation_server.unsuccessfulbuild”,因为已指定“AlwaysCreate”。
>InitializeBuildStatus:
> 正在创建“D:\google_breakpad\src\client\windows\Release\obj\common\common.unsuccessfulbuild”,因为已指定“AlwaysCreate”。
>ClCompile:
> client_info.cc
> minidump_generator.cc
> crash_generation_server.cc
>crash_generation_server.cc(): error C2220: 警告被视为错误 - 没有生成“object”文件
>crash_generation_server.cc(): warning C4189: “error_code”: 局部变量已初始化但不引用
>crash_generation_server.cc(): warning C4189: “error_code”: 局部变量已初始化但不引用
>crash_generation_server.cc(): warning C4189: “error_code”: 局部变量已初始化但不引用
>ClCompile:
> http_upload.cc
> guid_string.cc
> string_utils.cc
>Lib:
> gtest.vcxproj -> D:\google_breakpad\src\client\windows\Release\lib\gtest.lib
>FinalizeBuildStatus:
> 正在删除文件“D:\google_breakpad\src\client\windows\Release\obj\gtest\gtest.unsuccessfulbuild”。
> 正在对“D:\google_breakpad\src\client\windows\Release\obj\gtest\gtest.lastbuildstate”执行 Touch 任务。
>
>生成成功。
>
>已用时间 ::18.07
>
>生成失败。
原因是错误被视为警告的选项,在Release模式下编译的时候增加了NDEBUG选项,导致了assert被关掉了,所以error_code没有被其他地方引用到,所以编译器发出警告。
然后又被视为错误,所以导致crash_generation_server工程编译失败。
void CrashGenerationServer::HandleReadingState() {
assert(server_state_ == IPC_SERVER_STATE_READING);
DWORD bytes_count = ;
bool success = GetOverlappedResult(pipe_,
&overlapped_,
&bytes_count,
FALSE) != FALSE;
DWORD error_code = success ? ERROR_SUCCESS : GetLastError();
if (success && bytes_count == sizeof(ProtocolMessage)) {
EnterStateImmediately(IPC_SERVER_STATE_READ_DONE);
} else {
// We should never get an I/O incomplete since we should not execute this
// unless the Read has finished and the overlapped event is signaled. If
// we do get INCOMPLETE, we have a bug in our code.
assert(error_code != ERROR_IO_INCOMPLETE);
EnterStateImmediately(IPC_SERVER_STATE_DISCONNECTING);
}
}
最简单的解决方法是在下图的这个地方添加4189的警告。

然后重新生成,问题解决。
这次就先介绍到这里,下次介绍一下breakpad的使用。
Google Breakpad part 1 : Getting Started With Windows Client的更多相关文章
- Google Breakpad 完全解析(二) —— Windows前台实现篇
原创文章,转载请标明出处:Soul Apogee (http://bigasp.com),谢谢. 好,看完了如何使用breakpad,我们现在看看breakpad在Windows下到底是如何实现的呢? ...
- Google Breakpad 完全解析(一) —— Windows入门篇
原创文章,转载请标明出处:Soul Apogee (http://bigasp.com),谢谢. Google breakpad是一个非常实用的跨平台的崩溃转储和分析模块,他支持Windows,Lin ...
- C++库(Google Breakpad)
Google Breakpad是什么? 一个开源的多平台崩溃报告系统. Google breakpad是一个非常实用的跨平台的崩溃转储和分析模块,它支持Windows,Linux和Mac和Solari ...
- google breakpad for linux(2)
breakpad 是什么 breakpad 是一个包含了一系列库文件和工具的开源工具包,使用它可以帮助我们在程序崩溃后进行一系列的后续处理,如现场的保存(core dump),及事后分析(重建 cal ...
- Google Breakpad 之一,跨平台crash 处理上报系统简介
Google Breakpad 之一,跨平台crash 处理上报系统简介 http://blog.csdn.net/wpc320/article/details/8290501 Google Brea ...
- Google Breakpad: 实战crash .
Google Breakpad: 实战crash . http://blog.csdn.net/zm_21/article/details/24795205 C/C++程序最棘手的时候就是一个字“挂” ...
- google breakpad 使用初步总结
项目地址:https://code.google.com/p/google-breakpad/ 访问不了请挂VPN 这是一个由google主导的开源项目,官方介绍为:An open-source ...
- Google Breakpad · 基础介绍
Google breakpad是一个跨平台的崩溃转储和分析框架和工具集合. 三个主要组件 ◆ client 以library的形式内置在你的应用中,当崩溃发生时写 minidump文件 ◆ symbo ...
- Android使用google breakpad捕获分析native cash
Android 开发高手课 课后练习(1) 一.Chapter01 崩溃 https://time.geekbang.org/column/article/70602 https://github.c ...
随机推荐
- delphi 查找对话框
调用查找对话框 关键点 HTMLID_FIND = 1; //查找对话框 HTMLID_VIEWSOURCE= 2; //用记事本查看源代码 HTMLID_OPTIONS =3; //Internet ...
- SQL Server中DML语句要申请的锁
对于select语句: 1.当採用表扫描时,会直接锁定page,而不是锁定详细的某条记录,所以会有这些锁: A.数据库S锁 B.表的IS锁 C.页的S锁 2.当採用索引来查找数据时,会锁定详细的记录, ...
- online ddl 工具之pt-online-schema-change
MySQL ddl 的问题现状 在运维mysql数据库时,我们总会对数据表进行ddl 变更,修改添加字段或者索引,对于mysql 而已,ddl 显然是一个令所有MySQL dba 诟病的一个功能, ...
- 整型数组与vector对象之间的相互初始化
#include<iostream> #include<vector> #include<string> using namespace std; int main ...
- yar
<?php class Operator { /** * 两数相加 */ public function add($a, $b) { return $this->_add($a, $b); ...
- swift基本数据类型的使用
// // ViewController.swift // 基本数据类型 // // Created by 叶炯 on 16/9/8. // Copyright © 2016年 叶炯. All rig ...
- Android studio设置参数提示
在Android studio的使用的过程中,那么就需要对当前的代码显示当前的方式做一个的提示信息,那么可以通过Android studio的的设置的方法,来对Android studio方法的提示显 ...
- warning C4819: 该文件包含不能在当前代码页(936)中表示的字符。请将该文件保存为 Unicode 格式以防止数据丢失
bug来源: 一直在看sift然后就手贱的给 opencv源码做注释,如果在vs里面打开会一直相安无事,但是问题出在我用了notepad++. 这样就报了标题的错误. 因为notepad++会以uni ...
- Log4Net之初步了解
原创文章,转载必需注明出处:http://www.ncloud.hk/%E6%8A%80%E6%9C%AF%E5%88%86%E4%BA%AB/log4net%E4%B9%8B%E5%88%9D%E6 ...
- MSP430常见问题之FLASH存储类
Q1:用IAR Embedded Workbench for MSP430 通过JTAG往MSP430上写程序.为了知道片内程序的版本,必须读出Flash 中内容.什么工具软件可以通过JTAG口实现这 ...