mirror of
https://github.com/espressif/esp-idf.git
synced 2024-10-05 20:47:46 -04:00
Since the introduction of PCAddressMatcher, the executable produced by the build system is passed to elftools.elf.elffile.ELFFile. However on macOS, native executables are not ELF files, so the ELFFile class raises a rather unhelpful AssertionError exception. Given that the rest of the idf_monitor.py doesn't have assumptions that the "elf_file" argument is an ELF file (rather than just an executable), check if the file is a real ELF file inside PCAddressMatcher.