addr2line.py
underneath spawns a llvm-addr2line
process and communicates with it via standard input / output. Unfortunately llvm-addr2line
output is human readable and doesn't contain any sort of end of transmition marker. As a workaround, addr2line.py
sends an additional ,
, which produces ?? at ??:0
line and uses that line as end of transmition.
llvm-addr2line
has an --output-style=JSON
option, which emits whole output as json. Modify addr2line
to request json instead, parse it and return the same reply as before, thus dropping sending ,
.