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)
37
37
{
38
38
// Remove any address expression "0x0123456789abcdef" found in order to
39
39
// aid string comparison. Also remove any trailing printout from a padded
40
- // buffer.
40
+ // buffer (too brittle?) .
41
41
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+;;)" ), " " );
44
47
45
48
return os::strdup (red.c_str ());
46
49
}
You can’t perform that action at this time.
0 commit comments