Issue #685 better local register names from debug handling

This commit is contained in:
Jindra Petřík
2014-11-03 22:47:56 +01:00
parent 29cd9556f2
commit b4aeb0f80f
2 changed files with 1 additions and 4 deletions
@@ -1242,9 +1242,6 @@ public class AVM2Code implements Cloneable {
if (ins.definition instanceof DebugIns) {
if (ins.operands[0] == 1) {
String v = abc.constants.getString(ins.operands[1]);
if (!Deobfuscation.isValidName(v)) { //ignore obfuscated names
return new HashMap<>();
}
//Same name already exists, it may be wrong names inserted by obfuscator
if (localRegNames.values().contains(v)) {
return new HashMap<>();
@@ -270,7 +270,7 @@ public class MethodInfo {
public GraphTextWriter getParamStr(GraphTextWriter writer, AVM2ConstantPool constants, MethodBody body, ABC abc, List<String> fullyQualifiedNames) {
Map<Integer, String> localRegNames = new HashMap<>();
if (body != null && Configuration.getLocalNamesFromDebugInfo.get()) {
localRegNames = body.getCode().getLocalRegNamesFromDebug(abc);
localRegNames = body.getCode().getLocalRegNamesFromDebug(abc);
}
Map<String,String> pdata;