mirror of
https://github.com/rizinorg/cutter.git
synced 2024-12-18 10:56:11 +00:00
Update Rizin
This commit is contained in:
parent
46f7a8e4f6
commit
7541c8910d
@ -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_*.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
|
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:
|
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
|
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
|
If you installed radare2 and still encounter this error, it could be that your
|
||||||
``PATH`` environment variable is set improperly (doesn’t contain
|
``PATH`` environment variable is set improperly (doesn’t contain
|
||||||
|
@ -30,13 +30,13 @@ Select the boundaries in which the analyis will be performed. The different opti
|
|||||||
- Current mapped section (``bin.section``)
|
- Current mapped section (``bin.section``)
|
||||||
- All mapped sections (``bin.sections``)
|
- All mapped sections (``bin.sections``)
|
||||||
|
|
||||||
**Configuration variable:** ``anal.in``
|
**Configuration variable:** ``analysis.in``
|
||||||
|
|
||||||
Speculatively set a name for the functions
|
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.
|
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
|
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
|
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.
|
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
|
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
|
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.
|
that the jump will take place.
|
||||||
|
|
||||||
**Configuration variable:** ``anal.jmp.ref``
|
**Configuration variable:** ``analysis.jmp.ref``
|
||||||
|
|
||||||
|
|
||||||
Analyze jump tables in switch statements
|
Analyze jump tables in switch statements
|
||||||
~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
|
~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
|
||||||
When encountering switch statements during analysis, continue and analyze the target blocks of the jump tables.
|
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``
|
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``.
|
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``.
|
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
|
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
|
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.
|
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
|
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
|
Print warnings encountered while preforming type analysis. These warnings can help the user understand if anything went
|
||||||
wrong in the analysis.
|
wrong in the analysis.
|
||||||
|
|
||||||
**Configuration variable:** ``anal.types.verbose``
|
**Configuration variable:** ``analysis.types.verbose``
|
||||||
|
|
||||||
Pointer depth
|
Pointer depth
|
||||||
~~~~~~~~~~~~~
|
~~~~~~~~~~~~~
|
||||||
The maximum number of nested pointers to follow in analysis.
|
The maximum number of nested pointers to follow in analysis.
|
||||||
|
|
||||||
**Configuration variable:** ``anal.ptrdepth``
|
**Configuration variable:** ``analysis.ptrdepth``
|
||||||
|
|
||||||
Functions prelude
|
Functions prelude
|
||||||
~~~~~~~
|
~~~~~~~
|
||||||
Hex value that represents certain opcodes that will be used to identify functions.
|
Hex value that represents certain opcodes that will be used to identify functions.
|
||||||
|
|
||||||
**Configuration variable:** ``anal.prelude``
|
**Configuration variable:** ``analysis.prelude``
|
||||||
|
2
rizin
2
rizin
@ -1 +1 @@
|
|||||||
Subproject commit ad36954adbd607e9441130e0991c8027a015dd75
|
Subproject commit d53d1e38453850d7caf7e631365a6b9f2763c282
|
@ -24,16 +24,16 @@ AnalOptionsWidget::AnalOptionsWidget(PreferencesDialog *dialog)
|
|||||||
ui->setupUi(this);
|
ui->setupUi(this);
|
||||||
|
|
||||||
checkboxes = {
|
checkboxes = {
|
||||||
{ ui->autonameCheckbox, "anal.autoname" },
|
{ ui->autonameCheckbox, "analysis.autoname" },
|
||||||
{ ui->hasnextCheckbox, "anal.hasnext" },
|
{ ui->hasnextCheckbox, "analysis.hasnext" },
|
||||||
{ ui->jmpRefCheckbox, "anal.jmp.ref" },
|
{ ui->jmpRefCheckbox, "analysis.jmp.ref" },
|
||||||
{ ui->jmpTblCheckbox, "anal.jmp.tbl" },
|
{ ui->jmpTblCheckbox, "analysis.jmp.tbl" },
|
||||||
{ ui->pushRetCheckBox, "anal.pushret" },
|
{ ui->pushRetCheckBox, "analysis.pushret" },
|
||||||
{ ui->typesVerboseCheckBox, "anal.types.verbose" },
|
{ ui->typesVerboseCheckBox, "analysis.types.verbose" },
|
||||||
{ ui->verboseCheckBox, "anal.verbose" }
|
{ ui->verboseCheckBox, "analysis.verbose" }
|
||||||
};
|
};
|
||||||
|
|
||||||
// Create list of options for the anal.in selector
|
// Create list of options for the analysis.in selector
|
||||||
createAnalInOptionsList();
|
createAnalInOptionsList();
|
||||||
|
|
||||||
// Connect each checkbox from "checkboxes" to the generic signal "checkboxEnabler"
|
// 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
|
// Update the rest of analysis options that are not checkboxes
|
||||||
ui->analInComboBox->setCurrentIndex(ui->analInComboBox->findData(Core()->getConfig("anal.in")));
|
ui->analInComboBox->setCurrentIndex(ui->analInComboBox->findData(Core()->getConfig("analysis.in")));
|
||||||
ui->ptrDepthSpinBox->setValue(Core()->getConfigi("anal.ptrdepth"));
|
ui->ptrDepthSpinBox->setValue(Core()->getConfigi("analysis.ptrdepth"));
|
||||||
ui->preludeLineEdit->setText(Core()->getConfig("anal.prelude"));
|
ui->preludeLineEdit->setText(Core()->getConfig("analysis.prelude"));
|
||||||
}
|
}
|
||||||
|
|
||||||
void AnalOptionsWidget::updateAnalIn(int index)
|
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)
|
void AnalOptionsWidget::updateAnalPtrDepth(int value)
|
||||||
{
|
{
|
||||||
Config()->setConfig("anal.ptrdepth", value);
|
Config()->setConfig("analysis.ptrdepth", value);
|
||||||
}
|
}
|
||||||
|
|
||||||
void AnalOptionsWidget::updateAnalPrelude(const QString &prelude)
|
void AnalOptionsWidget::updateAnalPrelude(const QString &prelude)
|
||||||
{
|
{
|
||||||
Config()->setConfig("anal.prelude", prelude);
|
Config()->setConfig("analysis.prelude", prelude);
|
||||||
}
|
}
|
||||||
|
|
||||||
void AnalOptionsWidget::createAnalInOptionsList()
|
void AnalOptionsWidget::createAnalInOptionsList()
|
||||||
|
@ -29,13 +29,13 @@ private:
|
|||||||
QList<ConfigCheckbox> checkboxes;
|
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();
|
void createAnalInOptionsList();
|
||||||
|
|
||||||
private slots:
|
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();
|
void updateAnalOptionsFromVars();
|
||||||
|
|
||||||
@ -48,20 +48,20 @@ private slots:
|
|||||||
static void checkboxEnabler(QCheckBox *checkbox, const QString &config);
|
static void checkboxEnabler(QCheckBox *checkbox, const QString &config);
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* @brief A slot to update the value of anal.in when a different option is selected
|
* @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 anal.in
|
* @param index - The index of the selected option for analysis.in
|
||||||
*/
|
*/
|
||||||
void updateAnalIn(int index);
|
void updateAnalIn(int index);
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* @brief A slot to update the value of anal.ptrdepth when a new value is selected
|
* @brief A slot to update the value of analysis.ptrdepth when a new value is selected
|
||||||
* @param value - The new value for anal.ptrdepth
|
* @param value - The new value for analysis.ptrdepth
|
||||||
*/
|
*/
|
||||||
static void updateAnalPtrDepth(int value);
|
static void updateAnalPtrDepth(int value);
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* @brief slot to update the value of anal.prelude when a new value is introduced in the corresponding textbox
|
* @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 anal.prelude
|
* @param prelude - The new value for analysis.prelude
|
||||||
*/
|
*/
|
||||||
static void updateAnalPrelude(const QString &prelude);
|
static void updateAnalPrelude(const QString &prelude);
|
||||||
};
|
};
|
||||||
|
@ -52,7 +52,7 @@
|
|||||||
</rect>
|
</rect>
|
||||||
</property>
|
</property>
|
||||||
<property name="text">
|
<property name="text">
|
||||||
<string>Show verbose information when performing analysis (anal.verbose)</string>
|
<string>Show verbose information when performing analysis (analysis.verbose)</string>
|
||||||
</property>
|
</property>
|
||||||
</widget>
|
</widget>
|
||||||
<widget class="QCheckBox" name="pushRetCheckBox">
|
<widget class="QCheckBox" name="pushRetCheckBox">
|
||||||
@ -65,7 +65,7 @@
|
|||||||
</rect>
|
</rect>
|
||||||
</property>
|
</property>
|
||||||
<property name="text">
|
<property name="text">
|
||||||
<string>Analyze push+ret as jmp (anal.pushret)</string>
|
<string>Analyze push+ret as jmp (analysis.pushret)</string>
|
||||||
</property>
|
</property>
|
||||||
</widget>
|
</widget>
|
||||||
<widget class="QCheckBox" name="typesVerboseCheckBox">
|
<widget class="QCheckBox" name="typesVerboseCheckBox">
|
||||||
@ -78,7 +78,7 @@
|
|||||||
</rect>
|
</rect>
|
||||||
</property>
|
</property>
|
||||||
<property name="text">
|
<property name="text">
|
||||||
<string>Verbose output from type analysis (anal.types.verbose)</string>
|
<string>Verbose output from type analysis (analysis.types.verbose)</string>
|
||||||
</property>
|
</property>
|
||||||
</widget>
|
</widget>
|
||||||
<widget class="QCheckBox" name="autonameCheckbox">
|
<widget class="QCheckBox" name="autonameCheckbox">
|
||||||
@ -91,7 +91,7 @@
|
|||||||
</rect>
|
</rect>
|
||||||
</property>
|
</property>
|
||||||
<property name="text">
|
<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>
|
</property>
|
||||||
</widget>
|
</widget>
|
||||||
<widget class="QCheckBox" name="hasnextCheckbox">
|
<widget class="QCheckBox" name="hasnextCheckbox">
|
||||||
@ -104,7 +104,7 @@
|
|||||||
</rect>
|
</rect>
|
||||||
</property>
|
</property>
|
||||||
<property name="text">
|
<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>
|
</property>
|
||||||
</widget>
|
</widget>
|
||||||
<widget class="QCheckBox" name="jmpRefCheckbox">
|
<widget class="QCheckBox" name="jmpRefCheckbox">
|
||||||
@ -117,7 +117,7 @@
|
|||||||
</rect>
|
</rect>
|
||||||
</property>
|
</property>
|
||||||
<property name="text">
|
<property name="text">
|
||||||
<string>Create references for unconditional jumps (anal.jmp.ref)</string>
|
<string>Create references for unconditional jumps (analysis.jmp.ref)</string>
|
||||||
</property>
|
</property>
|
||||||
</widget>
|
</widget>
|
||||||
<widget class="QCheckBox" name="jmpTblCheckbox">
|
<widget class="QCheckBox" name="jmpTblCheckbox">
|
||||||
@ -130,7 +130,7 @@
|
|||||||
</rect>
|
</rect>
|
||||||
</property>
|
</property>
|
||||||
<property name="text">
|
<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>
|
</property>
|
||||||
</widget>
|
</widget>
|
||||||
<widget class="QWidget" name="verticalLayoutWidget">
|
<widget class="QWidget" name="verticalLayoutWidget">
|
||||||
@ -158,7 +158,7 @@
|
|||||||
</size>
|
</size>
|
||||||
</property>
|
</property>
|
||||||
<property name="text">
|
<property name="text">
|
||||||
<string>Search boundaries for analysis (anal.in): </string>
|
<string>Search boundaries for analysis (analysis.in): </string>
|
||||||
</property>
|
</property>
|
||||||
</widget>
|
</widget>
|
||||||
</item>
|
</item>
|
||||||
@ -192,7 +192,7 @@
|
|||||||
</size>
|
</size>
|
||||||
</property>
|
</property>
|
||||||
<property name="text">
|
<property name="text">
|
||||||
<string>Pointer depth (anal.ptrdepth):</string>
|
<string>Pointer depth (analysis.ptrdepth):</string>
|
||||||
</property>
|
</property>
|
||||||
</widget>
|
</widget>
|
||||||
</item>
|
</item>
|
||||||
@ -233,7 +233,7 @@
|
|||||||
</size>
|
</size>
|
||||||
</property>
|
</property>
|
||||||
<property name="text">
|
<property name="text">
|
||||||
<string>Functions Prelude (anal.prelude):</string>
|
<string>Functions Prelude (analysis.prelude):</string>
|
||||||
</property>
|
</property>
|
||||||
</widget>
|
</widget>
|
||||||
</item>
|
</item>
|
||||||
|
@ -42,7 +42,7 @@ win32 {
|
|||||||
PKG_CONFIG_PATH=$$PKG_CONFIG_PATH:$$R2_USER_PKGCONFIG
|
PKG_CONFIG_PATH=$$PKG_CONFIG_PATH:$$R2_USER_PKGCONFIG
|
||||||
} else {
|
} else {
|
||||||
unix {
|
unix {
|
||||||
exists($$R2PREFIX/lib/pkgconfig/r_core.pc) {
|
exists($$R2PREFIX/lib/pkgconfig/rz_core.pc) {
|
||||||
PKG_CONFIG_PATH=$$PKG_CONFIG_PATH:$$R2PREFIX/lib/pkgconfig
|
PKG_CONFIG_PATH=$$PKG_CONFIG_PATH:$$R2PREFIX/lib/pkgconfig
|
||||||
} else {
|
} else {
|
||||||
LIBS += -L$$R2PREFIX/lib
|
LIBS += -L$$R2PREFIX/lib
|
||||||
@ -58,7 +58,7 @@ win32 {
|
|||||||
USE_PKGCONFIG = 0
|
USE_PKGCONFIG = 0
|
||||||
}
|
}
|
||||||
bsd {
|
bsd {
|
||||||
!exists($$PKG_CONFIG_PATH/r_core.pc) {
|
!exists($$PKG_CONFIG_PATH/rz_core.pc) {
|
||||||
LIBS += -L$$R2PREFIX/lib
|
LIBS += -L$$R2PREFIX/lib
|
||||||
R2_INCLUDEPATH += $$R2PREFIX/include/libr
|
R2_INCLUDEPATH += $$R2PREFIX/include/libr
|
||||||
R2_INCLUDEPATH += $$R2PREFIX/include/libr/sdb
|
R2_INCLUDEPATH += $$R2PREFIX/include/libr/sdb
|
||||||
@ -72,9 +72,9 @@ win32 {
|
|||||||
DEFINES += _CRT_SECURE_NO_WARNINGS
|
DEFINES += _CRT_SECURE_NO_WARNINGS
|
||||||
equals(USE_PKGCONFIG, 1) {
|
equals(USE_PKGCONFIG, 1) {
|
||||||
CONFIG += link_pkgconfig
|
CONFIG += link_pkgconfig
|
||||||
PKGCONFIG += r_core
|
PKGCONFIG += rz_core
|
||||||
R2_INCLUDEPATH = "$$system("pkg-config --variable=includedir r_core")/libr"
|
R2_INCLUDEPATH = "$$system("pkg-config --variable=includedir rz_core")/libr"
|
||||||
R2_INCLUDEPATH += "$$system("pkg-config --variable=includedir r_core")/libr/sdb"
|
R2_INCLUDEPATH += "$$system("pkg-config --variable=includedir rz_core")/libr/sdb"
|
||||||
} else {
|
} else {
|
||||||
LIBS += \
|
LIBS += \
|
||||||
-lr_core \
|
-lr_core \
|
||||||
|
@ -2,7 +2,7 @@ HEADERS += ../CutterSamplePlugin.h ../CutterPlugin.h
|
|||||||
INCLUDEPATH += ../ ../../ ../../core ../../widgets
|
INCLUDEPATH += ../ ../../ ../../core ../../widgets
|
||||||
SOURCES += CutterSamplePlugin.cpp
|
SOURCES += CutterSamplePlugin.cpp
|
||||||
|
|
||||||
QMAKE_CXXFLAGS += $$system("pkg-config --cflags r_core")
|
QMAKE_CXXFLAGS += $$system("pkg-config --cflags rz_core")
|
||||||
|
|
||||||
TEMPLATE = lib
|
TEMPLATE = lib
|
||||||
CONFIG += plugin
|
CONFIG += plugin
|
||||||
|
Loading…
Reference in New Issue
Block a user