Skip to content

Commit c9abfd5

Browse files
committed
GUI: put current selection in the initial goto dialog expression
related to x64dbg#1812
1 parent f4cdecd commit c9abfd5

File tree

3 files changed

+3
-0
lines changed

3 files changed

+3
-0
lines changed

src/gui/Src/Gui/CPUDisassembly.cpp

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -981,6 +981,7 @@ void CPUDisassembly::gotoExpressionSlot()
981981
return;
982982
if(!mGoto)
983983
mGoto = new GotoDialog(this);
984+
mGoto->setInitialExpression(ToPtrString(rvaToVa(getInitialSelection())));
984985
if(mGoto->exec() == QDialog::Accepted)
985986
{
986987
duint value = DbgValFromString(mGoto->expressionText.toUtf8().constData());

src/gui/Src/Gui/CPUDump.cpp

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -563,6 +563,7 @@ void CPUDump::gotoExpressionSlot()
563563
if(!mGoto)
564564
mGoto = new GotoDialog(this);
565565
mGoto->setWindowTitle(tr("Enter expression to follow in Dump..."));
566+
mGoto->setInitialExpression(ToPtrString(rvaToVa(getInitialSelection())));
566567
if(mGoto->exec() == QDialog::Accepted)
567568
{
568569
duint value = DbgValFromString(mGoto->expressionText.toUtf8().constData());

src/gui/Src/Gui/CPUStack.cpp

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -652,6 +652,7 @@ void CPUStack::gotoExpressionSlot()
652652
mGoto->validRangeStart = base;
653653
mGoto->validRangeEnd = base + size;
654654
mGoto->setWindowTitle(tr("Enter expression to follow in Stack..."));
655+
mGoto->setInitialExpression(ToPtrString(rvaToVa(getInitialSelection())));
655656
if(mGoto->exec() == QDialog::Accepted)
656657
{
657658
duint value = DbgValFromString(mGoto->expressionText.toUtf8().constData());

0 commit comments

Comments
 (0)