mirror of
https://git.huckle.dev/Huckles-Minecraft-Archive/jpexs-decompiler.git
synced 2026-09-25 10:50:47 +00:00
Correct browsing variables
Show scope, trait, flags of the variables Add watch Stub for exporting ByteArray
This commit is contained in:
@@ -19,6 +19,8 @@ package com.jpexs.decompiler.flash.gui;
|
||||
import com.jpexs.debugger.flash.Debugger;
|
||||
import com.jpexs.debugger.flash.DebuggerCommands;
|
||||
import com.jpexs.debugger.flash.Variable;
|
||||
import com.jpexs.debugger.flash.VariableType;
|
||||
import com.jpexs.debugger.flash.messages.in.InCallFunction;
|
||||
import com.jpexs.decompiler.flash.ApplicationInfo;
|
||||
import com.jpexs.decompiler.flash.EventListener;
|
||||
import com.jpexs.decompiler.flash.SWF;
|
||||
@@ -206,6 +208,29 @@ public class Main {
|
||||
return runProcess != null && !runProcessDebug;
|
||||
}
|
||||
|
||||
/**
|
||||
* FIXME!
|
||||
*
|
||||
* @param v
|
||||
*/
|
||||
public static synchronized void dumpBytes(Variable v) {
|
||||
InCallFunction icf;
|
||||
try {
|
||||
long objectId = 0l;
|
||||
if ((v.vType == VariableType.OBJECT || v.vType == VariableType.MOVIECLIP)) {
|
||||
objectId = (Long) v.value;
|
||||
}
|
||||
Object oldPos = getDebugHandler().getVariable(objectId, "position", true).parent.value;
|
||||
getDebugHandler().setVariable(objectId, "position", VariableType.NUMBER, 0);
|
||||
icf = getDebugHandler().callFunction(false, "readUTF", v, new ArrayList<>());
|
||||
System.out.println("Result=" + icf.variables.get(0).value);
|
||||
getDebugHandler().setVariable(objectId, "position", VariableType.NUMBER, oldPos);
|
||||
} catch (DebuggerHandler.ActionScriptException ex) {
|
||||
Logger.getLogger(Main.class.getName()).log(Level.SEVERE, null, ex);
|
||||
}
|
||||
|
||||
}
|
||||
|
||||
public static synchronized boolean addWatch(Variable v, long v_id, boolean watchRead, boolean watchWrite) {
|
||||
DebuggerCommands.Watch w = getDebugHandler().addWatch(v, v_id, watchRead, watchWrite);
|
||||
return w != null;
|
||||
|
||||
Reference in New Issue
Block a user