summaryrefslogtreecommitdiff
path: root/docs
diff options
context:
space:
mode:
authorGlenn Smith <glenn@vector35.com>2023-01-11 18:07:18 -0500
committerGlenn Smith <glenn@vector35.com>2023-01-11 18:07:18 -0500
commitcc92bf6d28cbd347f6152bb00ef9773f36248149 (patch)
tree812bb4c8fb38f9464ad1872cc585d692aacc482e /docs
parent60bf10e1239c790b073e8b3f7664c9b96532ed64 (diff)
Updated PDB plugin documentation
Diffstat (limited to 'docs')
-rw-r--r--docs/guide/index.md23
1 files changed, 18 insertions, 5 deletions
diff --git a/docs/guide/index.md b/docs/guide/index.md
index 7f55d780..593bbef6 100644
--- a/docs/guide/index.md
+++ b/docs/guide/index.md
@@ -614,12 +614,25 @@ For more detailed information on plugins, see the [plugin guide](plugins.md).
## PDB Plugin
-Binary Ninja supports loading PDB files through a built in PDB loader. When selected from the plugin menu it attempts to find the corresponding PDB file using the following search order:
+Binary Ninja supports loading PDB files through a built in PDB loader. It will automatically search for a corresponding PDB file whenever you load a Windows executable or library that was compiled with a PDB. The PDB loader will search a variety of places for PDBs, in the following order, if the files exist and match the guid in the analyzed file:
-1. Look in the same directory as the opened file/bndb (e.g. If you have `c:\foo.exe` or `c:\foo.bndb` open the PDB plugin looks for `c:\foo.pdb`)
-2. Look in the local symbol store. This is the directory specified by the settings: `local-store-relative` or `local-store-absolute`. The format of this directory is `foo.pdb\<guid>\foo.pdb`.
-3. Attempt to connect and download the PDB from the list of symbol servers specified in setting `symbol-server-list`.
-4. Prompt the user for the PDB.
+1. Symbol servers defined in the `_NT_SYMBOL_PATH` environment variable, as defined by [Microsoft's documentation](https://learn.microsoft.com/en-us/windows/win32/debug/using-symsrv).
+2. Look for the file at the path specified in the loaded binary. E.g. when `c:\Users\foo\foo.exe` was compiled, it stores `c:\Users\foo\foo.pdb` as metadata inside `foo.exe`, so `C:\Users\foo\foo.pdb` will be loaded if it exists (and matches the guid).
+3. Look in the same directory as the opened file/bndb (e.g. If you have `c:\foo.exe` or `c:\foo.bndb` open the PDB plugin looks for `c:\foo.pdb`)
+4. Look in the local symbol store. This is the directory specified by `pdb.localStoreAbsolute` in the settings, if it exists. Otherwise, this is a folder relative to the Binary Ninja user directory, specified by `pdb.localStoreRelative`. The default is also in the format `foo.pdb\<guid>\foo.pdb`.
+5. Attempt to connect and download the PDB from the list of symbol servers specified in setting `pdb.symbolServerList`, in order.
+
+If you know the location of the PDB in advance, and it would not be found by any of the above, you can manually specify it via Open with Options and specifying the path under External Debug Info File (setting name `analysis.debugInfo.external`).
+
+### Configuration
+
+The PDB loader comes with a couple configuration options which enable and disable various features and may improve your analysis results. They can be toggled for all files via settings, or for an individual file via Open with Options.
+
+* Allow Unnamed Void Symbol Types (default off): Some PDBs contain variables with no name and only a `void` type. These are most likely static local variables with no type information. This is off by default because there isn't much actionable information you can do with these, and they often cause confusion and duplicate symbols.
+* Expand RTTI Structures (default on): This creates structure for RTTI symbols found within a PDB, like RTTI Class Type Information, RTTI Complete Object Locator, RTTI Class Hierarchy Descritor, etc. No analysis information is currently derived from these structures, but they will have their fields annotated in Linear View.
+* Generate Virtual Table Structures (default on): This generates structures for virtual tables found on classes in the PDB's types. Due to limiations of Binary Ninja's C++ type handling, these virtual table structures are just structures of function pointers, and may have incorrect behavior for types with multiple or virtual inheritence.
+* Load Global Module Symbols (default on): The global module in a PDB contains a list of all the functions with no type information beyond a C++ mangled name. Generally, this information is less accurate than a full symbol type, but stripped PDBs from Microsoft's official PDB server (and ones created via the `/PDBSTRIPPED` link.exe flag) will only have information in this module. In the event that a symbol has both a type and a global module mangled name, the real type will be used.
+* Cache Downloaded PDBs in Local Store (default on): When a PDB is downloaded from a PDB server, or loaded from a file, a copy of it will be saved in the local symbol store (as defined by #4 [above](#pdb-plugin)). This is useful when working with large PDBs that you want to save, but will use extra disk space.
## Debugger