读取 .pdb 文件
我有很多 .pdb 格式的文件,其中一些已下载,但到目前为止我无法使用或读取其中的内容,因此我正在寻找如何从 MS Windows XP 读取和查看 .pdb 文件格式。
请问有人知道怎么打开吗?
I have a lot of files in .pdb format, some of them downloaded, but until now I can't use or read what's inside, so I'm looking for how to read and view the .pdb file format from MS Windows XP.
Any of you that may know how to open it?
如果你对这篇内容有疑问,欢迎到本站社区发帖提问 参与讨论,获取更多帮助,或者扫码二维码加入 Web 技术交流群。
绑定邮箱获取回复消息
由于您还没有绑定你的真实邮箱,如果其他用户或者作者回复了您的评论,将不能在第一时间通知您!
发布评论
评论(5)
如果您指的是调试器使用的“程序数据库”中的 PDB:
PDB 文件包含有关用于帮助调试的文件(例如 EXE 或 DLL)的数据。有一些公共接口允许您从文件中提取数据。请参阅此处的示例:
如果您的意思是 Palm Pilot 数据库中的 PDB,那么我对此一无所知,但文件格式可在此处获得:
If you mean PDB as in a "program database" that the debugger uses:
PDB files contain data about a file such as an EXE or DLL that is used to aid in debugging. There are public interfaces that allow you to extract data from the file. See examples here:
If you mean PDB as in a Palm Pilot Database, then I know nothing about it, but the file format is available here:
微软发布了其 PDB 格式的源代码,因此其他编译器开发人员(例如 LLVM 团队)可以更轻松地实现 PDB 格式。
https://github.com/Microsoft/microsoft-pdb/
实际转储输出一个文件,只需使用:
https://github.com/ Microsoft/microsoft-pdb/blob/master/cvdump/cvdump.exe
Microsoft released the source code of their PDB formats, so other compiler developers like the LLVM team can implement the PDB format easier.
https://github.com/Microsoft/microsoft-pdb/
To actually dump the output of a file, just use this:
https://github.com/Microsoft/microsoft-pdb/blob/master/cvdump/cvdump.exe
便携式 PDB
工具
sourcelink print-urls Foo.pdb
编程访问
经典(不可移植)PDB
llvm-pdbutil dump -all Foo .pdb
cvdump Foo。 pdb
dbh.exe -v Foo.pdb 转储
pdbstr.exe -r - p:Foo.pdb -s:StreamName
pip3 install pdbparse; pdb_dump.py Foo.pdb
Portable PDB
Tools
sourcelink print-urls Foo.pdb
Programmatic Access
Classic (non-portable) PDB
llvm-pdbutil dump -all Foo.pdb
cvdump Foo.pdb
dbh.exe -v Foo.pdb dump
pdbstr.exe -r -p:Foo.pdb -s:StreamName
pip3 install pdbparse; pdb_dump.py Foo.pdb
如今,我强烈推荐 LLVM 的 PDB 解析器,llvm-pdbutil。
它是一个优秀且功能丰富的 PDB 转储程序,非常适合补充 Microsoft 的 cvdump。
有关详细信息和文档,请参阅:
一些用于获取的有用命令开始:
llvm-pdbutil dump -all your.pdb
llvm-pdbutil bytes -syms your.pdb
llvm-pdbutil -help
获取llvm-pdbutil:
根据最新的官方版本 LLVM 7.0.0,
llvm-pdbutil.exe
未随 LLVM 二进制文件一起分发,因此必须从源代码构建。但是,如果您同意非官方的 Windows 64 位二进制文件,可以在此处使用我自制的 llvm-pdbutil 版本(注意需要 Visual C++ 2015 Redistributable)
: com/shaharv/llvm-pdbutil-builds/releases" rel="noreferrer">https://github.com/shaharv/llvm-pdbutil-builds/releases
构建 llvm-pdbutil:
要在 Windows 上从源代码构建 llvm-pdbutil,您必须获取并设置 LLVM 构建。
请按照 https://llvm.org/docs/GettingStarted.html 上的说明进行操作。
不过,PDB 支持还需要一些补充。总结一下(对于 VS 2017):
git clone https://github.com/llvm/llvm-project.git
cd llvm-project
mkdir 构建 && cd build
set VSINSTALLDIR=c:\Program Files (x86)\Microsoft Visual Studio\2017\Community\
。cmake -G "Visual Studio 15 2017" -A x64 -Thost=x64 -DLLVM_ENABLE_DIA_SDK=ON ../llvm
Tools/llvm-pdbutil
项目。Nowadays, I highly recommend LLVM's PDB parser, llvm-pdbutil.
It is an excellent and feature rich PDB dumper and great to complement Microsoft's cvdump.
For details and documentation, see:
Some useful commands for getting started:
llvm-pdbutil dump -all your.pdb
llvm-pdbutil bytes -syms your.pdb
llvm-pdbutil -help
Getting llvm-pdbutil:
As per LLVM 7.0.0, the latest official release,
llvm-pdbutil.exe
is not distributed with the LLVM binaries, so it has to be built from source.However, if you're OK with a non official, Windows 64-bit binary, my home-brewed llvm-pdbutil builds are available here (note Visual C++ 2015 Redistributable is required):
https://github.com/shaharv/llvm-pdbutil-builds/releases
Building llvm-pdbutil:
For building llvm-pdbutil from source on Windows, you'll have to get and setup LLVM build.
Follow the instructions on https://llvm.org/docs/GettingStarted.html.
There are some needed additions for PDB support, though. To summarize (for VS 2017):
git clone https://github.com/llvm/llvm-project.git
cd llvm-project
mkdir build && cd build
set VSINSTALLDIR=c:\Program Files (x86)\Microsoft Visual Studio\2017\Community\
.cmake -G "Visual Studio 15 2017" -A x64 -Thost=x64 -DLLVM_ENABLE_DIA_SDK=ON ../llvm
Tools/llvm-pdbutil
project.您可以使用 Windows SDK 中的 DBH 工具。
You can use the DBH tool from Windows SDK.