Proguard的回扫心不是堆栈跟踪映射到实际的源 [英] Proguard retrace isnt mapping the stack trace to the actual source

查看:157
本文介绍了Proguard的回扫心不是堆栈跟踪映射到实际的源的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

我一直使用内置的ProGuard工具月食obsucate的code,工作正常。然而,当我尝试折回混淆code的堆栈跟踪,回扫不输出未混淆的堆栈跟踪。

我有双重检查的mapping.txt以确保我使用的是正确的。

这是我的堆栈跟踪

  ERROR / AndroidRuntime(19398):
致命异常:螺纹35
ERROR / AndroidRuntime(19398):显示java.lang.NullPointerException
ERROR / AndroidRuntime(19398):在android.graphics.Canvas.throwIfRecycled(Canvas.java:954)
ERROR / AndroidRuntime(19398):在android.graphics.Canvas.drawBitmap(Canvas.java:980)
ERROR / AndroidRuntime(19398):在com.excelectronic.b.aa.a(ProGuard的:535)
ERROR / AndroidRuntime(19398):在com.excelectronic.g.f.a(ProGuard的:220)
ERROR / AndroidRuntime(19398):在com.excelectronic.game.GameView.a(ProGuard的:198)
ERROR / AndroidRuntime(19398):在com.excelectronic.game.GameView.onDraw(ProGuard的:98)
ERROR / AndroidRuntime(19398):在com.excelectronic.game.ac.run(ProGuard的:121)

和使用命令

  retrace.bat -verbose的mapping.txt obfuscated_trace.txt


解决方案

在默认情况下的ProGuard的回扫工具预计堆栈跟踪被很好地格式化,它们是由java的打印出来的方式。这意味着它预计换行符在适当的地方,并没有prefixes像ERROR / AndroidRuntime(19398)。

另外,你可以修改追溯用来解析堆栈跟踪的常规前pression。

I have been using the eclipse built in proguard tool to obsucate the code, which Works fine. However when I try to retrace the stack trace of the obfuscated code, retrace doesn't output an un-obfuscated stacktrace.

I have double check the mapping.txt to sure that i am using the right one.

here is my stack trace

ERROR/AndroidRuntime(19398): 
FATAL EXCEPTION: Thread-35
ERROR/AndroidRuntime(19398): java.lang.NullPointerException
ERROR/AndroidRuntime(19398):     at android.graphics.Canvas.throwIfRecycled(Canvas.java:954)
ERROR/AndroidRuntime(19398):     at android.graphics.Canvas.drawBitmap(Canvas.java:980)
ERROR/AndroidRuntime(19398):     at com.excelectronic.b.aa.a(ProGuard:535)
ERROR/AndroidRuntime(19398):     at com.excelectronic.g.f.a(ProGuard:220)
ERROR/AndroidRuntime(19398):     at com.excelectronic.game.GameView.a(ProGuard:198)
ERROR/AndroidRuntime(19398):     at com.excelectronic.game.GameView.onDraw(ProGuard:98)
ERROR/AndroidRuntime(19398):     at com.excelectronic.game.ac.run(ProGuard:121)

and using the command

retrace.bat -verbose mapping.txt obfuscated_trace.txt

解决方案

ProGuard's ReTrace tool by default expects the stack traces to be nicely formatted, the way they are printed out by java. This means that it expects line breaks in the proper places and no prefixes like "ERROR/AndroidRuntime(19398)".

Alternatively, you can modify the regular expression that ReTrace uses for parsing the stack traces.

这篇关于Proguard的回扫心不是堆栈跟踪映射到实际的源的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

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