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"));
|
act->setStatusTip(tr("Step Over"));
|
||||||
connect( act, SIGNAL(triggered()), this, SLOT(debugStepOverCB(void)) );
|
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);
|
debugMenu->addAction(act);
|
||||||
|
|
||||||
// Debug -> Run Line
|
// 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)
|
void ConsoleDebugger::debugRunLineCB(void)
|
||||||
{
|
{
|
||||||
if (FCEUI_EmulationPaused())
|
if (FCEUI_EmulationPaused())
|
||||||
|
@ -3055,6 +3076,7 @@ QAsmView::QAsmView(QWidget *parent)
|
||||||
selAddrValue = -1;
|
selAddrValue = -1;
|
||||||
memset( selAddrText, 0, sizeof(selAddrText) );
|
memset( selAddrText, 0, sizeof(selAddrText) );
|
||||||
|
|
||||||
|
cursorLineAddr = -1;
|
||||||
wheelPixelCounter = 0;
|
wheelPixelCounter = 0;
|
||||||
|
|
||||||
//setSizePolicy( QSizePolicy::Preferred, QSizePolicy::Expanding );
|
//setSizePolicy( QSizePolicy::Preferred, QSizePolicy::Expanding );
|
||||||
|
@ -3426,7 +3448,7 @@ void QAsmView::mouseMoveEvent(QMouseEvent * event)
|
||||||
{
|
{
|
||||||
int addr;
|
int addr;
|
||||||
|
|
||||||
addr = asmEntry[line]->addr;
|
cursorLineAddr = addr = asmEntry[line]->addr;
|
||||||
|
|
||||||
if (addr >= 0x8000)
|
if (addr >= 0x8000)
|
||||||
{
|
{
|
||||||
|
|
|
@ -112,6 +112,7 @@ class QAsmView : public QWidget
|
||||||
void setSymbolDebugEnable( bool value );
|
void setSymbolDebugEnable( bool value );
|
||||||
void setRegisterNameEnable( bool value );
|
void setRegisterNameEnable( bool value );
|
||||||
int getCtxMenuAddr(void){ return ctxMenuAddr; };
|
int getCtxMenuAddr(void){ return ctxMenuAddr; };
|
||||||
|
int getCursorAddr(void){ return cursorLineAddr; };
|
||||||
void setPC_placement( int mode, int ofs = 0 );
|
void setPC_placement( int mode, int ofs = 0 );
|
||||||
protected:
|
protected:
|
||||||
void paintEvent(QPaintEvent *event);
|
void paintEvent(QPaintEvent *event);
|
||||||
|
@ -155,6 +156,7 @@ class QAsmView : public QWidget
|
||||||
int pxLineXScroll;
|
int pxLineXScroll;
|
||||||
int cursorPosX;
|
int cursorPosX;
|
||||||
int cursorPosY;
|
int cursorPosY;
|
||||||
|
int cursorLineAddr;
|
||||||
int pcLinePlacement;
|
int pcLinePlacement;
|
||||||
int pcLineOffset;
|
int pcLineOffset;
|
||||||
|
|
||||||
|
@ -304,6 +306,7 @@ class ConsoleDebugger : public QDialog
|
||||||
void debugStepIntoCB(void);
|
void debugStepIntoCB(void);
|
||||||
void debugStepOutCB(void);
|
void debugStepOutCB(void);
|
||||||
void debugStepOverCB(void);
|
void debugStepOverCB(void);
|
||||||
|
void debugRunToCursorCB(void);
|
||||||
void debugRunLineCB(void);
|
void debugRunLineCB(void);
|
||||||
void debugRunLine128CB(void);
|
void debugRunLine128CB(void);
|
||||||
void seekToCB(void);
|
void seekToCB(void);
|
||||||
|
|
Loading…
Reference in New Issue