File tree Expand file tree Collapse file tree 1 file changed +6
-3
lines changed Expand file tree Collapse file tree 1 file changed +6
-3
lines changed Original file line number Diff line number Diff line change @@ -37,10 +37,13 @@ static const char* replace_addr_expr(const char* str)
3737{
3838 // Remove any address expression "0x0123456789abcdef" found in order to
3939 // aid string comparison. Also remove any trailing printout from a padded
40- // buffer.
40+ // buffer (too brittle?) .
4141
42- std::basic_string<char > tmp = std::regex_replace (str, std::regex (" 0x[0-9a-fA-F]+" ), " <addr>" );
43- std::basic_string<char > red = std::regex_replace (tmp, std::regex (" \\ s+<addr>:\\ s+\\ .inst\\ t<addr> ; undefined" ), " " );
42+ std::basic_string<char > tmp1 = std::regex_replace (str, std::regex (" 0x[0-9a-fA-F]+" ), " <addr>" );
43+ // Padding: aarch64
44+ std::basic_string<char > tmp2 = std::regex_replace (tmp1, std::regex (" \\ s+<addr>:\\ s+\\ .inst\\ t<addr> ; undefined" ), " " );
45+ // Padding: x64
46+ std::basic_string<char > red = std::regex_replace (tmp2, std::regex (" \\ s+<addr>:\\ s+hlt[ \\ t]+(?!\\ n\\ s+;;)" ), " " );
4447
4548 return os::strdup (red.c_str ());
4649}
You can’t perform that action at this time.
0 commit comments