From 7541c8910d72940fe558ab55109c0e48b385a418 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Florian=20M=C3=A4rkl?= Date: Tue, 8 Dec 2020 10:46:30 +0100 Subject: [PATCH] Update Rizin --- docs/source/building.rst | 4 +-- .../source/user-docs/preferences/analysis.rst | 20 ++++++------- rizin | 2 +- src/dialogs/preferences/AnalOptionsWidget.cpp | 28 +++++++++---------- src/dialogs/preferences/AnalOptionsWidget.h | 16 +++++------ src/dialogs/preferences/AnalOptionsWidget.ui | 20 ++++++------- src/lib_radare2.pri | 10 +++---- src/plugins/sample-cpp/CutterSamplePlugin.pro | 2 +- 8 files changed, 51 insertions(+), 51 deletions(-) diff --git a/docs/source/building.rst b/docs/source/building.rst index c4565aeb..fe84132c 100644 --- a/docs/source/building.rst +++ b/docs/source/building.rst @@ -319,7 +319,7 @@ The workaround is to either add the `--disable-new-dtags` linker flag when compi * **r_*.h: No such file or directory** - r_util/r_annotated_code.h: No such file or directory + rz_util/rz_annotated_code.h: No such file or directory If you face an error where some header file starting with ``r_`` is missing, you should check the **radare2** submodule and make sure it is in sync with upstream **Cutter** repo. Simply run: @@ -328,7 +328,7 @@ make sure it is in sync with upstream **Cutter** repo. Simply run: git submodule update --init --recursive -* **r_core development package not found** +* **rz_core development package not found** If you installed radare2 and still encounter this error, it could be that your ``PATH`` environment variable is set improperly (doesn’t contain diff --git a/docs/source/user-docs/preferences/analysis.rst b/docs/source/user-docs/preferences/analysis.rst index 377afb5a..55442a03 100644 --- a/docs/source/user-docs/preferences/analysis.rst +++ b/docs/source/user-docs/preferences/analysis.rst @@ -30,13 +30,13 @@ Select the boundaries in which the analyis will be performed. The different opti - Current mapped section (``bin.section``) - All mapped sections (``bin.sections``) -**Configuration variable:** ``anal.in`` +**Configuration variable:** ``analysis.in`` Speculatively set a name for the functions ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ Try to name functions without symbols by using artifacts in the functions such as API calls and strings. -**Configuration variable:** ``anal.autoname`` +**Configuration variable:** ``analysis.autoname`` Search for new functions following already defined functions @@ -44,7 +44,7 @@ Search for new functions following already defined functions Cutter will check if there is a candidate for a new function following an already defined one, as the compiler usually state them together. This option is taking the advantages of both Recursive Analysis and Linear Sweep into some kind of a hybrid mode. For each discovered function, the analysis will try to check for a function-prologue, usually following a gap of null bytes or ``cc`` bytes. This will help with discovering functions which are not referenced in the program. As such, it will make the analysis slower and prone to false-positives. -**Configuration variable:** ``anal.hasnext`` +**Configuration variable:** ``analysis.hasnext`` Create references for unconditional jumps @@ -52,14 +52,14 @@ Create references for unconditional jumps When encountering unconditional jumps during the analysis, Cutter will add a code-reference even if it is not guaranteed that the jump will take place. -**Configuration variable:** ``anal.jmp.ref`` +**Configuration variable:** ``analysis.jmp.ref`` Analyze jump tables in switch statements ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ When encountering switch statements during analysis, continue and analyze the target blocks of the jump tables. -**Configuration variable:** ``anal.jmp.tbl`` +**Configuration variable:** ``analysis.jmp.tbl`` Analyze ``push`` + ``ret`` as ``jmp`` @@ -67,7 +67,7 @@ Analyze ``push`` + ``ret`` as ``jmp`` When performing analysis of a function, treat the sequence of ``push`` followed by ``ret`` instruction as a ``jmp``. This can help Cutter to continue the analysis to target of the ``jmp``. -**Configuration variable:** ``anal.pushret`` +**Configuration variable:** ``analysis.pushret`` Show verbose information when performing analysis @@ -76,7 +76,7 @@ When enabled, Cutter will print warnings it encountered while preforming analysi understand if anything went wrong in the analysis. This function is not only helpful when trying to perform a full analysis of the program, but also when trying to analyze and define new functions. -**Configuration variable:** ``anal.verbose`` +**Configuration variable:** ``analysis.verbose`` Verbose output from type analysis @@ -84,16 +84,16 @@ Verbose output from type analysis Print warnings encountered while preforming type analysis. These warnings can help the user understand if anything went wrong in the analysis. -**Configuration variable:** ``anal.types.verbose`` +**Configuration variable:** ``analysis.types.verbose`` Pointer depth ~~~~~~~~~~~~~ The maximum number of nested pointers to follow in analysis. -**Configuration variable:** ``anal.ptrdepth`` +**Configuration variable:** ``analysis.ptrdepth`` Functions prelude ~~~~~~~ Hex value that represents certain opcodes that will be used to identify functions. -**Configuration variable:** ``anal.prelude`` +**Configuration variable:** ``analysis.prelude`` diff --git a/rizin b/rizin index ad36954a..d53d1e38 160000 --- a/rizin +++ b/rizin @@ -1 +1 @@ -Subproject commit ad36954adbd607e9441130e0991c8027a015dd75 +Subproject commit d53d1e38453850d7caf7e631365a6b9f2763c282 diff --git a/src/dialogs/preferences/AnalOptionsWidget.cpp b/src/dialogs/preferences/AnalOptionsWidget.cpp index 51d83c90..3427e11f 100644 --- a/src/dialogs/preferences/AnalOptionsWidget.cpp +++ b/src/dialogs/preferences/AnalOptionsWidget.cpp @@ -24,16 +24,16 @@ AnalOptionsWidget::AnalOptionsWidget(PreferencesDialog *dialog) ui->setupUi(this); checkboxes = { - { ui->autonameCheckbox, "anal.autoname" }, - { ui->hasnextCheckbox, "anal.hasnext" }, - { ui->jmpRefCheckbox, "anal.jmp.ref" }, - { ui->jmpTblCheckbox, "anal.jmp.tbl" }, - { ui->pushRetCheckBox, "anal.pushret" }, - { ui->typesVerboseCheckBox, "anal.types.verbose" }, - { ui->verboseCheckBox, "anal.verbose" } + { ui->autonameCheckbox, "analysis.autoname" }, + { ui->hasnextCheckbox, "analysis.hasnext" }, + { ui->jmpRefCheckbox, "analysis.jmp.ref" }, + { ui->jmpTblCheckbox, "analysis.jmp.tbl" }, + { ui->pushRetCheckBox, "analysis.pushret" }, + { ui->typesVerboseCheckBox, "analysis.types.verbose" }, + { ui->verboseCheckBox, "analysis.verbose" } }; - // Create list of options for the anal.in selector + // Create list of options for the analysis.in selector createAnalInOptionsList(); // Connect each checkbox from "checkboxes" to the generic signal "checkboxEnabler" @@ -69,24 +69,24 @@ void AnalOptionsWidget::updateAnalOptionsFromVars() } // Update the rest of analysis options that are not checkboxes - ui->analInComboBox->setCurrentIndex(ui->analInComboBox->findData(Core()->getConfig("anal.in"))); - ui->ptrDepthSpinBox->setValue(Core()->getConfigi("anal.ptrdepth")); - ui->preludeLineEdit->setText(Core()->getConfig("anal.prelude")); + ui->analInComboBox->setCurrentIndex(ui->analInComboBox->findData(Core()->getConfig("analysis.in"))); + ui->ptrDepthSpinBox->setValue(Core()->getConfigi("analysis.ptrdepth")); + ui->preludeLineEdit->setText(Core()->getConfig("analysis.prelude")); } void AnalOptionsWidget::updateAnalIn(int index) { - Config()->setConfig("anal.in", ui->analInComboBox->itemData(index).toString()); + Config()->setConfig("analysis.in", ui->analInComboBox->itemData(index).toString()); } void AnalOptionsWidget::updateAnalPtrDepth(int value) { - Config()->setConfig("anal.ptrdepth", value); + Config()->setConfig("analysis.ptrdepth", value); } void AnalOptionsWidget::updateAnalPrelude(const QString &prelude) { - Config()->setConfig("anal.prelude", prelude); + Config()->setConfig("analysis.prelude", prelude); } void AnalOptionsWidget::createAnalInOptionsList() diff --git a/src/dialogs/preferences/AnalOptionsWidget.h b/src/dialogs/preferences/AnalOptionsWidget.h index b7aa65b8..d7e8250a 100644 --- a/src/dialogs/preferences/AnalOptionsWidget.h +++ b/src/dialogs/preferences/AnalOptionsWidget.h @@ -29,13 +29,13 @@ private: QList checkboxes; /** - * @brief This function creates the list with the different options shown in the selector for anal.in + * @brief This function creates the list with the different options shown in the selector for analysis.in */ void createAnalInOptionsList(); private slots: /** - * @brief A slot to display the options in the dialog according to the current anal.* configuration + * @brief A slot to display the options in the dialog according to the current analysis.* configuration */ void updateAnalOptionsFromVars(); @@ -48,20 +48,20 @@ private slots: static void checkboxEnabler(QCheckBox *checkbox, const QString &config); /** - * @brief A slot to update the value of anal.in when a different option is selected - * @param index - The index of the selected option for anal.in + * @brief A slot to update the value of analysis.in when a different option is selected + * @param index - The index of the selected option for analysis.in */ void updateAnalIn(int index); /** - * @brief A slot to update the value of anal.ptrdepth when a new value is selected - * @param value - The new value for anal.ptrdepth + * @brief A slot to update the value of analysis.ptrdepth when a new value is selected + * @param value - The new value for analysis.ptrdepth */ static void updateAnalPtrDepth(int value); /** - * @brief slot to update the value of anal.prelude when a new value is introduced in the corresponding textbox - * @param prelude - The new value for anal.prelude + * @brief slot to update the value of analysis.prelude when a new value is introduced in the corresponding textbox + * @param prelude - The new value for analysis.prelude */ static void updateAnalPrelude(const QString &prelude); }; diff --git a/src/dialogs/preferences/AnalOptionsWidget.ui b/src/dialogs/preferences/AnalOptionsWidget.ui index 5e272051..725506f4 100644 --- a/src/dialogs/preferences/AnalOptionsWidget.ui +++ b/src/dialogs/preferences/AnalOptionsWidget.ui @@ -52,7 +52,7 @@ - Show verbose information when performing analysis (anal.verbose) + Show verbose information when performing analysis (analysis.verbose) @@ -65,7 +65,7 @@ - Analyze push+ret as jmp (anal.pushret) + Analyze push+ret as jmp (analysis.pushret) @@ -78,7 +78,7 @@ - Verbose output from type analysis (anal.types.verbose) + Verbose output from type analysis (analysis.types.verbose) @@ -91,7 +91,7 @@ - Speculatively set a name for the functions (anal.autoname) + Speculatively set a name for the functions (analysis.autoname) @@ -104,7 +104,7 @@ - Search for new functions following already defined functions (anal.hasnext) + Search for new functions following already defined functions (analysis.hasnext) @@ -117,7 +117,7 @@ - Create references for unconditional jumps (anal.jmp.ref) + Create references for unconditional jumps (analysis.jmp.ref) @@ -130,7 +130,7 @@ - Analyze jump tables in switch statements (anal.jmp.tbl) + Analyze jump tables in switch statements (analysis.jmp.tbl) @@ -158,7 +158,7 @@ - Search boundaries for analysis (anal.in): + Search boundaries for analysis (analysis.in): @@ -192,7 +192,7 @@ - Pointer depth (anal.ptrdepth): + Pointer depth (analysis.ptrdepth): @@ -233,7 +233,7 @@ - Functions Prelude (anal.prelude): + Functions Prelude (analysis.prelude): diff --git a/src/lib_radare2.pri b/src/lib_radare2.pri index 8ec7a4a2..aa2fd3ac 100644 --- a/src/lib_radare2.pri +++ b/src/lib_radare2.pri @@ -42,7 +42,7 @@ win32 { PKG_CONFIG_PATH=$$PKG_CONFIG_PATH:$$R2_USER_PKGCONFIG } else { unix { - exists($$R2PREFIX/lib/pkgconfig/r_core.pc) { + exists($$R2PREFIX/lib/pkgconfig/rz_core.pc) { PKG_CONFIG_PATH=$$PKG_CONFIG_PATH:$$R2PREFIX/lib/pkgconfig } else { LIBS += -L$$R2PREFIX/lib @@ -58,7 +58,7 @@ win32 { USE_PKGCONFIG = 0 } bsd { - !exists($$PKG_CONFIG_PATH/r_core.pc) { + !exists($$PKG_CONFIG_PATH/rz_core.pc) { LIBS += -L$$R2PREFIX/lib R2_INCLUDEPATH += $$R2PREFIX/include/libr R2_INCLUDEPATH += $$R2PREFIX/include/libr/sdb @@ -72,9 +72,9 @@ win32 { DEFINES += _CRT_SECURE_NO_WARNINGS equals(USE_PKGCONFIG, 1) { CONFIG += link_pkgconfig - PKGCONFIG += r_core - R2_INCLUDEPATH = "$$system("pkg-config --variable=includedir r_core")/libr" - R2_INCLUDEPATH += "$$system("pkg-config --variable=includedir r_core")/libr/sdb" + PKGCONFIG += rz_core + R2_INCLUDEPATH = "$$system("pkg-config --variable=includedir rz_core")/libr" + R2_INCLUDEPATH += "$$system("pkg-config --variable=includedir rz_core")/libr/sdb" } else { LIBS += \ -lr_core \ diff --git a/src/plugins/sample-cpp/CutterSamplePlugin.pro b/src/plugins/sample-cpp/CutterSamplePlugin.pro index f4789527..c65aca87 100644 --- a/src/plugins/sample-cpp/CutterSamplePlugin.pro +++ b/src/plugins/sample-cpp/CutterSamplePlugin.pro @@ -2,7 +2,7 @@ HEADERS += ../CutterSamplePlugin.h ../CutterPlugin.h INCLUDEPATH += ../ ../../ ../../core ../../widgets SOURCES += CutterSamplePlugin.cpp -QMAKE_CXXFLAGS += $$system("pkg-config --cflags r_core") +QMAKE_CXXFLAGS += $$system("pkg-config --cflags rz_core") TEMPLATE = lib CONFIG += plugin