1
0
Fork 0

Merge pull request #534 from neobrain/disassembler-improvements

Disassembler improvements
This commit is contained in:
Tony Wasserka 2015-02-03 22:12:17 +01:00
commit a45175ee0d
3 changed files with 66 additions and 69 deletions

View File

@ -17,16 +17,9 @@
#include "core/arm/skyeye_common/armdefs.h" #include "core/arm/skyeye_common/armdefs.h"
#include "core/arm/disassembler/arm_disasm.h" #include "core/arm/disassembler/arm_disasm.h"
DisassemblerModel::DisassemblerModel(QObject* parent) : QAbstractItemModel(parent), base_address(0), code_size(0), program_counter(0), selection(QModelIndex()) {
} DisassemblerModel::DisassemblerModel(QObject* parent) : QAbstractListModel(parent), base_address(0), code_size(0), program_counter(0), selection(QModelIndex()) {
QModelIndex DisassemblerModel::index(int row, int column, const QModelIndex& parent) const {
return createIndex(row, column);
}
QModelIndex DisassemblerModel::parent(const QModelIndex& child) const {
return QModelIndex();
} }
int DisassemblerModel::columnCount(const QModelIndex& parent) const { int DisassemblerModel::columnCount(const QModelIndex& parent) const {

View File

@ -2,8 +2,11 @@
// Licensed under GPLv2 or any later version // Licensed under GPLv2 or any later version
// Refer to the license.txt file included. // Refer to the license.txt file included.
#include <QAbstractItemModel> #pragma once
#include <QAbstractListModel>
#include <QDockWidget> #include <QDockWidget>
#include "ui_disassembler.h" #include "ui_disassembler.h"
#include "common/common.h" #include "common/common.h"
@ -12,15 +15,13 @@
class QAction; class QAction;
class EmuThread; class EmuThread;
class DisassemblerModel : public QAbstractItemModel class DisassemblerModel : public QAbstractListModel
{ {
Q_OBJECT Q_OBJECT
public: public:
DisassemblerModel(QObject* parent); DisassemblerModel(QObject* parent);
QModelIndex index(int row, int column, const QModelIndex& parent = QModelIndex()) const override;
QModelIndex parent(const QModelIndex& child) const override;
int columnCount(const QModelIndex& parent = QModelIndex()) const override; int columnCount(const QModelIndex& parent = QModelIndex()) const override;
int rowCount(const QModelIndex& parent = QModelIndex()) const override; int rowCount(const QModelIndex& parent = QModelIndex()) const override;
QVariant data(const QModelIndex& index, int role = Qt::DisplayRole) const override; QVariant data(const QModelIndex& index, int role = Qt::DisplayRole) const override;

View File

@ -13,63 +13,66 @@
<property name="windowTitle"> <property name="windowTitle">
<string>Disassembly</string> <string>Disassembly</string>
</property> </property>
<widget class="QWidget" name="dockWidgetContents"> <widget class="QWidget" name="dockWidgetContents">
<layout class="QVBoxLayout" name="verticalLayout"> <layout class="QVBoxLayout" name="verticalLayout">
<item> <item>
<layout class="QHBoxLayout" name="horizontalLayout"> <layout class="QHBoxLayout" name="horizontalLayout">
<item> <item>
<widget class="QPushButton" name="button_step"> <widget class="QPushButton" name="button_step">
<property name="text"> <property name="text">
<string>Step</string> <string>Step</string>
</property> </property>
</widget> </widget>
</item> </item>
<item> <item>
<widget class="QPushButton" name="button_pause"> <widget class="QPushButton" name="button_pause">
<property name="text"> <property name="text">
<string>Pause</string> <string>Pause</string>
</property> </property>
</widget> </widget>
</item> </item>
<item> <item>
<widget class="QPushButton" name="button_continue"> <widget class="QPushButton" name="button_continue">
<property name="text"> <property name="text">
<string>Continue</string> <string>Continue</string>
</property> </property>
</widget> </widget>
</item> </item>
<item> <item>
<widget class="QPushButton" name="pushButton"> <widget class="QPushButton" name="pushButton">
<property name="text"> <property name="text">
<string>Step Into</string> <string>Step Into</string>
</property> </property>
</widget> </widget>
</item> </item>
<item> <item>
<widget class="QPushButton" name="button_breakpoint"> <widget class="QPushButton" name="button_breakpoint">
<property name="text"> <property name="text">
<string>Set Breakpoint</string> <string>Set Breakpoint</string>
</property> </property>
</widget> </widget>
</item> </item>
</layout> </layout>
</item> </item>
<item> <item>
<widget class="QTreeView" name="treeView"> <widget class="QTreeView" name="treeView">
<property name="alternatingRowColors"> <property name="alternatingRowColors">
<bool>true</bool> <bool>true</bool>
</property> </property>
<property name="indentation"> <property name="indentation">
<number>20</number> <number>20</number>
</property> </property>
<property name="rootIsDecorated"> <property name="rootIsDecorated">
<bool>false</bool> <bool>false</bool>
</property> </property>
<attribute name="headerVisible"> <property name="uniformRowHeights">
<bool>false</bool> <bool>true</bool>
</attribute> </property>
</widget> <attribute name="headerVisible">
</item> <bool>false</bool>
</attribute>
</widget>
</item>
</layout> </layout>
</widget> </widget>
</widget> </widget>