-
-
[旧帖]
[求助]android ndk 开发调试 .so 错误
0.00雪花
-
发表于:
2015-11-4 11:51
4397
-
[旧帖] [求助]android ndk 开发调试 .so 错误
0.00雪花
Android NDK开始调用.so库时,发生异常,异常发生在so库内,在网上找了一圈,通过NDK提供的一些调试工具,分析日志输出的JNI堆栈信息,来定位具体的代码位置。
使用NDK分析日志,有一个重要的参数,就是需要,堆栈信息中的,backtrace块的地址信息,而我现在找不到backtrace有效信息,backtrace块的上下文如下
--------- beginning of /dev/log/main
10-26 16:53:43.671 227-323/? I/ThermalEngine﹕ Sensor:batt_temp:32300 mC
10-26 16:53:44.211 9393-9537/com.zsguan.z A/libc﹕ Fatal signal 11 (SIGSEGV) at 0x00000000 (code=1), thread 9537 (Main Thread)
10-26 16:53:44.321 213-213/? I/DEBUG﹕ *** *** *** *** *** *** *** *** *** *** *** *** *** *** *** ***
10-26 16:53:44.321 213-213/? I/DEBUG﹕ Build fingerprint: 'Xiaomi/dior/dior:4.4.4/KTU84P/V6.7.1.0.KHICNCH:user/release-keys'
10-26 16:53:44.321 213-213/? I/DEBUG﹕ Revision: '0'
10-26 16:53:44.321 213-213/? I/DEBUG﹕ pid: 9393, tid: 9537, name: Main Thread >>> com.zsguan.z.mcpelauncher <<<
10-26 16:53:44.321 213-213/? I/DEBUG﹕ signal 11 (SIGSEGV), code 1 (SEGV_MAPERR), fault addr 00000000
10-26 16:53:44.481 213-213/? I/DEBUG﹕ r0 6088f0c8 r1 61c68b60 r2 61c68b64 r3 61c68b68
10-26 16:53:44.481 213-213/? I/DEBUG﹕ r4 60815e80 r5 6088f0c8 r6 00000000 r7 61c68b64
10-26 16:53:44.481 213-213/? I/DEBUG﹕ r8 61c68b60 r9 6088f0c8 sl 61c68b68 fp 000011bd
10-26 16:53:44.481 213-213/? I/DEBUG﹕ ip 61b1a954 sp 00000000 lr 00000000 pc 00000000 cpsr 60010010
10-26 16:53:44.481 213-213/? I/DEBUG﹕ d0 0000000043350000 d1 0000000000000000
10-26 16:53:44.481 213-213/? I/DEBUG﹕ d2 000003e800000000 d3 0000000000000014
10-26 16:53:44.481 213-213/? I/DEBUG﹕ d4 402674bee807bbb6 d5 410bd59800000000
10-26 16:53:44.481 213-213/? I/DEBUG﹕ d6 3c8bda943ec460ee d7 3c8bda9486b59000
10-26 16:53:44.481 213-213/? I/DEBUG﹕ d8 0000000000000000 d9 0000000000000000
10-26 16:53:44.481 213-213/? I/DEBUG﹕ d10 0000000000000000 d11 0000000000000000
10-26 16:53:44.481 213-213/? I/DEBUG﹕ d12 0000000000000000 d13 0000000000000000
10-26 16:53:44.481 213-213/? I/DEBUG﹕ d14 0000000000000000 d15 0000000000000000
10-26 16:53:44.481 213-213/? I/DEBUG﹕ d16 6d2e6e6f74747562 d17 636e61635f756e65
10-26 16:53:44.481 213-213/? I/DEBUG﹕ d18 0000000000000001 d19 0000000100000000
10-26 16:53:44.481 213-213/? I/DEBUG﹕ d20 0000000400000001 d21 00000000402fbe50
10-26 16:53:44.481 213-213/? I/DEBUG﹕ d22 0000000061c68c64 d23 402b64d1402f5de8
10-26 16:53:44.481 213-213/? I/DEBUG﹕ d24 001c001e001d001b d25 0021001f001e001c
10-26 16:53:44.481 213-213/? I/DEBUG﹕ d26 0001000000000001 d27 0001000100010001
10-26 16:53:44.481 213-213/? I/DEBUG﹕ d28 3a1282e7a7c8eec2 d29 be6777a5d0000000
10-26 16:53:44.481 213-213/? I/DEBUG﹕ d30 0021002100210021 d31 0000000000000000
10-26 16:53:44.481 213-213/? I/DEBUG﹕ scr 20000013
10-26 16:53:44.481 213-213/? I/DEBUG﹕ backtrace:
10-26 16:53:44.481 213-213/? I/DEBUG﹕ #00 pc 00000000 <unknown>
10-26 16:53:44.481 213-213/? I/DEBUG﹕ memory near r0:
10-26 16:53:44.481 213-213/? I/DEBUG﹕ 6088f0a8 00000000 00000000 00000000 00000000
10-26 16:53:44.481 213-213/? I/DEBUG﹕ 6088f0b8 00000000 00000000 00000000 000001cb
10-26 16:53:44.481 213-213/? I/DEBUG﹕ 6088f0c8 61acbaf8 61b65dc8 006e0001 61c68d40
10-26 16:53:44.481 213-213/? I/DEBUG﹕ 6088f0d8 00000000 00000000 00000000 61acbbc4
10-26 16:53:44.481 213-213/? I/DEBUG﹕ 6088f0e8 00000000 00000000 623fc9f8 625520a8
10-26 16:53:44.481 213-213/? I/DEBUG﹕ 6088f0f8 004d0000 00000000 608dffa4 00000000
10-26 16:53:44.481 213-213/? I/DEBUG﹕ 6088f108 00000000 00000000 477bc000 3f91098d
10-26 16:53:44.481 213-213/? I/DEBUG﹕ 6088f118 c8bc9cd4 40266c04 644b7ca0 608326f0
10-26 16:53:44.481 213-213/? I/DEBUG﹕ 6088f128 6088e5f8 60832f10 00000000 61acbbd8
10-26 16:53:44.481 213-213/? I/DEBUG﹕ 6088f138 63d3bae0 00000200 00000000 00000000
10-26 16:53:44.481 213-213/? I/DEBUG﹕ 6088f148 00000000 00000000 00000000 00000000
10-26 16:53:44.481 213-213/? I/DEBUG﹕ 6088f158 00000500 000002d0 63efcbf0 63fca8a0
10-26 16:53:44.481 213-213/? I/DEBUG﹕ 6088f168 63fcf008 62552d98 613bc9b0 63d1b010
10-26 16:53:44.481 213-213/? I/DEBUG﹕ 6088f178 63d3a810 00000000 6082c3e0 00000008
10-26 16:53:44.481 213-213/? I/DEBUG﹕ 6088f188 608b3730 608b3730 608b3930 6082c3ec
10-26 16:53:44.481 213-213/? I/DEBUG﹕ 6088f198 608b3740 608b3730 608b3930 6082c3ec
10-26 16:53:44.481 213-213/? I/DEBUG﹕ memory near r1:
10-26 16:53:44.481 213-213/? I/DEBUG﹕ 61c68b40 6088f0c8 61c68b60 000011bd 61942c31
10-26 16:53:44.481 213-213/? I/DEBUG﹕ 61c68b50 00000044 80000000 00000000 0000000b
10-26 16:53:44.481 213-213/? I/DEBUG﹕ 61c68b60 644e4ef4 644e4ed4 000011bd 00000000
现在我也无法通过这个错误信息定位到错误代码,怎么办呢,或者可以定位到发生错误的函数也可以。
小弟没有ndk开发经验,对于这样的错误,应该如何着手展开工作呢,还望各位大侠指点一二,多谢。
[招生]科锐逆向工程师培训(2024年11月15日实地,远程教学同时开班, 第51期)