概述
sx显示系统异常设置状态, 如下
0:001> sx
ct - Create thread - ignore 创建线程
et - Exit thread - ignore 退出线程
cpr - Create process - ignore 创建进程
epr - Exit process - break 退出进程
ld - Load module - output 加载模块
ud - Unload module - ignore 卸载模块
ser - System error - ignore 系统错误
ibp - Initial breakpoint - break 初始化断点
iml - Initial module load - ignore 初始化模块加载
out - Debuggee output - output 调试输出
av - Access violation - break - not handled 非法访问内存
asrt - Assertion failure - break - not handled assert报错
aph - Application hang - break - not handled 程序被挂起
bpe - Break instruction exception - break 断点异常
bpec - Break instruction exception continue - handled 同上
eh - C++ EH exception - second-chance break - not handledC++ EH 异常
clr - CLR exception - second-chance break - not handled公共语言运行时异常
clrn - CLR notification exception - second-chance break - handled 公共语言运行时通知异常
cce - Control-Break exception - break 控制台程序中按下CTRL+C 或者 CTRL+BREAK键
cc - Control-Break exception continue - handled 同上
cce - Control-C exception - break 同上
cc - Control-C exception continue - handled 同上
dm - Data misaligned - break - not handled 数据未对齐
dbce - Debugger command exception - ignore - handled 指定调试器命令异常
gp - Guard page violation - break - not handled 非法访问页
ii - Illegal instruction - second-chance break - not handled 非法指命
ip - In-page I/O error - break - not handled 页中的字节i/o错误
dz - Integer divide-by-zero - break - not handled 除0错误
iov - Integer overflow - break - not handled 整数溢出
ch - Invalid handle - break 非法句柄
hc - Invalid handle continue - not handled 同上
lsq - Invalid lock sequence - break - not handled 非法锁住队列
isc - Invalid system call - break - not handled 非法的系统调用
3c - Port disconnected - second-chance break - not handled 端口断开
svh - Service hang - break - not handled 服务挂起了
sse - Single step exception - break 单步异常
ssec - Single step exception continue - handled 同上
sbo - Stack buffer overflow - break - not handled 栈缓存溢出
sov - Stack overflow - break - not handled 栈溢出
vs - Verifier stop - break - not handled 被校验器停止
vcpp - Visual C++ exception - ignore - handled Visual C++ exception异常
wkd - Wake debugger - break - not handled 唤醒调试器
wob - WOW64 breakpoint - break - handled WOW64 断点
wos - WOW64 single step exception - break - handled WOW64 单步断点
* - Other exception - second-chance break - not handled 其它异常
其中呢,上面有些选项是需要记一下下的,如下:
| Break (Enabled) | When this exception occurs, the target immediately breaks into the debugger. This break in occurs before any other error handlers are activated. This method is calledfirst-chance handling. |
| Second chance break (Disabled) | The debugger does not break in for this kind of first-chance exception (although a message is displayed). If other error handlers cannot address this exception, execution stops and the target breaks into the debugger. This method is calledsecond-chance handling. |
| Output (Notify) | When this exception occurs, the target application does not break into the debugger at all. However, a message is displayed that informs the user of this exception. |
| Ignore | When this exception occurs, the target application does not break into the debugger, and no message is displayed. |
另外,关于 “handle”标志,如果标志上了handle标志后,说明此异常已经被处理过了,后继的异常处理就不用处理了;如果是标志为not handle时,则程序会继续寻找下一个异常处理者来处理异常,但是,也有可能到最后都没有找到异常处理者,于是调试器就有第二次处理异常的机会了,名曰: second-chance handling,可以通过SXD来设置的。
举例:
>>sxn epr:此命令可以将响应退出线程的动作变为output,而不是前面输出的break,也就是说,被调试线程退出时不再会触发中断了。
其实,上面通过命令来设置快是快,不过对我这种记性不好的人,还是比较喜欢点窗口的。
在windbg中,点Debug/Event Filter即可弹出设置窗口的~
最后
以上就是秀丽小伙为你收集整理的windbg的系统异常状态设置的全部内容,希望文章能够帮你解决windbg的系统异常状态设置所遇到的程序开发问题。
如果觉得靠谱客网站的内容还不错,欢迎将靠谱客网站推荐给程序员好友。
发表评论 取消回复