1.NDK编译jni时增加调试信息:

$NDK_ROOT/ndk-build -B NDK_DEBUG=1

2.发生崩溃时,logcat中收集日志:

- ::15.220: D/dalvikvm(): Added shared lib /data/data/com.sec.android.psfcore/lib/libPSFCore_Android.so 0x42461598
- ::15.220: V/JACK(): JNI_OnLoad
- ::15.225: V/JACK(): JNI_OnLoad finished
- ::15.225: A/libc(): Fatal signal (SIGSEGV) at 0x00000005 (code=), thread (android.psfcore)
- ::15.330: I/DEBUG(): *** *** *** *** *** *** *** *** *** *** *** *** *** *** *** ***
- ::15.330: I/DEBUG(): Build fingerprint: 'samsung/m0ctc/m0ctc:4.1.1/JRO03C/I939KEDLK4:eng/test-keys'
- ::15.330: I/DEBUG(): pid: , tid: , name: android.psfcore >>> com.sec.android.psfcore <<<
- ::15.330: I/DEBUG(): signal (SIGSEGV), code (SEGV_MAPERR), fault addr
- ::15.485: I/DEBUG(): r0 r1 r2 r3
- ::15.485: I/DEBUG(): r4 r5 5d427fcd r6 bee603c0 r7 40f814d0
- ::15.485: I/DEBUG(): r8 bee615c0 r9 57b55d7c sl 40fa6b88 fp bee615d4
- ::15.485: I/DEBUG(): ip 5d6aabd0 sp bee60370 lr 5d427303 pc 5d426a72 cpsr
- ::15.485: I/DEBUG(): d0 d1 3ff0000043a00000
- ::15.485: I/DEBUG(): d2 d3
- ::15.485: I/DEBUG(): d4 d5
- ::15.485: I/DEBUG(): d6 00d00ff000000000 d7
- ::15.490: I/DEBUG(): d8 d9
- ::15.490: I/DEBUG(): d10 d11
- ::15.490: I/DEBUG(): d12 d13
- ::15.490: I/DEBUG(): d14 d15
- ::15.490: I/DEBUG(): d16 6e6f69746369645f d17
- ::15.490: I/DEBUG(): d18 d19
- ::15.490: I/DEBUG(): d20 d21 3fbc71c71c71c71c
- ::15.490: I/DEBUG(): d22 3fcc7288e957b53b d23 3fd24998d6307188
- ::15.490: I/DEBUG(): d24 3fd99a27ad32ddf5 d25 3fe555b0aaeac752
- ::15.490: I/DEBUG(): d26 d27
- ::15.490: I/DEBUG(): d28 d29
- ::15.490: I/DEBUG(): d30 d31
- ::15.490: I/DEBUG(): scr
- ::15.490: I/DEBUG(): backtrace:
- ::15.490: I/DEBUG(): # pc 001f4a72 /data/data/com.sec.android.psfcore/lib/libPSFCore_Android.so (__gnu_cxx::__normal_iterator<delegate::Delegate<void (std::string const&), CSimpleMutex>::ICallBack**, std::vector<delegate::Delegate<void (std::string const&), CSimpleMutex>::ICallBack*, std::allocator<delegate::Delegate<void (std::string const&), CSimpleMutex>::ICallBack*> > > delegate::Delegate<void (std::string const&), CSimpleMutex>::find<std::pair<Publ+)
- ::15.490: I/DEBUG(): # pc 001f52ff /data/data/com.sec.android.psfcore/lib/libPSFCore_Android.so (void delegate::Delegate<void (std::string const&), CSimpleMutex>::add<std::pair<PublishToAllJony*, void (PublishToAllJony::*)(std::string const&)> >(std::pair<PublishToAllJony*, void (PublishToAllJony::*)(std::string const&)> const&)+)
- ::15.490: I/DEBUG(): stack:
- ::15.490: I/DEBUG(): bee60330 5d6abf88 /data/data/com.sec.android.psfcore/lib/libPSFCore_Android.so
- ::15.490: I/DEBUG(): bee60334 d26bc41c
- ::15.490: I/DEBUG(): bee60338 40f82e0c
- ::15.490: I/DEBUG(): bee6033c 5d6abf88 /data/data/com.sec.android.psfcore/lib/libPSFCore_Android.so
- ::15.490: I/DEBUG(): bee60340 c0000000
- ::15.490: I/DEBUG(): bee60344
- ::15.490: I/DEBUG(): bee60348
- ::15.490: I/DEBUG(): bee6034c
- ::15.490: I/DEBUG(): bee60350 4161dfc8
- ::15.490: I/DEBUG(): bee60354 400374ab /system/lib/libc.so (dlmalloc+)
- ::15.490: I/DEBUG(): bee60358 5d664db0 /data/data/com.sec.android.psfcore/lib/libPSFCore_Android.so
- ::15.490: I/DEBUG(): bee6035c 5d65d038 /data/data/com.sec.android.psfcore/lib/libPSFCore_Android.so
- ::15.490: I/DEBUG(): bee60360 c0000000
- ::15.490: I/DEBUG(): bee60364
- ::15.490: I/DEBUG(): bee60368 df0027ad
- ::15.490: I/DEBUG(): bee6036c
- ::15.490: I/DEBUG(): # bee60370 40f82314
- ::15.490: I/DEBUG(): bee60374 bee603c0 [stack]
- ::15.490: I/DEBUG(): bee60378
- ::15.490: I/DEBUG(): bee6037c
- ::15.490: I/DEBUG(): bee60380 40f82314
- ::15.490: I/DEBUG(): bee60384 bee603c0 [stack]
- ::15.490: I/DEBUG(): bee60388
- ::15.490: I/DEBUG(): bee6038c 5d427303 /data/data/com.sec.android.psfcore/lib/libPSFCore_Android.so (void delegate::Delegate<void (std::string const&), CSimpleMutex>::add<std::pair<PublishToAllJony*, void (PublishToAllJony::*)(std::string const&)> >(std::pair<PublishToAllJony*, void (PublishToAllJony::*)(std::string const&)> const&)+)
- ::15.495: I/DEBUG(): # bee60390 40f82318
- ::15.495: I/DEBUG(): bee60394 bee603c0 [stack]
- ::15.495: I/DEBUG(): bee60398 40f814d0
- ::15.495: I/DEBUG(): bee6039c 5d6aab88 /data/data/com.sec.android.psfcore/lib/libPSFCore_Android.so
- ::15.495: I/DEBUG(): bee603a0 40f82300
- ::15.495: I/DEBUG(): bee603a4 5d427b9f /data/data/com.sec.android.psfcore/lib/libPSFCore_Android.so (PublishToAllJony::PublishToAllJony(AllJoyn*, LocalReactor*)+)
- ::15.495: I/DEBUG(): bee603a8
- ::15.495: I/DEBUG(): bee603ac 40f82dc8
- ::15.495: I/DEBUG(): bee603b0 40f81450
- ::15.495: I/DEBUG(): bee603b4 400374ab /system/lib/libc.so (dlmalloc+)
- ::15.495: I/DEBUG(): bee603b8 40f81558
- ::15.495: I/DEBUG(): bee603bc bee603ec [stack]
- ::15.495: I/DEBUG(): bee603c0 40f814d0
- ::15.495: I/DEBUG(): bee603c4 5d427fcd /data/data/com.sec.android.psfcore/lib/libPSFCore_Android.so (PublishToAllJony::on_command(std::string const&))
- ::15.495: I/DEBUG(): bee603c8
- ::15.495: I/DEBUG(): bee603cc 0000004c
- ::15.495: I/DEBUG(): memory near r5:
- ::15.495: I/DEBUG(): 5d427fac 1c20b005 46c0bdf0 00282ca8 fffff4dc .. ....F.,(.....
- ::15.495: I/DEBUG(): 5d427fbc fffff584 0023605c 0023603f 0023601a ....\`#.?`#..`#.
- ::15.495: I/DEBUG(): 5d427fcc 4d86b5f0 4a874c86 682d447d 446a44a5 ...M.L.J}D-h.DjD
- ::15.495: I/DEBUG(): 5d427fdc 1c0c682b 44794a84 447a1c06 +h...I.`.JyD..zD
- ::15.495: I/DEBUG(): 5d427fec f7f02002 1c20ee98 f0862100 7803edd2 . .... ..!.....x
- ::15.495: I/DEBUG(): memory near r6:
- ::15.495: I/DEBUG(): bee603a0 40f82300 5d427b9f 40f82dc8 .#.@.{B].....-.@
- ::15.495: I/DEBUG(): bee603b0 40f81450 400374ab 40f81558 bee603ec P..@.t.@X..@....
- ::15.495: I/DEBUG(): bee603c0 40f814d0 5d427fcd 0000004c ...@..B]....L...
- ::15.495: I/DEBUG(): bee603d0 40f822e0 bee6048c bee615c0 .".@............
- ::15.495: I/DEBUG(): bee603e0 57b55d7c 40fa6b88 bee615d4 40038f81 |].W.k.@.......@
- ::15.495: I/DEBUG(): memory near r7:
- ::15.495: I/DEBUG(): 40f814b0 7664722f 2f31762f ..../rdv/v1/peer
- ::15.495: I/DEBUG(): 40f814c0 0073252f 3e656d61 3c207a20 /%s.ame> z <S...
- ::15.495: I/DEBUG(): 40f814d0 5d6a4c40 5d6ad24c @Lj]L.j].....@..
- ::15.495: I/DEBUG(): 40f814e0 .........@......
- ::15.495: I/DEBUG(): 40f814f0 .....@..........
- ::15.495: I/DEBUG(): memory near r8:
- ::15.495: I/DEBUG(): bee615a0 412b0070 40f817cc aab0001d 57fe1b90 p.+A...@.......W
- ::15.495: I/DEBUG(): bee615b0 40fa6b78 57b55d84 40833ef4 xk.@.....].W.>.@
- ::15.495: I/DEBUG(): bee615c0 57b55d78 4247a4e0 4174a77b x].W......GB{.tA
- ::15.495: I/DEBUG(): bee615d0 4245d6c4 57b55d78 4174a779 ..EBG1.@x].Wy.tA
- ::15.495: I/DEBUG(): bee615e0 5d41e755 40fa6b88 U.A].k.@........
- ::15.495: I/DEBUG(): memory near r9:
- ::15.495: I/DEBUG(): 57b55d5c 424790a8 57b55d94 4172ef6a ..GB.....].Wj.rA
- ::15.495: I/DEBUG(): 57b55d6c 57fe1b90 5c400019 ...W..........@\
- ::15.500: I/DEBUG(): 57b55d7c aab0001d 57b55db4 5954ebc2 57fe07a8 .....].W..TY...W
- ::15.500: I/DEBUG(): 57b55d8c 4172ef6a 4247a4e0 j.rA......GBh.GB
- ::15.500: I/DEBUG(): 57b55d9c 42465b50 57b55e00 5954d80c 57d773f8 P[FB.^.W..TY.s.W
- ::15.500: I/DEBUG(): memory near sl:
- ::15.500: I/DEBUG(): 40fa6b68 40d588d0 ...@........S...
- ::15.500: I/DEBUG(): 40fa6b78 595508d8 57b55d78 57fe07a8 4177c000 ..UYx].W...W..wA
- ::15.500: I/DEBUG(): 40fa6b88 4247a4e0 d26bc41c bee61730 ..GB..k........
- ::15.500: I/DEBUG(): 40fa6b98 bee61764 d............@.@
- ::15.500: I/DEBUG(): 40fa6ba8 56fd8e70 57b50300 ........p..V...W
- ::15.500: I/DEBUG(): memory near fp:
- ::15.500: I/DEBUG(): bee615b4 57b55d84 40833ef4 57b55d78 .....].W.>.@x].W
- ::15.500: I/DEBUG(): bee615c4 4247a4e0 4174a77b 4245d6c4 ......GB{.tA..EB
- ::15.500: I/DEBUG(): bee615d4 57b55d78 4174a779 5d41e755 G1.@x].Wy.tAU.A]
- ::15.500: I/DEBUG(): bee615e4 40fa6b88 0000005f .k.@........_...
- ::15.500: I/DEBUG(): bee615f4 40072a6c 40f8160d 40f81728 l*.@.w.@...@(..@
- ::15.500: I/DEBUG(): memory near ip:
- ::15.500: I/DEBUG(): 5d6aabb0 4002fd40 400347a8 400346c0 40033fa4 @..@.G.@.F.@.?.@
- ::15.500: I/DEBUG(): 5d6aabc0 40033ff8 400340ac 40033fb8 400e1649 .?.@.@.@.?.@I..@
- ::15.500: I/DEBUG(): 5d6aabd0 400342c0 400304c8 40034e0c 40034b18 .B.@...@.N.@.K.@
- ::15.500: I/DEBUG(): 5d6aabe0 400343b8 4003925c 40034ac0 400344ac .C.@\..@.J.@.D.@
- ::15.500: I/DEBUG(): 5d6aabf0 4004c895 4003e609 4003c2d5 ...@...@...@...@
- ::15.500: I/DEBUG(): memory near sp:
- ::15.500: I/DEBUG(): bee60350 4161dfc8 400374ab 5d664db0 5d65d038 ..aA.t.@.Mf].e]
- ::15.500: I/DEBUG(): bee60360 c0000000 df0027ad .........'......
- ::15.500: I/DEBUG(): bee60370 40f82314 bee603c0 .#.@............
- ::15.500: I/DEBUG(): bee60380 40f82314 bee603c0 5d427303 .#.@.........sB]
- ::15.500: I/DEBUG(): bee60390 40f82318 bee603c0 40f814d0 5d6aab88 .#.@.......@..j]
- ::15.500: I/DEBUG(): code around pc:
- ::15.500: I/DEBUG(): 5d426a50 edcaf088 bd761c30 f088a801 f09cedc6 .....v.........
- ::15.500: I/DEBUG(): 5d426a60 b5f7efb4 6803688c 684d680f 21011c20 .....h.h.hMh ..!
- ::15.500: I/DEBUG(): 5d426a70 685e4008 681b9001 cb04e012 d00f2a00 .@^h...h.....*..
- ::15.500: I/DEBUG(): 5d426a80 42b86850 6890d10c d10942a8 42a268d2 Ph.B...h.B...h.B
- ::15.505: I/DEBUG(): 5d426a90 2d00d009 9801d104 d1012800 d002420a ...-.....(...B..
- ::15.505: I/DEBUG(): code around lr:
- ::15.505: I/DEBUG(): 5d4272e0 d1062c00 f09d200c 6004eed4 .,... .....`D`.`
- ::15.505: I/DEBUG(): 5d4272f0 1d286028 f7f19000 1c28ed1a f7ff1c31 (`(.......(....
- ::15.505: I/DEBUG(): 5d427300 682bfbb0 4283685b 2010d122 eec0f09d ..+h[h.B".. ....
- ::15.505: I/DEBUG(): 5d427310 447b4b14 1c1a681b 1c033208 1c32c304 .K{D.h........
- ::15.505: I/DEBUG(): 5d427320 3304ca02 c3026871 601a6852 .....A`qh..Rh.`
- ::15.580: I/DEBUG(): !@dumpstate -k -t -z -d -o /data/log/dumpstate_app_native -m
- ::15.580: I/BootReceiver(): Copying /data/tombstones/tombstone_02 to DropBox (SYSTEM_TOMBSTONE)
- ::15.590: I/dumpstate(): begin

3.

/home/raozhengfeng/work/Library/android-ndk-r8e/toolchains/arm-linux-androideabi-4.6/prebuilt/linux-x86_64/bin/arm-linux-androideabi-addr2line -f -e libs/armeabi/libPSFCore_Android.so 001f52ff

Android跟踪NDK崩溃信息的更多相关文章

  1. Android将程序崩溃信息保存本地文件

    大家都知道,现在安装Android系统的手机版本和设备千差万别,在模拟器上运行良好的程序安装到某款手机上说不定就出现崩溃的现象,开发者个人不可能购买所有设备逐个调试,所以在程序发布出去之后,如果出现了 ...

  2. 【转】Android 收集已发布程序的崩溃信息

    我们写程序的时候都希望能写出一个没有任何Bug的程序,期望在任何情况下都不会发生程序崩溃.不过理想是丰满的,现实是骨感的.没有一个程序员能保证自己写的程序绝对不会出现异常崩溃.特别是针对用户数达到几十 ...

  3. Android 收集已发布程序的崩溃信息

    我们写程序的时候都希望能写出一个没有任何Bug的程序,期望在任何情况下都不会发生程序崩溃.不过理想是丰满的,现实是骨感的.没有一个程序员能保证自己写的程序绝对不会出现异常崩溃.特别是针对用户数达到几十 ...

  4. Android将应用程序的崩溃信息如何保存到本地文件,并上传服务器

    导语:最近实在是太忙了,没有怎么更新公众号,也没有怎么认真去写一些内容,在这里先给关注我的朋友说一声抱歉,可能在接下来的一段时间,还是很忙,但是我会争取抽空多分享一下技术文章,给大家看,共同进步,也希 ...

  5. Android热修复之 - 收集崩溃信息上传服务器

    1.概述 大致的流程就是在用户崩溃的时候,我们获取崩溃信息.应用当前的信息和手机信息,然后把它保存到手机内存卡,再找我就直接找出来看看.后来衍生到上线后某些奇葩机型会有部分问题,所以不得不上传到服务器 ...

  6. Android Studio NDK初探

    Android Studio中实现NDK开发较之前Eclipse+Cygwin,方便了很多. 本文以最简单的从C程序中获取字符串,并显示到MainActivity的TextView上为例进行NDK开发 ...

  7. Android之NDK开发(转)

    Android之NDK开发 一.NDK产生的背景 Android平台从诞生起,就已经支持C.C++开发.众所周知,Android的SDK基于Java实现,这意味着基于Android SDK进行开发的第 ...

  8. Android中NDK的搭建及简单使用 Android.mk相关介绍 JNI的使用

    Android中NDK的搭建及简单使用: 使用NDK,简述其重要步骤:.搭建NDK环境(作用:用于自动生成jni下的.c对应的so文件)---到Android NDK官网或Android官网下载ndk ...

  9. Android之NDK开发

    转自:http://www.cnblogs.com/devinzhang/archive/2012/02/29/2373729.html 一.NDK产生的背景 Android平台从诞生起,就已经支持C ...

随机推荐

  1. 日志rsyslog

    (1)日志基础 1)简介 rsyslog:记录大部分与系统操作有关,例如安全,认证sshd,su,计划任务at,cron rsyslog日志可以存在本地,也可以存放在远程服务器 2)常见的日志文件 / ...

  2. 在SpringMVC中 /* 和 / 的区别

    <url-pattern> / </url-pattern>:会匹配到 /springmvc 这样的路径型url,而不会匹配到像 .jsp 这样的后缀型的url. <ur ...

  3. ubuntu要安装新软件,已有deb安装包

    如果ubuntu要安装新软件,已有deb安装包(例如:iptux.deb),但是无法登录到桌面环境.那该怎么安装?答案是:使用dpkg命令.dpkg命令常用格式如下:sudo dpkg -I iptu ...

  4. cocos2dx三种定时器的使用以及停止schedule,scheduleUpdate,scheduleOnce。

    今天白白跟大家分享一下cocos2dx中定时器的使用方法. 首先,什么是定时器呢?或许你有时候会想让某个函数不断的去执行,或许只是执行一次,获取你想让他每隔几秒执行一次,ok,这些都可以统统交给定时器 ...

  5. (8)go 字符串

    内建函数在 包中 1. len(str) 计算长度,中文占3个字符 2.字符串遍历,同时处理中文 package main import ( "fmt" ) func main() ...

  6. CNN-感受野

    CNN中感受野的计算:http://blog.csdn.net/kuaitoukid/article/details/46829355(好像有错误)http://blog.csdn.net/green ...

  7. Pythonic和语法糖

    Pythonic就是以Python的方式写出简洁优美的代码. 用Python独有的语法写Python语言. 知乎:https://www.zhihu.com/question/20244565 某博客 ...

  8. POJ 3659 Cell Phone Network(树的最小支配集)(贪心)

    Cell Phone Network Time Limit: 1000MS   Memory Limit: 65536K Total Submissions: 6781   Accepted: 242 ...

  9. 设计模式-外观模式(Facade Pattern)

    本文由@呆代待殆原创,转载请注明出处:http://www.cnblogs.com/coffeeSS/ 外观模式简介 外观模式的作用用一句话说就是简化接口,举个例子楼主每次编程的时候都要点开IDE.点 ...

  10. [BZOJ2109][NOI2010]航空管制(贪心+拓扑)

    2109: [Noi2010]Plane 航空管制 Time Limit: 10 Sec  Memory Limit: 512 MBSubmit: 1227  Solved: 510[Submit][ ...