diff options
| author | 杨威 <[email protected]> | 2020-08-03 19:18:42 +0800 |
|---|---|---|
| committer | 杨威 <[email protected]> | 2020-08-14 15:50:20 +0800 |
| commit | f6d9d68ae79681e36ea4010f5ea4faaaf6b09cc1 (patch) | |
| tree | 455b0ac02447c3f475d2099f6177e599f766ed35 /src/config/cmd_args.c | |
| parent | b8e69bb7c7b84c8c7d637c2f989bdc0269ccfd5c (diff) | |
集成breakpad输出minidumpv4.1.0-rc1
1、sapp增加-g参数,测试生成minidump功能,默认读取./etc/sapp.toml下配置
2、代码增加src/support/breakpad_mini目录,封装简单的in_process输出minidump方式
3、控制参数集成在sapp配置项中,可配置内容如下:
[breakpad]
disable_coredump=1
enable_breakpad=1
breakpad_minidump_dir=/tmp/crashreport
enable_breakpad_upload=0
breakpad_upload_url=http://127.0.0.1/
1、移除sapp原有的dump_backtrace函数(已废弃)
2、更新breakpad默认参数,默认打开coredump,关闭breakpad
移除breakpad上传时的-p与-v参数
Breakpad_mini update:上传时-p参数值使用basename函数从/proc/self/exe获取,默认为进程名
移除breakpad_mini中的install,避免影响sapp打包
platform_init结束后,调用sapp_init_breakpad_mini()
增加tools.signal_handler.signal,开启后将接管SIGUSR1 和SIGUSR2信号,预留给实现优雅退出
更新CI流程,增加从debuginfo中导出elf文件,上传至sentry
指定breakpad INSTALL_DIR
1、调整breakpad编译选项,增加头文件目录包含INSTALL_DIR下的breadpad目录
2、撤销对INSTALL_DIR设置至/usr/local/的操作,避免编译时需要提权
Bugfix:编译breakpad_mini时lib_name写错成.so
移除cmake中对/usr/local/include/breakpad的显示引用
1、移除sapp原有的dump_backtrace函数(已废弃)
2、更新breakpad默认参数,默认打开coredump,关闭breakpad
Breakpad_mini update:上传时-p参数值使用basename函数从/proc/self/exe获取,默认为进程名
移除breakpad_mini中的install,避免影响sapp打包
platform_init结束后,调用sapp_init_breakpad_mini()
增加tools.signal_handler.signal,开启后将接管SIGUSR1 和SIGUSR2信号,预留给实现优雅退出
更新CI流程,增加从debuginfo中导出elf文件,上传至sentry
指定breakpad INSTALL_DIR
Bugfix:编译breakpad_mini时lib_name写错成.so
移除cmake中对/usr/local/include/breakpad的显示引用
ci更新,默认编译CAPTURE_MODE =MARSIO的sapp
更新ci/travis.sh,指定CAPTURE_MODE 编译
修复笔误
更新ci/travis.sh,增加安装mrzcpd依赖rpm包
调整sapp_init_breakpad_mini初始化位置,提至MESA_platform_init之前
更新sapp.toml,增加breakpad配置模板
更新ci文件,默认编译PLATFORM_MODE=INLINE
Diffstat (limited to 'src/config/cmd_args.c')
| -rw-r--r-- | src/config/cmd_args.c | 12 |
1 files changed, 10 insertions, 2 deletions
diff --git a/src/config/cmd_args.c b/src/config/cmd_args.c index bb5a779..1b54ce9 100644 --- a/src/config/cmd_args.c +++ b/src/config/cmd_args.c @@ -30,6 +30,7 @@ static const sapp_cmd_args_usage_t cmd_args_usage[] = { {"-h", "help", NULL, "show help message"}, {"-v", "version", NULL, "show platform version"}, + {"-g", "coredump", NULL, "generate coredump for test"}, {"-c", "sample-config", NULL, "generate sample config file->sapp.toml"}, {"-d", "dumpfile", NULL, "running as pcap dumpfile mode"}, {"-r", "dumpfile-file", NULL, "read packets from which pcap file"}, @@ -38,7 +39,7 @@ static const sapp_cmd_args_usage_t cmd_args_usage[] = }; /* ��ֻ̬��ȫ�ֱ������Է����κδ����, ������sapp_global_val�� */ -static const char *sapp_cla_short_options = "cdhr:v"; +static const char *sapp_cla_short_options = "cdhr:vg"; /* ��ֻ̬��ȫ�ֱ������Է����κδ����, ������sapp_global_val�� */ static const struct option sapp_cla_long_options[] = @@ -49,6 +50,7 @@ static const struct option sapp_cla_long_options[] = {"dumpfile-file", required_argument, NULL, 'r'}, {"dumpfile-speed", required_argument, NULL, 0}, {"sample-config", no_argument, NULL, 'c'}, + {"coredump", no_argument, NULL, 'g'}, {NULL, 0, NULL, 0} }; @@ -239,7 +241,13 @@ int sapp_parse_cmd_args(int argc, char *argv[]) case 'd': store_cmd_args("dumpfile", NULL); continue; - break; + break; + + case 'g': + sapp_init_breakpad_mini(); + sapp_segv_generate(); + continue; + break; case 'r': store_cmd_args("dumpfile-file", optarg); |
