I'm opened opening a process (with C++/Windows) using
if( CreateProcessA( NULL, // No module name (use command line)
(LPSTR)path, //argv[1], // Command line
NULL, // Process handle not inheritable
NULL, // Thread handle not inheritable
FALSE, // Set handle inheritance to FALSE
creationFlags, // No creation flags
NULL, // Use parent's environment block
NULL, // Use parent's starting directory
&startInfo, // Pointer to STARTUPINFO structure
&processInfo ) // Pointer to PROCESS_INFORMATION structure
where
DWORD creationFlags = DEBUG_PROCESS | DEBUG_ONLY_THIS_PROCESS;
and then I'm trying to stackwalk it with
bool ok = StackWalk64(IMAGE_FILE_MACHINE_I386,m_ps.Handle ,m_th.Handle,
&m_stackframe, &m_threadContext,
0, NULL, NULL, 0);
but stackwalk just gives me the top address and the next one is 0, while I know there are more addresses in the stack.
Does anybody know what's the problem?
thanks :)