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. 通过IP地址和子网掩码计算主机数

    知道ip地址和子网掩码后可以算出: 1. 网络地址 2. 广播地址 3. 地址范围 4. 本网有几台主机 例1:下面例子IP地址为192·168·100·5 子网掩码是255·255·255·0.算出 ...

  2. SGU 202. The Towers of Hanoi Revisited

    多柱汉诺塔问题. 引用自wiki百科 多塔汉诺塔问题 在有3个柱子时,所需步数的公式较简单,但对于4个以上柱子的汉诺塔尚未得到通用公式,但有一递归公式(未得到证明,但目前为止没有找到反例): 令为在有 ...

  3. NodeJs中使用jQuery?

    在NodeJs中使用jQuery? 有时候在项目中需要使用jq在node中,但是使用起来却不是那么友好,那么现在该怎么做?改写JQ插件?将JQ插件打包成npm包,再在项目中进行引用?显然这些相比较于难 ...

  4. 在mac上无法使用Android Studio的解决方法

    随着android Studio 1.0的正式发布,估计使用的人会越来越多,并且官网上现在已经没有融合好的eclipse下载了,官方推荐下载android Studio.之前的beta版我也安装过,好 ...

  5. poj 3464(Trie)Approximations

    Approximations Time Limit: 2000MS   Memory Limit: 131072K Total Submissions: 419   Accepted: 23 Desc ...

  6. 【思维】Stacks of Flapjacks

    [UVa120] Stacks of Flapjacks 算法入门经典第8章8-1 (P236) 题目大意:有一个序列,可以翻转[1,k],构造一种方案使得序列升序排列. 试题分析:从插入排序即可找到 ...

  7. 【高斯消元】CDOJ1784 曜酱的线性代数课堂(二)

    高斯消元求矩阵秩板子. #include<cstdio> #include<cmath> #include<algorithm> #include<cstri ...

  8. 【哈希表】Ural Championship April 30, 2017 Problem H. Hamburgers

    题意:有n群人,每个人有喜欢的汉堡配方:有m家店,给出每家店的每个汉堡的配方,如果存在某个汉堡,其配料表包含某个人喜欢的配方,则这个人喜欢这个汉堡所在的店家.问你对每群人,输出被喜欢的人数最多的店面是 ...

  9. 【树链剖分】bzoj2243 [SDOI2011]染色

    树链剖分模板题.线段树维护每个段中的颜色数.左端点颜色.右端点颜色. pushup: col[rt]=col[rt<<1]+col[rt<<1|1]-(Rcol[rt<& ...

  10. bzoj 1689: [Usaco2005 Open] Muddy roads 泥泞的路

    1689: [Usaco2005 Open] Muddy roads 泥泞的路 Description Farmer John has a problem: the dirt road from hi ...