本文整理汇总了C++中IDebugger::SetEnabledState方法的典型用法代码示例。如果您正苦于以下问题:C++ IDebugger::SetEnabledState方法的具体用法?C++ IDebugger::SetEnabledState怎么用?C++ IDebugger::SetEnabledState使用的例子?那么, 这里精选的方法代码示例或许可以为您提供帮助。您也可以进一步了解该方法所在类IDebugger
的用法示例。
在下文中一共展示了IDebugger::SetEnabledState方法的2个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的C++代码示例。
示例1: SetBPEnabledState
bool BreakptMgr::SetBPEnabledState(const int bid, const bool enable)
{
IDebugger *dbgr = DebuggerMgr::Get().GetActiveDebugger();
if (dbgr && dbgr->IsRunning()) {
// If the debugger is already running, tell it about the new 'enable' level
// If not, it'll happen automatically when the debugger does start
bool contIsNeeded = PauseDebuggerIfNeeded();
bool result = dbgr->SetEnabledState(bid, enable);
if (contIsNeeded) {
dbgr->Continue();
}
return result;
}
return true;
}
示例2: SetAllBreakpointsEnabledState
void BreakptMgr::SetAllBreakpointsEnabledState(bool enabled)
{
unsigned int successes = 0;
bool debuggerIsRunning = false;
bool contIsNeeded = false;
IDebugger *dbgr = DebuggerMgr::Get().GetActiveDebugger();
if (dbgr && dbgr->IsRunning()) {
debuggerIsRunning = true;
contIsNeeded = PauseDebuggerIfNeeded();
}
for (size_t i=0; i<m_bps.size(); ++i) {
BreakpointInfo &bp = m_bps.at(i);
if (((bp.debugger_id != -1) || !debuggerIsRunning) // Sanity check for when the debugger's running
&& (bp.is_enabled != enabled)) { // No point setting it to the current status
if (debuggerIsRunning) {
if (dbgr->SetEnabledState(bp.debugger_id, enabled)) {
bp.is_enabled = enabled;
++successes;
}
} else {
bp.is_enabled = enabled;
++successes;
}
}
}
if (debuggerIsRunning && contIsNeeded) {
dbgr->Continue();
}
if (successes) {
RefreshBreakpointMarkers();
clMainFrame::Get()->GetDebuggerPane()->GetBreakpointView()->Initialize();
wxString msg = wxString::Format(wxT("%u "), successes);
msg << (enabled ? _("breakpoints enabled") : _("breakpoints disabled"));
clMainFrame::Get()->SetStatusMessage(msg, 0);
}
}