ios如何生成crash报告
#include <signal.h>
#include <execinfo.h> void OnProcessExceptionHandler(int sigl)
{
do
{
std::string str = ""; void* arrayList[];
int count = backtrace(arrayList, );
char** pStr = backtrace_symbols(arrayList, count);
if (pStr == NULL)
break; for (int i=; i<count; i++)
{
str += pStr[i];
str += "\n";
} if (str.size() <= )
break; char buffer[] = "";
time_t t = time(NULL);
tm* pTm = localtime(&t);
sprintf(buffer, "[TRACE]%02d:%02d:%02d : \n", pTm->tm_hour,pTm->tm_min,pTm->tm_sec); std::string logFile = "";//writeable dir
logFile += "exception.txt";
FILE* pFile = fopen(logFile.c_str(), "ab");
if (pFile == NULL)
break; fwrite(buffer, strlen(buffer), , pFile);
fwrite(str.c_str(), str.size(), , pFile);
fclose(pFile);
}
while (false); exit();
} int _tmain(int argc, _TCHAR* argv[])
{
signal(SIGQUIT, CrashReportSystem::OnProcessExceptionHandler);
signal(SIGILL, CrashReportSystem::OnProcessExceptionHandler);
signal(SIGTRAP, CrashReportSystem::OnProcessExceptionHandler);
signal(SIGABRT, CrashReportSystem::OnProcessExceptionHandler);
signal(SIGEMT, CrashReportSystem::OnProcessExceptionHandler);
signal(SIGFPE, CrashReportSystem::OnProcessExceptionHandler);
signal(SIGBUS, CrashReportSystem::OnProcessExceptionHandler);
signal(SIGSEGV, CrashReportSystem::OnProcessExceptionHandler);
signal(SIGSYS, CrashReportSystem::OnProcessExceptionHandler);
signal(SIGPIPE, CrashReportSystem::OnProcessExceptionHandler);
signal(SIGALRM, CrashReportSystem::OnProcessExceptionHandler);
signal(SIGXCPU, CrashReportSystem::OnProcessExceptionHandler);
signal(SIGXFSZ, CrashReportSystem::OnProcessExceptionHandler); return ;
}
ios如何生成crash报告的更多相关文章
- iOS应用的crash日志的分析基础
Outline如何获得crash日志如何解析crash日志如何分析crash日志 1. iOS策略相关 2. 常见错误标识 3. 代码bug 一.如何获得crash日志 ...
- 转 理解与分析ios应用的崩溃报告
理解与分析ios应用的崩溃报告 源网址: http://developer.apple.com/library/ios/#technotes/tn2151/_index.html 当一个应用程序崩溃时 ...
- [转载]Matlab生成Word报告
最近在进行一批来料的检验测试,一个个手动填写报告存图片太慢了,就有了种想要使用Matlab在分析完后数据可以自动生成PDF报告的想法,于是就去网上搜索了相关的资料,发现Matlab中文论坛上有xiez ...
- iOS项目生成通用Windows应用
WinObjc - 使用iOS项目生成通用Windows应用 Github上一周年的WinObjc项目最近发布了预览版本,终于等到了这一天.WinObjc项目就是Build 2015大会上微软宣布 ...
- ORACLE AWR概述及生成AWR报告
1.Overview of the Automatic Workload Repository The Automatic Workload Repository (AWR) collects, pr ...
- 生成awr报告
主要参考文献: http://343766868.blog.163.com/blog/static/48314056201110124513396/ 概况 Oracle内部以一定的频率把系统关键的统计 ...
- 自动生成AWR报告
--自动生成AWR报告 -------------------2013/09/23 脚本代码: #!/bin/bash AWR_FORMAT=html NUM_DAYS=1 MAX_S ...
- Oracle 每天自动生成AWR报告
经验丰富的老员工希望能够每天为数据库生成1个AWR报告,以便于后期分析数据库的性能变化,手动生成太麻烦,查了一下资料,发现可以自动生成,过程如下. 数据库环境:11gR2 RAC(双节点) AWR报告 ...
- oracle手工生成AWR报告方法记录
AWR(Automatic Workload Repository)报告是我们进行日常数据库性能评定.问题SQL发现的重要手段.熟练掌握AWR报告,是做好开发.运维DBA工作的重要基本功. AWR报告 ...
随机推荐
- Google-解决在调试页面或者js时总是提示烦恼的断点问题
按F12键,然后切换到Source标签,看底下的那个跟暂停一样的图标是不是变成蓝色或紫色了? 如果是蓝色或者紫色,则把他切换到“灰色”状态(点击图标就会切换成不同的状态.或者可能是其他颜色状态),如下 ...
- Java设计模式-备忘录模式(Memento)
主要目的是保存一个对象的某个状态,以便在适当的时候恢复对象,个人觉得叫备份模式更形象些,通俗的讲下:假设有原始类A,A中有各种属性,A可以决定需要备份的属性,备忘录类B是用来存储A的一些内部状态,类C ...
- HashMap和Hashtable及HashSet的区别
相关文章1:HashSet,TreeSet和LinkedHashSet的区别 相关文章2:HashSet和TreeSet的区别 Hashtable类 Hashtable继承Map接口,实现一个 ...
- 【CodeForces 605A】BUPT 2015 newbie practice #2 div2-E - Sorting Railway Cars
http://acm.hust.edu.cn/vjudge/contest/view.action?cid=102419#problem/E Description An infinitely lon ...
- codeforces 719A:Vitya in the Countryside
Description Every summer Vitya comes to visit his grandmother in the countryside. This summer, he go ...
- Tomcat Server Configuration Automation Reinforcement
目录 . 引言 . 黑客针对WEB Server会有那些攻击面 . 针对Tomcat Server可以做的安全加固 . Managing Security Realms with JMX . 实现对T ...
- java分页
package entity; public class Page { //记录当前页的状态信息 private int num; //当前页号,采用自然数计数 1,2,3,... private i ...
- Knockout Grid - Loading Remote Data
http://wijmo.com/grid-with-knockout-viewmodel-loading-remote-data/ We were hearing quite a few peopl ...
- Windows下绘制数学函数图像的方法
一.安装相关软件 在Windows中安装VirtualBox: 在VirtualBox中安装Ubuntu Server: 在Ubuntu Server中安装cifs-utils:sudo apt-ge ...
- Java创建目录 mkdir与mkdirs的区别
两者的参数都是路径串,但: mkdir只能创建父目录存在的目录,而mkdirs不论要创建目录的父目录是否存在都能创建成功. 例如:假设目录c:/uses/zsm/desktop/dir1不存在,,现在 ...