| 110 | |
| 111 | |
| 112 | def get_python_version_for_core( |
| 113 | corefile: pathlib.Path, executable: pathlib.Path, mapinfo: MemoryMapInformation |
| 114 | ) -> Tuple[int, int]: |
| 115 | if mapinfo.bss is not None: |
| 116 | version_from_bss = scan_core_bss_for_python_version(corefile, mapinfo.bss) |
| 117 | if version_from_bss is not None: |
| 118 | LOGGER.info( |
| 119 | "Version found by scanning the bss section: %d.%d", *version_from_bss |
| 120 | ) |
| 121 | return version_from_bss |
| 122 | return _get_python_version_from_map_information(mapinfo) |
| 123 | |
| 124 | |
| 125 | def is_elf(filename: pathlib.Path) -> bool: |