Is it possible to debug a gcc-compiled program using lldb, or debug a clang-compiled program using gdb?
问题 (Preface: I'm pretty new to C/C++ and I don't really know how debugging in native code actually works.) Some sources say that gdb and lldb can debug any program compiled to machine code. Others say that to debug with gdb you must compile in gcc with the -g flag. The documentation for gcc itself suggests this is optional, and that in fact if you use it, it can cause problems for debuggers other than gdb. Clang also has a -g flag and the documentation basically just says "Generate debug