diff --git a/src/common/AnalTask.cpp b/src/common/AnalTask.cpp index 26698639..64089f61 100644 --- a/src/common/AnalTask.cpp +++ b/src/common/AnalTask.cpp @@ -81,8 +81,6 @@ void AnalTask::runTask() Core()->setEndianness(options.endian == InitialOptions::Endianness::Big); } - Core()->setBBSize(options.bbsize); - Core()->cmd("fs *"); if (!options.script.isNull()) { diff --git a/src/common/InitialOptions.h b/src/common/InitialOptions.h index 52b1e9ce..65a86edf 100644 --- a/src/common/InitialOptions.h +++ b/src/common/InitialOptions.h @@ -30,8 +30,6 @@ struct InitialOptions QString pdbFile; QString script; - int bbsize = 0; - QList analCmd = { "aaa" }; QString shellcode; diff --git a/src/core/Cutter.cpp b/src/core/Cutter.cpp index f5e21047..4ea90e3b 100644 --- a/src/core/Cutter.cpp +++ b/src/core/Cutter.cpp @@ -768,11 +768,6 @@ void CutterCore::setEndianness(bool big) setConfig("cfg.bigendian", big); } -void CutterCore::setBBSize(int size) -{ - setConfig("anal.bb.maxsize", size); -} - QByteArray CutterCore::assemble(const QString &code) { CORE_LOCK(); diff --git a/src/core/Cutter.h b/src/core/Cutter.h index 75e9fcff..0b2369f1 100644 --- a/src/core/Cutter.h +++ b/src/core/Cutter.h @@ -195,7 +195,6 @@ public: void setCPU(QString arch, QString cpu, int bits); void setEndianness(bool big); - void setBBSize(int size); /* SDB */ QList sdbList(QString path); diff --git a/src/dialogs/InitialOptionsDialog.cpp b/src/dialogs/InitialOptionsDialog.cpp index ae74c37d..329ba6d3 100644 --- a/src/dialogs/InitialOptionsDialog.cpp +++ b/src/dialogs/InitialOptionsDialog.cpp @@ -28,8 +28,9 @@ InitialOptionsDialog::InitialOptionsDialog(MainWindow *main): // Fill the plugins combo asm_plugins = core->getAsmPluginNames(); - for (const auto &plugin : asm_plugins) + for (const auto &plugin : asm_plugins) { ui->archComboBox->addItem(plugin, plugin); + } ui->archComboBox->setToolTip(core->cmd("e? asm.arch").trimmed()); // cpu combo box @@ -38,16 +39,16 @@ InitialOptionsDialog::InitialOptionsDialog(MainWindow *main): updateCPUComboBox(); // os combo box - for (const auto &plugin : core->cmdList("e asm.os=?")) + for (const auto &plugin : core->cmdList("e asm.os=?")) { ui->kernelComboBox->addItem(plugin, plugin); + } ui->kernelComboBox->setToolTip(core->cmd("e? asm.os").trimmed()); ui->bitsComboBox->setToolTip(core->cmd("e? asm.bits").trimmed()); - ui->entry_analbb->setToolTip(core->cmd("e? anal.bb.maxsize").trimmed()); - - for (const auto &plugin : core->getRBinPluginDescriptions("bin")) + for (const auto &plugin : core->getRBinPluginDescriptions("bin")) { ui->formatComboBox->addItem(plugin.name, QVariant::fromValue(plugin)); + } ui->hideFrame->setVisible(false); ui->analoptionsFrame->setVisible(false); @@ -75,8 +76,9 @@ void InitialOptionsDialog::updateCPUComboBox() QString cmd = "e asm.cpu=?"; QString arch = getSelectedArch(); - if (!arch.isNull()) + if (!arch.isNull()) { cmd += " @a:" + arch; + } ui->cpuComboBox->addItem(""); ui->cpuComboBox->addItems(core->cmdList(cmd)); @@ -135,8 +137,9 @@ QString InitialOptionsDialog::getSelectedArch() const QString InitialOptionsDialog::getSelectedCPU() const { QString cpu = ui->cpuComboBox->currentText(); - if (cpu.isNull() || cpu.isEmpty()) + if (cpu.isNull() || cpu.isEmpty()) { return nullptr; + } return cpu; } @@ -150,16 +153,6 @@ int InitialOptionsDialog::getSelectedBits() const return 0; } -int InitialOptionsDialog::getSelectedBBSize() const -{ - QString sel_bbsize = ui->entry_analbb->text(); - bool ok; - int bbsize = sel_bbsize.toInt(&ok); - if (ok) - return bbsize; - return 1024; -} - InitialOptions::Endianness InitialOptionsDialog::getSelectedEndianness() const { switch (ui->endiannessComboBox->currentIndex()) { @@ -266,7 +259,6 @@ void InitialOptionsDialog::setupAndStartAnalysis(/*int level, QList adv options.endian = getSelectedEndianness(); - options.bbsize = getSelectedBBSize(); int level = ui->analSlider->value(); switch (level) { diff --git a/src/dialogs/InitialOptionsDialog.h b/src/dialogs/InitialOptionsDialog.h index ddb1a899..60534b50 100644 --- a/src/dialogs/InitialOptionsDialog.h +++ b/src/dialogs/InitialOptionsDialog.h @@ -53,7 +53,6 @@ private: QString getSelectedArch() const; QString getSelectedCPU() const; int getSelectedBits() const; - int getSelectedBBSize() const; InitialOptions::Endianness getSelectedEndianness() const; QString getSelectedOS() const; QList getSelectedAdvancedAnalCmds() const; diff --git a/src/dialogs/InitialOptionsDialog.ui b/src/dialogs/InitialOptionsDialog.ui index 78de457b..8953d379 100644 --- a/src/dialogs/InitialOptionsDialog.ui +++ b/src/dialogs/InitialOptionsDialog.ui @@ -933,38 +933,6 @@ - - - - - 0 - 0 - - - - - 0 - 0 - - - - BasicBlock maxsize: - - - - - - - 1024 - - - false - - - Qt::AlignRight|Qt::AlignTrailing|Qt::AlignVCenter - - -