[Lldb-commits] [PATCH] D44321: Support demangling for D symbols via dlopen

2018-03-20 Thread Johan Engelen via Phabricator via lldb-commits
johanengelen added a comment. In https://reviews.llvm.org/D44321#1038241, @timotheecour wrote: > > When druntime is initialized, a number of resources are allocated (e.g. > > memory and mutex). Yes you initialize druntime once, I can see that. You > > don't deinitialize druntime at all: that's

[Lldb-commits] [PATCH] D44321: Support demangling for D symbols via dlopen

2018-03-14 Thread Johan Engelen via Phabricator via lldb-commits
johanengelen added a comment. In https://reviews.llvm.org/D44321#1038160, @timotheecour wrote: > > How do you de-initialize druntime? (without de-init, there is a big mem > > leak) > > There is no memory leak because `d_initialize` once (using c++11 static > initialization pattern) and is inten

[Lldb-commits] [PATCH] D44321: Support demangling for D symbols via dlopen

2018-03-11 Thread Johan Engelen via Phabricator via lldb-commits
johanengelen added a comment. In https://reviews.llvm.org/D44321#1034168, @johanengelen wrote: > extern "C" char* lldbd_demangle(size_t length, const char* mangled) { > if (mangled == "_D3fooFZv") // pseudo code > return "void foo()"; > else > return mangled; > } >

[Lldb-commits] [PATCH] D44321: Support demangling for D symbols via dlopen

2018-03-11 Thread Johan Engelen via Phabricator via lldb-commits
johanengelen added a comment. In https://reviews.llvm.org/D44321#1034141, @timotheecour wrote: > > It's a little more complicated for D because it's an out-of-tree compiler > > so it poses interesting challenges. > > the demangling itself is thoroughly tested in > https://github.com/dlang/drunt

[Lldb-commits] [PATCH] D44321: Support demangling for D symbols via dlopen

2018-03-11 Thread Johan Engelen via Phabricator via lldb-commits
johanengelen added inline comments. Comment at: source/Plugins/Language/D/DLanguage.cpp:108 + +auto fun0=lib2->getFun("d_initialize"); +(*fun0)(); timotheecour wrote: > johanengelen wrote: > > Would it help to initialize druntime using a static module con

[Lldb-commits] [PATCH] D44321: Support demangling for D symbols via dlopen

2018-03-09 Thread Johan Engelen via Phabricator via lldb-commits
johanengelen added inline comments. Comment at: source/Plugins/Language/D/DLanguage.cpp:1 +//===-- DLanguage.cpp +// fix header, and also need to clang-format the file Comment at: source/Plugins/Language/D/DLanguage.cpp:20 + +char* lldbd_demang