SimonKagstrom / kcov

Code coverage tool for compiled programs, Python and Bash which uses debugging information to collect and report data without special compilation options
http://simonkagstrom.github.io/kcov/
GNU General Public License v2.0
710 stars 109 forks source link

build failure against `binutils-2.39` (`init_disassemble_info()` API change) #381

Closed trofi closed 2 years ago

trofi commented 2 years ago

binutils-2.39 slightly changed an API of init_disassemble_info() by adding extra param. Now kcov fils the build as:

kcov> /build/source/src/parsers/bfd-disassembler.cc: In constructor 'BfdDisassembler::BfdDisassembler()':
kcov> /build/source/src/parsers/bfd-disassembler.cc:78:38: error: too few arguments to function 'void init_disassemble_info(disassemble_info*, void*, fprintf_ftype, fprintf_styled_ftype)'
kcov>    78 |                 init_disassemble_info(&m_info, (void *)this, BfdDisassembler::opcodesFprintFuncStatic);
kcov>       |                 ~~~~~~~~~~~~~~~~~~~~~^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~

If it helps here is how linux.git dealt with API change: https://github.com/torvalds/linux/compare/00b32625982e0c796f0abb8effcac9c05ef55bd3...600b7b26c07a070d0153daa76b3806c1e52c9e00

SimonKagstrom commented 2 years ago

Thanks for the report!

I'll think of some way to handle both, although I guess in kcovs case if might be enough with just an #ifdef

SimonKagstrom commented 2 years ago

Fixed by @oreo639 , so closing!