diff options
| author | Alejandro Soto <alejandro@34project.org> | 2022-12-07 19:18:04 -0600 |
|---|---|---|
| committer | Alejandro Soto <alejandro@34project.org> | 2022-12-07 19:51:41 -0600 |
| commit | c39552375661e495b344e8386649ade92a4d45b2 (patch) | |
| tree | 45623ce35964e43ae7d8804c1ef1c6dedb3ba7a1 /tb | |
| parent | b1761b8eac5777c09723bbc8cd31cc05d8ec35ae (diff) | |
Implement single-stepping
Diffstat (limited to 'tb')
| -rw-r--r-- | tb/top/conspiracion.cpp | 9 |
1 files changed, 8 insertions, 1 deletions
diff --git a/tb/top/conspiracion.cpp b/tb/top/conspiracion.cpp index 96fd57f..bd1086a 100644 --- a/tb/top/conspiracion.cpp +++ b/tb/top/conspiracion.cpp @@ -391,6 +391,7 @@ int main(int argc, char **argv) ttyJ0.takeover(); } + top.step = 0; top.halt = start_halted; top.rst_n = 0; cycle(); @@ -458,6 +459,9 @@ int main(int argc, char **argv) if(top.cpu_halted) { + top.step = 0; + top.halt = 0; + do_reg_dump(); std::fputs("=== halted ===\n", ctrl); @@ -486,7 +490,10 @@ int main(int argc, char **argv) const char *cmd = std::strtok(line, " "); if(!std::strcmp(cmd, "continue")) { - top.halt = 0; + break; + } else if(!std::strcmp(cmd, "step")) + { + top.step = 1; break; } else if(!std::strcmp(cmd, "dump-mem")) { |
