macOS: debugging hell - strange behavior in lldb and gdb
Relja Ljubobratovic via Digitalmars-d-debugger
digitalmars-d-debugger at puremagic.com
Tue Feb 14 16:46:17 PST 2017
On Tuesday, 14 February 2017 at 23:56:22 UTC, John Colvin wrote:
> On Tuesday, 14 February 2017 at 23:35:15 UTC, Relja
> Ljubobratovic wrote:
>> On Tuesday, 14 February 2017 at 20:32:53 UTC, John Colvin
>>> The docs say it is, but they could be wrong. Could you run
>>> dub with -v (and without any manually added -gc) and share
>>> the output?
>> Sure, here's what I'd think is the relevant part:
>> Performing "debug" build using ldc2 for x86_64.
>> File '/Users/relja/Projects/dlangplayground/dub.json'
>> modified, need rebuild.
>> dlangplayground ~master: building configuration
>> ldc2 -mcpu=haswell
>> -of.dub/build/application-debug-posix.osx-x86_64-ldc_2071-A59B2D18A3A7E59FF17DA8905B6773B0/dlangplayground -d-debug -g -w -oq -od=.dub/obj -d-version=Have_dlangplayground -Isource/ source/app.d -vcolumns
>> So, no -gc.
> -g is there though, which is actually what the docs say.
> gdb should suppport D (assuming it's not an ancient gdb), so -g
> should be better there. Overall, gdb is a better debugger for
> D. -g means D debug info, -gc means pretend to be C.
Well, while I was on Ubuntu, I was using gdb (through cgdb) with
everything in order, so I'd expect the same on macOS. gdb version
on the Ubuntu could only be older, I suppose, so I'd say that is
not the problem. Nevertheless, I feel like lldb with c-like
debugging will do just fine. Although its a shame there's so much
hustle around such an important development tool (hope I'm the
special case and other people have better experience).
> I maintain the D packages in homebrew, so let me know if you
> have any problems. homebrew is up to date with the latest
> stable dub release, so a quick brew update && brew upgrade dub
> should get you up to date..
Awesome, thanks for the good work!
More information about the Digitalmars-d-debugger