lib
directory of the
ProGuard distribution. To run ReTrace, just type:
java -jar retrace.jar
[options...]
mapping_file [stacktrace_file]
bin
directory contains some short Linux and
Windows scripts containing this command. These are the arguments:
-printmapping
mapping_file",
while obfuscating the application that produced the stack trace.-verbose
-regex
regular_expression(?:.*?\bat\s+%c\.%m\s*\(%s(?::%l)?\)\s*(?:~\[.*\])?)|(?:(?:.*?[:"]\s+)?%c(?::.*)?)The regular expression is a Java regular expression (cfr. the documentation of
java.util.regex.Pattern
), with a few additional wildcards:
%c |
matches a class name (e.g.
"myapplication.MyClass "). |
%C |
matches a class name with slashes (e.g.
"myapplication/MyClass "). |
%t |
matches a field type or method return type (e.g.
"myapplication.MyClass[] "). |
%f |
matches a field name (e.g.
"myField "). |
%m |
matches a method name (e.g.
"myMethod "). |
%a |
matches a list of method arguments (e.g.
"boolean,int "). |
%s |
matches a source file name (e.g.
"MyClass.java "). |
%l |
matches a line number inside a method (e.g.
"123 "). |
(?:
...)
The default expression for instance matches the following lines:
Exception in thread "main" myapplication.MyException: Some message at myapplication.MyClass.myMethod(SourceFile:123)
Preserving line number tables is explained in detail in this example in the ProGuard User Manual.
Source file names are currently restored based on the names of the outer-most
classes. If you prefer to keep the obfuscated name, you can
replace %s
in the default regular expression by .*
Unobfuscated elements and obfuscated elements for which no mapping is available will be left unchanged.