use of jadx.gui.device.debugger.SmaliDebugger.RuntimeField in project jadx by skylot.
the class DebugController method updateAllFields.
private void updateAllFields(FrameNode frame) {
List<FieldNode> fldNodes = Collections.emptyList();
String clsSig = frame.getClsSig();
if (clsSig != null) {
ClassNode clsNode = DbgUtils.getClassNodeBySig(clsSig, debuggerPanel.getMainWindow());
if (clsNode != null) {
fldNodes = clsNode.getFields();
}
}
try {
long thisID = debugger.getThisID(frame.getThreadID(), frame.getFrame().getID());
List<RuntimeField> flds = debugger.getAllFieldsSync(frame.getClsID());
List<FieldTreeNode> nodes = new ArrayList<>(flds.size());
for (RuntimeField fld : flds) {
FieldTreeNode fldNode = new FieldTreeNode(fld, thisID);
fldNodes.stream().filter(f -> f.getName().equals(fldNode.getName())).findFirst().ifPresent(smaliFld -> fldNode.setAlias(smaliFld.getAlias()));
nodes.add(fldNode);
}
debuggerPanel.updateThisFieldNodes(nodes);
frame.setFieldNodes(nodes);
if (thisID > 0 && nodes.size() > 0) {
lazyQueue.execute(() -> updateAllFieldValues(thisID, frame));
}
} catch (SmaliDebuggerException e) {
logErr(e);
}
}
use of jadx.gui.device.debugger.SmaliDebugger.RuntimeField in project jadx by skylot.
the class DebugController method updateAllFieldValues.
private void updateAllFieldValues(long thisID, FrameNode frame) {
List<FieldTreeNode> nodes = frame.getFieldNodes();
if (nodes.size() > 0) {
List<FieldTreeNode> flds = new ArrayList<>(nodes.size());
List<RuntimeField> rts = new ArrayList<>(nodes.size());
nodes.forEach(n -> {
RuntimeField f = n.getRuntimeField();
if (f.isBelongToThis()) {
flds.add(n);
rts.add(f);
}
});
try {
debugger.getAllFieldValuesSync(thisID, rts);
flds.forEach(n -> decodeRuntimeValue(n));
debuggerPanel.refreshThisFieldTree();
} catch (SmaliDebuggerException e) {
logErr(e);
}
}
}
Aggregations