You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
结构
`
public class MachPortsLookupReply extends UnicornStructure {
public MachPortsLookupReply(Pointer p) {
super(p);
}
public int retCode;
public Pointer outPort;
public int ret;
public int mask;
public int reserved1;
public int reserved2;
public int cnt;
@Override
protected List<String> getFieldOrder() {
return Arrays.asList("retCode", "outPort", "ret", "mask", "reserved1", "reserved2", "cnt");
}
}
`
操作:
MachPortsLookupReply test = new MachPortsLookupReply(statbuf);
test.unpack();
dumpMemory(statbuf,test.size());
test.retCode = 1;
test.outPort = UnicornPointer.pointer(emulator, 0x1f1f1f1f1l);
test.pack();
dumpMemory(statbuf,test.size());
问题:但凡字段中存在long或者64位长度的Pointer字段,这个64位字段前面的字段会自动扩充成64位
例子:
环境:
iOS 64 Emulator
结构
`
public class MachPortsLookupReply extends UnicornStructure {
}
`
操作:
MachPortsLookupReply test = new MachPortsLookupReply(statbuf);
test.unpack();
dumpMemory(statbuf,test.size());
test.retCode = 1;
test.outPort = UnicornPointer.pointer(emulator, 0x1f1f1f1f1l);
test.pack();
dumpMemory(statbuf,test.size());
赋值前输出:
赋值后输出:
这个retCode字段本来只有32位,现在变成了64位
The text was updated successfully, but these errors were encountered: