aboutsummaryrefslogtreecommitdiffstats
path: root/ethereal/assets
diff options
context:
space:
mode:
authorobscuren <geffobscura@gmail.com>2014-07-02 19:08:18 +0800
committerobscuren <geffobscura@gmail.com>2014-07-02 19:08:18 +0800
commit50c093822637c42f43234d08c5f7b273b7117749 (patch)
tree5d9a1e7bad5677fe3b5b2f9f2bed0a6fabaf9175 /ethereal/assets
parent7d0004f058d7e93df684b0524fd52cd2eb1af3e3 (diff)
downloadgo-tangerine-50c093822637c42f43234d08c5f7b273b7117749.tar.gz
go-tangerine-50c093822637c42f43234d08c5f7b273b7117749.tar.zst
go-tangerine-50c093822637c42f43234d08c5f7b273b7117749.zip
Break points and debugger commands
Diffstat (limited to 'ethereal/assets')
-rw-r--r--ethereal/assets/debugger/debugger.qml65
1 files changed, 58 insertions, 7 deletions
diff --git a/ethereal/assets/debugger/debugger.qml b/ethereal/assets/debugger/debugger.qml
index 3e653882c..b93308b3e 100644
--- a/ethereal/assets/debugger/debugger.qml
+++ b/ethereal/assets/debugger/debugger.qml
@@ -12,7 +12,7 @@ ApplicationWindow {
minimumWidth: 1280
minimumHeight: 700
width: 1290
- height: 700
+ height: 750
property alias codeText: codeEditor.text
property alias dataText: rawDataField.text
@@ -31,6 +31,12 @@ ApplicationWindow {
shortcut: "Ctrl+n"
onTriggered: dbg.next()
}
+
+ MenuItem {
+ text: "Continue"
+ shortcut: "Ctrl+c"
+ onTriggered: dbg.continue()
+ }
}
}
@@ -39,6 +45,7 @@ ApplicationWindow {
property var asmModel: ListModel {
id: asmModel
}
+
TableView {
id: asmTableView
width: 200
@@ -187,6 +194,36 @@ ApplicationWindow {
}
}
+ function exec() {
+ dbg.execCommand(dbgCommand.text);
+ dbgCommand.text = "";
+ }
+ statusBar: StatusBar {
+ height: 30
+
+
+ TextField {
+ id: dbgCommand
+ y: 1
+ x: asmTableView.width
+ width: 500
+ placeholderText: "Debugger command (help for help)"
+ Keys.onReturnPressed: {
+ exec()
+ }
+ }
+
+ Button {
+ anchors {
+ left: dbgCommand.right
+ }
+ text: "Exec"
+ onClicked: {
+ exec()
+ }
+ }
+ }
+
toolBar: ToolBar {
RowLayout {
spacing: 5
@@ -208,11 +245,13 @@ ApplicationWindow {
}
text: "Next"
}
- CheckBox {
- id: breakEachLine
- objectName: "breakEachLine"
- text: "Break each instruction"
- checked: true
+
+ Button {
+ id: debugContinueButton
+ onClicked: {
+ dbg.continue()
+ }
+ text: "Continue"
}
}
}
@@ -261,7 +300,19 @@ ApplicationWindow {
}
function setLog(msg) {
- logModel.insert(0, {message: msg})
+ // Remove first item once we've reached max log items
+ if(logModel.count > 250) {
+ logModel.remove(0)
+ }
+
+ if(msg.len != 0) {
+ if(logTableView.flickableItem.atYEnd) {
+ logModel.append({message: msg})
+ logTableView.positionViewAtRow(logTableView.rowCount - 1, ListView.Contain)
+ } else {
+ logModel.append({message: msg})
+ }
+ }
}
function clearLog() {