mirror of
https://github.com/rizinorg/cutter.git
synced 2025-01-19 02:48:49 +00:00
Add asm.fcnlines option (Fix #248)
This commit is contained in:
parent
e2d73763d9
commit
3dcd9cab9d
@ -513,6 +513,7 @@ void CutterCore::resetDefaultAsmOptions()
|
||||
setConfig("asm.stackptr", Config()->getAsmStackPointer());
|
||||
setConfig("asm.slow", Config()->getAsmSlow());
|
||||
setConfig("asm.lines", Config()->getAsmLines());
|
||||
setConfig("asm.fcnlines", Config()->getAsmFcnLines());
|
||||
setConfig("asm.emu", Config()->getAsmEmu());
|
||||
setConfig("asm.cmtright", Config()->getAsmCmtRight());
|
||||
setConfig("asm.varsum", Config()->getAsmVarSum());
|
||||
@ -538,6 +539,7 @@ void CutterCore::saveDefaultAsmOptions()
|
||||
Config()->setAsmStackPointer(getConfigb("asm.stackptr"));
|
||||
Config()->setAsmSlow(getConfigb("asm.slow"));
|
||||
Config()->setAsmLines(getConfigb("asm.lines"));
|
||||
Config()->setAsmFcnLines(getConfigb("asm.fcnlines"));
|
||||
Config()->setAsmEmu(getConfigb("asm.emu"));
|
||||
Config()->setAsmCmtRight(getConfigb("asm.cmtright"));
|
||||
Config()->setAsmVarSum(getConfigb("asm.varsum"));
|
||||
@ -782,7 +784,6 @@ void CutterCore::setSettings()
|
||||
setConfig("hex.pairs", false);
|
||||
setConfig("asm.cmtcol", 70);
|
||||
setConfig("asm.xrefs", false);
|
||||
setConfig("asm.fcnlines", false);
|
||||
|
||||
setConfig("asm.tabsonce", true);
|
||||
setConfig("asm.tabsoff", 5);
|
||||
|
@ -42,6 +42,7 @@ void AsmOptionsWidget::updateAsmOptionsFromVars()
|
||||
qhelpers::setCheckedWithoutSignals(ui->stackpointerCheckBox, Core()->getConfigb("asm.stackptr"));
|
||||
qhelpers::setCheckedWithoutSignals(ui->slowCheckBox, Core()->getConfigb("asm.slow"));
|
||||
qhelpers::setCheckedWithoutSignals(ui->linesCheckBox, Core()->getConfigb("asm.lines"));
|
||||
qhelpers::setCheckedWithoutSignals(ui->fcnlinesCheckBox, Core()->getConfigb("asm.fcnlines"));
|
||||
qhelpers::setCheckedWithoutSignals(ui->emuCheckBox, Core()->getConfigb("asm.emu"));
|
||||
qhelpers::setCheckedWithoutSignals(ui->cmtrightCheckBox, Core()->getConfigb("asm.cmtright"));
|
||||
qhelpers::setCheckedWithoutSignals(ui->varsumCheckBox, Core()->getConfigb("asm.varsum"));
|
||||
@ -161,6 +162,12 @@ void AsmOptionsWidget::on_linesCheckBox_toggled(bool checked)
|
||||
triggerAsmOptionsChanged();
|
||||
}
|
||||
|
||||
void AsmOptionsWidget::on_fcnlinesCheckBox_toggled(bool checked)
|
||||
{
|
||||
Core()->setConfig("asm.fcnlines", checked);
|
||||
triggerAsmOptionsChanged();
|
||||
}
|
||||
|
||||
void AsmOptionsWidget::on_emuCheckBox_toggled(bool checked)
|
||||
{
|
||||
Core()->setConfig("asm.emu", checked);
|
||||
|
@ -41,6 +41,7 @@ private slots:
|
||||
void on_stackpointerCheckBox_toggled(bool checked);
|
||||
void on_slowCheckBox_toggled(bool checked);
|
||||
void on_linesCheckBox_toggled(bool checked);
|
||||
void on_fcnlinesCheckBox_toggled(bool checked);
|
||||
void on_emuCheckBox_toggled(bool checked);
|
||||
void on_cmtrightCheckBox_toggled(bool checked);
|
||||
void on_varsumCheckBox_toggled(bool checked);
|
||||
|
@ -63,6 +63,13 @@
|
||||
</property>
|
||||
</widget>
|
||||
</item>
|
||||
<item>
|
||||
<widget class="QCheckBox" name="fcnlinesCheckBox">
|
||||
<property name="text">
|
||||
<string>Show function boundary lines (asm.fcnlines)</string>
|
||||
</property>
|
||||
</widget>
|
||||
</item>
|
||||
<item>
|
||||
<widget class="QCheckBox" name="emuCheckBox">
|
||||
<property name="text">
|
||||
|
@ -61,9 +61,12 @@ public:
|
||||
bool getAsmSlow() const { return s.value("asm.slow", true).toBool(); }
|
||||
void setAsmSlow(bool v) { s.setValue("asm.slow", v); }
|
||||
|
||||
bool getAsmLines() const { return s.value("asm.lines", false).toBool(); }
|
||||
bool getAsmLines() const { return s.value("asm.lines", true).toBool(); }
|
||||
void setAsmLines(bool v) { s.setValue("asm.lines", v); }
|
||||
|
||||
bool getAsmFcnLines() const { return s.value("asm.fcnlines", true).toBool(); }
|
||||
void setAsmFcnLines(bool v) { s.setValue("asm.fcnlines", v); }
|
||||
|
||||
bool getAsmEmu() const { return s.value("asm.emu", false).toBool(); }
|
||||
void setAsmEmu(bool v) { s.setValue("asm.emu", v); }
|
||||
|
||||
|
@ -114,7 +114,9 @@ void DisassemblerGraphView::loadCurrentGraph()
|
||||
TempConfig tempConfig;
|
||||
tempConfig.set("scr.html", true)
|
||||
.set("scr.color", true)
|
||||
.set("asm.bbline", false);
|
||||
.set("asm.bbline", false)
|
||||
.set("asm.lines", false)
|
||||
.set("asm.fcnlines", false);
|
||||
QJsonDocument functionsDoc = Core()->cmdj("agJ");
|
||||
QJsonArray functions = functionsDoc.array();
|
||||
|
||||
|
Loading…
Reference in New Issue
Block a user