www.digitalmars.com         C & C++   DMDScript  

digitalmars.D.debugger - Most reliable debugging experience for LDC

reply Sam <fake mailinator.com> writes:
I've tried to get de-mangling, line numbers and local variables 
working on OS X and Linux using both GDB and LLDB (multiple 
versions). My target is compiled with -g. So far, none of the 
variants work across all areas, although some produce de-mangled 
names and others produce line numbers (but mangled names).

I believe none of the variants produced local variables - OS X 
might have done under one configuration but currently I need to 
debug a live process on Linux. This is the most important part 
for me, because I can piece together the other information from 
other debugger executables if really necessary.

I have recently tried LLDB 3.4.2, LLDB 3.8, GDB 7.6.1 and GDB 
7.11. LDC was compiled with LLVM/Clang 3.8. Target program has 
some non-D code - compiled using system GCC (4.8.5) - but the 
frame in question is D code.

Is there currently any debugger that can show local variables for 
LDC 1.0.0 on Linux? What is the most reliable one in general (to 
investigate further)?
Jul 27 2016
next sibling parent Sam <fake mailinator.com> writes:
I posted an issue on Github for this 
(https://github.com/ldc-developers/ldc/issues/1651#issuecomment-235930281) and
it seems that currently LDC 1.0.0 compiled with LLVM 3.8 does not produce good
debugging info.
Jul 28 2016
prev sibling parent Vadim Lopatin <coolreader.org gmail.com> writes:
On Wednesday, 27 July 2016 at 13:48:30 UTC, Sam wrote:
 I've tried to get de-mangling, line numbers and local variables 
 working on OS X and Linux using both GDB and LLDB (multiple 
 versions). My target is compiled with -g. So far, none of the 
 variants work across all areas, although some produce 
 de-mangled names and others produce line numbers (but mangled 
 names).

 I believe none of the variants produced local variables - OS X 
 might have done under one configuration but currently I need to 
 debug a live process on Linux. This is the most important part 
 for me, because I can piece together the other information from 
 other debugger executables if really necessary.

 I have recently tried LLDB 3.4.2, LLDB 3.8, GDB 7.6.1 and GDB 
 7.11. LDC was compiled with LLVM/Clang 3.8. Target program has 
 some non-D code - compiled using system GCC (4.8.5) - but the 
 frame in question is D code.

 Is there currently any debugger that can show local variables 
 for LDC 1.0.0 on Linux? What is the most reliable one in 
 general (to investigate further)?
I've tried to debug DMD generated code with lldbmi2 debugger. There was a problem with source file / line numbers when stepping, but I fixed it in lldbmi2. Cannot get variables working - looks like debug information about function context is not compatible with llvm-db
Aug 03 2016