Bug 125728

Summary: [patch] demangling support for "D"
Product: [Developer tools] valgrind Reporter: Thomas Kühne <thomas-dloop>
Component: generalAssignee: Julian Seward <jseward>
Status: REPORTED ---    
Severity: normal CC: josef.weidendorfer
Priority: NOR    
Version: 3.2 SVN   
Target Milestone: ---   
Platform: Compiled Sources   
OS: All   
Latest Commit: Version Fixed In:
Attachments: D demangling support
D demangling support
D demangling support
D demangling support

Description Thomas Kühne 2006-04-17 13:24:12 UTC
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
Comment 1 Thomas Kühne 2006-04-17 13:25:51 UTC
Created attachment 15656 [details]
D demangling support
Comment 2 Thomas Kühne 2006-04-22 20:12:41 UTC
Created attachment 15744 [details]
D demangling support

* refactored source
* changed license from Eiffel Forum license version 1 to GPL with linking
exception
Comment 3 Thomas Kühne 2006-05-12 20:19:22 UTC
Created attachment 16049 [details]
D demangling support

fixed size of string allocation
Comment 4 Thomas Kühne 2006-05-12 21:37:07 UTC
Created attachment 16052 [details]
D demangling support

removed debugging artefacts ^_^
Comment 5 David Nadlinger 2008-12-31 07:17:03 UTC
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!
Comment 6 Josef Weidendorfer 2009-01-01 23:32:55 UTC
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).