-
-
如何调试 线程函数
-
发表于:
2011-3-25 00:04
6923
-
DWORD dwThreadID;
DWORD dwAddress;
HANDLE hThread;
TCHAR szNotice[MAX_PATH];
unsigned __stdcall MyThread(void* pArguments)
{
//我想让程序执行到这里的时候断下来
__asm
{
push loopk
pop dwAddress
loopk:
}
wsprintf(szNotice,TEXT("地址:%X"),dwAddress);
MessageBox(NULL,szNotice,TEXT("TITLE"),MB_OK);
_endthreadex(0);
return 0;
}
hThread = CreateThread(
NULL, // default security attributes
0, // use default stack size
MyThread, // thread function
pData, // argument to thread function
0, // use default creation flags
&dwThreadID); // returns the thread identifier
试验了很多办法,包括把地址打印出来。我转到该处设置硬件执行断点都无效。
[培训]内核驱动高级班,冲击BAT一流互联网大厂工作,每周日13:00-18:00直播授课