void PluginManager::SetBreakpoints(const BreakpointInfo::Vec_t& breakpoints) { ManagerST::Get()->GetBreakpointsMgr()->DelAllBreakpoints(); for(size_t i = 0; i < breakpoints.size(); ++i) { ManagerST::Get()->GetBreakpointsMgr()->AddBreakpoint(breakpoints.at(i)); } }
LLDBBreakpoint::Vec_t LLDBBreakpoint::FromBreakpointInfoVector(const BreakpointInfo::Vec_t& breakpoints) { LLDBBreakpoint::Vec_t bps; for(size_t i=0; i<breakpoints.size(); ++i) { if ( breakpoints.at(i).bp_type == BP_type_break ) { LLDBBreakpoint::Ptr_t bp(new LLDBBreakpoint() ); const BreakpointInfo &gdbBp = breakpoints.at(i); bp->SetName( gdbBp.function_name ); bp->SetFilename( gdbBp.file ); bp->SetLineNumber( gdbBp.lineno ); bp->SetType( kFileLine ); bps.push_back( bp ); } } return bps; }
size_t PluginManager::GetAllBreakpoints(BreakpointInfo::Vec_t& breakpoints) { breakpoints.clear(); ManagerST::Get()->GetBreakpointsMgr()->GetBreakpoints(breakpoints); return breakpoints.size(); }