April 23rd, 1999, 09:31 AM
I'm attempting to write a Just-In-Time debugger for WinCE that will dump out
register, stack, and call stack information information when there's an
exception in a CE program. This would be a CE program running on the CE
hardware.
I have two issues that I haven't been able to work out on my own.
1) From the CONTEXT structure (for x86) I know I can determine the top of the
stack simply by looking at the register Esp. How can I determine where the
bottom of the stack is?
2) I can get GetThreadContext() to work for the main thread (the one reported in
the CREATE_PROCESS_DEBUG_EVENT), but I have been unsuccessful to get it to work
for secondary threads (handles passed in with the CREATE_THREAD_DEBUG_EVENT). I
have tried suspending the thread before this call, but it seems to make little
difference. In fact, in any case, calling this routine causes an exception in
the debugger itself for these secondary threads.
I'd appreciate any clues.
Thanks,
Jim
register, stack, and call stack information information when there's an
exception in a CE program. This would be a CE program running on the CE
hardware.
I have two issues that I haven't been able to work out on my own.
1) From the CONTEXT structure (for x86) I know I can determine the top of the
stack simply by looking at the register Esp. How can I determine where the
bottom of the stack is?
2) I can get GetThreadContext() to work for the main thread (the one reported in
the CREATE_PROCESS_DEBUG_EVENT), but I have been unsuccessful to get it to work
for secondary threads (handles passed in with the CREATE_THREAD_DEBUG_EVENT). I
have tried suspending the thread before this call, but it seems to make little
difference. In fact, in any case, calling this routine causes an exception in
the debugger itself for these secondary threads.
I'd appreciate any clues.
Thanks,
Jim