Download presentation
Presentation is loading. Please wait.
1
Java 6 Decompiler Joshua Cranmer
2
Steps of Decompilation
Parse Java class file Recreate signatures Convert bytecode to Java executable code Verify bytecode Perform trivial conversion Reconstruct control structures Scope & Type Variables Simplify code
3
Last Time Class parsing: Signature recreation:
All required information recovered Java 5 attributes recovered: signature, varargs, enums Debug attributes recovered: variable names Signature recreation: Valid for any method, field, class Enums, annotations partially destroyed No inner classes
4
Now Class parsing: Signature recreation: Bytecode conversion:
Annotations fully recoverable Signature recreation: All information relating to annotations updated Bytecode conversion: Some simple types convertible Some scoping and typing of variables Minimal verification
5
Bytecode conversion Successive iterations of transforms
Many can be condensed at this point Two main runs: StackAnalyzer + assorted StackAnalyzer verifies bytecode, performs SSA analysis, asserts certain invariants Assorted transforms provides trivial decompilation Trivial: aload_0; invokesuper <init>()V; return becomes super(); return
6
Variable Scoping and Typing
MOST DIFFICULT PART Creation of SSA form: Each variable is only assigned to once Maximal variable assumption SSA unification: ongoing research Type is easy iff variables are not over-scoped
7
Future Cleanup of transformation sequences
Start converting control structures Handle variables better
Similar presentations
© 2024 SlidePlayer.com. Inc.
All rights reserved.