zero9178 / C-Cpp-Coverage-for-CLion

Get coverage data in CLion using gcov or llvm-cov
MIT License
38 stars 2 forks source link

Function names not demangled - how do I fix my settings? #25

Closed claremacrae closed 3 years ago

claremacrae commented 3 years ago

Many thanks for the new version in https://github.com/zero9178/C-Cpp-Coverage-for-CLion/issues/24#issuecomment-778406672. I was able to install it the current (non-EAP) release - which is what I'm using for the demo.

I am planning to release this version, among other subtle fixes and Clang 12 integration on Monday. I have attached the current binary if you want to test it out yourself meanwhile.

C C++ Coverage-2020.3.1.zip

You mentioned the name demangler above, which prompted me to look a bit more closely at the results... And to see that I could see results broken down by function, which is great!

Also, that on my Mac, names are not demangled...

image

My settings are:

image

The demangler is present:

ls -ls /Users/clare/Documents/develop/tools/clang/clang+llvm-11.0.0-x86_64-apple-darwin/bin/llvm-cxxfilt
824 -rwxr-xr-x  1 clare  staff  421408 12 Oct 18:41 /Users/clare/Documents/develop/tools/clang/clang+llvm-11.0.0-x86_64-apple-darwin/bin/llvm-cxxfilt

and the profile is unchanged from when CLion set it up for me yesterday:

image

zero9178 commented 3 years ago

This is definitely a bug on my side, llvm-cxxfilt or c++filt are both correct options for demanglers in non MSVC environments. I will try to look into it and hope that I can maybe reproduce it in the WSL.

zero9178 commented 3 years ago

C C++ Coverage-2020.3.1.zip

Could you try out this version? Until now I did the IO between the processes myself, but now I am trying to use response files. Initially thought this might not be as cross-platform but llvm-cxxfilt, c++filt and llvm-undname actually implement it themselves.

This should be less fragile I believe and happens to be more performant as well.

claremacrae commented 3 years ago

There are some comments on the above release which I mistakenly put in the wrong ticket - in: https://github.com/zero9178/C-Cpp-Coverage-for-CLion/issues/22#issuecomment-778644243 to https://github.com/zero9178/C-Cpp-Coverage-for-CLion/issues/22#issuecomment-778650458

claremacrae commented 3 years ago

C C++ Coverage-2020.3.1.zip

Could you try out this version? Until now I did the IO between the processes myself, but now I am trying to use response files. Initially thought this might not be as cross-platform but llvm-cxxfilt, c++filt and llvm-undname actually implement it themselves.

This should be less fragile I believe and happens to be more performant as well.

It doesn't seem to have changed the demangling...

image

To double-check, I re-downloaded and re-installed the new version - from 5 hours ago, above - https://github.com/zero9178/C-Cpp-Coverage-for-CLion/issues/25#issuecomment-778612173 - and did a re-build of the code.

(From my perspective, this isn't an especially high priority for fixing, as I can tell the function names easily enough when mangled, and the highlighting on the code is so good that I generally look there.)

claremacrae commented 3 years ago

(From my perspective, this isn't an especially high priority for fixing, as I can tell the function names easily enough when mangled, and the highlighting on the code is so good that I generally look there.)

That might have sounded ungrateful - it wasn't meant to!

I am very grateful that you tried, but don't want you to be spending all your free time responding to niggles from me, when the plugin is already highly useful and highly demo-able!

zero9178 commented 3 years ago

In that case it seems I'll have to try and reproduce it somehow. I remember seeing something similar on Linux, but not in the WSL so I will try on an actual Linux client next. I hope I can reproduce it there because I don't have the knowledge nor access to use a Mac

claremacrae commented 3 years ago

In that case it seems I'll have to try and reproduce it somehow. I remember seeing something similar on Linux, but not in the WSL so I will try on an actual Linux client next. I hope I can reproduce it their because I don't have the knowledge nor access to use a Mac

Thanks...

If it would help to debug on a Mac, I'm very happy to screen-share on my machine and pair with you, remotely...

zero9178 commented 3 years ago

Sadly failed to reproduce on Linux. If you want to we can try debugging this issue together through screen sharing and similar. Starting next week I'll have plenty of time.

claremacrae commented 3 years ago

Thank you for trying, and yes, I'd love to work with you in fixing it.. I'll send you a message on #include to see if we can find a time...

claremacrae commented 3 years ago

This was caused by -n needing to be passed to the demangler on Mac - this will be fixed in an update...