Communicating with the Debugger

原文链接:http://msdn.microsoft.com/en-us/library/windows/desktop/ms679283%28v=vs.85%29.aspx

本文链接:http://blog.csdn.net/wlsgzl/article/details/18715395


The OutputDebugString function sends a string from the process being debugged to the debugger by generating an OUTPUT_DEBUG_STRING_EVENT debugging event.OutputDebugString函数通过产生OUTPUT_DEBUG_STRING_EVENT中断由被调试进程向调试器发送字符串。A process can detect whether it is being debugged by calling the IsDebuggerPresent function.进程可以通过调IsDebuggerPresent函数来检测是否处于被调试状态。


The DebugBreak function causes a breakpoint exception in the current process.DebugBreak函数在当前进程引发一个断点异常。 A breakpoint is a location in a program where execution is stopped to allow the developer to examine the program's code, variables, and register values and, as necessary, to make changes, continue execution, or terminate execution.断点是程序停止执行的位置,允许开发人员检测程序的代码、变量、寄存器的值(必要的话进行改变)、继续执行或者终止程序。

The FatalExit function terminates the current process and gives execution control to the debugger, but unlike DebugBreak, it does not generate an exception.函数结束当前进程,把执行控制权交给调试器,但是不像DebugBreak函数,它不产生异常。 This function should only be used as a last resort, because it does not always free the process's memory or close its files.这个函数只能作为最后的手段,因为它并不总是释放进程的内存或者关闭文件。



  • 0
    点赞
  • 0
    收藏
    觉得还不错? 一键收藏
  • 0
    评论
评论
添加红包

请填写红包祝福语或标题

红包个数最小为10个

红包金额最低5元

当前余额3.43前往充值 >
需支付:10.00
成就一亿技术人!
领取后你会自动成为博主和红包主的粉丝 规则
hope_wisdom
发出的红包
实付
使用余额支付
点击重新获取
扫码支付
钱包余额 0

抵扣说明:

1.余额是钱包充值的虚拟货币,按照1:1的比例进行支付金额的抵扣。
2.余额无法直接购买下载,可以购买VIP、付费专栏及课程。

余额充值