mirror of
https://github.com/rizinorg/cutter.git
synced 2025-01-31 08:37:26 +00:00
added show jump lines in disassembly (#286)
This commit is contained in:
parent
98c6c0a56e
commit
a7ce43784b
@ -507,6 +507,7 @@ void CutterCore::resetDefaultAsmOptions()
|
|||||||
setConfig("asm.offset", Config()->getAsmOffset());
|
setConfig("asm.offset", Config()->getAsmOffset());
|
||||||
setConfig("asm.describe", Config()->getAsmDescribe());
|
setConfig("asm.describe", Config()->getAsmDescribe());
|
||||||
setConfig("asm.stackptr", Config()->getAsmStackPointer());
|
setConfig("asm.stackptr", Config()->getAsmStackPointer());
|
||||||
|
setConfig("asm.lines", Config()->getAsmLines());
|
||||||
setConfig("asm.bytes", Config()->getAsmBytes());
|
setConfig("asm.bytes", Config()->getAsmBytes());
|
||||||
setConfig("asm.bytespace", Config()->getAsmBytespace());
|
setConfig("asm.bytespace", Config()->getAsmBytespace());
|
||||||
setConfig("asm.lbytes", Config()->getAsmLBytes());
|
setConfig("asm.lbytes", Config()->getAsmLBytes());
|
||||||
@ -525,6 +526,7 @@ void CutterCore::saveDefaultAsmOptions()
|
|||||||
Config()->setAsmOffset(getConfigb("asm.offset"));
|
Config()->setAsmOffset(getConfigb("asm.offset"));
|
||||||
Config()->setAsmDescribe(getConfigb("asm.describe"));
|
Config()->setAsmDescribe(getConfigb("asm.describe"));
|
||||||
Config()->setAsmStackPointer(getConfigb("asm.stackptr"));
|
Config()->setAsmStackPointer(getConfigb("asm.stackptr"));
|
||||||
|
Config()->setAsmLines(getConfigb("asm.lines"));
|
||||||
Config()->setAsmBytes(getConfigb("asm.bytes"));
|
Config()->setAsmBytes(getConfigb("asm.bytes"));
|
||||||
Config()->setAsmBytespace(getConfigb("asm.bytespace"));
|
Config()->setAsmBytespace(getConfigb("asm.bytespace"));
|
||||||
Config()->setAsmLBytes(getConfigb("asm.lbytes"));
|
Config()->setAsmLBytes(getConfigb("asm.lbytes"));
|
||||||
@ -760,7 +762,6 @@ void CutterCore::getOpcodes()
|
|||||||
void CutterCore::setSettings()
|
void CutterCore::setSettings()
|
||||||
{
|
{
|
||||||
setConfig("scr.interactive", false);
|
setConfig("scr.interactive", false);
|
||||||
setConfig("asm.lines", false);
|
|
||||||
// Intredazting...
|
// Intredazting...
|
||||||
//setConfig("asm.linesright", "true");
|
//setConfig("asm.linesright", "true");
|
||||||
//setConfig("asm.lineswidth", "15");
|
//setConfig("asm.lineswidth", "15");
|
||||||
|
@ -40,6 +40,7 @@ void AsmOptionsWidget::updateAsmOptionsFromVars()
|
|||||||
qhelpers::setCheckedWithoutSignals(ui->offsetCheckBox, Core()->getConfigb("asm.offset"));
|
qhelpers::setCheckedWithoutSignals(ui->offsetCheckBox, Core()->getConfigb("asm.offset"));
|
||||||
qhelpers::setCheckedWithoutSignals(ui->describeCheckBox, Core()->getConfigb("asm.describe"));
|
qhelpers::setCheckedWithoutSignals(ui->describeCheckBox, Core()->getConfigb("asm.describe"));
|
||||||
qhelpers::setCheckedWithoutSignals(ui->stackpointerCheckBox, Core()->getConfigb("asm.stackptr"));
|
qhelpers::setCheckedWithoutSignals(ui->stackpointerCheckBox, Core()->getConfigb("asm.stackptr"));
|
||||||
|
qhelpers::setCheckedWithoutSignals(ui->linesCheckBox, Core()->getConfigb("asm.lines"));
|
||||||
|
|
||||||
bool bytesEnabled = Core()->getConfigb("asm.bytes");
|
bool bytesEnabled = Core()->getConfigb("asm.bytes");
|
||||||
qhelpers::setCheckedWithoutSignals(ui->bytesCheckBox, bytesEnabled);
|
qhelpers::setCheckedWithoutSignals(ui->bytesCheckBox, bytesEnabled);
|
||||||
@ -134,6 +135,12 @@ void AsmOptionsWidget::on_stackpointerCheckBox_toggled(bool checked)
|
|||||||
triggerAsmOptionsChanged();
|
triggerAsmOptionsChanged();
|
||||||
}
|
}
|
||||||
|
|
||||||
|
void AsmOptionsWidget::on_linesCheckBox_toggled(bool checked)
|
||||||
|
{
|
||||||
|
Core()->setConfig("asm.lines", checked);
|
||||||
|
triggerAsmOptionsChanged();
|
||||||
|
}
|
||||||
|
|
||||||
void AsmOptionsWidget::on_bytesCheckBox_toggled(bool checked)
|
void AsmOptionsWidget::on_bytesCheckBox_toggled(bool checked)
|
||||||
{
|
{
|
||||||
Core()->setConfig("asm.bytes", checked);
|
Core()->setConfig("asm.bytes", checked);
|
||||||
@ -225,4 +232,4 @@ void AsmOptionsWidget::on_buttonBox_clicked(QAbstractButton *button)
|
|||||||
default:
|
default:
|
||||||
break;
|
break;
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
@ -39,6 +39,7 @@ private slots:
|
|||||||
void on_offsetCheckBox_toggled(bool checked);
|
void on_offsetCheckBox_toggled(bool checked);
|
||||||
void on_describeCheckBox_toggled(bool checked);
|
void on_describeCheckBox_toggled(bool checked);
|
||||||
void on_stackpointerCheckBox_toggled(bool checked);
|
void on_stackpointerCheckBox_toggled(bool checked);
|
||||||
|
void on_linesCheckBox_toggled(bool checked);
|
||||||
void on_bytesCheckBox_toggled(bool checked);
|
void on_bytesCheckBox_toggled(bool checked);
|
||||||
void on_bytespaceCheckBox_toggled(bool checked);
|
void on_bytespaceCheckBox_toggled(bool checked);
|
||||||
void on_lbytesCheckBox_toggled(bool checked);
|
void on_lbytesCheckBox_toggled(bool checked);
|
||||||
|
@ -6,8 +6,8 @@
|
|||||||
<rect>
|
<rect>
|
||||||
<x>0</x>
|
<x>0</x>
|
||||||
<y>0</y>
|
<y>0</y>
|
||||||
<width>461</width>
|
<width>541</width>
|
||||||
<height>463</height>
|
<height>478</height>
|
||||||
</rect>
|
</rect>
|
||||||
</property>
|
</property>
|
||||||
<property name="windowTitle">
|
<property name="windowTitle">
|
||||||
@ -49,6 +49,13 @@
|
|||||||
</property>
|
</property>
|
||||||
</widget>
|
</widget>
|
||||||
</item>
|
</item>
|
||||||
|
<item>
|
||||||
|
<widget class="QCheckBox" name="linesCheckBox">
|
||||||
|
<property name="text">
|
||||||
|
<string>Show jump lines (asm.lines)</string>
|
||||||
|
</property>
|
||||||
|
</widget>
|
||||||
|
</item>
|
||||||
<item>
|
<item>
|
||||||
<widget class="QCheckBox" name="bytesCheckBox">
|
<widget class="QCheckBox" name="bytesCheckBox">
|
||||||
<property name="text">
|
<property name="text">
|
||||||
|
@ -58,6 +58,9 @@ public:
|
|||||||
bool getAsmStackPointer() const { return s.value("asm.stackptr", false).toBool(); }
|
bool getAsmStackPointer() const { return s.value("asm.stackptr", false).toBool(); }
|
||||||
void setAsmStackPointer(bool v) { s.setValue("asm.stackptr", v); }
|
void setAsmStackPointer(bool v) { s.setValue("asm.stackptr", v); }
|
||||||
|
|
||||||
|
bool getAsmLines() const { return s.value("asm.lines", false).toBool(); }
|
||||||
|
void setAsmLines(bool v) { s.setValue("asm.lines", v); }
|
||||||
|
|
||||||
bool getAsmBytes() const { return s.value("asm.bytes", false).toBool(); }
|
bool getAsmBytes() const { return s.value("asm.bytes", false).toBool(); }
|
||||||
void setAsmBytes(bool v) { s.setValue("asm.bytes", v); }
|
void setAsmBytes(bool v) { s.setValue("asm.bytes", v); }
|
||||||
|
|
||||||
|
Loading…
Reference in New Issue
Block a user