Clang not generating debug info on -g flag

只谈情不闲聊 提交于 2019-12-11 12:43:09

问题


When using clang v8.0.0 on Windows (from llvm prebuilt binaries) with -g or -gline-tables-only source map tables are not being aren't picked up by gdb or lldb debuggers.

Upon including -g flag file grows in size (which is to be expected) yet neither gdb nor lldb pickes the source up

When compiled with gcc though (with -g flag) source files are detected by debugger.

I have tried running the same command (clang -g <codefile>) on macOS High Sierra (clang -v says it is Apple LLVM version 10.0.0 (clang-1000/10.44.4)) where there source files are being picked up by lldb. So I guessed it is localized to my widows instance or llvm for windows build.

P.S. output of clang -v on windows:

clang version 8.0.0 (tags/RELEASE_800/final)
Target: x86_64-pc-windows-msvc
Thread model: posix
InstalledDir: C:\Program Files\LLVM\bin

来源:https://stackoverflow.com/questions/56004739/clang-not-generating-debug-info-on-g-flag

易学教程内所有资源均来自网络或用户发布的内容,如有违反法律规定的内容欢迎反馈
该文章没有解决你所遇到的问题?点击提问,说说你的问题,让更多的人一起探讨吧!