diff options
author | obscuren <geffobscura@gmail.com> | 2014-05-27 16:42:37 +0800 |
---|---|---|
committer | obscuren <geffobscura@gmail.com> | 2014-05-27 16:42:37 +0800 |
commit | 4fd267a7785ea06014f38f9be4e8e380c7f1cb1e (patch) | |
tree | 693d2ac06153636077c53d783e77e82e8bb37329 /ethereal/assets | |
parent | d694e00a3340a36c39872950bb7a2404e9686c18 (diff) | |
download | dexon-4fd267a7785ea06014f38f9be4e8e380c7f1cb1e.tar dexon-4fd267a7785ea06014f38f9be4e8e380c7f1cb1e.tar.gz dexon-4fd267a7785ea06014f38f9be4e8e380c7f1cb1e.tar.bz2 dexon-4fd267a7785ea06014f38f9be4e8e380c7f1cb1e.tar.lz dexon-4fd267a7785ea06014f38f9be4e8e380c7f1cb1e.tar.xz dexon-4fd267a7785ea06014f38f9be4e8e380c7f1cb1e.tar.zst dexon-4fd267a7785ea06014f38f9be4e8e380c7f1cb1e.zip |
Sep debugger from main
Diffstat (limited to 'ethereal/assets')
-rw-r--r-- | ethereal/assets/debugger/debugger.qml | 114 | ||||
-rw-r--r-- | ethereal/assets/qml/wallet.qml | 14 |
2 files changed, 126 insertions, 2 deletions
diff --git a/ethereal/assets/debugger/debugger.qml b/ethereal/assets/debugger/debugger.qml new file mode 100644 index 000000000..b7d954e73 --- /dev/null +++ b/ethereal/assets/debugger/debugger.qml @@ -0,0 +1,114 @@ +import QtQuick 2.0 +import QtQuick.Controls 1.0; +import QtQuick.Layouts 1.0; +import QtQuick.Dialogs 1.0; +import QtQuick.Window 2.1; +import QtQuick.Controls.Styles 1.1 +import Ethereum 1.0 + +ApplicationWindow { + id: debugWindow + visible: false + title: "Debugger" + minimumWidth: 600 + minimumHeight: 600 + width: 800 + height: 600 + + SplitView { + anchors.fill: parent + property var asmModel: ListModel { + id: asmModel + } + TableView { + id: asmTableView + width: 200 + TableViewColumn{ role: "value" ; title: "" ; width: 100 } + model: asmModel + } + + Rectangle { + anchors.left: asmTableView.right + anchors.right: parent.right + SplitView { + orientation: Qt.Vertical + anchors.fill: parent + + TableView { + property var memModel: ListModel { + id: memModel + } + height: parent.height/2 + width: parent.width + TableViewColumn{ id:mnumColmn ; role: "num" ; title: "#" ; width: 50} + TableViewColumn{ role: "value" ; title: "Memory" ; width: 750} + model: memModel + } + + SplitView { + orientation: Qt.Horizontal + TableView { + property var debuggerLog: ListModel { + id: debuggerLog + } + TableViewColumn{ role: "value"; title: "Debug messages" } + model: debuggerLog + } + TableView { + property var stackModel: ListModel { + id: stackModel + } + height: parent.height/2 + width: parent.width + TableViewColumn{ role: "value" ; title: "Stack" ; width: 200 } + model: stackModel + } + } + } + } + } + statusBar: StatusBar { + RowLayout { + anchors.fill: parent + Button { + property var enabled: true + id: debugNextButton + onClicked: { + //db.next() + } + text: "Next" + } + } + } + + function setAsm(asm) { + asmModel.append({asm: asm}) + } + + function setInstruction(num) { + asmTableView.selection.clear() + asmTableView.selection.select(num-1) + } + + function clearAsm() { + asmModel.clear() + } + + function setMem(mem) { + memModel.append({num: mem.num, value: mem.value}) + } + function clearMem(){ + memModel.clear() + } + + function setStack(stack) { + stackModel.append({value: stack}) + } + function addDebugMessage(message){ + debuggerLog.append({value: message}) + } + + function clearStack() { + stackModel.clear() + } +} diff --git a/ethereal/assets/qml/wallet.qml b/ethereal/assets/qml/wallet.qml index f42cf3b1b..40de8624e 100644 --- a/ethereal/assets/qml/wallet.qml +++ b/ethereal/assets/qml/wallet.qml @@ -294,6 +294,7 @@ ApplicationWindow { statusBar: StatusBar { RowLayout { anchors.fill: parent + /* Button { property var enabled: true id: connectButton @@ -304,10 +305,19 @@ ApplicationWindow { } text: "Connect" } + */ + Button { + property var enabled: true + id: debuggerWindow + onClicked: { + ui.startDebugger() + } + text: "Debugger" + } Button { id: importAppButton - anchors.left: connectButton.right + anchors.left: debuggerWindow.right anchors.leftMargin: 5 onClicked: openAppDialog.open() text: "Import App" @@ -473,7 +483,7 @@ ApplicationWindow { } height: parent.height/2 width: parent.width - TableViewColumn{ role: "value" ; title: "Stack" ; width: parent.width } + TableViewColumn{ role: "value" ; title: "Stack" ; width: 300 } model: stackModel } } |