| 1187 | } |
| 1188 | |
| 1189 | std::string prettify_stacktrace(const std::string & input) |
| 1190 | { |
| 1191 | std::string output = input; |
| 1192 | |
| 1193 | do_replacements(s_user_stack_cleanups, output); |
| 1194 | do_replacements(REPLACE_LIST, output); |
| 1195 | |
| 1196 | try { |
| 1197 | std::regex std_allocator_re(R"(,\s*std::allocator<[^<>]+>)"); |
| 1198 | output = std::regex_replace(output, std_allocator_re, std::string("")); |
| 1199 | |
| 1200 | std::regex template_spaces_re(R"(<\s*([^<> ]+)\s*>)"); |
| 1201 | output = std::regex_replace(output, template_spaces_re, std::string("<$1>")); |
| 1202 | } |
| 1203 | catch (std::regex_error&) { |
| 1204 | // Probably old GCC. |
| 1205 | } |
| 1206 | |
| 1207 | return output; |
| 1208 | } |
| 1209 | |
| 1210 | std::string stacktrace_as_stdstring(int skip) |
| 1211 | { |
no test coverage detected