windows 如何从 .PDB 文件创建 .MAP 文件

声明:本页面是StackOverFlow热门问题的中英对照翻译,遵循CC BY-SA 4.0协议,如果您需要使用它,必须同样遵循CC BY-SA许可,注明原文地址和作者信息,同时你必须将它归于原作者(不是我):StackOverFlow 原文地址: http://stackoverflow.com/questions/2451369/
Warning: these are provided under cc-by-sa 4.0 license. You are free to use/share it, But you must attribute it to the original authors (not me): StackOverFlow

提示:将鼠标放在中文语句上可以显示对应的英文。显示中英文
时间:2020-09-15 14:07:23  来源:igfitidea点击:

How to create a .MAP file from a .PDB file

windowsdebuggingsymbolspdb-files

提问by SamB

I would like to create a simple .MAP file listing addresses and symbol names from a PDB file. My natural inclination was to look for a tool named "pdb2map", but most of the results I get for that appear to refer to a sample program from the CD included with Debugging Applications for Microsoft .NET and Microsoft Windows, which unfortunately is not also posted on the 'net.

我想创建一个简单的 .MAP 文件,列出 PDB 文件中的地址和符号名称。我的自然倾向是寻找一个名为“pdb2map”的工具,但我得到的大部分结果似乎是指Debugging Applications for Microsoft .NET and Microsoft Windows附带的 CD 中的一个示例程序,不幸的是,它也不是发布在“网络”上。

Anyone know a good tool for this? Thanks.

有谁知道这方面的好工具吗?谢谢。

回答by Alex O

If you have both the application.exe and the application.pdb files, put them in the same directory and run:

如果您同时拥有 application.exe 和 application.pdb 文件,请将它们放在同一目录中并运行:

dumpbin /map application.exe > application.map

dumpbin comes with Visual Studio and probably with other tools as well.

dumpbin 随 Visual Studio 一起提供,也可能随其他工具一起提供。

回答by Michael Burr

pdb2map was also discussed in a BugSlayer article in MSDN magazine. Unfortunately, the code archive for the online version of the articlehas been removed.

在 MSDN 杂志的一篇 BugSlayer 文章中也讨论了 pdb2map。不幸的是,文章在线版本的代码存档已被删除。

John Robbins, the author, has a blogand may be willing to post the code if you request it.

作者 John Robbins有一个博客,如果您要求,他可能愿意发布代码。

BTW, the book is well worth getting.

顺便说一句,这本书非常值得一看。