Thread overview
Debugging with LLDB on Windows
Aug 03
kinke
Aug 04
kinke
August 03
I'm trying to use LLDB on Windows to debug a program compiled with LDC, however it seems LLDB doesn't load any debug symbols or it doesn't know how to parse the ones emitted by LDC.

Is there some way to make LDC emit debug symbols parsable by LLDB? I believe it needs DWARF debugging information to work properly, but I assume that's what LDC already emits.

On the other hand I'm also not sure if it's just the LLDB build I'm using, I've obtained it from the VSCode extension https://github.com/vadimcn/vscode-lldb and it says the version is

lldb version 10.0.1 (local revision a55a07af20ef3228dfc31bd5c0c0161c356fb1af)
  clang revision a55a07af20ef3228dfc31bd5c0c0161c356fb1af
  llvm revision a55a07af20ef3228dfc31bd5c0c0161c356fb1af
  rust-enabled

August 03
On Monday, 3 August 2020 at 11:56:30 UTC, WebFreak001 wrote:
> I believe it needs DWARF debugging information to work properly, but I assume that's what LDC already emits.

It doesn't, see https://forum.dlang.org/post/ttblgcwiwmdhyukzpocb@forum.dlang.org. - Wrt. VSCode on Windows, we've re-activated `-gc` to improve debugging with the Microsoft C/C++ plugin, see https://github.com/ldc-developers/ldc/pull/2869.
August 03
On Monday, 3 August 2020 at 17:43:21 UTC, kinke wrote:
> On Monday, 3 August 2020 at 11:56:30 UTC, WebFreak001 wrote:
>> I believe it needs DWARF debugging information to work properly, but I assume that's what LDC already emits.
>
> It doesn't, see https://forum.dlang.org/post/ttblgcwiwmdhyukzpocb@forum.dlang.org. - Wrt. VSCode on Windows, we've re-activated `-gc` to improve debugging with the Microsoft C/C++ plugin, see https://github.com/ldc-developers/ldc/pull/2869.

is it possible to then simply target the MinGW triple? Are there any disadvantages coming from it?

I would like to try making a small D script for LLDB so it can parse all the types and hopefully make a good debug experience on all platforms consistently, because LLDB implements DWARF debug symbols on all platforms.
August 04
On Monday, 3 August 2020 at 20:37:49 UTC, WebFreak001 wrote:
> is it possible to then simply target the MinGW triple?

Nope, not (fully) supported by druntime and Phobos, and the compiler would probably require a few adaptations too.

As you're the 2nd guy asking for DWARF debuginfos and MSVC targets in a month, and LLVM supports it: https://github.com/ldc-developers/ldc/pull/3533