Remember some window settings, copy old value, UI enhancement
This commit is contained in:
parent
a6313b45f5
commit
10c26e783b
|
@ -6,7 +6,7 @@
|
|||
|
||||
[](https://telegram.me/x64dbg) [](https://invite.gg/x64dbg) [](https://x64dbg-slack.herokuapp.com) [](https://gitter.im/x64dbg/x64dbg) [](https://webchat.freenode.net/?channels=x64dbg) [](https://riot.im/app/#/room/#x64dbg:matrix.org) [](https://inverse.chat/#converse/room?jid=x64dbg@conference.jwchat.org)
|
||||
|
||||
一个开源的Windows二进制调试器,旨在进行恶意软件分析和你没有源代码的可执行文件的逆向工程。有许多可用的功能和一个全面的[插件系统](http://plugins.x64dbg.com) 来添加你自己的功能。你可以在[博客](https://x64dbg.com/blog)!上找到更多信息!
|
||||
一个开源的Windows二进制调试器,旨在进行恶意软件分析和你没有源代码的可执行文件的逆向工程。有许多可用的功能和一个全面的[插件系统](http://plugins.x64dbg.com) 来添加你自己的功能。你可以在[博客](https://x64dbg.com/blog)上找到更多信息!
|
||||
|
||||
## 屏幕截图
|
||||
|
||||
|
@ -30,7 +30,7 @@
|
|||
|
||||
- 调试器核心由[TitanEngine社区版](https://github.com/x64dbg/TitanEngine)提供技术支持
|
||||
- 反汇编引擎由 [Zydis](https://zydis.re)提供技术支持
|
||||
- 组件由 [XEDParse](https://github.com/x64dbg/XEDParse) 和 [asmjit](https://github.com/asmjit)提供技术支持
|
||||
- 汇编由 [XEDParse](https://github.com/x64dbg/XEDParse) 和 [asmjit](https://github.com/asmjit)提供技术支持
|
||||
- 导入重建由 [Scylla](https://github.com/NtQuery/Scylla)提供技术支持
|
||||
- JSON由 [Jansson](https://www.digip.org/jansson)提供技术支持
|
||||
- 数据库优化由 [lz4](https://bitbucket.org/mrexodia/lz4)提供技术支持
|
||||
|
|
|
@ -18,6 +18,7 @@ CPURegistersView::CPURegistersView(CPUWidget* parent) : RegistersView(parent), m
|
|||
wCM_Modify->setShortcut(QKeySequence(Qt::Key_Enter));
|
||||
wCM_ToggleValue = setupAction(DIcon("register_toggle.png"), tr("Toggle"));
|
||||
wCM_Undo = setupAction(DIcon("undo.png"), tr("Undo"));
|
||||
wCM_CopyPrevious = setupAction(DIcon("undo.png"), "");
|
||||
wCM_FollowInDisassembly = new QAction(DIcon(QString("processor%1.png").arg(ArchValue("32", "64"))), tr("Follow in Disassembler"), this);
|
||||
wCM_FollowInDump = new QAction(DIcon("dump.png"), tr("Follow in Dump"), this);
|
||||
wCM_FollowInStack = new QAction(DIcon("stack.png"), tr("Follow in Stack"), this);
|
||||
|
@ -37,6 +38,7 @@ CPURegistersView::CPURegistersView(CPUWidget* parent) : RegistersView(parent), m
|
|||
connect(wCM_Modify, SIGNAL(triggered()), this, SLOT(onModifyAction()));
|
||||
connect(wCM_ToggleValue, SIGNAL(triggered()), this, SLOT(onToggleValueAction()));
|
||||
connect(wCM_Undo, SIGNAL(triggered()), this, SLOT(onUndoAction()));
|
||||
connect(wCM_CopyPrevious, SIGNAL(triggered()), this, SLOT(onCopyPreviousAction()));
|
||||
connect(wCM_FollowInDisassembly, SIGNAL(triggered()), this, SLOT(onFollowInDisassembly()));
|
||||
connect(wCM_FollowInDump, SIGNAL(triggered()), this, SLOT(onFollowInDump()));
|
||||
connect(wCM_FollowInStack, SIGNAL(triggered()), this, SLOT(onFollowInStack()));
|
||||
|
@ -441,6 +443,11 @@ void CPURegistersView::onUndoAction()
|
|||
}
|
||||
}
|
||||
|
||||
void CPURegistersView::onCopyPreviousAction()
|
||||
{
|
||||
Bridge::CopyToClipboard(wCM_CopyPrevious->data().toString());
|
||||
}
|
||||
|
||||
void CPURegistersView::onHighlightSlot()
|
||||
{
|
||||
Disassembly* CPUDisassemblyView = mParent->getDisasmWidget();
|
||||
|
@ -580,6 +587,9 @@ void CPURegistersView::displayCustomContextMenuSlot(QPoint pos)
|
|||
if(mUNDODISPLAY.contains(mSelected) && CompareRegisters(mSelected, &wRegDumpStruct, &wCipRegDumpStruct) != 0)
|
||||
{
|
||||
wMenu.addAction(wCM_Undo);
|
||||
wCM_CopyPrevious->setData(GetRegStringValueFromValue(mSelected, registerValue(&wCipRegDumpStruct, mSelected)));
|
||||
wCM_CopyPrevious->setText(tr("Copy old value: %1").arg(wCM_CopyPrevious->data().toString()));
|
||||
wMenu.addAction(wCM_CopyPrevious);
|
||||
}
|
||||
|
||||
if(mBOOLDISPLAY.contains(mSelected))
|
||||
|
|
|
@ -24,6 +24,7 @@ protected slots:
|
|||
void onModifyAction();
|
||||
void onToggleValueAction();
|
||||
void onUndoAction();
|
||||
void onCopyPreviousAction();
|
||||
void onFollowInDisassembly();
|
||||
void onFollowInDump();
|
||||
void onFollowInDumpN();
|
||||
|
@ -43,6 +44,7 @@ private:
|
|||
QAction* mFollowInDump;
|
||||
QAction* wCM_Modify;
|
||||
QAction* wCM_ToggleValue;
|
||||
QAction* wCM_CopyPrevious;
|
||||
QAction* wCM_Undo;
|
||||
QAction* wCM_FollowInDisassembly;
|
||||
QAction* wCM_FollowInDump;
|
||||
|
|
|
@ -42,6 +42,9 @@
|
|||
</property>
|
||||
<item row="1" column="0">
|
||||
<widget class="QLabel" name="labelLogText">
|
||||
<property name="toolTip">
|
||||
<string><html><head/><body><p>This text will be logged whenever the log condition is true.</p><p>String formatting can be used to print variables.</p></body></html></string>
|
||||
</property>
|
||||
<property name="text">
|
||||
<string>&Log Text:</string>
|
||||
</property>
|
||||
|
@ -52,6 +55,9 @@
|
|||
</item>
|
||||
<item row="0" column="0">
|
||||
<widget class="QLabel" name="labelBreakCondition">
|
||||
<property name="toolTip">
|
||||
<string><html><head/><body><p>If this expression is evaluated to 1 the breakpoint will break.</p><p>Set to <span style=" text-decoration: underline;">0</span> for a breakpoint that never breaks, but can still do logging and execute command.</p></body></html></string>
|
||||
</property>
|
||||
<property name="text">
|
||||
<string>&Break Condition:</string>
|
||||
</property>
|
||||
|
@ -90,6 +96,9 @@
|
|||
</item>
|
||||
<item row="2" column="0">
|
||||
<widget class="QLabel" name="labelLogCondition">
|
||||
<property name="toolTip">
|
||||
<string><html><head/><body><p>String logging is enabled whenever this expression is evaluated to 1.</p></body></html></string>
|
||||
</property>
|
||||
<property name="text">
|
||||
<string>Lo&g Condition:</string>
|
||||
</property>
|
||||
|
@ -110,6 +119,9 @@
|
|||
</item>
|
||||
<item row="3" column="0">
|
||||
<widget class="QLabel" name="labelCommandText">
|
||||
<property name="toolTip">
|
||||
<string><html><head/><body><p>This command will be executed whenever command condition is true.</p><p>Currently certain commands, for example, stepping from breakpoint command are not supported.</p></body></html></string>
|
||||
</property>
|
||||
<property name="text">
|
||||
<string>&Command Text:</string>
|
||||
</property>
|
||||
|
@ -137,6 +149,9 @@
|
|||
</item>
|
||||
<item row="6" column="0">
|
||||
<widget class="QLabel" name="labelHitCount">
|
||||
<property name="toolTip">
|
||||
<string><html><head/><body><p>The number of times the breakpoint is hit.</p></body></html></string>
|
||||
</property>
|
||||
<property name="text">
|
||||
<string>&Hit Count:</string>
|
||||
</property>
|
||||
|
@ -147,6 +162,9 @@
|
|||
</item>
|
||||
<item row="4" column="0">
|
||||
<widget class="QLabel" name="labelCommandCondition">
|
||||
<property name="toolTip">
|
||||
<string><html><head/><body><p>If this expression is evaluated to 1 the command specified above is executed when the breakpoint is hit.</p><p>Set the expression to <span style=" text-decoration: underline;">1</span> to always execute the command.</p></body></html></string>
|
||||
</property>
|
||||
<property name="text">
|
||||
<string>C&ommand Condition:</string>
|
||||
</property>
|
||||
|
@ -181,6 +199,9 @@
|
|||
</item>
|
||||
<item>
|
||||
<widget class="QCheckBox" name="checkBoxSingleshoot">
|
||||
<property name="toolTip">
|
||||
<string><html><head/><body><p>Remove the breakpoint once it pauses the debuggee.</p></body></html></string>
|
||||
</property>
|
||||
<property name="text">
|
||||
<string>Singlesho&ot</string>
|
||||
</property>
|
||||
|
@ -188,6 +209,9 @@
|
|||
</item>
|
||||
<item>
|
||||
<widget class="QCheckBox" name="checkBoxSilent">
|
||||
<property name="toolTip">
|
||||
<string><html><head/><body><p>Don't print the default breakpoint log.</p></body></html></string>
|
||||
</property>
|
||||
<property name="text">
|
||||
<string>&Silent</string>
|
||||
</property>
|
||||
|
@ -195,6 +219,9 @@
|
|||
</item>
|
||||
<item>
|
||||
<widget class="QCheckBox" name="checkBoxFastResume">
|
||||
<property name="toolTip">
|
||||
<string><html><head/><body><p>Don't enable extended conditional breakpoint features and plugins.</p></body></html></string>
|
||||
</property>
|
||||
<property name="text">
|
||||
<string>&Fast Resume</string>
|
||||
</property>
|
||||
|
|
|
@ -58,6 +58,21 @@ EditFloatRegister::EditFloatRegister(int RegisterSize, QWidget* parent) :
|
|||
ui->hexEdit->setValidator(&hexValidate);
|
||||
connect(ui->hexEdit_2, SIGNAL(textEdited(QString)), this, SLOT(editingHex2FinishedSlot(QString)));
|
||||
ui->hexEdit_2->setValidator(&hexValidate);
|
||||
QRadioButton* checkedRadio;
|
||||
switch(ConfigUint("Gui", "EditFloatRegisterDefaultMode"))
|
||||
{
|
||||
case 0:
|
||||
default:
|
||||
checkedRadio = ui->radioHex;
|
||||
break;
|
||||
case 1:
|
||||
checkedRadio = ui->radioSigned;
|
||||
break;
|
||||
case 2:
|
||||
checkedRadio = ui->radioUnsigned;
|
||||
break;
|
||||
}
|
||||
checkedRadio->setChecked(true);
|
||||
editingModeChangedSlot(false);
|
||||
connect(ui->radioHex, SIGNAL(toggled(bool)), this, SLOT(editingModeChangedSlot(bool)));
|
||||
connect(ui->radioSigned, SIGNAL(toggled(bool)), this, SLOT(editingModeChangedSlot(bool)));
|
||||
|
@ -473,6 +488,7 @@ void EditFloatRegister::editingModeChangedSlot(bool arg)
|
|||
ui->longLongEdit0_2->setValidator(&hexValidate);
|
||||
ui->longLongEdit1_2->setValidator(&hexValidate);
|
||||
}
|
||||
Config()->setUint("Gui", "EditFloatRegisterDefaultMode", 0);
|
||||
}
|
||||
else if(ui->radioSigned->isChecked())
|
||||
{
|
||||
|
@ -532,6 +548,7 @@ void EditFloatRegister::editingModeChangedSlot(bool arg)
|
|||
ui->longLongEdit1->setValidator(&signedLongLongValidator);
|
||||
ui->longLongEdit0_2->setValidator(&signedLongLongValidator);
|
||||
ui->longLongEdit1_2->setValidator(&signedLongLongValidator);
|
||||
Config()->setUint("Gui", "EditFloatRegisterDefaultMode", 1);
|
||||
}
|
||||
else
|
||||
{
|
||||
|
@ -587,6 +604,7 @@ void EditFloatRegister::editingModeChangedSlot(bool arg)
|
|||
ui->longLongEdit1->setValidator(&unsignedLongLongValidator);
|
||||
ui->longLongEdit0_2->setValidator(&unsignedLongLongValidator);
|
||||
ui->longLongEdit1_2->setValidator(&unsignedLongLongValidator);
|
||||
Config()->setUint("Gui", "EditFloatRegisterDefaultMode", 2);
|
||||
}
|
||||
reloadDataLow();
|
||||
if(RegSize > 128)
|
||||
|
|
|
@ -25,7 +25,7 @@ HexEditDialog::HexEditDialog(QWidget* parent) : QDialog(parent), ui(new Ui::HexE
|
|||
//setup text fields
|
||||
ui->lineEditAscii->setEncoding(QTextCodec::codecForName("System"));
|
||||
ui->lineEditUnicode->setEncoding(QTextCodec::codecForName("UTF-16"));
|
||||
|
||||
ui->chkKeepSize->setChecked(ConfigBool("HexDump", "KeepSize"));
|
||||
ui->chkEntireBlock->hide();
|
||||
|
||||
mDataInitialized = false;
|
||||
|
@ -86,7 +86,9 @@ HexEditDialog::HexEditDialog(QWidget* parent) : QDialog(parent), ui(new Ui::HexE
|
|||
for(int i = 0; i < DataLast; i++)
|
||||
ui->listType->addItem(mTypes[i].name);
|
||||
|
||||
QModelIndex index = ui->listType->model()->index(DataCByte, 0);
|
||||
duint lastDataType = ConfigUint("HexDump", "CopyDataType");
|
||||
lastDataType = std::min(lastDataType, static_cast<duint>(ui->listType->count() - 1));
|
||||
QModelIndex index = ui->listType->model()->index(lastDataType, 0);
|
||||
ui->listType->setCurrentIndex(index);
|
||||
|
||||
Config()->setupWindowPos(this);
|
||||
|
@ -162,10 +164,13 @@ void HexEditDialog::updateStyle()
|
|||
|
||||
void HexEditDialog::on_chkKeepSize_toggled(bool checked)
|
||||
{
|
||||
if(!this->isVisible())
|
||||
return;
|
||||
mHexEdit->setKeepSize(checked);
|
||||
ui->lineEditAscii->setKeepSize(checked);
|
||||
ui->lineEditUnicode->setKeepSize(checked);
|
||||
ui->lineEditCodepage->setKeepSize(checked);
|
||||
Config()->setBool("HexDump", "KeepSize", checked);
|
||||
}
|
||||
|
||||
void HexEditDialog::dataChangedSlot()
|
||||
|
@ -818,6 +823,7 @@ void HexEditDialog::on_listType_currentRowChanged(int currentRow)
|
|||
mIndex = currentRow;
|
||||
ui->spinBox->setValue(mTypes[mIndex].itemsPerLine);
|
||||
printData(DataType(mIndex));
|
||||
Config()->setUint("HexDump", "CopyDataType", currentRow);
|
||||
}
|
||||
|
||||
void HexEditDialog::on_buttonCopy_clicked()
|
||||
|
|
|
@ -505,6 +505,9 @@ void PatchDialog::on_btnImport_clicked()
|
|||
QList<QPair<DBGPATCHINFO, IMPORTSTATUS>> patchList;
|
||||
DBGPATCHINFO curPatch;
|
||||
|
||||
if(!filenamelist.size())
|
||||
return; // No files are selected, don't show the "No patches to apply in the current process." dialog.
|
||||
|
||||
for(const auto & filename1 : filenamelist)
|
||||
{
|
||||
if(!filename1.length())
|
||||
|
|
|
@ -328,6 +328,7 @@ Configuration::Configuration() : QObject(), noMoreMsgbox(false)
|
|||
AbstractTableView::setupColumnConfigDefaultValue(guiUint, "SourceView", 4);
|
||||
AbstractTableView::setupColumnConfigDefaultValue(guiUint, "Trace", 7);
|
||||
guiUint.insert("SIMDRegistersDisplayMode", 0);
|
||||
guiUint.insert("EditFloatRegisterDefaultMode", 0);
|
||||
addWindowPosConfig(guiUint, "AssembleDialog");
|
||||
addWindowPosConfig(guiUint, "AttachDialog");
|
||||
addWindowPosConfig(guiUint, "GotoDialog");
|
||||
|
@ -342,7 +343,11 @@ Configuration::Configuration() : QObject(), noMoreMsgbox(false)
|
|||
//uint settings
|
||||
QMap<QString, duint> hexdumpUint;
|
||||
hexdumpUint.insert("DefaultView", 0);
|
||||
hexdumpUint.insert("CopyDataType", 0);
|
||||
defaultUints.insert("HexDump", hexdumpUint);
|
||||
QMap<QString, bool> hexdumpBool;
|
||||
hexdumpBool.insert("KeepSize", false);
|
||||
defaultBools.insert("HexDump", hexdumpBool);
|
||||
|
||||
QMap<QString, duint> disasmUint;
|
||||
disasmUint.insert("MaxModuleSize", -1);
|
||||
|
|
Loading…
Reference in New Issue