C++ WinDbg入门,设置源文件路径
作为一个完整的 WinDbg 初学者,我只是想知道,源文件路径到底是什么?它是您源的根文件夹吗?这是你的源的所有文件夹吗? (如果源位于目录结构中)
并且根据 此处:换句话说,如果您在 C:\FOO 中使用源文件 MYCODE.CPP,那么什么是PDB 文件中嵌入的是 C:\FOO\MYCODE.CPP。 但是,如果源文件的路径是 PDB 文件中给出的绝对路径,我需要设置源做什么?那我可以把这个留空吗?
谢谢
As a complete WinDbg beginner, I am just wondering, what is exactly going into the source file path? Is it the root folder of your sources? Is it all folders of your sources? (If the sources are in a directory structure)
And also, according to here: In other words, if you use a source file MYCODE.CPP in C:\FOO, what's embedded in the PDB file is C:\FOO\MYCODE.CPP. But if the path to the source file is an absolute path given in the PDB file, what do I need to set the sources for? Could I leave this blank then?
Thanks
如果你对这篇内容有疑问,欢迎到本站社区发帖提问 参与讨论,获取更多帮助,或者扫码二维码加入 Web 技术交流群。

绑定邮箱获取回复消息
由于您还没有绑定你的真实邮箱,如果其他用户或者作者回复了您的评论,将不能在第一时间通知您!
发布评论
评论(1)
假设您的符号路径全部通过 _NT_SYMBOL_PATH 或通过 WinDBG 符号路径选项设置,您只需将根源路径指定到源文件路径中。
当有多个项目并且您正在调试实时进程或故障转储时,这是有意义的。
在这些场景中,还建议维护一个符号存储,其中存储所有档案和当前 PDB(公共或私有)。这是通过 symstore 命令实现的。符号库的路径实际上应该附加到符号文件路径中。
如果您只是调试单个项目,只需指向包含源代码的实际路径即可。
Assuming your symbol path is all set either via _NT_SYMBOL_PATH or through WinDBG Symbol Path Option, you just need to specify the Root Source Path into the source file path.
This makes sense when there are multiple projects and you are debugging either a live process or a Crash Dump.
It is also recommended in these scenarios to maintain a Symbol Store where all the archives and current PDBs (Public or Private) are stored. This is achieved through symstore command. The path to the symstore should actually be appended to the symbol file path.
In case you are just debugging a single project, just pointing to the actual path which contains the source would work for you.