According to the SDK, the PDB loader is implemented as an IDA plugin (see the SDK, e.g: \idasdk67\plugins\pdb
).
The plugin name is "pdb", so you can call the plugin directly, like this:
idaapi.load_and_run_plugin("pdb", call_code)
Where call_code
is an enum
defined in \idasdk67\plugins\pdb\common.h
,
0, 1 and 2 are already defined and will ask for user input, but if you want to silently load a pdb for the actually loaded PE file, you can pass a value greater than 2, e.g.:
idaapi.load_and_run_plugin("pdb", 3)
That should do the trick (at least it worked for me :)
Python>idaapi.load_and_run_plugin("pdb", 3)
PDB: using DIA dll "C:\Program Files (x86)\Common Files\Microsoft Shared\VC\msdia90.dll"
PDB: DIA interface version 9.0
ntkrpamp.pdb: not found, trying with the input file Z:\Reverse\Windows\win8.1\x86\6.3.9600\ntoskrnl.exe
Trying loadDataForExe with ffffffff
loadDataForExe: 0
PDB: loaded 2055 types
PDB: total 22027 symbols loaded for Z:\Reverse\Windows\win8.1\x86\6.3.9600\ntoskrnl.exe
True