che sto aperto l'apertura di un processo (con C++/Windows) usandoStack piedi un processo di debug
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
dove
DWORD creationFlags = DEBUG_PROCESS | DEBUG_ONLY_THIS_PROCESS;
e poi sto cercando di stackwalk con
bool ok = StackWalk64(IMAGE_FILE_MACHINE_I386,m_ps.Handle ,m_th.Handle,
&m_stackframe, &m_threadContext,
0, NULL, NULL, 0);
ma lo stackwalk mi dà solo l'indirizzo principale e il successivo è 0, mentre I noto e ci sono più indirizzi nello stack.
Qualcuno sa qual è il problema?
grazie :)
Ho già funzionato bene quando ho creato il processo solo con il flag "CREATE_NEW_CONSOLE", ma ora ho bisogno di eseguire lo stackwalk di un processo debug. le bandiere in "CreateProcess" sono le uniche differenze che ho fatto ... – Idov