about summary refs log tree commit diff stats
diff options
context:
space:
mode:
-rw-r--r--003trace.cc1
-rw-r--r--039debug.cc4
2 files changed, 4 insertions, 1 deletions
diff --git a/003trace.cc b/003trace.cc
index 25b21825..688ba0e1 100644
--- a/003trace.cc
+++ b/003trace.cc
@@ -453,6 +453,7 @@ else if (is_equal(*arg, "--trace")) {
   // Add a dummy line up top; otherwise the `browse_trace` tool currently has
   // no way to expand any lines above an error.
   Trace_file << "   0 dummy: start\n";
+  // End --trace Settings
 }
 :(before "End trace Commit")
 if (Trace_file) {
diff --git a/039debug.cc b/039debug.cc
index bb306b06..9f2dd4bd 100644
--- a/039debug.cc
+++ b/039debug.cc
@@ -7,12 +7,13 @@
 :(before "End Globals")
 map</*address*/uint32_t, string> Symbol_name;  // used only by 'bootstrap run'
 map</*address*/uint32_t, string> Source_line;  // used only by 'bootstrap run'
-:(before "End --debug Settings")
+:(before "End --trace Settings")
 load_labels();
 load_source_lines();
 :(code)
 void load_labels() {
   ifstream fin("labels");
+  if (fin.fail()) return;
   fin >> std::hex;
   while (has_data(fin)) {
     uint32_t addr = 0;
@@ -25,6 +26,7 @@ void load_labels() {
 
 void load_source_lines() {
   ifstream fin("source_lines");
+  if (fin.fail()) return;
   fin >> std::hex;
   while (has_data(fin)) {
     uint32_t addr = 0;