这样的崩溃,堆栈只去到第二个函数,后面的堆栈就没有显示了,会是什么原因?该如何处理

这样的崩溃,堆栈只去到第二个函数,后面的堆栈就没有显示了,会是什么原因?
本帖最后由 u013627061 于 2014-02-24 13:23:03 编辑
下面函数崩溃后,查看堆栈,但只有两个函数,wWinMain和ad1。


但ad2和ad3就没有显示了,会是什么原因造成的?

堆栈如下:





  ntdll.dll!76f815ee() 
  [Frames below may be incorrect and/or missing, no symbols loaded for ntdll.dll]
  ntdll.dll!76f815ee() 
  ntdll.dll!76f7015e() 
>  xyy.exe!ad1()  Line 15 C++
  xyy.exe!wWinMain(HINSTANCE__ * hInstance, HINSTANCE__ * hPrevInstance, wchar_t * pCmdLine, int nCmdShow)  Line 21 C++
  xyy.exe!__tmainCRTStartup()  Line 547 + 0x2c bytes C
  xyy.exe!wWinMainCRTStartup()  Line 371 C
  kernel32.dll!769733ca() 
  ntdll.dll!76f99ed2() 
  ntdll.dll!76f99ea5() 





代码如下:


#include <Windows.h>
void ad3()
{
int a = *(int*)0;
}

void ad2()
{
ad3();
}

void ad1()
{
ad2();
}


int WINAPI wWinMain(HINSTANCE hInstance, HINSTANCE hPrevInstance, PWSTR pCmdLine, int nCmdShow)
{
ad1();
return 0;

}


------解决方案--------------------
To set a breakpoint at a memory address 

From the View menu, click Debug Windows and Disassembly. The Disassembly window opens.


In the Disassembly window, move the insertion point to the line where you want the program to break.


Click the Insert/Remove Breakpoint toolbar button. 
A red dot appears in the left margin, indicating that the breakpoint is set.