本文整理汇总了C++中LLDBCommand::GetBreakpoints方法的典型用法代码示例。如果您正苦于以下问题:C++ LLDBCommand::GetBreakpoints方法的具体用法?C++ LLDBCommand::GetBreakpoints怎么用?C++ LLDBCommand::GetBreakpoints使用的例子?那么, 这里精选的方法代码示例或许可以为您提供帮助。您也可以进一步了解该方法所在类LLDBCommand
的用法示例。
在下文中一共展示了LLDBCommand::GetBreakpoints方法的2个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的C++代码示例。
示例1: DeleteBreakpoints
void CodeLiteLLDBApp::DeleteBreakpoints(const LLDBCommand& command)
{
CHECK_DEBUG_SESSION_RUNNING();
const LLDBBreakpoint::Vec_t& bps = command.GetBreakpoints();
if(bps.empty()) {
return;
}
wxPrintf("codelite-lldb: DeleteBreakpoints called\n");
if(m_target.GetProcess().GetState() == lldb::eStateStopped) {
wxPrintf("codelite-lldb: DeleteBreakpoints: process state is Stopped - will apply them now\n");
for(size_t i = 0; i < bps.size(); ++i) {
LLDBBreakpoint::Ptr_t breakpoint = bps.at(i);
wxPrintf("codelite-lldb: deleting breakpoint: %s\n", breakpoint->ToString());
if(breakpoint->IsApplied()) {
lldb::SBBreakpoint lldbBreakpoint = m_target.FindBreakpointByID(breakpoint->GetId());
if(lldbBreakpoint.IsValid()) {
lldbBreakpoint.ClearAllBreakpointSites();
m_target.BreakpointDelete(lldbBreakpoint.GetID());
}
}
}
NotifyBreakpointsUpdated();
} else {
wxPrintf("codelite-lldb: DeleteBreakpoints: process is Busy - will interrupt it\n");
m_interruptReason = kInterruptReasonDeleteBreakpoint;
m_target.GetProcess().SendAsyncInterrupt();
}
}
示例2: ApplyBreakpoints
void CodeLiteLLDBApp::ApplyBreakpoints(const LLDBCommand& command)
{
wxPrintf("codelite-lldb: ApplyBreakpoints called\n");
if ( m_target.GetProcess().GetState() == lldb::eStateStopped ) {
wxPrintf("codelite-lldb: ApplyBreakpoints: process state is stopped - will apply them now\n");
// we can apply the breakpoints
// Apply all breakpoints with an-invalid breakpoint ID
LLDBBreakpoint::Vec_t breakpoints = command.GetBreakpoints();
while( !breakpoints.empty() ) {
LLDBBreakpoint::Ptr_t breakPoint = breakpoints.at(0);
if ( !breakPoint->IsApplied() ) {
switch( breakPoint->GetType() ) {
case LLDBBreakpoint::kFunction: {
wxPrintf("codelite-lldb: creating breakpoint by name: %s\n", breakPoint->GetName());
m_target.BreakpointCreateByName(breakPoint->GetName().mb_str().data(), NULL);
break;
}
case LLDBBreakpoint::kFileLine: {
wxPrintf("codelite-lldb: creating breakpoint by location: %s,%d\n", breakPoint->GetFilename(), breakPoint->GetLineNumber());
m_target.BreakpointCreateByLocation(breakPoint->GetFilename().mb_str().data(), breakPoint->GetLineNumber());
break;
}
}
}
breakpoints.erase(breakpoints.begin());
}
NotifyBreakpointsUpdated();
} else {
wxPrintf("codelite-lldb: ApplyBreakpoints: process state is _NOT_ Stopped - interrupting process\n");
// interrupt the process
m_interruptReason = kInterruptReasonApplyBreakpoints;
m_target.GetProcess().SendAsyncInterrupt();
}
}