(self)
| 612 | raise ValueError("tick data offset does not match header") |
| 613 | |
| 614 | def _parse_function_table(self) -> list[str | None]: |
| 615 | section = self.section_by_type[SECTION_FUNCTION_TABLE] |
| 616 | pos = section.offset |
| 617 | end = pos + section.length |
| 618 | names: list[str | None] = [None] |
| 619 | for _ in range(int(self.header["function_count"])): |
| 620 | self._require_range(pos, U32_STRUCT.size) |
| 621 | (name_bytes,) = U32_STRUCT.unpack_from(self._mmap, pos) |
| 622 | pos += U32_STRUCT.size |
| 623 | self._require_range(pos, name_bytes) |
| 624 | names.append(bytes(self._mmap[pos : pos + name_bytes]).decode("utf-8", errors="replace")) |
| 625 | pos += name_bytes |
| 626 | if pos != end: |
| 627 | raise ValueError("function table size does not match the encoded payload") |
| 628 | return names |
| 629 | |
| 630 | def _derive_display_names(self, function_names: Sequence[str | None]) -> list[str | None]: |
| 631 | short_names = [_simplify_symbol(name) if name else None for name in function_names] |
no test coverage detected