mirror of
https://github.com/rizinorg/cutter.git
synced 2024-12-24 13:55:26 +00:00
Make breakpoints available outside of debug (#2027)
* Make breakpoints available outside of debug
This commit is contained in:
parent
57b5879593
commit
969ce5ac30
@ -1203,7 +1203,12 @@ void MainWindow::showDebugDocks()
|
|||||||
|
|
||||||
void MainWindow::enableDebugWidgetsMenu(bool enable)
|
void MainWindow::enableDebugWidgetsMenu(bool enable)
|
||||||
{
|
{
|
||||||
ui->menuAddDebugWidgets->setEnabled(enable);
|
for (QAction *action : ui->menuAddDebugWidgets->actions()) {
|
||||||
|
// The breakpoints menu should be available outside of debug
|
||||||
|
if (!action->text().contains("Breakpoints")) {
|
||||||
|
action->setEnabled(enable);
|
||||||
|
}
|
||||||
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
void MainWindow::resetToDefaultLayout()
|
void MainWindow::resetToDefaultLayout()
|
||||||
|
@ -151,6 +151,7 @@ DisassemblyContextMenu::DisassemblyContextMenu(QWidget *parent, MainWindow *main
|
|||||||
|
|
||||||
addSeparator();
|
addSeparator();
|
||||||
|
|
||||||
|
addBreakpointMenu();
|
||||||
addDebugMenu();
|
addDebugMenu();
|
||||||
|
|
||||||
addSeparator();
|
addSeparator();
|
||||||
@ -294,16 +295,21 @@ void DisassemblyContextMenu::addEditMenu()
|
|||||||
editMenu->addAction(&actionJmpReverse);
|
editMenu->addAction(&actionJmpReverse);
|
||||||
}
|
}
|
||||||
|
|
||||||
void DisassemblyContextMenu::addDebugMenu()
|
void DisassemblyContextMenu::addBreakpointMenu()
|
||||||
{
|
{
|
||||||
debugMenu = addMenu(tr("Debug"));
|
breakpointMenu = addMenu(tr("Breakpoint"));
|
||||||
|
|
||||||
initAction(&actionAddBreakpoint, tr("Add/remove breakpoint"),
|
initAction(&actionAddBreakpoint, tr("Add/remove breakpoint"),
|
||||||
SLOT(on_actionAddBreakpoint_triggered()), getAddBPSequence());
|
SLOT(on_actionAddBreakpoint_triggered()), getAddBPSequence());
|
||||||
debugMenu->addAction(&actionAddBreakpoint);
|
breakpointMenu->addAction(&actionAddBreakpoint);
|
||||||
initAction(&actionAdvancedBreakpoint, tr("Advanced breakpoint"),
|
initAction(&actionAdvancedBreakpoint, tr("Advanced breakpoint"),
|
||||||
SLOT(on_actionAdvancedBreakpoint_triggered()), QKeySequence(Qt::CTRL+Qt::Key_F2));
|
SLOT(on_actionAdvancedBreakpoint_triggered()), QKeySequence(Qt::CTRL+Qt::Key_F2));
|
||||||
debugMenu->addAction(&actionAdvancedBreakpoint);
|
breakpointMenu->addAction(&actionAdvancedBreakpoint);
|
||||||
|
}
|
||||||
|
|
||||||
|
void DisassemblyContextMenu::addDebugMenu()
|
||||||
|
{
|
||||||
|
debugMenu = addMenu(tr("Debug"));
|
||||||
|
|
||||||
initAction(&actionContinueUntil, tr("Continue until line"),
|
initAction(&actionContinueUntil, tr("Continue until line"),
|
||||||
SLOT(on_actionContinueUntil_triggered()));
|
SLOT(on_actionContinueUntil_triggered()));
|
||||||
|
@ -157,9 +157,11 @@ private:
|
|||||||
|
|
||||||
QMenu *debugMenu;
|
QMenu *debugMenu;
|
||||||
QAction actionContinueUntil;
|
QAction actionContinueUntil;
|
||||||
|
QAction actionSetPC;
|
||||||
|
|
||||||
|
QMenu *breakpointMenu;
|
||||||
QAction actionAddBreakpoint;
|
QAction actionAddBreakpoint;
|
||||||
QAction actionAdvancedBreakpoint;
|
QAction actionAdvancedBreakpoint;
|
||||||
QAction actionSetPC;
|
|
||||||
|
|
||||||
QMenu *pluginMenu;
|
QMenu *pluginMenu;
|
||||||
|
|
||||||
@ -197,6 +199,7 @@ private:
|
|||||||
void addSetAsMenu();
|
void addSetAsMenu();
|
||||||
void addSetToDataMenu();
|
void addSetToDataMenu();
|
||||||
void addEditMenu();
|
void addEditMenu();
|
||||||
|
void addBreakpointMenu();
|
||||||
void addDebugMenu();
|
void addDebugMenu();
|
||||||
|
|
||||||
struct ThingUsedHere {
|
struct ThingUsedHere {
|
||||||
|
Loading…
Reference in New Issue
Block a user