Hi, On Fri, 2020-05-15 at 02:28 +0000, Witold Baryluk wrote: > Package: valgrind > Version: 1:3.15.0-1 > Severity: normal > > It looks like valgrind doesn't support D programming language symbol > mangling (as emitted by DMD, GDC or LDC2 compilers); > > ==29535== valgrind: Unrecognised instruction at address 0x1b38db. > ==29535== at 0x1B38DB: _D3rcu__T3RCUTSQn1AZQl6updateMFNbPQuZv > (rcu.d:390) > ==29535== by 0x1B2F6F: _D3rcu6writerFZv (rcu.d:96) > ==29535== by 0x1B3230: _D3rcu4mainFAAyaZ9__lambda3FZv (rcu.d:600) > ==29535== by 0x1E52B7: _D4core6thread8osthread6Thread3runMFZv (in > /home/user/vps1/home/baryluk/Projekty/rcu.d/rcu) > ==29535== by 0x1FE929: thread_entryPoint (in > /home/user/vps1/home/baryluk/Projekty/rcu.d/rcu) > ==29535== by 0x487DF26: start_thread (pthread_create.c:479) > ==29535== by 0x49AD31E: clone (clone.S:95) > > That is a bit unfortunate. Most of this compilers allow to emulate > "C" > mangling in debug symbols (ldc2 -gc), but it interferes with other > things, and is not supported everywhere. > > gdb and objdump do demangle D symbols very well. I hope valgrind > could pick it up too?
Best to file this upstream. Yes, it shouldn't be too hard to support. valgrind uses the same demangler as gdb and binutils. So since this works: $ echo _D4core6thread8osthread6Thread3runMFZv | c++filt -s dlang core.thread.osthread.Thread.run() valgrind just needs to know when to switch to "dlang". See coregrind/m_demangle/demangle.c where it already checks for "rust" demangling. Cheers, Mark