Android的NDK崩溃日志太大找到错误 [英] Android NDK crash log too big to find error

查看:627
本文介绍了Android的NDK崩溃日志太大找到错误的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

我有使用JNI的共享对象(即我写我自己),这是造成segault Android应用程序。不过,我有一个粗略的时间调试它,因为每次它崩溃的时候,我的/ dev /日志主要是与像这样的消息充斥/:

I've got an android application using a shared object in the JNI (that I wrote myself) that is causing a segault. However, I'm having a rough time debugging it, because each time it crashes, my /dev/log/main is flooded with messages that look like this:

06-18 12:50:31.069  2863  2863 I DEBUG   :     453b7608  ffffffff  
06-18 12:50:31.069  2863  2863 I DEBUG   :     453b760c  ffffffff  
06-18 12:50:31.069  2863  2863 I DEBUG   :     453b7610  ffffffff  
06-18 12:50:31.069  2863  2863 I DEBUG   :     453b7614  ffffffff  
06-18 12:50:31.069  2863  2863 I DEBUG   :     453b7618  ffffffff  
06-18 12:50:31.069  2863  2863 I DEBUG   :     453b761c  ffffffff  
06-18 12:50:31.069  2863  2863 I DEBUG   :     453b7620  ffffffff  
06-18 12:50:31.069  2863  2863 I DEBUG   :     453b7624  ffffffff  
06-18 12:50:31.069  2863  2863 I DEBUG   :     453b7628  ffffffff

有没有办法用晚餐preSS的似乎是我的手机上每一个内存地址的输出,使我能找到的堆栈跟踪的相关信息?

Is there a way to suppress the output of what appears to be every memory address on my phone so that I can find the relevant information in the stack trace?

(更多的东西像这样):

(something more like this):

06-18 13:07:35.857 11350 11350 I DEBUG   : signal 11 (SIGSEGV), code 2 (SEGV_ACCERR), fault addr 452c7000
06-18 13:07:35.857 11350 11350 I DEBUG   :  r0 00000021  r1 452c66a0  r2 00000033  r3 0000003c
06-18 13:07:35.857 11350 11350 I DEBUG   :  r4 000000a1  r5 452c7000  r6 002cf880  r7 453c6b08
06-18 13:07:35.857 11350 11350 I DEBUG   :  r8 4051e618  r9 00020000  10 51eb851f  fp 81f03700
06-18 13:07:35.857 11350 11350 I DEBUG   :  ip 00000064  sp 452c6af8  lr 81f00e35  pc 81f00df8  cpsr 00000030
06-18 13:07:35.857 11350 11350 I DEBUG   :  d0  0000000000000000  d1  0000002f00000000
06-18 13:07:35.857 11350 11350 I DEBUG   :  d2  4da4480e423d3abc  d3  006f1fe04a5247c0
06-18 13:07:35.857 11350 11350 I DEBUG   :  d4  00000000003491f0  d5  0000000000000000
06-18 13:07:35.857 11350 11350 I DEBUG   :  d6  3f80000000000000  d7  43200000000000a0
06-18 13:07:35.857 11350 11350 I DEBUG   :  d8  0000000000000000  d9  0000000000000000
06-18 13:07:35.857 11350 11350 I DEBUG   :  d10 0000000000000000  d11 0000000000000000
06-18 13:07:35.857 11350 11350 I DEBUG   :  d12 0000000000000000  d13 0000000000000000
06-18 13:07:35.857 11350 11350 I DEBUG   :  d14 0000000000000000  d15 0000000000000000
06-18 13:07:35.857 11350 11350 I DEBUG   :  scr 60000012
06-18 13:07:35.857 11350 11350 I DEBUG   : 
06-18 13:07:35.887 11350 11350 I DEBUG   : tid 11348 not responding!

我大多使用Eclipse中的DDMS透视图,但一直有使用亚行外壳从主日志赶上直接转储,因为Eclipse中的窗口变得相当迅速淹没。这是不可接受的工作流程。

I mostly use the DDMS perspective in eclipse, but have been having to use adb shell to catch direct dumps from the main log because the window in eclipse becomes overwhelmed quite quickly. This is an unacceptable workflow.

推荐答案

管的logcat到开发计算机上的文件

Pipe logcat into a file on your development machine

adb logcat > logfile

或者,如果你有发球,做这种方式,所以你也能看到它由

Or if you have tee, do it this way so you also get to see it fly by

adb logcat | tee logfile

然后在你最喜欢的文本编辑器打开文件,然后搜索感兴趣的项目。

Then open the file in your favorite text editor and search for items of interest

您还可以使用各种grep的过滤器和管道进入传呼机,如少跌多,但保存到一个文件,检查在编辑器中,你可以四处走动是需要认真研究的问题更好。

You can also use various grep filters and pipe into a pager such as less or more, but storing to a file and examining in an editor where you can move around is better for problems which require serious study.

这篇关于Android的NDK崩溃日志太大找到错误的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

查看全文
登录 关闭
扫码关注1秒登录
发送“验证码”获取 | 15天全站免登陆