(line: str)
| 382 | |
| 383 | |
| 384 | def _recover_code_ranges(instr: bytes, base_va: int) -> List[dict]: |
| 385 | """Code ranges from frame prologues and call targets. |
| 386 | |
| 387 | Every range here is a guess about where a function begins, so each one is |
| 388 | `heuristic` and none of them carries a name: there is no name evidence in a |
| 389 | prologue, and `sub_1234` was never one. |
| 390 | """ |
| 391 | starts: Set[int] = set() |
| 392 | if base_va: |
| 393 | starts.add(base_va) |
| 394 | |
| 395 | instr_len = len(instr) |
| 396 | hi = base_va + instr_len |
| 397 | |
| 398 | prologues: Set[int] = set() |
| 399 | call_target_counts: Dict[int, int] = {} |
| 400 | for off in range(0, max(0, instr_len - 3), 4): |
| 401 | word = struct.unpack_from("<I", instr, off)[0] |
no test coverage detected