diff --git a/Ghidra/Features/Base/src/main/help/help/topics/ImporterPlugin/load_pdb.html b/Ghidra/Features/Base/src/main/help/help/topics/ImporterPlugin/load_pdb.html index 6510882be6..e54775e07a 100644 --- a/Ghidra/Features/Base/src/main/help/help/topics/ImporterPlugin/load_pdb.html +++ b/Ghidra/Features/Base/src/main/help/help/topics/ImporterPlugin/load_pdb.html @@ -12,48 +12,57 @@

Load PDB File

-

A program database (PDB) file holds debugging and project state information about programs - compiled using a Microsoft compiler and written in C/C++, C#, and - Visual Basic. A user generates a PDB file using the /ZI or /Zi flag - (for C/C++ programs) or the /debug flag (for Visual Basic/C# programs).

+

A program database (PDB) file holds debugging and project state information about a program + and can be created in a number of ways. Historically, it has been created using a Microsoft + compiler and written in C/C++, C#, and Visual Basic. + A user generates a PDB file using the /ZI or /Zi flag (for C/C++ programs) or the + /debug flag (for Visual Basic/C# programs).

+ +

There are two mechanisms for processing a PDB file. First, the platform-independent + PDB Universal Reader/Analyzer, which can read a raw PDB file and apply it. Its capabilities + are expected to be expanded in future releases. Second, the legacy capability that uses the + DIA SDK to read information from the PDB file. This mechanism can only run + on a Windows platform, however it creates an XML representation of information gleaned using + the DIA SDK. These XML files can be saved and then used on Windows and non-Windows platforms + hosting Ghidra.

+ +

If loading a PDB, this should be done prior to other analysis, except in special cases, + such as when only loading data types.

+ +

Restricted loading of data types or public symbols is + supported by PDB Universal.

+ +

To Load a PDB

+ +
+
    +
  1. From the menu-bar of a tool, select File Load PDB File
  2. + +
  3. In the file chooser, select the PDB file (*.PDB or *.PDB.XML)
  4. + +
  5. Click the "Select PDB" button
  6. +
+ +
+ +

When a user chooses a PDB or XML file to load for a program, Ghidra will verify its + signature to be valid for the program. At this time, the PDB MSDIA loader cannot be used to + force-load a mismatched PDB. To perform a force-load of a PDB file, the user must choose the + PDB Universal loader if given the option. Force-loading an mismatched file can have + consequences, such as loading incorrect data types and symbols located at the wrong + addresses.

+ +

+ PDB files may also be loaded using the PDB Analyzer, which is available through + Auto Analysis or as + a One Shot Analyzer. +

+
-

Ghidra uses the DIA SDK to read information from the PDB file.  - Therefore, Ghidra can only load *.PDB files while running on Windows platforms. However, while - on Windows, the user may create *.PDB.XML files that can be loaded on non-Windows platforms. - *.PDB.XML files can be created in three different ways: - -

- -
-

-

NOTE: Execution of pdb.exe has runtime dependencies which must be satisfied. - Please refer to the README_PDB document for details.

-

Information Loaded From PDB

@@ -76,24 +85,6 @@
-

To Load a PDB

- -
-
    -
  1. From the menu-bar of a tool, select File Load PDB File
  2. - -
  3. In the file chooser, select the PDB file (*.PDB for Windows and *.PDB.XML for other platforms)
  4. - -
  5. Click the "Select PDB" button
  6. -
-

- PDB files may also be loaded using the PDB Analyzer, which is available through - Auto Analysis or as - a One Shot Analyzer. -

-
-

Loading Errors

@@ -106,7 +97,45 @@

Figure 1

-

Debug Interface Access SDK

+

The DIA SDK-Based Capability

+ +

*.PDB.XML files can be created in three different ways: + +

+

+

NOTE: Execution of pdb.exe has runtime dependencies which must be satisfied. + Please refer to the README_PDB document for details.

+ +

Debug Interface Access SDK

The Microsoft Debug Interface Access Software Development Kit (DIA SDK) provides access to @@ -122,8 +151,6 @@ you will need to add and register one or more files on your computer. Refer to the README_PDB document for detailed instructions.

- -
diff --git a/Ghidra/Features/PDB/src/main/help/help/topics/Pdb/PDB.htm b/Ghidra/Features/PDB/src/main/help/help/topics/Pdb/PDB.htm index 0d174f2f7c..388ef33464 100644 --- a/Ghidra/Features/PDB/src/main/help/help/topics/Pdb/PDB.htm +++ b/Ghidra/Features/PDB/src/main/help/help/topics/Pdb/PDB.htm @@ -14,9 +14,11 @@

PDB

-

Ghidra offers the ability to download and apply PDB debug information for Microsoft programs. - The Download PDB File feature allows users to download - a PDB file that matches the user's current program, given an accessible Symbol Server. +

Ghidra offers the ability to download and apply PDB debug information for programs that run + on Microsoft Windows operating systems. + The Download PDB File feature allows users to + download and optionally load/apply a PDB file that matches the user's current program, given an + accessible Symbol Server. The Load PDB File feature allows users to apply a local PDB file to the current program. The PDB Analyzer also automatically applies PDB symbols (attempting a search for matching PDB files locally) during diff --git a/Ghidra/Features/PDB/src/main/help/help/topics/Pdb/download_pdb_file.html b/Ghidra/Features/PDB/src/main/help/help/topics/Pdb/download_pdb_file.html index b4928c7286..a161cc6e43 100644 --- a/Ghidra/Features/PDB/src/main/help/help/topics/Pdb/download_pdb_file.html +++ b/Ghidra/Features/PDB/src/main/help/help/topics/Pdb/download_pdb_file.html @@ -151,10 +151,8 @@

  • If the download was successful or an existing PDB file was found, you may be asked whether you want to apply the PDB to the program.
  • -

    You will not be asked if you want to - apply the found file if the file is of type .PDB and you are not on a Windows system. - This is because .PDB files can only be parsed when running on Windows, while .PDB.XML - files can be parsed on any Operating System.

    +

    If Yes is chosen, see + Load PDB File for continued help.