Open childenProtos opened 1 year ago
Sorry for this answer coming pretty late. I am currently too busy to work on this project.
You might want to try replacing the decode call in line 33 of system_command.py with output: str = o.decode("utf8", errors="ignore")
. I am not sure, though, which character causes the decoding to fail.
Here's my two cents on this issue:
I replaced that call with
try:
output: str = o.decode("utf8")
except:
with open("subprocess_output.txt", "wb") as f:
f.write(o)
raise
and got a text file containing the problematic output. In my case it was a section sign (0xA7) in the line containing source code. It appears my sources are encoded not as UTF-8 but as CP1252. After replacing the codec in decode
call, elf_diff
ran smoothly.
It would be nice to add source file encoding option to elf_diff
command. And it may be different for the first and second ELF file.
I am comparing two arm gcc elf files. If I do not specify the bin_dir the report is generated successfully but I get the "Unable to read assembly from binary" warning.
If I specify the correct bin_dir + bin_prefix the warning disappears and instead I get the following output (with utf-8 decode error):
Is there any way I can debug the source of the error / find out what is causing the wrong utf-8 string?