dbg.println(clazz.getName() + "." + stub.name + " " + stub.signature);
X86Disassembler disassembler = X86Disassembler.create();
disassembler.setMode(Platform.getNativePlatform().getCPU() == Platform.CPU.I386
? X86Disassembler.Mode.I386 : X86Disassembler.Mode.X86_64);
disassembler.setSyntax(X86Disassembler.Syntax.INTEL);
disassembler.setInputBuffer(MemoryUtil.newPointer(runtime, fn), asm.offset());
while (disassembler.disassemble()) {
dbg.printf("%8x: %s\n", disassembler.offset(), disassembler.insn());
}
if (buf.remaining() > asm.offset()) {
// libudis86 for some reason cannot understand the code asmjit emits for the trampolines