From: Philippe W. <phi...@so...> - 2024-12-25 15:09:28
|
https://sourceware.org/git/gitweb.cgi?p=valgrind.git;h=4e42cc21d67d9c07ee90cd08abbacf960d75c72c commit 4e42cc21d67d9c07ee90cd08abbacf960d75c72c Author: Philippe Waroquiers <phi...@sk...> Date: Wed Dec 25 16:08:04 2024 +0100 Minor changes to the documentation and commends related to demangling. Diff: --- coregrind/m_demangle/demangle.c | 4 ++-- docs/xml/manual-core.xml | 10 +++++++--- 2 files changed, 9 insertions(+), 5 deletions(-) diff --git a/coregrind/m_demangle/demangle.c b/coregrind/m_demangle/demangle.c index ca066a4b07..165012aeaf 100644 --- a/coregrind/m_demangle/demangle.c +++ b/coregrind/m_demangle/demangle.c @@ -123,8 +123,8 @@ void VG_(demangle) ( Bool do_cxx_demangling, Bool do_z_demangling, // - Rust "legacy" mangled symbols start with "_Z". // - Rust "v0" mangled symbols start with "_R". // - D programming language mangled symbols start with "_D". - // XXX: the Java/Rust/Ada demangling here probably doesn't work. See - // https://bugs.kde.org/show_bug.cgi?id=445235 for details. + // - Ada mangled symbols depend on the entity the symbol represents. + // See ada_demangle for details. if (do_cxx_demangling && VG_(clo_demangle) && orig != NULL && (VG_(lang_is_ada) || (orig[0] == '_' && (orig[1] == 'Z' || orig[1] == 'R' || orig[1] == 'D')))) { diff --git a/docs/xml/manual-core.xml b/docs/xml/manual-core.xml index da7e811768..3a2ce461cd 100644 --- a/docs/xml/manual-core.xml +++ b/docs/xml/manual-core.xml @@ -1128,10 +1128,14 @@ that can report errors, e.g. Memcheck, but not Cachegrind.</para> <option><![CDATA[--demangle=<yes|no> [default: yes] ]]></option> </term> <listitem> - <para>Enable/disable automatic demangling (decoding) of C++ names. + <para>Enable/disable automatic demangling (decoding) of C++, D, + Rust, Java, Ada names. Enabled by default. When enabled, Valgrind will attempt to - translate encoded C++ names back to something approaching the - original. The demangler handles symbols mangled by g++ versions + translate encoded names in the listed languages back to something + approaching the original. + Note that the callgrind tool always disables Ada demangling in order + to differentiate overloaded functions and procedures in the callgraph. + The demangler handles symbols mangled by g++ versions 2.X, 3.X and 4.X.</para> <para>An important fact about demangling is that function names |