For Qt debugger, added a run to cursor menu shortcut key.
This commit is contained in:
parent
8629e19273
commit
386f943140
|
@ -127,6 +127,14 @@ ConsoleDebugger::ConsoleDebugger(QWidget *parent)
|
|||
act->setStatusTip(tr("Step Over"));
|
||||
connect( act, SIGNAL(triggered()), this, SLOT(debugStepOverCB(void)) );
|
||||
|
||||
debugMenu->addAction(act);
|
||||
|
||||
// Debug -> Run to Cursor
|
||||
act = new QAction(tr("Run to Cursor"), this);
|
||||
act->setShortcut(QKeySequence( tr("Ctrl+F10") ) );
|
||||
act->setStatusTip(tr("Run to Cursor"));
|
||||
connect( act, SIGNAL(triggered()), this, SLOT(debugRunToCursorCB(void)) );
|
||||
|
||||
debugMenu->addAction(act);
|
||||
|
||||
// Debug -> Run Line
|
||||
|
@ -1707,6 +1715,19 @@ void ConsoleDebugger::debugStepOverCB(void)
|
|||
}
|
||||
}
|
||||
//----------------------------------------------------------------------------
|
||||
void ConsoleDebugger::debugRunToCursorCB(void)
|
||||
{
|
||||
int addr = asmView->getCursorAddr();
|
||||
|
||||
if ( addr >= 0 )
|
||||
{
|
||||
watchpoint[64].address = addr;
|
||||
watchpoint[64].flags = WP_E|WP_X;
|
||||
|
||||
FCEUI_SetEmulationPaused(0);
|
||||
}
|
||||
}
|
||||
//----------------------------------------------------------------------------
|
||||
void ConsoleDebugger::debugRunLineCB(void)
|
||||
{
|
||||
if (FCEUI_EmulationPaused())
|
||||
|
@ -3055,7 +3076,8 @@ QAsmView::QAsmView(QWidget *parent)
|
|||
selAddrValue = -1;
|
||||
memset( selAddrText, 0, sizeof(selAddrText) );
|
||||
|
||||
wheelPixelCounter = 0;
|
||||
cursorLineAddr = -1;
|
||||
wheelPixelCounter = 0;
|
||||
|
||||
//setSizePolicy( QSizePolicy::Preferred, QSizePolicy::Expanding );
|
||||
setFocusPolicy(Qt::StrongFocus);
|
||||
|
@ -3426,7 +3448,7 @@ void QAsmView::mouseMoveEvent(QMouseEvent * event)
|
|||
{
|
||||
int addr;
|
||||
|
||||
addr = asmEntry[line]->addr;
|
||||
cursorLineAddr = addr = asmEntry[line]->addr;
|
||||
|
||||
if (addr >= 0x8000)
|
||||
{
|
||||
|
|
|
@ -112,6 +112,7 @@ class QAsmView : public QWidget
|
|||
void setSymbolDebugEnable( bool value );
|
||||
void setRegisterNameEnable( bool value );
|
||||
int getCtxMenuAddr(void){ return ctxMenuAddr; };
|
||||
int getCursorAddr(void){ return cursorLineAddr; };
|
||||
void setPC_placement( int mode, int ofs = 0 );
|
||||
protected:
|
||||
void paintEvent(QPaintEvent *event);
|
||||
|
@ -155,6 +156,7 @@ class QAsmView : public QWidget
|
|||
int pxLineXScroll;
|
||||
int cursorPosX;
|
||||
int cursorPosY;
|
||||
int cursorLineAddr;
|
||||
int pcLinePlacement;
|
||||
int pcLineOffset;
|
||||
|
||||
|
@ -304,6 +306,7 @@ class ConsoleDebugger : public QDialog
|
|||
void debugStepIntoCB(void);
|
||||
void debugStepOutCB(void);
|
||||
void debugStepOverCB(void);
|
||||
void debugRunToCursorCB(void);
|
||||
void debugRunLineCB(void);
|
||||
void debugRunLine128CB(void);
|
||||
void seekToCB(void);
|
||||
|
|
Loading…
Reference in New Issue