From 4e42cc21d67d9c07ee90cd08abbacf960d75c72c Mon Sep 17 00:00:00 2001 From: Philippe Waroquiers Date: Wed, 25 Dec 2024 16:08:04 +0100 Subject: [PATCH] Minor changes to the documentation and commends related to demangling. --- 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 ca066a4b0..165012aea 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 da7e81176..3a2ce461c 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. - Enable/disable automatic demangling (decoding) of C++ names. + 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. An important fact about demangling is that function names -- 2.11.4.GIT