The attached patch against r5854 adds basic demangling support for D. D: http://www.digitalmars.com/d/ http://www.prowiki.org/wiki4d/wiki.cgi?FrontPage
Created attachment 15656 [details] D demangling support
Created attachment 15744 [details] D demangling support * refactored source * changed license from Eiffel Forum license version 1 to GPL with linking exception
Created attachment 16049 [details] D demangling support fixed size of string allocation
Created attachment 16052 [details] D demangling support removed debugging artefacts ^_^
This would come in very handy for me, because I am working an a D project which desperately needs some profiling. Unfortunately, as the patch is more than two years old, it does not apply cleanly anymore. There seems to be some major issue with valgrind's malloc/realloc replacements. It would be great if you could update this patch, as I have not wrapped my head around the valgrind internals yet. Thanks in advance!
Hmm... I am not sure that putting all kind of demanglers into Valgrind core is the right thing to do. IMHO this should be part of post-processing/pretty-printing the results (and if there is some functionality based on demangled names, it would be better to add a config option to Valgrind to allow to provide the mangled name). Is there a standalone demangler for D (as c++filt for C++)? Perhaps it is enough for profiling to pipe the callgrind.out/cachegrind.out files trough the demangler? On the other hand, I can imagine putting a scripting hook for pretty-printing symbol names into KCachegrind (and the CLI version of it). A demangler would be a perfect usage (aside from customizing shortening of C++ templates).
I'm closing this. The D demangler from libiberty was added to Valgrind about 10 years ago, commit 9d0a8787d5e040af014d8add2f0aaf1c3774bb8e Author: Mark Wielaard <mark@klomp.org> Date: Tue, 13 Sep 2016 19:06:23 +0000 Update libiberty demangler. Update the libiberty demangler using the auxprogs/update-demangler script. There were various extensions and bug fixes since our last import. Add new D language demangler file d-demangle.c and update the vg_libciface.h header with some new constructs used (strtol, xmalloc_failed, xmemdup, XDELETEVEC, XDUPVEC). Resolves bug #359181 - Buffer Overflow during Demangling. git-svn-id: svn://svn.valgrind.org/valgrind/trunk@15951