Skip to content

Commit

Permalink
tracing: properly escape tracing strings
Browse files Browse the repository at this point in the history
  • Loading branch information
janweinstock committed Jun 19, 2024
1 parent cbdbb8e commit 7dc6b86
Show file tree
Hide file tree
Showing 2 changed files with 2 additions and 2 deletions.
2 changes: 1 addition & 1 deletion src/vcml/tracing/tracer_file.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -27,7 +27,7 @@ namespace vcml {

template <typename PAYLOAD>
void tracer_file::do_trace(const activity<PAYLOAD>& msg) {
vector<string> lines = split(to_string(msg.payload), '\n');
vector<string> lines = split(escape(to_string(msg.payload)), '\n');
for (const string& line : lines) {
m_stream << "[" << protocol_name(msg.kind);
print_timing(m_stream, msg);
Expand Down
2 changes: 1 addition & 1 deletion src/vcml/tracing/tracer_term.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -59,7 +59,7 @@ void tracer_term::do_trace(const activity<PAYLOAD>& msg) {
if (msg.dir == TRACE_FW)
trace_curr_indent += trace_indent_incr;

vector<string> lines = split(to_string(msg.payload), '\n');
vector<string> lines = split(escape(to_string(msg.payload)), '\n');
for (const string& line : lines) {
ss << "[" << protocol_name(msg.kind);
print_timing(ss, msg.t, msg.cycle);
Expand Down

0 comments on commit 7dc6b86

Please sign in to comment.