March 08, 2018
> I'm pretty sure Timothee based his patch onto LLDB/LLVM trunk.

indeed, see instructions here: https://github.com/timotheecour/dtools/blob/master/dtools/lldbdplugin.d

> Seems like they prefer a shared library and not rewriting it in C++ [1].

indeed, I would not support something that requires rewriting demangle in C++ for obvious reasons (lots of useless work, gets out of sync etc).

> BTW, there's also GNU libiberty, bart of binutils, which Iain claims have better support for demangling D symbols than core.demangler.

IIRC he wrote that, so we'd need an unbiased opinion :) But more importantly, libiberty is not up to date with latest features in core.demangle (eg back references etc). Also, I'd like to know in what way it'd be better.


I had to make some small modifications to core.demangle to avoid https://github.com/timotheecour/dtools/issues/2 ; it works, but a bit ugly (see https://github.com/timotheecour/dtools/issues/2 for discussion)


On Tue, Mar 6, 2018 at 12:26 PM, Johan Engelen via Digitalmars-d <digitalmars-d@puremagic.com> wrote:
> On Tuesday, 6 March 2018 at 20:25:10 UTC, Johan Engelen wrote:
>>
>> On Tuesday, 6 March 2018 at 18:19:13 UTC, Luís Marques wrote:
>>>
>>> On my LLVM fork for RISC-V and MSP430 work it doesn't build (no
>>> llvm/Support/DJB.h) and on the latest stable, 5.0.1, cmake fails to
>>> configure (Unknown CMake command "add_llvm_install_targets").
>>
>>
>> LLDB and LLVM need to be version synchronized. Did you checkout LLVM and LLDB both from their respective same-named release branches?
>
>
> I'm pretty sure Timothee based his patch onto LLDB/LLVM trunk.
>
> -Johan

March 09, 2018
On Tuesday, 27 February 2018 at 05:28:41 UTC, Timothee Cour wrote:
> https://github.com/timotheecour/dtools/blob/master/dtools/lldbdplugin.d

dtools seems to rely on the old import visibility behavior and doesn't compile with a recent D compiler. For instance:

// functional.d:
import std.algorithm:sort,uniq,walkLength;

Error: module std.algorithm import 'walkLength' not found
March 09, 2018
updated build instructions, see https://github.com/timotheecour/dtools/commit/8597923dd4ed7691f717b5e1bdbbf2ee66961ef5

On Fri, Mar 9, 2018 at 9:33 AM, Luís Marques via Digitalmars-d <digitalmars-d@puremagic.com> wrote:
> On Tuesday, 27 February 2018 at 05:28:41 UTC, Timothee Cour wrote:
>>
>> https://github.com/timotheecour/dtools/blob/master/dtools/lldbdplugin.d
>
>
> dtools seems to rely on the old import visibility behavior and doesn't compile with a recent D compiler. For instance:
>
> // functional.d:
> import std.algorithm:sort,uniq,walkLength;
>
> Error: module std.algorithm import 'walkLength' not found

March 12, 2018
On Tuesday, 27 February 2018 at 05:28:41 UTC, Timothee Cour wrote:
> https://github.com/llvm-mirror/lldb/pull/3
> +
> https://github.com/timotheecour/dtools/blob/master/dtools/lldbdplugin.d

I put a writeln in lldbd_demangle and I see it's demangling about two pagefuls of symbols, but the backtrace still shows mangled names. The mangled names lack the initial underscore, maybe that's related?

* thread #1, queue = 'com.apple.main-thread', stop reason = breakpoint 2.1
  * frame #0: 0x0000000100000a74 test`D4test3fooFZv at test.d:8
    frame #1: 0x0000000100000a49 test`_Dmain at test.d:5
    frame #2: 0x000000010001f0d4 test`D2rt6dmain211_d_run_mainUiPPaPUAAaZiZ6runAllMFZ9__lambda1MFZv + 40
    frame #3: 0x000000010001ef64 test`D2rt6dmain211_d_run_mainUiPPaPUAAaZiZ7tryExecMFMDFZvZv + 32
    frame #4: 0x000000010001f03f test`D2rt6dmain211_d_run_mainUiPPaPUAAaZiZ6runAllMFZv + 139
    frame #5: 0x000000010001ef64 test`D2rt6dmain211_d_run_mainUiPPaPUAAaZiZ7tryExecMFMDFZvZv + 32
    frame #6: 0x000000010001eed2 test`_d_run_main + 486
    frame #7: 0x0000000100000a72 test`main + 34
    frame #8: 0x00007fff58733115 libdyld.dylib`start + 1

