Expand description
This crate implements handling of proguard mapping files.
The main use case is to re-map classes or complete stack frames, but it can also be used to parse a proguard mapping line-by-line.
The uuid
feature also allows getting the UUID of the proguard file.
§Examples
let mapping = r#"
android.arch.core.internal.SafeIterableMap -> a.a.a.b.c:
13:13:java.util.Map$Entry eldest():168:168 -> a
"#;
let mapper = proguard::ProguardMapper::from(mapping);
// re-mapping a classname
assert_eq!(
mapper.remap_class("a.a.a.b.c"),
Some("android.arch.core.internal.SafeIterableMap"),
);
// re-map a stack frame
assert_eq!(
mapper
.remap_frame(&proguard::StackFrame::new("a.a.a.b.c", "a", 13))
.collect::<Vec<_>>(),
vec![proguard::StackFrame::new(
"android.arch.core.internal.SafeIterableMap",
"eldest",
168
)],
);
Structs§
- Cache
Error - An error returned when handling a
ProguardCache
. - Deobfuscated
Signature - A deobfuscated method signature.
- Line
Mapping - A proguard line mapping.
- Mapping
Summary - Summary of a mapping file.
- Parse
Error - Error when parsing a proguard mapping line.
- Proguard
Cache - The serialized
ProguardCache
binary format. - Proguard
Mapper - A Proguard Remapper.
- Proguard
Mapping - A Proguard Mapping file.
- Proguard
Record Iter - An Iterator yielding
ProguardRecord
s, created byProguardMapping::iter
. - Remapped
Frame Iter - An Iterator over remapped StackFrames.
- Stack
Frame - A Java StackFrame.
- Stack
Trace - A full Java StackTrace as printed by
Throwable.printStackTrace()
. - Throwable
- A Java Throwable.
Enums§
- Cache
Error Kind - Errors returned while loading/parsing a serialized
ProguardCache
. - Parse
Error Kind - The specific parse Error.
- Proguard
Record - A Proguard Mapping Record.