FabricMC / Enigma

This is a fork of cuchaz's Enigma, a deobfuscation/remapping tool for Java software.
GNU Lesser General Public License v3.0
445 stars 116 forks source link

Index more class references #531

Closed YanisBft closed 1 year ago

YanisBft commented 1 year ago

Until now, Enigma only indexed class references through constructor methods. With this PR, it now indexes class references in 3 more ways:

liach commented 1 year ago

Should we consider checkcast instruction as well?

YanisBft commented 1 year ago

Should we consider checkcast instruction as well?

Good idea, now done

Juuxel commented 1 year ago

Hmm, checkcast would catch some of the "invisible" casts done for generic objects, like when getting an element from a list with a specific type

YanisBft commented 1 year ago

Hmm, checkcast would catch some of the "invisible" casts done for generic objects, like when getting an element from a list with a specific type

These casts are invisible with Procyon, but seem to appear with CFR. Should I revert?

Juuxel commented 1 year ago

I don't think it's a huge issue. The generics checkcasts are references to that type after all :smile:

LlamaLad7 commented 1 year ago

Why care about the specific opcodes rather than just considering every TypeInsnNode?