GUI: added back the remove all option in the BreakpointsView
This commit is contained in:
parent
1d47124ec3
commit
95d3a837bb
|
@ -893,7 +893,7 @@ BRIDGE_IMPEXP duint DbgMemFindBaseAddr(duint addr, duint* size);
|
|||
/// Asynchronously execute a debugger command by adding it to the command queue.
|
||||
/// Note: the command may not have completed before this call returns. Use this
|
||||
/// function if you don't care when the command gets executed.
|
||||
///
|
||||
///
|
||||
/// Example: DbgCmdExec("ClearLog")
|
||||
/// </summary>
|
||||
/// <param name="cmd">The command to execute.</param>
|
||||
|
@ -903,7 +903,7 @@ BRIDGE_IMPEXP bool DbgCmdExec(const char* cmd);
|
|||
/// <summary>
|
||||
/// Performs synchronous execution of a debugger command. This function call only
|
||||
/// returns after the command has completed.
|
||||
///
|
||||
///
|
||||
/// Example: DbgCmdExecDirect("loadlib advapi32.dll")
|
||||
/// </summary>
|
||||
/// <param name="cmd">The command to execute.</param>
|
||||
|
|
|
@ -90,6 +90,14 @@ void BreakpointsView::setupContextMenu()
|
|||
disableAll->setText(tr("Disable all (%1)").arg(bpTypeName(selectedBp().type)));
|
||||
return true;
|
||||
});
|
||||
QAction* removeAll = makeShortcutAction(DIcon("breakpoint_remove_all.png"), QString(), SLOT(removeAllBreakpointsSlot()), "ActionRemoveAllBreakpoints");
|
||||
mMenuBuilder->addAction(removeAll, [this, removeAll](QMenu*)
|
||||
{
|
||||
if(!isValidBp())
|
||||
return false;
|
||||
removeAll->setText(tr("Remove all (%1)").arg(bpTypeName(selectedBp().type)));
|
||||
return true;
|
||||
});
|
||||
mMenuBuilder->addSeparator();
|
||||
|
||||
mMenuBuilder->addAction(makeAction(DIcon("breakpoint_module_add.png"), tr("Add DLL breakpoint"), SLOT(addDllBreakpointSlot())));
|
||||
|
@ -667,6 +675,30 @@ void BreakpointsView::disableAllBreakpointsSlot()
|
|||
}());
|
||||
}
|
||||
|
||||
void BreakpointsView::removeAllBreakpointsSlot()
|
||||
{
|
||||
if(mBps.empty())
|
||||
return;
|
||||
DbgCmdExec([this]()
|
||||
{
|
||||
switch(selectedBp().type)
|
||||
{
|
||||
case bp_normal:
|
||||
return "bc";
|
||||
case bp_hardware:
|
||||
return "bphwc";
|
||||
case bp_memory:
|
||||
return "bpmc";
|
||||
case bp_dll:
|
||||
return "bcdll";
|
||||
case bp_exception:
|
||||
return "DeleteExceptionBPX";
|
||||
default:
|
||||
return "invalid";
|
||||
}
|
||||
}());
|
||||
}
|
||||
|
||||
void BreakpointsView::addDllBreakpointSlot()
|
||||
{
|
||||
QString fileName;
|
||||
|
|
|
@ -32,6 +32,7 @@ private slots:
|
|||
void resetHitCountBreakpointSlot();
|
||||
void enableAllBreakpointsSlot();
|
||||
void disableAllBreakpointsSlot();
|
||||
void removeAllBreakpointsSlot();
|
||||
void addDllBreakpointSlot();
|
||||
void addExceptionBreakpointSlot();
|
||||
|
||||
|
|
|
@ -458,6 +458,7 @@ Configuration::Configuration() : QObject(), noMoreMsgbox(false)
|
|||
defaultShortcuts.insert("ActionResetHitCountBreakpoint", Shortcut({tr("Actions"), tr("Reset breakpoint hit count")}));
|
||||
defaultShortcuts.insert("ActionEnableAllBreakpoints", Shortcut({tr("Actions"), tr("Enable all breakpoints")}));
|
||||
defaultShortcuts.insert("ActionDisableAllBreakpoints", Shortcut({tr("Actions"), tr("Disable all breakpoints")}));
|
||||
defaultShortcuts.insert("ActionRemoveAllBreakpoints", Shortcut({tr("Actions"), tr("Remove all breakpoints")}));
|
||||
|
||||
defaultShortcuts.insert("ActionBinaryEdit", Shortcut({tr("Actions"), tr("Binary Edit")}, "Ctrl+E"));
|
||||
defaultShortcuts.insert("ActionBinaryFill", Shortcut({tr("Actions"), tr("Binary Fill")}, "F"));
|
||||
|
|
Loading…
Reference in New Issue