Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

Get a function signature from PDB using WinDBG

Trying to find the invocation method of an EventHandler instance, I had to !do it, and then try to find which method _methodPtr was referring to.

_methodPtr was in my case 32c0e0

I figured it out using dd 32c0e0 (which contains the method address).

However, the first thing I tried was to look at unmanaged code at 32c0e0, which was:

0:000> !U 32c0e0 
Unmanaged code
0032c0e0 e8d55cf567      call    mscorwks!PrecodeFixupThunk (68281dba)
   ... etc ...

PrecodeFixupThunk is not an export of mscorwks, and I cant find anyting on google about it. I guess that windbg is resolving the call using mscorwks.pdb...

My question is: What is PrecodeFixupThunk signature ? I can find its asm code using x and !u, but more generally, is there a way to get a function signature using windbg ?

[edit] FYI :

0:000> x /v /t mscorwks!PrecodeFixupThunk
pub global 68281dba    0 <NoType> mscorwks!PrecodeFixupThunk = <no type information>
like image 314
Olivier Avatar asked Nov 02 '22 04:11

Olivier


1 Answers

It depends. You can build module with private symbols or public symbols. Private symbols contain all information about variables, types, functions. Public symbols contain RVA for variables and functions.

MS usually upload only public symbols or public symbols with some type definitions.

see: http://msdn.microsoft.com/en-us/library/windows/hardware/ff553493(v=vs.85).aspx

like image 72
pykd team Avatar answered Nov 13 '22 23:11

pykd team