mirror of
https://github.com/rizinorg/cutter.git
synced 2024-12-23 05:16:11 +00:00
parent
76bc053a8c
commit
a71f2a8b27
@ -198,6 +198,7 @@ public:
|
|||||||
QString itoa(ut64 num, int rdx = 16);
|
QString itoa(ut64 num, int rdx = 16);
|
||||||
QString config(const QString &k, const QString &v = NULL);
|
QString config(const QString &k, const QString &v = NULL);
|
||||||
int config(const QString &k, int v);
|
int config(const QString &k, int v);
|
||||||
|
int getConfig(const QString &k);
|
||||||
QString assemble(const QString &code);
|
QString assemble(const QString &code);
|
||||||
QString disassemble(const QString &hex);
|
QString disassemble(const QString &hex);
|
||||||
QString disassembleSingleInstruction(RVA addr);
|
QString disassembleSingleInstruction(RVA addr);
|
||||||
|
@ -1078,3 +1078,17 @@ void MainWindow::on_actionRefresh_contents_triggered()
|
|||||||
{
|
{
|
||||||
this->refreshVisibleDockWidgets();
|
this->refreshVisibleDockWidgets();
|
||||||
}
|
}
|
||||||
|
|
||||||
|
void MainWindow::on_actionDisplay_Esil_triggered()
|
||||||
|
{
|
||||||
|
int esil = this->core->getConfig("asm.esil");
|
||||||
|
this->core->config("asm.esil", !esil);
|
||||||
|
this->refreshVisibleDockWidgets();
|
||||||
|
}
|
||||||
|
|
||||||
|
void MainWindow::on_actionDisplay_Pseudocode_triggered()
|
||||||
|
{
|
||||||
|
int pseudo = this->core->getConfig("asm.pseudo");
|
||||||
|
this->core->config("asm.pseudo", !pseudo);
|
||||||
|
this->refreshVisibleDockWidgets();
|
||||||
|
}
|
||||||
|
@ -174,6 +174,10 @@ private slots:
|
|||||||
|
|
||||||
void on_actionRefresh_contents_triggered();
|
void on_actionRefresh_contents_triggered();
|
||||||
|
|
||||||
|
void on_actionDisplay_Esil_triggered();
|
||||||
|
|
||||||
|
void on_actionDisplay_Pseudocode_triggered();
|
||||||
|
|
||||||
private:
|
private:
|
||||||
QDockWidget *asmDock;
|
QDockWidget *asmDock;
|
||||||
QDockWidget *calcDock;
|
QDockWidget *calcDock;
|
||||||
|
@ -214,6 +214,9 @@ border-top: 0px;
|
|||||||
<addaction name="separator"/>
|
<addaction name="separator"/>
|
||||||
<addaction name="actionWhite_Theme"/>
|
<addaction name="actionWhite_Theme"/>
|
||||||
<addaction name="actionDark_Theme"/>
|
<addaction name="actionDark_Theme"/>
|
||||||
|
<addaction name="separator"/>
|
||||||
|
<addaction name="actionDisplay_Esil"/>
|
||||||
|
<addaction name="actionDisplay_Pseudocode"/>
|
||||||
</widget>
|
</widget>
|
||||||
<widget class="QMenu" name="menuHelp">
|
<widget class="QMenu" name="menuHelp">
|
||||||
<property name="title">
|
<property name="title">
|
||||||
@ -882,7 +885,7 @@ QToolButton .svg-icon path {
|
|||||||
<string>Dashboard</string>
|
<string>Dashboard</string>
|
||||||
</property>
|
</property>
|
||||||
<property name="toolTip">
|
<property name="toolTip">
|
||||||
<string>Show/HIde Dashboard panel</string>
|
<string>Show/Hide Dashboard panel</string>
|
||||||
</property>
|
</property>
|
||||||
</action>
|
</action>
|
||||||
<action name="actionReset_settings">
|
<action name="actionReset_settings">
|
||||||
@ -917,6 +920,22 @@ QToolButton .svg-icon path {
|
|||||||
<string>Refresh contents</string>
|
<string>Refresh contents</string>
|
||||||
</property>
|
</property>
|
||||||
</action>
|
</action>
|
||||||
|
<action name="actionDisplay_Esil">
|
||||||
|
<property name="text">
|
||||||
|
<string>Show ESIL rather than assembly</string>
|
||||||
|
</property>
|
||||||
|
<property name="checkable">
|
||||||
|
<bool>true</bool>
|
||||||
|
</property>
|
||||||
|
</action>
|
||||||
|
<action name="actionDisplay_Pseudocode">
|
||||||
|
<property name="text">
|
||||||
|
<string>Show pseudocode rather than assembly</string>
|
||||||
|
</property>
|
||||||
|
<property name="checkable">
|
||||||
|
<bool>true</bool>
|
||||||
|
</property>
|
||||||
|
</action>
|
||||||
<action name="actionEntry_points">
|
<action name="actionEntry_points">
|
||||||
<property name="text">
|
<property name="text">
|
||||||
<string>Entry points</string>
|
<string>Entry points</string>
|
||||||
|
@ -507,6 +507,13 @@ int IaitoRCore::config(const QString &k, int v)
|
|||||||
return r_config_get_i(core_->config, key.constData());
|
return r_config_get_i(core_->config, key.constData());
|
||||||
}
|
}
|
||||||
|
|
||||||
|
int IaitoRCore::getConfig(const QString &k)
|
||||||
|
{
|
||||||
|
CORE_LOCK();
|
||||||
|
QByteArray key = k.toUtf8();
|
||||||
|
return r_config_get_i(core_->config, key.constData());
|
||||||
|
}
|
||||||
|
|
||||||
void IaitoRCore::setOptions(QString key)
|
void IaitoRCore::setOptions(QString key)
|
||||||
{
|
{
|
||||||
IAITONOTUSED(key);
|
IAITONOTUSED(key);
|
||||||
@ -734,6 +741,10 @@ void IaitoRCore::setSettings()
|
|||||||
config("asm.flgoff", "true");
|
config("asm.flgoff", "true");
|
||||||
config("anal.autoname", "true");
|
config("anal.autoname", "true");
|
||||||
|
|
||||||
|
// Required for consistency with GUI checkboxes
|
||||||
|
config("asm.esil", "false");
|
||||||
|
config("asm.pseudo", "false");
|
||||||
|
|
||||||
// Highlight current node in graphviz
|
// Highlight current node in graphviz
|
||||||
config("graph.gv.current", "true");
|
config("graph.gv.current", "true");
|
||||||
|
|
||||||
|
Loading…
Reference in New Issue
Block a user