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