macOS: debugging hell - strange behavior in lldb and gdb

Relja Ljubobratovic via Digitalmars-d-debugger digitalmars-d-debugger at
Sun Feb 12 02:27:38 PST 2017

Hey guys,

I've had zero luck with debuggers on macOS. Here's the story:

lldb - thread step-over (n) works as thread step-in (s). 
Everything else seems to be working fine. I could work with 
step-in followed by step-out (which in combination works as 

I don't have this issue with C/C++ programs.

I'm compiling with ldc (with dub --build=debug).

ldc2 --version:
LDC - the LLVM D compiler (1.1.0-beta4):
   based on DMD v2.071.2 and LLVM 3.9.0
   built with LDC - the LLVM D compiler (1.1.0-beta4)
   Default target: x86_64-apple-darwin16.4.0
   Host CPU: skylake-avx512 -

   Registered Targets:
     x86    - 32-bit X86: Pentium-Pro and above
     x86-64 - 64-bit X86: EM64T and AMD64

lldb --version:

Behavior is the same with dmd v2.072.0.

With gdb I'm having the reverse story - `s` works as `n`, i.e. I 
cannot step into a function. Again, workaround is to set a 
breakpoint inside the function, and continue the program. But 
that's maybe even more frustrating since symbol names are not 
demangled and I have to define a line in the source. Also gdb 
works fine with C/C++.

gdb --version:
GNU gdb (GDB) 7.12

Has anyone had similar problems? I've searched the web for 
similar issues, but couldn't find the solution.

More information about the Digitalmars-d-debugger mailing list