【发布时间】:2011-05-12 13:52:54
【问题描述】:
我正在使用
打开一个进程(使用 C++/Windows)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
在哪里
DWORD creationFlags = DEBUG_PROCESS | DEBUG_ONLY_THIS_PROCESS;
然后我试图用堆栈遍历它
bool ok = StackWalk64(IMAGE_FILE_MACHINE_I386,m_ps.Handle ,m_th.Handle,
&m_stackframe, &m_threadContext,
0, NULL, NULL, 0);
但是stackwalk只给了我顶部地址,下一个是0,而我知道堆栈中有更多地址。
有人知道问题出在哪里吗?
谢谢:)
【问题讨论】:
标签: c++ windows debugging callstack