Added debugger bookmark add/edit via ASM view context menu.

This commit is contained in:
Matthew Budd 2020-09-20 16:37:41 -04:00
parent 39a0f24445
commit 3099a233c3
2 changed files with 21 additions and 3 deletions

View File

@ -1128,11 +1128,14 @@ void ConsoleDebugger::edit_BM_name( int addr )
int ret; int ret;
debuggerBookmark_t *bm; debuggerBookmark_t *bm;
QInputDialog dialog(this); QInputDialog dialog(this);
char stmp[128];
bm = dbgBmMgr.getAddr( addr ); bm = dbgBmMgr.getAddr( addr );
sprintf( stmp, "Specify Bookmark Name for %04X", addr );
dialog.setWindowTitle( tr("Edit Bookmark") ); dialog.setWindowTitle( tr("Edit Bookmark") );
dialog.setLabelText( tr("Specify Bookmark Name") ); dialog.setLabelText( tr(stmp) );
dialog.setOkButtonText( tr("Edit") ); dialog.setOkButtonText( tr("Edit") );
if ( bm != NULL ) if ( bm != NULL )
@ -1590,6 +1593,17 @@ void ConsoleDebugger::asmViewCtxMenuAddBP(void)
} }
//---------------------------------------------------------------------------- //----------------------------------------------------------------------------
void ConsoleDebugger::asmViewCtxMenuAddBM(void)
{
int addr = asmView->getCtxMenuAddr();
dbgBmMgr.addBookmark( addr );
edit_BM_name( addr );
bmListUpdate(false);
}
//----------------------------------------------------------------------------
void ConsoleDebugger::setBookmarkSelectedAddress( int addr ) void ConsoleDebugger::setBookmarkSelectedAddress( int addr )
{ {
char stmp[32]; char stmp[32];
@ -2935,10 +2949,13 @@ void QAsmView::contextMenuEvent(QContextMenuEvent *event)
menu.addAction(act); menu.addAction(act);
connect( act, SIGNAL(triggered(void)), parent, SLOT(asmViewCtxMenuAddBP(void)) ); connect( act, SIGNAL(triggered(void)), parent, SLOT(asmViewCtxMenuAddBP(void)) );
act = new QAction(tr("Add Symbolic Debug Name"), this); act = new QAction(tr("Add Symbolic Debug Marker"), this);
menu.addAction(act); menu.addAction(act);
connect( act, SIGNAL(triggered(void)), parent, SLOT(asmViewCtxMenuAddSym(void)) ); connect( act, SIGNAL(triggered(void)), parent, SLOT(asmViewCtxMenuAddSym(void)) );
//connect( act, SIGNAL(triggered(void)), this, SLOT(addBookMarkCB(void)) );
act = new QAction(tr("Add Bookmark"), this);
menu.addAction(act);
connect( act, SIGNAL(triggered(void)), parent, SLOT(asmViewCtxMenuAddBM(void)) );
menu.exec(event->globalPos()); menu.exec(event->globalPos());
} }

View File

@ -235,6 +235,7 @@ class ConsoleDebugger : public QDialog
public slots: public slots:
void closeWindow(void); void closeWindow(void);
void asmViewCtxMenuAddBP(void); void asmViewCtxMenuAddBP(void);
void asmViewCtxMenuAddBM(void);
void asmViewCtxMenuAddSym(void); void asmViewCtxMenuAddSym(void);
private slots: private slots:
void updatePeriodic(void); void updatePeriodic(void);