本文整理汇总了C++中IDebugger::RemoveBreak方法的典型用法代码示例。如果您正苦于以下问题:C++ IDebugger::RemoveBreak方法的具体用法?C++ IDebugger::RemoveBreak怎么用?C++ IDebugger::RemoveBreak使用的例子?那么, 这里精选的方法代码示例或许可以为您提供帮助。您也可以进一步了解该方法所在类IDebugger
的用法示例。
在下文中一共展示了IDebugger::RemoveBreak方法的2个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的C++代码示例。
示例1: DelBreakpoint
bool BreakptMgr::DelBreakpoint(const int id)
{
int index = FindBreakpointById(id, m_bps);
if (index == wxNOT_FOUND) {
return false;
}
//remove it from the debugger if it's running
IDebugger *dbgr = DebuggerMgr::Get().GetActiveDebugger();
if (dbgr && dbgr->IsRunning()) {
if (id > FIRST_INTERNAL_ID) {
// This shouldn't happen while the debugger is running (debugger_id should be valid)
// But if it does, assume it was a bp that gdb couldn't create, and just remove from the bp list
} else {
bool contIsNeeded = PauseDebuggerIfNeeded();
if (dbgr->RemoveBreak(id)) {
// Strangely, -break-delete doesn't output any confirmation except for ^done. So do it here
wxString msg = ((m_bps.at(index).bp_type == BP_type_watchpt) ? _("Watchpoint ") : _("Breakpoint "));
ManagerST::Get()->UpdateAddLine(msg + wxString::Format(_("%u deleted"), id));
}
if (contIsNeeded) {
dbgr->Continue();
}
}
}
// Delete all markers before removing bp from the vector. Otherwise if id was the last in a file...
DeleteAllBreakpointMarkers();
m_bps.erase(m_bps.begin()+index);
RefreshBreakpointMarkers();
return true;
}
示例2: EditBreakpoint
void BreakptMgr::EditBreakpoint(int index, bool &bpExist)
{
// sanity
bpExist = true;
if (index < 0 || index >= (int)m_bps.size()) {
wxLogMessage(wxT("BreakptMgr::EditBreakpoint: Insane index"));
bpExist = false;
return;
}
BreakpointInfo bp = m_bps.at(index);
BreakptPropertiesDlg dlg(NULL);
wxString title;
if (bp.bp_type == BP_type_watchpt) {
title = _("Properties for watchpoint ");
} else {
title = _("Properties for breakpoint ");
}
int id = bp.debugger_id;
if (id == -1) {
id = bp.internal_id - FIRST_INTERNAL_ID;
}
title << id;
dlg.SetTitle(title);
dlg.EnterBPData(bp);
if (dlg.ShowModal() != wxID_OK) {
return ;
}
SetBestBPType(dlg.b); // The edited data's available. Use it to determine the best bp_type
if (bp == dlg.b) {
// Nothing was altered
return ;
}
// We've got our altered dlg.b If the debugger's running, we can update it now
// Otherwise, it'll be automatically inserted correctly when the debugger starts
IDebugger *dbgr = DebuggerMgr::Get().GetActiveDebugger();
if (dbgr && dbgr->IsRunning()) {
if (CanThisBreakpointBeUpdated(dlg.b, bp)) {
if (dlg.b.ignore_number != bp.ignore_number) {
if (! SetBPIgnoreCount(dlg.b.debugger_id, dlg.b.ignore_number)) {
return; // Harsh, but what else can one do?
}
}
if (dlg.b.is_enabled != bp.is_enabled) {
if (! SetBPEnabledState(dlg.b.debugger_id, dlg.b.is_enabled)) {
return ;
}
}
if (dlg.b.conditions != bp.conditions) {
if (! SetBPConditon(dlg.b)) {
return ;
}
}
if (dlg.b.commandlist != bp.commandlist) {
if (! SetBPCommands(dlg.b)) {
return ;
}
}
} else {
// If it can't be updated (because gdb wouldn't be able to cope with the change), replace
bool contIsNeeded = PauseDebuggerIfNeeded();
dbgr->RemoveBreak(bp.debugger_id);
dbgr->Break(dlg.b);
// dbgr->Break(bp) doesn't set the ignore/disabled/etc states
// but we can't do it now, as we don't yet know the debugger_id
// However it will happen later, in SetBreakpointDebuggerID
if (contIsNeeded) {
dbgr->Continue();
}
}
}
// Replace the old data with the new, in m_bps
m_bps.at(index) = dlg.b;
DeleteAllBreakpointMarkers();
RefreshBreakpointMarkers();
}