Make breakpoints available outside of debug

This commit is contained in:
yossizap 2020-01-22 20:49:32 +00:00
parent c7d66cec06
commit ce22de5576
3 changed files with 15 additions and 5 deletions

View File

@ -145,6 +145,7 @@
<addaction name="actionSymbols"/> <addaction name="actionSymbols"/>
<addaction name="actionVTables"/> <addaction name="actionVTables"/>
<addaction name="actionZignatures"/> <addaction name="actionZignatures"/>
<addaction name="actionBreakpoint"/>
</widget> </widget>
<widget class="QMenu" name="menuAddDebugWidgets"> <widget class="QMenu" name="menuAddDebugWidgets">
<property name="title"> <property name="title">

View File

@ -151,6 +151,7 @@ DisassemblyContextMenu::DisassemblyContextMenu(QWidget *parent, MainWindow *main
addSeparator(); addSeparator();
addBreakpointMenu();
addDebugMenu(); addDebugMenu();
connect(this, &DisassemblyContextMenu::aboutToShow, connect(this, &DisassemblyContextMenu::aboutToShow,
@ -287,16 +288,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()));

View File

@ -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;
QAction actionSetToCode; QAction actionSetToCode;
@ -195,6 +197,7 @@ private:
void addSetAsMenu(); void addSetAsMenu();
void addSetToDataMenu(); void addSetToDataMenu();
void addEditMenu(); void addEditMenu();
void addBreakpointMenu();
void addDebugMenu(); void addDebugMenu();
struct ThingUsedHere { struct ThingUsedHere {