vs2013开发linux程序,Vs2013在Linux开发中的应用(20): 断点设立

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

当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接口:

AD7PendingBreakpointpendingBreakpoint=newAD7PendingBreakpoint(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

);



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

请填写红包祝福语或标题

红包个数最小为10个

红包金额最低5元

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

抵扣说明:

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

余额充值