March 12, 2018
On Monday, 12 March 2018 at 14:19:03 UTC, Luís Marques wrote:
> On Tuesday, 27 February 2018 at 05:28:41 UTC, Timothee Cour wrote:
>> https://github.com/llvm-mirror/lldb/pull/3
>> +
>> https://github.com/timotheecour/dtools/blob/master/dtools/lldbdplugin.d

(BTW, if I commented out the plugin path setting I would get an assertion failure. Just FYI if that helps with the code review.)
March 12, 2018
>  The mangled names lack the initial underscore, maybe that's related?

quite likely, try to compile with ldc or with latest dmd (2.079, which
fixed underscores on OSX) so that demangling works. I just tried with
dmd 2.078 and it indeed doesn't demangle (as expected)








On Mon, Mar 12, 2018 at 7:21 AM, Luís Marques via Digitalmars-d <digitalmars-d@puremagic.com> wrote:
> On Monday, 12 March 2018 at 14:19:03 UTC, Luís Marques wrote:
>>
>> On Tuesday, 27 February 2018 at 05:28:41 UTC, Timothee Cour wrote:
>>>
>>> https://github.com/llvm-mirror/lldb/pull/3
>>> +
>>> https://github.com/timotheecour/dtools/blob/master/dtools/lldbdplugin.d
>
>
> (BTW, if I commented out the plugin path setting I would get an assertion failure. Just FYI if that helps with the code review.)

March 13, 2018
On Monday, 12 March 2018 at 23:03:33 UTC, Timothee Cour wrote:
> quite likely, try to compile with ldc or with latest dmd (2.079, which
> fixed underscores on OSX) so that demangling works. I just tried with
> dmd 2.078 and it indeed doesn't demangle (as expected)

Yeah, that works. I'll be trying it more thoroughly and report any issues.
March 13, 2018
On Tuesday, 13 March 2018 at 14:00:39 UTC, Luís Marques wrote:
> On Monday, 12 March 2018 at 23:03:33 UTC, Timothee Cour wrote:
> Yeah, that works. I'll be trying it more thoroughly and report any issues.

Even with DMD 2.079 the frame locals don't show up... LDC FTW!
March 14, 2018
> (BTW, if I commented out the plugin path setting I would get an assertion failure. Just FYI if that helps with the code review.)

fixed ; thanks for reporting!


On Tue, Mar 13, 2018 at 9:29 AM, Luís Marques via Digitalmars-d <digitalmars-d@puremagic.com> wrote:
> On Tuesday, 13 March 2018 at 14:00:39 UTC, Luís Marques wrote:
>>
>> On Monday, 12 March 2018 at 23:03:33 UTC, Timothee Cour wrote:
>> Yeah, that works. I'll be trying it more thoroughly and report any issues.
>
>
> Even with DMD 2.079 the frame locals don't show up... LDC FTW!

March 14, 2018
> Even with DMD 2.079 the frame locals don't show up... LDC FTW!

confirmed, `fr v` shows frame locals for a binary built with ldc but not dmd
(independent of this PR though :) )
=> just submitted https://issues.dlang.org/show_bug.cgi?id=18612

On Tue, Mar 13, 2018 at 9:29 AM, Luís Marques via Digitalmars-d <digitalmars-d@puremagic.com> wrote:
> On Tuesday, 13 March 2018 at 14:00:39 UTC, Luís Marques wrote:
>>
>> On Monday, 12 March 2018 at 23:03:33 UTC, Timothee Cour wrote:
>> Yeah, that works. I'll be trying it more thoroughly and report any issues.
>
>
> Even with DMD 2.079 the frame locals don't show up... LDC FTW!

1 2
Next ›   Last »