Hell'o I use clang compiler and GTest framework. I'm trying to see what is my code coverage in each function but llvm-cov gcov does not show me function names - just, incomprehensible, mangled names. How to see demangled function names? Inb4: -m flag does not work.
Asked
Active
Viewed 584 times
1
-
1Have you tried `c++filt` ? – Khouri Giordano Jul 24 '17 at 13:04
-
can you explain me how to use it? I have not installed this package yet, since I don't know the package name - "c++filt" does not exist in arch repositories (I use Manjaro). – Jarek Kaczor Jul 24 '17 at 13:15
-
Simply pipe your output through 'c++filt' or call 'c++filt' with filename of your output. – Klaus Jul 24 '17 at 13:25
-
It does not work. Not sure what file should I pipe through c++filt. For instance, I want to see code coverage for Array file. What file is it: with .cpp, .cpp.o or .cpp.gcda? I did it for all files - "c++filt *" but still does not work – Jarek Kaczor Jul 24 '17 at 13:43
-
2Using any file: `cat file.txt |c++filt`. It will convert anything that looks like a mangled C++ symbol. Any program that prints mangled names can be piped thru: `nm file.a |c++filt` – Khouri Giordano Jul 24 '17 at 19:18
-
This answer worked for me https://stackoverflow.com/questions/40922850/how-do-you-use-cfilt-with-llvm-cov-report?rq=1 – remikz Jun 10 '21 at 19:04