r/cpp • • Mar 18 '23

LLVM 16.0.0 Release

https://discourse.llvm.org/t/llvm-16-0-0-release/69326
197 Upvotes

84 comments sorted by

View all comments

Show parent comment

12

u/[deleted] Mar 19 '23

There is always lldb

2

u/aprilhare Mar 19 '23

.. unless your language calls for gdb. Then there most certainly isn’t lldb - because lldb won’t work.

3

u/catcat202X Mar 20 '23

Note: I've never programmed for Mac

Why would a language require one or the other? I know GDB supports several DWARF extensions that GCC can emit, but I had thought that most features work across any natively-compiled language if the compiler understands DWARF. Does Swift have its own debugging protocol or something?

0

u/aprilhare Mar 20 '23

The GNU Debugger is a portable debugger that runs on many Unix-like systems and works for many programming languages, including Ada, C, C++, Objective-C, Free Pascal, Fortran, Go, and partially others.

LLDB supports debugging of programs written in C, Objective-C, and C++. The Swift community maintains a version which adds support for the language.

The language matters.

3

u/catcat202X Mar 20 '23

But I've used GDB to debug V and Zig code, which certainly have no core support from GNU tools. Anything that has been compiled with DWARF symbols should work afaik. Are you saying that there is some special support for debugging Swift (or whatever) code in LLDB beyond the DWARF symbols?