title: How to decode a Windows CE call stack?
body: <p>Desktop Windows OSs have a "StackWalk64" function, upon which Jochen Kalmbach made <a href="http://www.codeproject.com/KB/threads/StackWalker.aspx" rel="nofollow">a library for decoding the call stack</a> into something human-readable.</p>
  
  <p>I need a similar tool, but for Windows CE. WinCE has a function to get the call stack, <a href="http://msdn.microsoft.com/en-us/library/ms885641.aspx" rel="nofollow">GetThreadCallStack</a>, but once I have the raw return addresses, how do I</p>
  
  <ol>
  <li>Determine the module (DLL or EXE) from each program counter?</li>
  <li>Determine the function that contains the address, using my .map or .pdb files?</li>
  </ol>
  
  <p>PS. If it helps anyone, I also found <a href="http://www.mcternan.co.uk/ArmStackUnwinding/" rel="nofollow">OS-agnostic code</a> for walking the ARM call stack. Apparently it's really hard to do reliably!</p>