pdb files

Nov 22, 2007 at 5:23 PM
I'm writing an addin for reflector that spits out everything that a PDB file has to offer. I know that reflector is not meant for this but is there anyway of overriding the error icon and treat a pdb file as a first class citizen! Its easy enough to write an add-in (the framework is excellent) to load a pdb and pass the fullpath of that to a wrapper I've written in c# around DIA SDK but I'd like a couple of hints how best to show the contents of a pdb file whilst still adhering (mostly) to the intent of reflector. Any ideas?

Cheers,

neuralsea
Coordinator
Nov 24, 2007 at 4:41 AM
You can try to hook your add-in into the IAssemblyManager.AssemblyLoaded command, check if a PDB file path got loaded and have it load the actual PDB file. Now translate to an IAssembly and swap the IAssemblyManager.Assemblies... object that got loaded. As you already mentioned none of this is designed to function this way so good luck.
Nov 26, 2007 at 12:44 PM
Thank you for your suggestion. The IAssemblyManager Assemblies property contains a list of all dlls and (now) pdb files. Doesn't do much else though :(

Is there any way of creating/extending additional interfaces so that I can show in the right hand side window (the same place that assembly files are disassembled)? I can then show UDT's, Files, Lines, injected source tables, FPOs and the like. I was going to go the route of implementing the IAssembly interface and overriding - at the very least - the ICustomAttributeCollection to treat each of the new types as first class citizens. Still a fair amount of work to do (on my side :) but since I want to view RVA, debug streams (I index against a TFS source server and have a symbol server configured), see private methods etc. I'm not sure if this is the right approach.

I'm also writing a wrapper in C# around the diasdk to handle each of the types that I want to show/filter by.

Is there any way of adding a resource icon (for a PDB file) and extend the filedialog so that PDB files are an option?

Regards,

Emmett
Coordinator
Nov 27, 2007 at 12:42 AM
Edited Nov 27, 2007 at 12:44 AM
You can try and convert the PDB information into existing code model primitives, scenarios beyond that are not really supported.