about summary refs log tree commit diff stats
path: root/subx
diff options
context:
space:
mode:
authorKartik Agaram <vc@akkartik.com>2019-07-09 17:52:05 -0700
committerKartik Agaram <vc@akkartik.com>2019-07-09 17:52:05 -0700
commit4a96b659ff1dc16b78ba5fc607d49276b6d76c2a (patch)
tree504750fd650caf55e24b668fc2d9fdf611aca2ab /subx
parent7bc9240c3cf3f0e9e1710c3b148ffbcb2cc29fcf (diff)
downloadmu-4a96b659ff1dc16b78ba5fc607d49276b6d76c2a.tar.gz
.
Stop dumping huge traces on error. We can always rerun with --trace.
Though perhaps we should just dump the trace automatically on error.
Not bothering thinking about that right now.
Diffstat (limited to 'subx')
-rw-r--r--subx/010---vm.cc7
-rw-r--r--subx/013direct_addressing.cc1
2 files changed, 1 insertions, 7 deletions
diff --git a/subx/010---vm.cc b/subx/010---vm.cc
index 18f69035..de8d51b1 100644
--- a/subx/010---vm.cc
+++ b/subx/010---vm.cc
@@ -203,6 +203,7 @@ inline uint8_t* mem_addr_u8(uint32_t addr) {
   if (result == NULL) {
     if (Trace_file) Trace_file.flush();
     raise << "Tried to access uninitialized memory at address 0x" << HEXWORD << addr << '\n' << end();
+    exit(1);
   }
   return result;
 }
@@ -293,7 +294,6 @@ void run_one_instruction() {
     // End Two-Byte Opcodes Starting With 0f
     default:
       cerr << "unrecognized second opcode after 0f: " << HEXBYTE << NUM(op2) << '\n';
-      DUMP("");
       exit(1);
     }
     break;
@@ -305,13 +305,11 @@ void run_one_instruction() {
       // End Three-Byte Opcodes Starting With f2 0f
       default:
         cerr << "unrecognized third opcode after f2 0f: " << HEXBYTE << NUM(op3) << '\n';
-        DUMP("");
         exit(1);
       }
       break;
     default:
       cerr << "unrecognized second opcode after f2: " << HEXBYTE << NUM(op2) << '\n';
-      DUMP("");
       exit(1);
     }
     break;
@@ -323,19 +321,16 @@ void run_one_instruction() {
       // End Three-Byte Opcodes Starting With f3 0f
       default:
         cerr << "unrecognized third opcode after f3 0f: " << HEXBYTE << NUM(op3) << '\n';
-        DUMP("");
         exit(1);
       }
       break;
     default:
       cerr << "unrecognized second opcode after f3: " << HEXBYTE << NUM(op2) << '\n';
-      DUMP("");
       exit(1);
     }
     break;
   default:
     cerr << "unrecognized opcode: " << HEXBYTE << NUM(op) << '\n';
-    DUMP("");
     exit(1);
   }
 }
diff --git a/subx/013direct_addressing.cc b/subx/013direct_addressing.cc
index ca76acfb..513cb61b 100644
--- a/subx/013direct_addressing.cc
+++ b/subx/013direct_addressing.cc
@@ -1103,7 +1103,6 @@ case 0xff: {
     }
     default:
       cerr << "unrecognized subop for ff: " << HEXBYTE << NUM(subop) << '\n';
-      DUMP("");
       exit(1);
     // End Op ff Subops
   }