Under certain circumstances, gcc seems to emit multiple symbols for ctors and dtors. This seems to be in adherence with the specification of the Itanium C++ ABI. A pretty good description of the issue can be found here .
However, c++filt generates the same demangled names for these symbols. Apparently, this was not always the case. Since demangling is currently done after reading the lcov files, this results in duplicate entries in the output XML file.
According to the Cobertura DTD, each class should only have a single method entry. This can lead to issues with certain parsers. For example, the Jenkins Coverage plugin will not accept XML files with duplicate method entries for the same class.
This PR resolves the issue by applying the demangling operation when the function hit data is stored, and summing the hit counts as needed.
Thanks for digging that out! I was wondering why the new coverage Jenkins plugin has the java.lang. IllegalArgumentException: There is already the same child [METHOD] foo::~foo() error.
Under certain circumstances, gcc seems to emit multiple symbols for ctors and dtors. This seems to be in adherence with the specification of the Itanium C++ ABI. A pretty good description of the issue can be found here .
However,
c++filt
generates the same demangled names for these symbols. Apparently, this was not always the case. Since demangling is currently done after reading thelcov
files, this results in duplicate entries in the output XML file.According to the Cobertura DTD, each
class
should only have a singlemethod
entry. This can lead to issues with certain parsers. For example, the Jenkins Coverage plugin will not accept XML files with duplicate method entries for the same class.This PR resolves the issue by applying the demangling operation when the function hit data is stored, and summing the hit counts as needed.