本文整理汇总了C++中LLDBReply::SetBreakpoints方法的典型用法代码示例。如果您正苦于以下问题:C++ LLDBReply::SetBreakpoints方法的具体用法?C++ LLDBReply::SetBreakpoints怎么用?C++ LLDBReply::SetBreakpoints使用的例子?那么, 这里精选的方法代码示例或许可以为您提供帮助。您也可以进一步了解该方法所在类LLDBReply
的用法示例。
在下文中一共展示了LLDBReply::SetBreakpoints方法的1个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的C++代码示例。
示例1: NotifyBreakpointsUpdated
void CodeLiteLLDBApp::NotifyBreakpointsUpdated()
{
LLDBBreakpoint::Vec_t breakpoints;
int num = m_target.GetNumBreakpoints();
wxPrintf("codelite-lldb: Calling NotifyBreakpointsUpdated(). Got %d breakpoints\n", num);
for(int i=0; i<num; ++i) {
lldb::SBBreakpoint bp = m_target.GetBreakpointAtIndex(i);
if ( bp.IsValid() && bp.GetNumResolvedLocations() ) {
// Add the parent breakpoint
LLDBBreakpoint::Ptr_t mainBreakpoint( new LLDBBreakpoint() );
mainBreakpoint->SetId( bp.GetID() );
if ( bp.GetNumLocations() > 1 ) {
// add all the children locations to the main breakpoint
for(size_t i=0; i<bp.GetNumLocations(); ++i) {
lldb::SBBreakpointLocation loc = bp.GetLocationAtIndex(i);
lldb::SBFileSpec fileLoc = loc.GetAddress().GetLineEntry().GetFileSpec();
wxFileName bpFile( fileLoc.GetDirectory(), fileLoc.GetFilename() );
// Create a breakpoint for this location
LLDBBreakpoint::Ptr_t new_bp(new LLDBBreakpoint());
new_bp->SetType( LLDBBreakpoint::kLocation );
new_bp->SetFilename( bpFile.GetFullPath() );
new_bp->SetLineNumber( loc.GetAddress().GetLineEntry().GetLine() );
new_bp->SetName( loc.GetAddress().GetFunction().GetName() );
mainBreakpoint->GetChildren().push_back( new_bp );
}
} else {
lldb::SBBreakpointLocation loc = bp.GetLocationAtIndex(0);
lldb::SBFileSpec fileLoc = loc.GetAddress().GetLineEntry().GetFileSpec();
wxFileName bpFile( fileLoc.GetDirectory(), fileLoc.GetFilename() );
mainBreakpoint->SetType( LLDBBreakpoint::kFileLine );
mainBreakpoint->SetName( loc.GetAddress().GetFunction().GetName() );
mainBreakpoint->SetFilename( bpFile.GetFullPath() );
mainBreakpoint->SetLineNumber( loc.GetAddress().GetLineEntry().GetLine() );
}
breakpoints.push_back( mainBreakpoint );
}
}
LLDBReply reply;
reply.SetReplyType( kReplyTypeBreakpointsUpdated );
reply.SetBreakpoints( breakpoints );
SendReply( reply );
}