Update Rizin

This commit is contained in:
Florian Märkl 2020-12-08 10:46:30 +01:00
parent 46f7a8e4f6
commit 7541c8910d
No known key found for this signature in database
GPG Key ID: 125BC8A5A6A1E857
8 changed files with 51 additions and 51 deletions

View File

@ -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 (doesnt contain

View File

@ -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``

2
rizin

@ -1 +1 @@
Subproject commit ad36954adbd607e9441130e0991c8027a015dd75
Subproject commit d53d1e38453850d7caf7e631365a6b9f2763c282

View File

@ -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()

View File

@ -29,13 +29,13 @@ private:
QList<ConfigCheckbox> 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);
};

View File

@ -52,7 +52,7 @@
</rect>
</property>
<property name="text">
<string>Show verbose information when performing analysis (anal.verbose)</string>
<string>Show verbose information when performing analysis (analysis.verbose)</string>
</property>
</widget>
<widget class="QCheckBox" name="pushRetCheckBox">
@ -65,7 +65,7 @@
</rect>
</property>
<property name="text">
<string>Analyze push+ret as jmp (anal.pushret)</string>
<string>Analyze push+ret as jmp (analysis.pushret)</string>
</property>
</widget>
<widget class="QCheckBox" name="typesVerboseCheckBox">
@ -78,7 +78,7 @@
</rect>
</property>
<property name="text">
<string>Verbose output from type analysis (anal.types.verbose)</string>
<string>Verbose output from type analysis (analysis.types.verbose)</string>
</property>
</widget>
<widget class="QCheckBox" name="autonameCheckbox">
@ -91,7 +91,7 @@
</rect>
</property>
<property name="text">
<string>Speculatively set a name for the functions (anal.autoname)</string>
<string>Speculatively set a name for the functions (analysis.autoname)</string>
</property>
</widget>
<widget class="QCheckBox" name="hasnextCheckbox">
@ -104,7 +104,7 @@
</rect>
</property>
<property name="text">
<string>Search for new functions following already defined functions (anal.hasnext)</string>
<string>Search for new functions following already defined functions (analysis.hasnext)</string>
</property>
</widget>
<widget class="QCheckBox" name="jmpRefCheckbox">
@ -117,7 +117,7 @@
</rect>
</property>
<property name="text">
<string>Create references for unconditional jumps (anal.jmp.ref)</string>
<string>Create references for unconditional jumps (analysis.jmp.ref)</string>
</property>
</widget>
<widget class="QCheckBox" name="jmpTblCheckbox">
@ -130,7 +130,7 @@
</rect>
</property>
<property name="text">
<string>Analyze jump tables in switch statements (anal.jmp.tbl)</string>
<string>Analyze jump tables in switch statements (analysis.jmp.tbl)</string>
</property>
</widget>
<widget class="QWidget" name="verticalLayoutWidget">
@ -158,7 +158,7 @@
</size>
</property>
<property name="text">
<string>Search boundaries for analysis (anal.in): </string>
<string>Search boundaries for analysis (analysis.in): </string>
</property>
</widget>
</item>
@ -192,7 +192,7 @@
</size>
</property>
<property name="text">
<string>Pointer depth (anal.ptrdepth):</string>
<string>Pointer depth (analysis.ptrdepth):</string>
</property>
</widget>
</item>
@ -233,7 +233,7 @@
</size>
</property>
<property name="text">
<string>Functions Prelude (anal.prelude):</string>
<string>Functions Prelude (analysis.prelude):</string>
</property>
</widget>
</item>

View File

@ -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 \

View File

@ -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