Ghidra:无法找到 PDB 并且无法找到类型信息结构

Ghidra : unable to find PDB and Couldn't find type info structure

我大约一周前下载了 Ghidra(我是逆向工程的新手),我做了 Ghidra 官方网站上的教程视频,我做了一个简单的 C++ 程序 Visual Studio,程序有将 "Hello World!" 打印到屏幕 (std::cout << "Hello World!";) 的无穷大 while(while(1))。 我使用 Ghidra 像教程中的人那样反汇编了那个程序,但是我遇到了错误。

错误:

PDB> ERROR: Unable to locate the DIA SDK. It is required to load PDB files.
* See docs/README_PDB.html for DLL registration instructions.


PDB> ERROR: Unable to locate the DIA SDK. It is required to load PDB files.
* See docs/README_PDB.html for DLL registration instructions.


Windows x86 PE RTTI Analyzer> Couldn't find type info structure.

我看到了 "README_PDB.html",我按照上面说的去做了,但是仍然有错误,所有错误都在那里。

一段时间后,我发现我的 .exe 存储的文件夹也有一个 [我的 exe 的名称].pdb 文件,当你选择分析器时,有一个分析器 "PDB" 和如果你点击它会让你插入一个路径,试图插入到那个.pdb的父文件夹的路径,但仍然没有任何改变。

所以 : 我怎样才能使这个工作,请任何人,我很绝望

根据错误,您似乎是 Windows 上的 运行 ghidra,并且在 README_PDB and load_pdb 站点提到了错误。也许问题出在 Visual Studio 而不是 ghidra。

从那里引用:

In order for the native PDB parser to work on your Microsoft Windows machine, you must:

  1. Ensure you have msdia140.dll on your computer, and
  2. Register msdia140.dll in the Windows registry.

和:

  • The following instructions assume you have a 64-bit operating system. If you have rebuilt pdb.exe with a newer version of the DIA SDK you will need to register the corresponding version of the 64-bit DLL. The DIA SDK 14.0 corresponds to Visual Studio 2017.

  • The PDB format is known to change over time and may be incompatible with the current pdb.exe parser contained within Ghidra. A Microsoft Visual Studio project is provided within the Ghidra/Features/PDB/src/pdb directory which will allow you to rebuild it with a newer version of Visual Studio and DIA SDK.
  • Microsoft Visual Studio 2019 msdia140.dll 不适用于 Ghidra 9.1.2 pdb.exe。为了构建与 Visual Studio 2019 msdia140.dll 一起使用的新 Ghidra pdb.exe,您应该使用 inverzeio 回复的最后一个项目符号中提到的 Visual Studio 项目。 $(GHIDRA)\Ghidra\Features\PDB\src\pdb\README.txt 解释了如何做到这一点。

    msdia140.dll 也必须注册,如 $(GHIDRA)\docs\README_PDB.html.

    中所述