1
0
Fork 0

GUI: fixed GotoDialog and quotes in the expression

This commit is contained in:
mrexodia 2016-08-30 22:55:08 +02:00
parent 20d19cdb60
commit 21cb469792
No known key found for this signature in database
GPG Key ID: FC89E0AAA0C1AAD8
4 changed files with 10 additions and 7 deletions

View File

@ -967,7 +967,8 @@ void CPUDisassembly::gotoExpressionSlot()
mGoto = new GotoDialog(this);
if(mGoto->exec() == QDialog::Accepted)
{
DbgCmdExec(QString().sprintf("disasm \"%s\"", mGoto->expressionText.toUtf8().constData()).toUtf8().constData());
duint value = DbgValFromString(mGoto->expressionText.toUtf8().constData());
DbgCmdExec(QString().sprintf("disasm %p", value).toUtf8().constData());
}
}

View File

@ -458,8 +458,8 @@ void CPUDump::gotoExpressionSlot()
mGoto->setWindowTitle(tr("Enter expression to follow in Dump..."));
if(mGoto->exec() == QDialog::Accepted)
{
QString cmd;
DbgCmdExec(cmd.sprintf("dump \"%s\"", mGoto->expressionText.toUtf8().constData()).toUtf8().constData());
duint value = DbgValFromString(mGoto->expressionText.toUtf8().constData());
DbgCmdExec(QString().sprintf("dump %p", value).toUtf8().constData());
}
}
@ -1447,8 +1447,7 @@ void CPUDump::syncWithExpressionSlot()
if(gotoDialog.exec() != QDialog::Accepted)
return;
mSyncAddrExpression = gotoDialog.expressionText;
if(mSyncAddrExpression.length())
DbgCmdExec(QString("dump \"%1\"").arg(mSyncAddrExpression).toUtf8().constData());
updateDumpSlot();
}
void CPUDump::followInDumpNSlot()

View File

@ -730,7 +730,10 @@ void CPUStack::gotoExpressionSlot()
mGoto->validRangeEnd = base + size;
mGoto->setWindowTitle(tr("Enter expression to follow in Stack..."));
if(mGoto->exec() == QDialog::Accepted)
DbgCmdExec(QString("sdump \"%1\"").arg(mGoto->expressionText).toUtf8().constData());
{
duint value = DbgValFromString(mGoto->expressionText.toUtf8().constData());
DbgCmdExec(QString().sprintf("sdump %p", value).toUtf8().constData());
}
}
void CPUStack::gotoPreviousSlot()

View File

@ -75,7 +75,7 @@ void HexLineEdit::setData(const QByteArray & data)
break;
case Encoding::Unicode:
text = QString::fromUtf16((const ushort *)data.constData());
text = QString::fromUtf16((const ushort*)data.constData());
break;
}
for(auto & i : text)