1
0
mirror of https://github.com/sehugg/8bitworkshop.git synced 2024-06-12 18:42:14 +00:00

marker for current breakpoint line

This commit is contained in:
Steven Hugg 2018-06-24 13:39:08 -04:00
parent 3bf39dbde5
commit 00537a0e67
2 changed files with 30 additions and 9 deletions

View File

@ -16,13 +16,13 @@ TODO:
- case sensisitvity looking for mismatch variables - case sensisitvity looking for mismatch variables
- remove pulldown when no preset? - remove pulldown when no preset?
- can't step after reset (or when funky frame; TIA frame is out of sync) - can't step after reset (or when funky frame; TIA frame is out of sync)
- break on BRK/illegal opcode? - break on BRK/illegal opcode? (or warnings?)
- skeleton for each platform/tool (check?) - skeleton for each platform/tool (check?)
- disassembler/debugger - disassembler/debugger
- multiple breakpoints, expression breakpoints - multiple breakpoints, expression breakpoints
- current exec. pos in gutter - current exec. pos in gutter
- cc65: parse listing - cc65: parse listing
- faster Z80 compile - faster Z80 compile (maybe split up files?)
- projects w/ multiple files, navigation (need refactor UI) - projects w/ multiple files, navigation (need refactor UI, backend)
- nes: tools (nesst, tiled) https://shiru.untergrund.net/software.shtml - nes: tools (nesst, tiled) https://shiru.untergrund.net/software.shtml

View File

@ -582,13 +582,33 @@ worker.onmessage = function(e) {
setCompileOutput(e.data); setCompileOutput(e.data);
} }
function setCurrentLine(line) { var currentDebugLine;
editor.setSelection({line:line,ch:0}, {line:line-1,ch:0}, {scroll:true});
}
var lastDebugInfo; var lastDebugInfo;
var lastDebugState; var lastDebugState;
function setCurrentLine(line) {
function addCurrentMarker(line) {
var div = document.createElement("div");
div.style.color = '#66ffff'; // TODO
div.appendChild(document.createTextNode("\u25b6"));
editor.setGutterMarker(line, "gutter-info", div);
}
clearCurrentLine();
if (line>0) {
addCurrentMarker(line-1);
editor.setSelection({line:line,ch:0}, {line:line-1,ch:0}, {scroll:true});
currentDebugLine = line;
}
}
function clearCurrentLine() {
if (currentDebugLine) {
editor.clearGutter("gutter-info");
editor.setSelection(editor.getCursor()); // TODO??
currentDebugLine = 0;
}
}
function showMemory(state) { function showMemory(state) {
var s = state && platform.cpuStateToLongString && platform.cpuStateToLongString(state.c); var s = state && platform.cpuStateToLongString && platform.cpuStateToLongString(state.c);
if (s) { if (s) {
@ -654,8 +674,9 @@ function _resume() {
function resume() { function resume() {
clearBreakpoint(); clearBreakpoint();
if (! platform.isRunning() ) if (! platform.isRunning() ) {
editor.setSelection(editor.getCursor()); // TODO?? clearCurrentLine();
}
_resume(); _resume();
userPaused = false; userPaused = false;
} }