Search code examples
visual-studiodebuggingpdb-files

How to get StackFrame at compile time from PDB?


I need to get a stack frame of a function from any PDB (All in/out arguments and their types). I have the function name and address of a certain function from PDB, is there a way to get all of the parameters (in/out) of that function from the PDB file?

The functions are written in unmanaged code.

Regards,

Usman


Solution

  • You have a mess of concepts. PDB as any other file doesn't contain stack or stack frames, because it is something that is created during execution. .net exe/dll contains metadata for classes so you can peek at methods signature. You can get stack frames in your code (google class StackFrame/StackFrame) but still you can't all data from the stack like parameters values.