title: get c++ function name from !DllRegisterServer+0x3ebfa notation to solve 'endless wait in critical section' puzzle
body: <p>I'm new in debugging with symbols (when no access to the testing machine is possible).</p>
  
  <p>I already provided the client with Debug build with .pdb file but for some reason the dump file I get contains no entries specific to my .dll (although the customer insists the problem occurs there, in particular, the app hangs). The debug build was made with VC++ 2008 x86 (I also tried older VC++ 6.0 with no difference).</p>
  
  <p>The stack trace customer provides looks like</p>
  
  <pre>
  ChildEBP RetAddr  
  01ece854 773f8e44 ntdll!NtWaitForSingleObject+0x15
  01ece8b8 773f8d28 ntdll!RtlpWaitOnCriticalSection+0x13e
  01ece8e0 02a92003 ntdll!RtlEnterCriticalSection+0x150
  WARNING: Stack unwind information not available. Following frames may be wrong.
  01ece8f0 02a8b4fa MyDllName!DllRegisterServer+0xbd2dc
  01ece920 02a8b49e MyDllName!DllRegisterServer+0xb67d3
  01ece930 02a8746c MyDllName!DllRegisterServer+0xb6777
  01ece93c 029dc5ca MyDllName!DllRegisterServer+0xb2745
  01ece99c 02a819e4 MyDllName!DllRegisterServer+0x78a3
  01ecea80 02a09776 MyDllName!DllRegisterServer+0xaccbd
  01eceb00 02a32506 MyDllName!DllRegisterServer+0x34a4f
  01eceb58 029f44bf MyDllName!DllRegisterServer+0x5d7df
  01ececdc 029f5e20 MyDllName!DllRegisterServer+0x1f798
  01eceda0 029f76da MyDllName!DllRegisterServer+0x210f9
  01ecedf4 291fe0ce MyDllName!DllRegisterServer+0x229b3
  01ecee98 29365243 ClientAppName!Class.Method2+0x262
  01eceeb8 293378d9 ClientAppName!Class.Method1+0x37
  </pre>
  
  <p>But I'm not sure what all of this exactly means. Does DllRegisterServer+0x229b3 mean "function which has address +229b3 to the address of DllRegisterServer in map file"?</p>
  
  <p>In map file, I have something like</p>
  
  <pre>
  0002:0006d720 _DllRegisterServer@0 10137720 f DllName.obj
  </pre>
  
  <p>But when I sum 229b3 and 6d720, I don't have any match in the map file for the resulting value.</p>
  
  <p>And why the stack trace shows DllRegisterServer as an address base? It's not the first address in the map file. There are many function before it, should they have negative offset then (seems meaningless)?</p>
  
  <p>I guess I understand reading debugging things wrong, but can't figure out what exactly is wrong..</p>
  
  <p>If I could find out the function names, this would let me move further.</p>
  
  <p>Things get even more complicated as I don't think my .DLL has no critical sections but the customer insists it's my dll which causes entering a critical section and never getting out. For now, I don't yet know how to prove him wrong (or maybe find out that it's indeed my lib which somehow, indirectly, does this, maybe, Windows sockets or DNS resolve name to an IP address somewhere behind the scenes are using critical sections).</p>