From 1c39aa6d418a4c86ac452abfef59f52c9856a6ee Mon Sep 17 00:00:00 2001 From: Itay Cohen Date: Tue, 21 Jan 2020 12:00:38 +0200 Subject: [PATCH] Add asm.flags.real to preferences and enable by default (#2014) --- src/common/Configuration.cpp | 1 + src/dialogs/preferences/AsmOptionsWidget.cpp | 1 + src/dialogs/preferences/AsmOptionsWidget.ui | 775 ++++++++++--------- 3 files changed, 418 insertions(+), 359 deletions(-) diff --git a/src/common/Configuration.cpp b/src/common/Configuration.cpp index d84e90ed..a1f84511 100644 --- a/src/common/Configuration.cpp +++ b/src/common/Configuration.cpp @@ -124,6 +124,7 @@ static const QHash asmOptions = { { "asm.tabs.off", 5 }, { "asm.marks", false }, { "asm.refptr", false }, + { "asm.flags.real", true }, { "esil.breakoninvalid",true }, { "graph.offset", false} }; diff --git a/src/dialogs/preferences/AsmOptionsWidget.cpp b/src/dialogs/preferences/AsmOptionsWidget.cpp index cdd5a025..05057f06 100644 --- a/src/dialogs/preferences/AsmOptionsWidget.cpp +++ b/src/dialogs/preferences/AsmOptionsWidget.cpp @@ -42,6 +42,7 @@ AsmOptionsWidget::AsmOptionsWidget(PreferencesDialog *dialog) { ui->emuStrCheckBox, "emu.str" }, { ui->varsumCheckBox, "asm.var.summary" }, { ui->sizeCheckBox, "asm.size" }, + { ui->realnameCheckBox, "asm.flags.real" } }; diff --git a/src/dialogs/preferences/AsmOptionsWidget.ui b/src/dialogs/preferences/AsmOptionsWidget.ui index 7f4eee5a..8311b114 100644 --- a/src/dialogs/preferences/AsmOptionsWidget.ui +++ b/src/dialogs/preferences/AsmOptionsWidget.ui @@ -7,7 +7,7 @@ 0 0 652 - 725 + 686 @@ -36,282 +36,331 @@ - - - - 0 - 0 - + + + QFrame::NoFrame - - Disassembly + + true - - - - - - Lowercase + + + + 0 + 0 + 583 + 668 + + + + + + + + 0 + 0 + - - - - Uppercase (asm.ucase) + + Disassembly - - - - Capitalize (asm.capitalize) - - - - - - - - 100 - - - 5 - - - - - - - Tabs in assembly (asm.tabs): - - - Qt::LinksAccessibleByMouse|Qt::TextSelectableByMouse - - - - - - - - - - 100 - - - 5 - - - - - - - Separate bytes with whitespace (asm.bytespace) - - - - - - - Syntax (asm.syntax): - - - Qt::LinksAccessibleByMouse|Qt::TextSelectableByMouse - - - - - - - Indent disassembly based on reflines depth (asm.indent) - - - - - - - Show offsets (asm.offset) - - - - - - - Tabs before assembly (asm.tabs.off): - - - Qt::LinksAccessibleByMouse|Qt::TextSelectableByMouse - - - - - - - Show Disassembly as: - - - Qt::LinksAccessibleByMouse|Qt::TextSelectableByMouse - - - - - - - Show empty line after every basic block (asm.bb.line) - - - - - - - Qt::Vertical - - - QSizePolicy::Fixed - - - - 20 - 10 - - - - - - - - - Normal - - - - - ESIL (asm.esil) - - - - - Pseudocode (asm.pseudo) - - - - - - - - Align bytes to the left (asm.lbytes) - - - - - - - Display the bytes of each instruction (asm.bytes) - - - - - - - - - - - 0 - 1 - - - - Comments - - - - - - - - Show opcode description (asm.describe) - - - - - - - - Normal - + + + + + true + + - - - Above instructions - + + + + true + + + Number of bytes to display (asm.nbytes): + + + Qt::LinksAccessibleByMouse|Qt::TextSelectableByMouse + + - - - Off - + + + + Tabs before assembly (asm.tabs.off): + + + Qt::LinksAccessibleByMouse|Qt::TextSelectableByMouse + + - - - - - - Show comments: - - - Qt::LinksAccessibleByMouse|Qt::TextSelectableByMouse - - - - - - - 100 - - - 5 - - - - - - - Column to align comments (asm.cmt.col): - - - Qt::LinksAccessibleByMouse|Qt::TextSelectableByMouse - - - - - - - Show x-refs (asm.xrefs) - - - - - - - Show refpointer information (asm.refptr) - - - - - - - - - Qt::Vertical - - - QSizePolicy::Fixed - - - - 20 - 10 - - - - - + + + + Show Disassembly as: + + + Qt::LinksAccessibleByMouse|Qt::TextSelectableByMouse + + + + + + + 100 + + + 5 + + + + + + + Separate bytes with whitespace (asm.bytespace) + + + + + + + Indent disassembly based on reflines depth (asm.indent) + + + + + + + 100 + + + 5 + + + + + + + Tabs in assembly (asm.tabs): + + + Qt::LinksAccessibleByMouse|Qt::TextSelectableByMouse + + + + + + + Align bytes to the left (asm.lbytes) + + + + + + + Qt::Vertical + + + QSizePolicy::Fixed + + + + 20 + 10 + + + + + + + + + Lowercase + + + + + Uppercase (asm.ucase) + + + + + Capitalize (asm.capitalize) + + + + + + + + + Normal + + + + + ESIL (asm.esil) + + + + + Pseudocode (asm.pseudo) + + + + + + + + Show empty line after every basic block (asm.bb.line) + + + + + + + Show offsets (asm.offset) + + + + + + + Syntax (asm.syntax): + + + Qt::LinksAccessibleByMouse|Qt::TextSelectableByMouse + + + + + + + Display the bytes of each instruction (asm.bytes) + + + + + + + + + + Display flags' real name (asm.flags.real) + + + + + + + + + + + 0 + 1 + + + + Comments + + + + + + + + Show opcode description (asm.describe) + + + + + + + + Normal + + + + + Above instructions + + + + + Off + + + + + + + + Show comments: + + + Qt::LinksAccessibleByMouse|Qt::TextSelectableByMouse + + + + + + + 100 + + + 5 + + + + + + + Column to align comments (asm.cmt.col): + + + Qt::LinksAccessibleByMouse|Qt::TextSelectableByMouse + + + + + + + Show x-refs (asm.xrefs) + + + + + + + Show refpointer information (asm.refptr) + + + + + + + + + Qt::Vertical + + + QSizePolicy::Fixed + + + + 20 + 10 + + + + + + + + + @@ -322,101 +371,109 @@ - - - Slow Analysis (asm.slow) + + + QFrame::StyledPanel + + true + + + + + 0 + 0 + 581 + 302 + + + + + + + Slow Analysis (asm.slow) + + + + + + + Show jump lines (asm.lines) + + + + + + + Show function boundary lines (asm.lines.fcn) + + + + + + + Show offset before flags (asm.flags.off) + + + + + + + Run ESIL emulation analysis (asm.emu) + + + + + + + Show only strings if any in the asm.emu output (emu.str) + + + + + + + Show size of opcodes in disassembly (asm.size) + + + + + + + Show variables summary instead of full list (asm.var.summary) + + + + + + + Substitute variables (asm.var.sub) + + + + + + + Substitute entire variable expressions with names (asm.var.subonly) + + + + + - - - Show jump lines (asm.lines) + + + Qt::Vertical - - - - - - Show function boundary lines (asm.lines.fcn) + + + 20 + 40 + - - - - - - Show offset before flags (asm.flags.off) - - - - - - - Run ESIL emulation analysis (asm.emu) - - - - - - - Show only strings if any in the asm.emu output (emu.str) - - - - - - - Show size of opcodes in disassembly (asm.size) - - - - - - - Show variables summary instead of full list (asm.var.summary) - - - - - - - 16 - - - - - true - - - Number of bytes to display (asm.nbytes): - - - Qt::LinksAccessibleByMouse|Qt::TextSelectableByMouse - - - - - - - true - - - - - - - - - Substitute variables (asm.var.sub) - - - - - - - Substitute entire variable expressions with names (asm.var.subonly) - - +