From f15991babab0b7ba160e6cd7e340ec698185b73c Mon Sep 17 00:00:00 2001 From: wtfsck Date: Sun, 19 Jun 2022 19:21:32 +0200 Subject: [PATCH] Impl Java `Instruction.toString()` (masm formatter) --- .../main/java/com/github/icedland/iced/x86/Instruction.java | 5 ++++- 1 file changed, 4 insertions(+), 1 deletion(-) diff --git a/src/java/iced-x86/src/main/java/com/github/icedland/iced/x86/Instruction.java b/src/java/iced-x86/src/main/java/com/github/icedland/iced/x86/Instruction.java index aa32e7c45..f720a7623 100644 --- a/src/java/iced-x86/src/main/java/com/github/icedland/iced/x86/Instruction.java +++ b/src/java/iced-x86/src/main/java/com/github/icedland/iced/x86/Instruction.java @@ -195,7 +195,10 @@ public final class Instruction { */ @Override public String toString() { - throw new UnsupportedOperationException(); // TODO: + com.github.icedland.iced.x86.fmt.masm.MasmFormatter formatter = new com.github.icedland.iced.x86.fmt.masm.MasmFormatter(); + com.github.icedland.iced.x86.fmt.StringOutput output = new com.github.icedland.iced.x86.fmt.StringOutput(); + formatter.format(this, output); + return output.toString(); } /**