码迷,mamicode.com
首页 > 系统相关 > 详细

Vs2013在Linux开发中的应用(20): 断点设置

时间:2014-12-19 22:03:52      阅读:251      评论:0      收藏:0      [点我收藏+]

标签:linux   msbuild   vs2012   


vs设置断点时,SDM将调用:


        // Creates a pending breakpoint in the engine. A pending breakpoint is contains all the information needed to bind a breakpoint to 
        // a location in the debuggee.
        int IDebugEngine2.CreatePendingBreakpoint(IDebugBreakpointRequest2 pBPRequest, out IDebugPendingBreakpoint2 ppPendingBP)

在此回调中,我们实现并填充IDebugPendingBreakpoint2接口:


            AD7PendingBreakpoint pendingBreakpoint = new AD7PendingBreakpoint(pBPRequest, m_engine, this);

            ppPendingBP= (IDebugPendingBreakpoint2)pendingBreakpoint;


但此时并不需要通知gdb设置断点。

接着SDM将调用

        // Binds this pending breakpoint to one or more codelocations.

        intIDebugPendingBreakpoint2.Bind() {

在这个回调函数中我们将通知gdb绑定断点(-break-insert命令),下面是gdb对命令的响应:

-break-insertrc.c:1564

^done,bkpt={number="1",type="breakpoint",disp="keep",enabled="y",addr="0x0805fc75",func="main",file="../../app/rc/rc.c",fullname="/mnt/hgfs/nvs_dev/src/ipc/app/rc/rc.c",line="1564",times="0",original-location="rc.c:1564"}

gdb正常设置断点后,我们需要通知SDM断点绑定成功:

            Send(

                newAD7BreakpointBoundEvent((AD7PendingBreakpoint)pendingBreakpoint, boundBreakpoint),

                AD7BreakpointBoundEvent.IID,

                null

            );


 


??

Vs2013在Linux开发中的应用(20): 断点设置

标签:linux   msbuild   vs2012   

原文地址:http://blog.csdn.net/lights_joy/article/details/42032225

(0)
(0)
   
举报
评论 一句话评论(0
登录后才能评论!
© 2014 mamicode.com 版权所有  联系我们:gaon5@hotmail.com
迷上了代码!