如何清除VC ++版本中的PDB字符串 [英] how to clear PDB string in a release VC++ build

查看:203
本文介绍了如何清除VC ++版本中的PDB字符串的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

我有一个从Visual Studio构建的EXE,我想清除或删除PDB文件名的路径部分.我正在寻找一种无需使用十六进制编辑器即可在PE的调试目录中进行此调整的工具.许多人建议使用BinPlace,但我无法使用它.我还没有看到可用于此目的的binplace命令行.建议使用其他Microsoft工具,并且这些工具除了命令行帮助外几乎没有任何文档.命令行帮助还表明这不是这些工具的用途(例如pdbstr).同样,提出这些建议的人没有发布任何命令行使用信息,并且由于这些工具没有记录在案,因此我回到了第一篇.在这种情况下,重新链接不是我的选择,但我知道链接器开关会更改此信息.是否有任何工具可用于从EXE清除PDB路径信息,或者您有可运行的binplace命令行?

I have an EXE built from Visual Studio and I'd like to clear or just remove the path portion of the PDB filename. I'm looking for a tool to make this adjustment in the PE's debug directory, without using a hex editor. Many have suggested BinPlace, but I can't get this to work. I have yet to see a command line for binplace that actually works for this purpose. Other Microsoft tools have been suggested and these tools have literally no documentation besides the command line help. The command line help also indicates that's not what these tools are for (e.g. pdbstr). Again, people making these suggestions post no command line usage information and since these tools aren't documented, I'm back at square one. Relinking is not an option for me in this case but I am aware of the linker switches that alter this information. Are there any tools that will work with clearing PDB path information from an EXE or do you have a binplace command line that works?

推荐答案

peupdate可以在此处下载:

peupdate can be downloaded here:

http://bytepointer.com/tools/index.htm#peupdate

此工具可用于列出,删除或更改可执行模块中的PDB字符串.以下示例清除了整个PDB字符串(路径和文件名):

This tool can be used to list, remove or change the PDB string in an executable module. The following example clears the entire PDB string (path and filename):

peupdate -c <module_path>

如果正确设置了符号路径(例如,"c:\ joeblow \ test.pdb"更改为"test.pdb"),则在调试模块时要剥离PDB路径并保留PDB文件名,以允许符号查找仍然起作用: /p>

To strip the PDB path and leave the PDB filename allowing symbol lookup to still work when debugging module if symbol paths properly set up (e.g. "c:\joeblow\test.pdb" changes to "test.pdb"):

peupdate -s <module_path>

要更改PDB路径:(任意字符串)

To change the PDB path: (any arbitrary string)

peupdate -u <new_path> <module_path>

这篇关于如何清除VC ++版本中的PDB字符串的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

查看全文
登录 关闭
扫码关注1秒登录
发送“验证码”获取 | 15天全站免登陆