diff options
author | Kartik Agaram <vc@akkartik.com> | 2020-01-02 02:02:37 -0800 |
---|---|---|
committer | Kartik Agaram <vc@akkartik.com> | 2020-01-02 02:02:37 -0800 |
commit | ab02bb66328f3dd8066a32efb04d86f67f34993e (patch) | |
tree | e1b464483796e5b1f512f9b436f37e7c2266fde9 | |
parent | 9e5e87ca3776efa5f0d772ed8cf348bf6ee4d08e (diff) | |
download | mu-ab02bb66328f3dd8066a32efb04d86f67f34993e.tar.gz |
5866
Stop requiring '--debug' in 'bootstrap run'. Now it's smart enough to turn on when needed. This creates some small chance of reading stale debug info for the wrong binary, but in practice that hasn't been an issue.
-rw-r--r-- | 003trace.cc | 1 | ||||
-rw-r--r-- | 039debug.cc | 4 |
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; |