(self, address, hex_output=False)
| 305 | # return bytes of instruction or data |
| 306 | # return None on failure |
| 307 | def ida_get_item(self, address, hex_output=False): |
| 308 | if self.check_address(address) != 1: |
| 309 | # not a valid address |
| 310 | return (None, 0) |
| 311 | |
| 312 | # return None if address is in the middle of instruction / data |
| 313 | if address != idc.ItemHead(address): |
| 314 | return (None, 0) |
| 315 | |
| 316 | len = idc.ItemSize(address) |
| 317 | item = idaapi.get_many_bytes(address, len) |
| 318 | |
| 319 | if item is None: |
| 320 | return (None, 0) |
| 321 | |
| 322 | if hex_output: |
| 323 | item = to_hexstr(item) |
| 324 | |
| 325 | return (item, len) |
| 326 | |
| 327 | @staticmethod |
| 328 | def get_op_dtype_name(op_idx): |
no test coverage detected