|
@ -3,6 +3,7 @@ import QtQuick.Controls.Styles 1.1 |
|
|
import QtQuick.Controls 1.1 |
|
|
import QtQuick.Controls 1.1 |
|
|
import QtQuick.Dialogs 1.1 |
|
|
import QtQuick.Dialogs 1.1 |
|
|
import QtQuick.Layouts 1.1 |
|
|
import QtQuick.Layouts 1.1 |
|
|
|
|
|
import Qt.labs.settings 1.0 |
|
|
import "js/Debugger.js" as Debugger |
|
|
import "js/Debugger.js" as Debugger |
|
|
import "js/ErrorLocationFormater.js" as ErrorLocationFormater |
|
|
import "js/ErrorLocationFormater.js" as ErrorLocationFormater |
|
|
|
|
|
|
|
@ -20,7 +21,13 @@ Rectangle { |
|
|
Debugger.moveSelection(-1); |
|
|
Debugger.moveSelection(-1); |
|
|
} |
|
|
} |
|
|
|
|
|
|
|
|
function update() |
|
|
onVisibleChanged: |
|
|
|
|
|
{ |
|
|
|
|
|
if (visible) |
|
|
|
|
|
forceActiveFocus(); |
|
|
|
|
|
} |
|
|
|
|
|
|
|
|
|
|
|
function update(giveFocus) |
|
|
{ |
|
|
{ |
|
|
if (statusPane.result.successful) |
|
|
if (statusPane.result.successful) |
|
|
{ |
|
|
{ |
|
@ -39,11 +46,13 @@ Rectangle { |
|
|
errorDetail.text = errorInfo.errorDetail; |
|
|
errorDetail.text = errorInfo.errorDetail; |
|
|
errorLine.text = errorInfo.errorLine; |
|
|
errorLine.text = errorInfo.errorLine; |
|
|
} |
|
|
} |
|
|
|
|
|
if (giveFocus) |
|
|
|
|
|
forceActiveFocus(); |
|
|
} |
|
|
} |
|
|
|
|
|
|
|
|
Connections { |
|
|
Connections { |
|
|
target: codeModel |
|
|
target: codeModel |
|
|
onCompilationComplete: update() |
|
|
onCompilationComplete: update(false) |
|
|
} |
|
|
} |
|
|
|
|
|
|
|
|
Rectangle |
|
|
Rectangle |
|
@ -95,17 +104,18 @@ Rectangle { |
|
|
} |
|
|
} |
|
|
} |
|
|
} |
|
|
|
|
|
|
|
|
|
|
|
|
|
|
Flickable { |
|
|
Flickable { |
|
|
property int firstColumnWidth: 170 |
|
|
property int firstColumnWidth: 180 |
|
|
property int secondColumnWidth: 250 |
|
|
property int secondColumnWidth: 250 |
|
|
id: debugScrollArea |
|
|
id: debugScrollArea |
|
|
flickableDirection: Flickable.VerticalFlick |
|
|
flickableDirection: Flickable.VerticalFlick |
|
|
anchors.fill: parent |
|
|
anchors.fill: parent |
|
|
contentHeight: machineStates.height + 300 |
|
|
contentHeight: 4000 |
|
|
contentWidth: machineStates.width |
|
|
contentWidth: parent.width |
|
|
|
|
|
Rectangle |
|
|
GridLayout |
|
|
{ |
|
|
|
|
|
anchors.fill: parent |
|
|
|
|
|
ColumnLayout |
|
|
{ |
|
|
{ |
|
|
property int sideMargin: 10 |
|
|
property int sideMargin: 10 |
|
|
id: machineStates |
|
|
id: machineStates |
|
@ -115,13 +125,16 @@ Rectangle { |
|
|
anchors.leftMargin: machineStates.sideMargin |
|
|
anchors.leftMargin: machineStates.sideMargin |
|
|
anchors.right: parent.right; |
|
|
anchors.right: parent.right; |
|
|
anchors.rightMargin: machineStates.sideMargin |
|
|
anchors.rightMargin: machineStates.sideMargin |
|
|
flow: GridLayout.TopToBottom |
|
|
anchors.fill: parent |
|
|
rowSpacing: 15 |
|
|
Layout.fillWidth: true |
|
|
|
|
|
Layout.fillHeight: true |
|
|
RowLayout { |
|
|
RowLayout { |
|
|
// step button + slider |
|
|
// step button + slider |
|
|
|
|
|
id: buttonRow |
|
|
spacing: machineStates.sideMargin |
|
|
spacing: machineStates.sideMargin |
|
|
height: 27 |
|
|
height: 27 |
|
|
width: debugPanel.width |
|
|
Layout.fillWidth: true |
|
|
|
|
|
|
|
|
Rectangle |
|
|
Rectangle |
|
|
{ |
|
|
{ |
|
|
height: parent.height |
|
|
height: parent.height |
|
@ -137,8 +150,9 @@ Rectangle { |
|
|
enabledStateImg: "qrc:/qml/img/jumpoutback.png" |
|
|
enabledStateImg: "qrc:/qml/img/jumpoutback.png" |
|
|
disableStateImg: "qrc:/qml/img/jumpoutbackdisabled.png" |
|
|
disableStateImg: "qrc:/qml/img/jumpoutbackdisabled.png" |
|
|
onClicked: Debugger.stepOutBack() |
|
|
onClicked: Debugger.stepOutBack() |
|
|
width: 25 |
|
|
width: 28 |
|
|
height: 27 |
|
|
height: 30 |
|
|
|
|
|
buttonTooltip: qsTr("Step Out Back") |
|
|
} |
|
|
} |
|
|
|
|
|
|
|
|
StepActionImage |
|
|
StepActionImage |
|
@ -147,8 +161,9 @@ Rectangle { |
|
|
enabledStateImg: "qrc:/qml/img/jumpintoback.png" |
|
|
enabledStateImg: "qrc:/qml/img/jumpintoback.png" |
|
|
disableStateImg: "qrc:/qml/img/jumpintobackdisabled.png" |
|
|
disableStateImg: "qrc:/qml/img/jumpintobackdisabled.png" |
|
|
onClicked: Debugger.stepIntoBack() |
|
|
onClicked: Debugger.stepIntoBack() |
|
|
width: 25 |
|
|
width: 28 |
|
|
height: 27 |
|
|
height: 30 |
|
|
|
|
|
buttonTooltip: qsTr("Step Into Back") |
|
|
} |
|
|
} |
|
|
|
|
|
|
|
|
StepActionImage |
|
|
StepActionImage |
|
@ -157,8 +172,9 @@ Rectangle { |
|
|
enabledStateImg: "qrc:/qml/img/jumpoverback.png" |
|
|
enabledStateImg: "qrc:/qml/img/jumpoverback.png" |
|
|
disableStateImg: "qrc:/qml/img/jumpoverbackdisabled.png" |
|
|
disableStateImg: "qrc:/qml/img/jumpoverbackdisabled.png" |
|
|
onClicked: Debugger.stepOverBack() |
|
|
onClicked: Debugger.stepOverBack() |
|
|
width: 25 |
|
|
width: 28 |
|
|
height: 27 |
|
|
height: 30 |
|
|
|
|
|
buttonTooltip: qsTr("Step Over Back") |
|
|
} |
|
|
} |
|
|
|
|
|
|
|
|
StepActionImage |
|
|
StepActionImage |
|
@ -167,8 +183,9 @@ Rectangle { |
|
|
enabledStateImg: "qrc:/qml/img/jumpoverforward.png" |
|
|
enabledStateImg: "qrc:/qml/img/jumpoverforward.png" |
|
|
disableStateImg: "qrc:/qml/img/jumpoverforwarddisabled.png" |
|
|
disableStateImg: "qrc:/qml/img/jumpoverforwarddisabled.png" |
|
|
onClicked: Debugger.stepOverForward() |
|
|
onClicked: Debugger.stepOverForward() |
|
|
width: 25 |
|
|
width: 28 |
|
|
height: 27 |
|
|
height: 30 |
|
|
|
|
|
buttonTooltip: qsTr("Step Over Forward") |
|
|
} |
|
|
} |
|
|
|
|
|
|
|
|
StepActionImage |
|
|
StepActionImage |
|
@ -177,8 +194,9 @@ Rectangle { |
|
|
enabledStateImg: "qrc:/qml/img/jumpintoforward.png" |
|
|
enabledStateImg: "qrc:/qml/img/jumpintoforward.png" |
|
|
disableStateImg: "qrc:/qml/img/jumpintoforwarddisabled.png" |
|
|
disableStateImg: "qrc:/qml/img/jumpintoforwarddisabled.png" |
|
|
onClicked: Debugger.stepIntoForward() |
|
|
onClicked: Debugger.stepIntoForward() |
|
|
width: 25 |
|
|
width: 28 |
|
|
height: 27 |
|
|
height: 30 |
|
|
|
|
|
buttonTooltip: qsTr("Step Into Forward") |
|
|
} |
|
|
} |
|
|
|
|
|
|
|
|
StepActionImage |
|
|
StepActionImage |
|
@ -187,14 +205,16 @@ Rectangle { |
|
|
enabledStateImg: "qrc:/qml/img/jumpoutforward.png" |
|
|
enabledStateImg: "qrc:/qml/img/jumpoutforward.png" |
|
|
disableStateImg: "qrc:/qml/img/jumpoutforwarddisabled.png" |
|
|
disableStateImg: "qrc:/qml/img/jumpoutforwarddisabled.png" |
|
|
onClicked: Debugger.stepOutForward() |
|
|
onClicked: Debugger.stepOutForward() |
|
|
width: 25 |
|
|
width: 28 |
|
|
height: 27 |
|
|
height: 30 |
|
|
|
|
|
buttonTooltip: qsTr("Step Out Forward") |
|
|
} |
|
|
} |
|
|
} |
|
|
} |
|
|
} |
|
|
} |
|
|
|
|
|
|
|
|
Rectangle { |
|
|
Rectangle { |
|
|
color: "transparent" |
|
|
color: "transparent" |
|
|
width: debugScrollArea.secondColumnWidth |
|
|
Layout.fillWidth: true |
|
|
height: parent.height |
|
|
height: parent.height |
|
|
Slider { |
|
|
Slider { |
|
|
id: statesSlider |
|
|
id: statesSlider |
|
@ -224,12 +244,15 @@ Rectangle { |
|
|
|
|
|
|
|
|
RowLayout { |
|
|
RowLayout { |
|
|
// Assembly code |
|
|
// Assembly code |
|
|
width: debugPanel.width |
|
|
id: assemblyCodeRow |
|
|
|
|
|
Layout.fillWidth: true |
|
|
height: 405 |
|
|
height: 405 |
|
|
|
|
|
implicitHeight: 405 |
|
|
spacing: machineStates.sideMargin |
|
|
spacing: machineStates.sideMargin |
|
|
|
|
|
|
|
|
Rectangle |
|
|
Rectangle |
|
|
{ |
|
|
{ |
|
|
|
|
|
id: stateListContainer |
|
|
width: debugScrollArea.firstColumnWidth |
|
|
width: debugScrollArea.firstColumnWidth |
|
|
height: parent.height |
|
|
height: parent.height |
|
|
border.width: 3 |
|
|
border.width: 3 |
|
@ -246,7 +269,7 @@ Rectangle { |
|
|
id: statesList |
|
|
id: statesList |
|
|
delegate: renderDelegate |
|
|
delegate: renderDelegate |
|
|
highlight: highlightBar |
|
|
highlight: highlightBar |
|
|
highlightFollowsCurrentItem: true |
|
|
highlightFollowsCurrentItem: false |
|
|
} |
|
|
} |
|
|
|
|
|
|
|
|
Component { |
|
|
Component { |
|
@ -255,8 +278,11 @@ Rectangle { |
|
|
radius: 4 |
|
|
radius: 4 |
|
|
height: statesList.currentItem.height |
|
|
height: statesList.currentItem.height |
|
|
width: statesList.currentItem.width; |
|
|
width: statesList.currentItem.width; |
|
|
|
|
|
y: statesList.currentItem.y |
|
|
color: "#4A90E2" |
|
|
color: "#4A90E2" |
|
|
Behavior on y { SpringAnimation { spring: 2; damping: 0.1 } } |
|
|
Behavior on y { |
|
|
|
|
|
PropertyAnimation { properties: "y"; easing.type: Easing.InOutQuad; duration: 50} |
|
|
|
|
|
} |
|
|
} |
|
|
} |
|
|
} |
|
|
} |
|
|
|
|
|
|
|
@ -288,54 +314,49 @@ Rectangle { |
|
|
} |
|
|
} |
|
|
} |
|
|
} |
|
|
|
|
|
|
|
|
ColumnLayout { |
|
|
|
|
|
width: debugScrollArea.secondColumnWidth |
|
|
|
|
|
height: parent.height |
|
|
|
|
|
Rectangle { |
|
|
Rectangle { |
|
|
// Info |
|
|
Layout.fillWidth: true |
|
|
|
|
|
height: parent.height //- 2 * stateListContainer.border.width |
|
|
|
|
|
|
|
|
|
|
|
ColumnLayout |
|
|
|
|
|
{ |
|
|
width: parent.width |
|
|
width: parent.width |
|
|
id: basicInfoColumn |
|
|
anchors.fill: parent |
|
|
height: 125 |
|
|
|
|
|
color: "transparent" |
|
|
|
|
|
ColumnLayout { |
|
|
|
|
|
spacing: 0 |
|
|
spacing: 0 |
|
|
width: parent.width |
|
|
|
|
|
height: parent.height |
|
|
|
|
|
DebugBasicInfo { |
|
|
DebugBasicInfo { |
|
|
id: currentStep |
|
|
id: currentStep |
|
|
titleStr: qsTr("Current step") |
|
|
titleStr: qsTr("Current Step") |
|
|
|
|
|
Layout.fillWidth: true |
|
|
|
|
|
height: 30 |
|
|
} |
|
|
} |
|
|
DebugBasicInfo { |
|
|
DebugBasicInfo { |
|
|
id: mem |
|
|
id: mem |
|
|
titleStr: qsTr("Adding memory") |
|
|
titleStr: qsTr("Adding Memory") |
|
|
|
|
|
Layout.fillWidth: true |
|
|
|
|
|
height: 30 |
|
|
} |
|
|
} |
|
|
DebugBasicInfo { |
|
|
DebugBasicInfo { |
|
|
id: stepCost |
|
|
id: stepCost |
|
|
titleStr: qsTr("Step cost") |
|
|
titleStr: qsTr("Step Cost") |
|
|
|
|
|
Layout.fillWidth: true |
|
|
|
|
|
height: 30 |
|
|
} |
|
|
} |
|
|
DebugBasicInfo { |
|
|
DebugBasicInfo { |
|
|
id: gasSpent |
|
|
id: gasSpent |
|
|
titleStr: qsTr("Total gas spent") |
|
|
titleStr: qsTr("Total Gas Spent") |
|
|
} |
|
|
Layout.fillWidth: true |
|
|
} |
|
|
height: 30 |
|
|
} |
|
|
} |
|
|
|
|
|
|
|
|
Rectangle { |
|
|
|
|
|
// Stack |
|
|
|
|
|
height: 275 |
|
|
|
|
|
width: parent.width |
|
|
|
|
|
color: "transparent" |
|
|
|
|
|
|
|
|
|
|
|
DebugInfoList |
|
|
DebugInfoList |
|
|
{ |
|
|
{ |
|
|
|
|
|
Layout.fillHeight: true |
|
|
|
|
|
Layout.fillWidth: true |
|
|
id: stack |
|
|
id: stack |
|
|
width: parent.width |
|
|
|
|
|
height: parent.height |
|
|
|
|
|
collapsible: false |
|
|
collapsible: false |
|
|
title : qsTr("Stack") |
|
|
title : qsTr("Stack") |
|
|
itemDelegate: Item { |
|
|
itemDelegate: Item { |
|
|
id: renderedItem |
|
|
id: renderedItem |
|
|
height: 27 |
|
|
height: 25 |
|
|
width: parent.width |
|
|
width: parent.width |
|
|
RowLayout |
|
|
RowLayout |
|
|
{ |
|
|
{ |
|
@ -352,7 +373,8 @@ Rectangle { |
|
|
Text { |
|
|
Text { |
|
|
anchors.centerIn: parent |
|
|
anchors.centerIn: parent |
|
|
anchors.leftMargin: 5 |
|
|
anchors.leftMargin: 5 |
|
|
color: "#8b8b8b" |
|
|
font.family: "monospace" |
|
|
|
|
|
color: "#4a4a4a" |
|
|
text: model.index; |
|
|
text: model.index; |
|
|
font.pointSize: 9 |
|
|
font.pointSize: 9 |
|
|
} |
|
|
} |
|
@ -369,8 +391,9 @@ Rectangle { |
|
|
Text { |
|
|
Text { |
|
|
anchors.left: parent.left |
|
|
anchors.left: parent.left |
|
|
anchors.leftMargin: 5 |
|
|
anchors.leftMargin: 5 |
|
|
|
|
|
font.family: "monospace" |
|
|
anchors.verticalCenter: parent.verticalCenter |
|
|
anchors.verticalCenter: parent.verticalCenter |
|
|
color: "#8b8b8b" |
|
|
color: "#4a4a4a" |
|
|
text: modelData |
|
|
text: modelData |
|
|
font.pointSize: 9 |
|
|
font.pointSize: 9 |
|
|
} |
|
|
} |
|
@ -390,18 +413,32 @@ Rectangle { |
|
|
} |
|
|
} |
|
|
} |
|
|
} |
|
|
|
|
|
|
|
|
Rectangle { |
|
|
SplitView |
|
|
width: debugPanel.width - 2 * machineStates.sideMargin |
|
|
{ |
|
|
height: 2; |
|
|
id: splitInfoList |
|
|
color: "#e3e3e3" |
|
|
Layout.fillHeight: true |
|
|
radius: 3 |
|
|
Layout.fillWidth: true |
|
|
|
|
|
|
|
|
|
|
|
Settings { |
|
|
|
|
|
id: splitSettings |
|
|
|
|
|
property alias storageHeightSettings: storageRect.height |
|
|
|
|
|
property alias memoryDumpHeightSettings: memoryRect.height |
|
|
|
|
|
property alias callDataHeightSettings: callDataRect.height |
|
|
} |
|
|
} |
|
|
|
|
|
|
|
|
|
|
|
orientation: Qt.Vertical |
|
|
|
|
|
width: debugPanel.width - 2 * machineStates.sideMargin |
|
|
|
|
|
Rectangle |
|
|
|
|
|
{ |
|
|
|
|
|
id: storageRect |
|
|
|
|
|
width: parent.width |
|
|
|
|
|
Layout.minimumHeight: 25 |
|
|
|
|
|
Layout.maximumHeight: 223 |
|
|
|
|
|
height: 25 |
|
|
DebugInfoList |
|
|
DebugInfoList |
|
|
{ |
|
|
{ |
|
|
id: storage |
|
|
id: storage |
|
|
width: debugPanel.width - 2 * machineStates.sideMargin |
|
|
anchors.fill: parent |
|
|
height: 223 |
|
|
|
|
|
collapsible: true |
|
|
collapsible: true |
|
|
title : qsTr("Storage") |
|
|
title : qsTr("Storage") |
|
|
itemDelegate: |
|
|
itemDelegate: |
|
@ -425,8 +462,9 @@ Rectangle { |
|
|
Text { |
|
|
Text { |
|
|
anchors.verticalCenter: parent.verticalCenter |
|
|
anchors.verticalCenter: parent.verticalCenter |
|
|
anchors.left: parent.left |
|
|
anchors.left: parent.left |
|
|
|
|
|
font.family: "monospace" |
|
|
anchors.leftMargin: 5 |
|
|
anchors.leftMargin: 5 |
|
|
color: "#8b8b8b" |
|
|
color: "#4a4a4a" |
|
|
text: modelData.split(' ')[0].substring(0, 10); |
|
|
text: modelData.split(' ')[0].substring(0, 10); |
|
|
font.pointSize: 9 |
|
|
font.pointSize: 9 |
|
|
} |
|
|
} |
|
@ -445,8 +483,9 @@ Rectangle { |
|
|
width: parent.width - 5 |
|
|
width: parent.width - 5 |
|
|
wrapMode: Text.Wrap |
|
|
wrapMode: Text.Wrap |
|
|
anchors.left: parent.left |
|
|
anchors.left: parent.left |
|
|
|
|
|
font.family: "monospace" |
|
|
anchors.verticalCenter: parent.verticalCenter |
|
|
anchors.verticalCenter: parent.verticalCenter |
|
|
color: "#8b8b8b" |
|
|
color: "#4a4a4a" |
|
|
text: modelData.split(' ')[1].substring(0, 10); |
|
|
text: modelData.split(' ')[1].substring(0, 10); |
|
|
font.pointSize: 9 |
|
|
font.pointSize: 9 |
|
|
} |
|
|
} |
|
@ -462,18 +501,18 @@ Rectangle { |
|
|
} |
|
|
} |
|
|
} |
|
|
} |
|
|
} |
|
|
} |
|
|
|
|
|
|
|
|
Rectangle { |
|
|
|
|
|
width: debugPanel.width - 2 * machineStates.sideMargin |
|
|
|
|
|
height: 2; |
|
|
|
|
|
color: "#e3e3e3" |
|
|
|
|
|
radius: 3 |
|
|
|
|
|
} |
|
|
} |
|
|
|
|
|
|
|
|
|
|
|
Rectangle |
|
|
|
|
|
{ |
|
|
|
|
|
id: memoryRect; |
|
|
|
|
|
height: 25 |
|
|
|
|
|
width: parent.width |
|
|
|
|
|
Layout.minimumHeight: 25 |
|
|
|
|
|
Layout.maximumHeight: 223 |
|
|
DebugInfoList { |
|
|
DebugInfoList { |
|
|
id: memoryDump |
|
|
id: memoryDump |
|
|
width: debugPanel.width - 2 * machineStates.sideMargin |
|
|
anchors.fill: parent |
|
|
height: 223 |
|
|
|
|
|
collapsible: true |
|
|
collapsible: true |
|
|
title: qsTr("Memory Dump") |
|
|
title: qsTr("Memory Dump") |
|
|
itemDelegate: |
|
|
itemDelegate: |
|
@ -483,20 +522,20 @@ Rectangle { |
|
|
ItemDelegateDataDump {} |
|
|
ItemDelegateDataDump {} |
|
|
} |
|
|
} |
|
|
} |
|
|
} |
|
|
|
|
|
|
|
|
Rectangle { |
|
|
|
|
|
width: debugPanel.width - 2 * machineStates.sideMargin |
|
|
|
|
|
height: 2; |
|
|
|
|
|
color: "#e3e3e3" |
|
|
|
|
|
radius: 3 |
|
|
|
|
|
} |
|
|
} |
|
|
|
|
|
|
|
|
|
|
|
Rectangle |
|
|
|
|
|
{ |
|
|
|
|
|
id: callDataRect |
|
|
|
|
|
height: 25 |
|
|
|
|
|
width: parent.width |
|
|
|
|
|
Layout.minimumHeight: 25 |
|
|
|
|
|
Layout.maximumHeight: 223 |
|
|
DebugInfoList { |
|
|
DebugInfoList { |
|
|
id: callDataDump |
|
|
id: callDataDump |
|
|
width: debugPanel.width - 2 * machineStates.sideMargin |
|
|
anchors.fill: parent |
|
|
height: 223 |
|
|
|
|
|
collapsible: true |
|
|
collapsible: true |
|
|
title: qsTr("Call data") |
|
|
title: qsTr("Call Data") |
|
|
itemDelegate: |
|
|
itemDelegate: |
|
|
Item { |
|
|
Item { |
|
|
height: 29 |
|
|
height: 29 |
|
@ -505,5 +544,14 @@ Rectangle { |
|
|
} |
|
|
} |
|
|
} |
|
|
} |
|
|
} |
|
|
} |
|
|
|
|
|
Rectangle |
|
|
|
|
|
{ |
|
|
|
|
|
width: parent.width |
|
|
|
|
|
Layout.minimumHeight: 25 |
|
|
|
|
|
color: "transparent" |
|
|
|
|
|
} |
|
|
|
|
|
} |
|
|
|
|
|
} |
|
|
|
|
|
} |
|
|
} |
|
|
} |
|
|
} |
|
|
} |
|
|