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 /039debug.cc | |
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.
Diffstat (limited to '039debug.cc')
-rw-r--r-- | 039debug.cc | 4 |
1 files changed, 3 insertions, 1 deletions
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; |