Skip to content

Commit 6f72d9b

Browse files
committed
Split binary string in plain-text output of goto trace in groups of 8
1 parent 0ff1384 commit 6f72d9b

File tree

1 file changed

+12
-1
lines changed

1 file changed

+12
-1
lines changed

src/goto-programs/goto_trace.cpp

+12-1
Original file line numberDiff line numberDiff line change
@@ -122,7 +122,18 @@ std::string trace_value_binary(
122122
type.id()==ID_c_enum ||
123123
type.id()==ID_c_enum_tag)
124124
{
125-
return expr.get_string(ID_value);
125+
const std::string & str = expr.get_string(ID_value);
126+
127+
std::ostringstream oss;
128+
std::string::size_type i = 0;
129+
for(const auto c : str)
130+
{
131+
oss << c;
132+
if(++i % 8 == 0 && str.size() != i)
133+
oss << ' ';
134+
}
135+
136+
return oss.str();
126137
}
127138
else if(type.id()==ID_bool)
128139
{

0 commit comments

Comments
 (0)