- 博客(14)
- 收藏
- 关注
翻译 Win32 SEH异常深度探索_9 总结
最后,整个SEH的调用关系如下: KiUserExceptionDispatcher() RtlDispatchException() RtlpExecuteHandlerForException() ExecuteHandler() //
2009-09-25 13:57:00 997
翻译 Win32 SEH异常深度探索_8 异常处理是如何开始的
If youve made it this far, it wouldnt befair to finish without completing the entire circuit. Ive shown how theoperating system calls a user-defined function when an exception occurs. Ivesho
2009-09-25 13:56:00 1997
原创 Win32 SEH异常深度探索_7 对未处理异常的默认处理
UnhandledExceptionsEarlier in the article, I put off a fulldescription of the UnhandledExceptionFilter API. You normally dont call thisAPI directly (although you can). Most of the time,
2009-09-25 13:53:00 1550
翻译 Win32 SEH异常深度探索_6 回退
UnwindingLets briefly recap what unwinding meansbefore digging into the code that implements it. Earlier, I described howpotential exception handlers are kept in a linked list, pointed to
2009-09-25 13:52:00 1205
翻译 Win32 SEH异常深度探索_5 一个异常帧链表遍历例子
If youre feeling a bit overwhelmed at thispoint by things like EXCEPTION_REGISTRATIONs, scopetables, trylevels,filter-expressions, and unwinding, so was I at first. The subject ofcompiler-level
2009-09-25 13:50:00 1530
翻译 Win32 SEH异常深度探索_4 编译器对SEH的支持
While Ive made occasional reference to_try and _except, just about everything Ive written about so far is implementedby the operating system. However, in looking at the contortions of my two sma
2009-09-25 13:47:00 1572
翻译 Win32 SEH异常深度探索_3 默认异常回调函数
So far, Ive implicitly assumed that the operatingsystem always finds a handler somewhere in the linked list ofEXCEPTION_REGISTRATIONs. What happens if nobody steps up to the plate? As itturn
2009-09-25 13:46:00 1419
翻译 Win32 SEH异常深度探索_2 异常链表遍历
With this simplest of scenarios behind us, lets goback and fill in some of the blanks. While this exception callback is great,its not a perfect solution. In an application of any size, it would
2009-09-25 13:43:00 1509
翻译 Win32 SEH异常深度探索_1
最近学习C++异常实现机制,面对一堆汇编代码无所适从,无意中看到这样一篇文章,读完后感觉对整个异常的原理清晰很多。看来学习还是要多去读读大牛的文章呀。这里严格来说并不算是翻译,仅仅是提炼的一些总结而已。具体内容还是参照原文把。原文地址:http://www.microsoft.com/msj/0197/exception/exception.aspx
2009-09-25 13:40:00 1916
原创 C++异常处理机制__3.编译器何时生成栈回退代码
学习异常原理,先从几个例子看起编译器什么时候生成异常支持代码(栈回退支持)//没有栈回退代码void cpp_exception_test1(){ int *p = new int; CMyClass1 s1;}//有栈回退代码void cpp_exception_test2(){ CMyClass1 s1;
2009-09-16 16:27:00 1712
原创 C++异常处理机制__2.SEH异常抛出与处理
测试函数:void SEH_test2(){ int *p1 = NULL; __try { *p1 = 10; } __except(EXCEPTION_EXECUTE_HANDLER) { cout << "SHE_test2::__except" << endl; }}
2009-09-16 12:39:00 5037
原创 C++异常处理机制__1.SEH处理的函数栈布局
C++可以有两种异常处理方法1. SEH exceptions (Structured Exception Handling), 结构化异常处理它有三个关键字__try, __except, __finally,并通过RaiseException 抛出异常其中一个__try后只能跟一个__except或一个__finally。当__try后跟__except时,为异常处理(ex
2009-09-15 17:02:00 2713
原创 程序内存布局
程序虚拟地址布局:从高到低:0X8000,0000 - 0XFFFF,FFFF 内核空间0X7FFF,0000 - 0X7FFF,FFFF 64K的禁止进入区0X0001,0000 - 0X7FFE,FFFF 用户空间0X0000,0000 - 0X0000,FFFF NULL指针分配区(64K)其中用户空间中,用户的exe程序一般加载到0X0040,00
2009-09-07 16:17:00 1247
原创 CreateFile 一点总结
CreateFile的函数原型如下:HANDLE CreateFile( LPCTSTR lpFileName, DWORD dwDesiredAccess, DWORD dwShareMode, LPSECURITY_ATTRIBUTES lpSecurityAttributes, DWORD dwCreationDisposition, DWORD dw
2009-09-07 16:14:00 8179
空空如也
空空如也
TA创建的收藏夹 TA关注的收藏夹
TA关注的人