Fixed Entropy and baddr on Dashboard view (#479)

This commit is contained in:
Itay Cohen 2018-05-04 13:50:57 +03:00 committed by xarkes
parent d34dab3925
commit 31c7289726

View File

@ -3,8 +3,10 @@
#include "utils/Helpers.h"
#include "utils/JsonModel.h"
#include "utils/JsonTreeItem.h"
#include "utils/TempConfig.h"
#include "dialogs/VersionInfoDialog.h"
#include "MainWindow.h"
#include <QDebug>
@ -60,7 +62,7 @@ void Dashboard::updateContents()
this->ui->relroEdit->setText(relro);
}
this->ui->baddrEdit->setText(QString::number(item2["baddr"].toDouble()));
this->ui->baddrEdit->setText("0x"+QString::number(Core()->get_baddr(), 16));
if (item2["va"].toBool() == true) {
this->ui->vaEdit->setText("True");
@ -143,8 +145,14 @@ void Dashboard::updateContents()
ui->verticalLayout_2->addSpacerItem(spacer);
// Add entropy value
QString entropy = Core()->cmd("ph entropy").trimmed();
{
// Scope for TempConfig
TempConfig tempConfig;
tempConfig.set("io.va", false);
QString entropy = Core()->cmd("ph entropy $s @ 0").trimmed();
ui->lblEntropy->setText(entropy);
}
// Get stats for the graphs
QStringList stats = Core()->getStats();