Get next instruction offset for op located at given . NOTE: extended_arg is no longer used
(self, offset: int, extended_arg: int = 0)
| 316 | return self.insts[self.offset2inst_index[offset]] |
| 317 | |
| 318 | def get_target(self, offset: int, extended_arg: int = 0) -> int: |
| 319 | """ |
| 320 | Get next instruction offset for op located at given <offset>. |
| 321 | NOTE: extended_arg is no longer used |
| 322 | """ |
| 323 | inst = self.get_inst(offset) |
| 324 | if inst.opcode in self.opc.JREL_OPS | self.opc.JABS_OPS: |
| 325 | target = inst.argval |
| 326 | else: |
| 327 | # No jump offset, so use fall-through offset |
| 328 | target = next_offset(inst.opcode, self.opc, inst.offset) |
| 329 | return target |
| 330 | |
| 331 | def get_argument(self, pos: int): |
| 332 | arg = self.code[pos + 1] + self.code[pos + 2] * 256 |
no test coverage detected