| 82 | |
| 83 | @dataclass(unsafe_hash=True, init=False) |
| 84 | class Instruction(R2Data): |
| 85 | offset: int |
| 86 | size: int |
| 87 | opcode: str # raw opcode |
| 88 | disasm: str = '' # flag resolved opcode |
| 89 | bytes: bytes |
| 90 | type: str |
| 91 | |
| 92 | def __init__(self, **kwargs): |
| 93 | super().__init__(**kwargs) |
| 94 | self.bytes = bytes.fromhex(kwargs["bytes"]) |
| 95 | |
| 96 | |
| 97 | @dataclass(unsafe_hash=True, init=False) |