From bf458036ced8cbb50c79268f57418149f5e43909 Mon Sep 17 00:00:00 2001 From: "Kartik K. Agaram" Date: Tue, 8 Dec 2015 00:51:06 -0800 Subject: 2621 --- 090trace_browser.cc | 13 +++++++++++-- 1 file changed, 11 insertions(+), 2 deletions(-) diff --git a/090trace_browser.cc b/090trace_browser.cc index 445718af..377b391c 100644 --- a/090trace_browser.cc +++ b/090trace_browser.cc @@ -32,14 +32,14 @@ map Trace_index; // screen row -> trace index :(code) void start_trace_browser() { if (!Trace_stream) return; - cerr << "computing depth to display\n"; + cerr << "computing min depth to display\n"; long long int min_depth = 9999; for (long long int i = 0; i < SIZE(Trace_stream->past_lines); ++i) { trace_line& curr_line = Trace_stream->past_lines.at(i); if (curr_line.depth == 0) continue; if (curr_line.depth < min_depth) min_depth = curr_line.depth; } - cerr << "depth is " << min_depth << '\n'; + cerr << "min depth is " << min_depth << '\n'; cerr << "computing lines to display\n"; for (long long int i = 0; i < SIZE(Trace_stream->past_lines); ++i) { if (Trace_stream->past_lines.at(i).depth == min_depth) @@ -231,6 +231,14 @@ void load_trace(const char* filename) { } Trace_stream = new trace_stream; while (has_data(tin)) { + tin >> std::noskipws; + skip_whitespace_but_not_newline(tin); + if (!isdigit(tin.peek())) { + string dummy; + getline(tin, dummy); + continue; + } + tin >> std::skipws; int depth; tin >> depth; string label; @@ -240,4 +248,5 @@ void load_trace(const char* filename) { getline(tin, line); Trace_stream->past_lines.push_back(trace_line(depth, label, line)); } + cerr << "lines read: " << Trace_stream->past_lines.size() << '\n'; } -- cgit 1.4.1-2-gfad0 tik/mu/diff/html/029tools.cc.html?h=hlt&id=83b7c4a1018d17548055d63f18bffc37e869c695'>diff stats