views:

21

answers:

2

Desktop Windows OSs have a "StackWalk64" function, upon which Jochen Kalmbach made a library for decoding the call stack into something human-readable.

I need a similar tool, but for Windows CE. WinCE has a function to get the call stack, GetThreadCallStack, but once I have the raw return addresses, how do I

  1. Determine the module (DLL or EXE) from each program counter?
  2. Determine the function that contains the address, using my .map or .pdb files?

PS. If it helps anyone, I also found OS-agnostic code for walking the ARM call stack. Apparently it's really hard to do reliably!

+1  A: 

These articles all discuss converting an address to a line of code in source and might be helpful:

ctacke