Remember navigation source in graph history (#1766)
* Remember navigation source in graph history If you follow a jump or a call, and click on '-', you don't go back to the jump or the call (as in the regular CPU view), but to a previous, non-relevant command in the graph. This commit tries to fix this. * Update DisassemblerGraphView.cpp * Update DisassemblerGraphView.cpp
This commit is contained in:
parent
f519f322da
commit
75987325fb
|
@ -141,7 +141,6 @@ duint DisassemblerGraphView::get_cursor_pos()
|
|||
|
||||
void DisassemblerGraphView::set_cursor_pos(duint addr)
|
||||
{
|
||||
Q_UNUSED(addr);
|
||||
if(!this->navigate(addr))
|
||||
{
|
||||
//TODO: show in hex editor?
|
||||
|
@ -721,6 +720,11 @@ void DisassemblerGraphView::mouseDoubleClickEvent(QMouseEvent* event)
|
|||
else
|
||||
{
|
||||
duint instr = this->getInstrForMouseEvent(event);
|
||||
|
||||
//Add address to history
|
||||
if(!mHistoryLock)
|
||||
mHistory.addVaToHistory(instr);
|
||||
|
||||
DbgCmdExec(QString("graph dis.branchdest(%1), silent").arg(ToPtrString(instr)).toUtf8().constData());
|
||||
}
|
||||
}
|
||||
|
@ -1779,8 +1783,13 @@ void DisassemblerGraphView::keyPressEvent(QKeyEvent* event)
|
|||
DbgCmdExec(QString("graph dis.brtrue(%1), silent").arg(ToPtrString(cur_instr)).toUtf8().constData());
|
||||
else if(key == Qt::Key_Right)
|
||||
DbgCmdExec(QString("graph dis.brfalse(%1), silent").arg(ToPtrString(cur_instr)).toUtf8().constData());
|
||||
if(key == Qt::Key_Return || key == Qt::Key_Enter)
|
||||
else if(key == Qt::Key_Return || key == Qt::Key_Enter)
|
||||
{
|
||||
//Add address to history
|
||||
if(!mHistoryLock)
|
||||
mHistory.addVaToHistory(cur_instr);
|
||||
DbgCmdExec(QString("graph dis.branchdest(%1), silent").arg(ToPtrString(cur_instr)).toUtf8().constData());
|
||||
}
|
||||
}
|
||||
|
||||
void DisassemblerGraphView::followDisassemblerSlot()
|
||||
|
|
Loading…
Reference in New Issue