https://bugs.kde.org/show_bug.cgi?id=497723

--- Comment #4 from Philippe Waroquiers <philippe.waroqui...@skynet.be> ---
(In reply to Paul Floyd from comment #3)
> I've unconditionally turned off Ada demangling with callgrind.
> Also added the bug497723 testcase to callgrind/tests with a grep for
> functions containing ada_ that should detect the mangled names.
> 
> I tried the testcase that you provided, Philippe, and it seems to work as
> before.
> 
> commit 2e029beff537aab841ea7a3b4207b8b5ff33c86f (HEAD -> master,
> origin/master, origin/HEAD)
> Author: Paul Floyd <pjfl...@wanadoo.fr>
> Date:   Sat Dec 21 20:46:40 2024 +0100
> 
>     Bug 497723 - Enabling Ada demangling breaks callgrind differentiation
> between overloaded functions and procedures

I am wondering what happens when we have a multi-language executable (e.g.
mixing Ada and C++).
When callgrind is used on such a mixed executable and the demangle is set to
"no" due when Ada is recognised,
will that not change the kcachegrind visualisation for C++, if kcachegrind used
to have demangled c++ names ?

Another question I have (not related to this bug but related to the Ada
demangling) is:
Ada demangling is enabled based on presence of __gnat_ada_main_program_name.
We can however have Ada libraries linked with a non Ada main program.
See e.g.
https://gcc.gnu.org/onlinedocs/gcc-14.2.0/gnat_ugn/Binding-with-Non-Ada-Main-Programs.html
I have never done that myself but likely this  main program name symbol will
not be present in such a case.

Likely the (only?) safe way to do Ada demangling is to check the debug info for
the symbol and get the language from the dwarf information.

-- 
You are receiving this mail because:
You are watching all bug changes.

Reply via email to