【问题标题】:Get source code and debug symbol with clang (using the cli)使用 clang 获取源代码和调试符号(使用 cli)
【发布时间】:2020-11-18 21:41:15
【问题描述】:

我在 Windows 上使用 clang 10,我想用调试符号编译我的文件,并能够在调试时找到源代码。

现在我在编译时将 -g -gcodeview 传递给 clang,在链接时传递 -g。我可以在调试时看到堆栈跟踪,所以我假设符号是正确生成的。但是,我无法使用任何 Windows 调试器查看或使用我的 c++ 代码源,我尝试了 WinDbg 和 Visual Studio 调试器,但我认为我可以安全地假设这不是他们的错误。

我可以看到我正确地生成了我的 .pdb,但我可能遗漏了一些东西。

谢谢!

【问题讨论】:

    标签: c++ windows debugging clang llvm


    【解决方案1】:

    我想通了,你需要传递-gno-column-info。这是我找到解决方案的线程https://handmade.network/forums/t/3169-clang_on_windows,_debugging,_compile_times

    【讨论】:

      猜你喜欢
      • 2011-07-28
      • 1970-01-01
      • 2012-04-25
      • 2020-01-26
      • 1970-01-01
      • 2019-09-08
      • 2023-03-17
      • 1970-01-01
      • 1970-01-01
      相关资源
      最近更新 更多