backtrace_execinfo: correct newlines for ostream
if addr2line wasn't found newlines weren't consistent
This commit is contained in:
parent
12f154d0cb
commit
539188ffde
@ -66,7 +66,7 @@ addr2line (const void *addr)
|
||||
return std::string (data.cbegin (), data.cend ());
|
||||
|
||||
#else
|
||||
return "\n";
|
||||
return "";
|
||||
#endif
|
||||
}
|
||||
|
||||
@ -81,7 +81,7 @@ debug::operator <<(std::ostream &os, const debug::backtrace &rhs) {
|
||||
str_t names (backtrace_symbols (frames.data (), trunc_cast<int> (frames.size ())), ::free);
|
||||
|
||||
for (unsigned int i = 0; i < frames.size (); ++i)
|
||||
os << frames[i] << '\t' << names.get()[i] << '\t' << addr2line (frames[i]);
|
||||
os << frames[i] << '\t' << names.get()[i] << '\t' << addr2line (frames[i]) << '\n';
|
||||
|
||||
return os;
|
||||
}
|
||||
|
Loading…
Reference in New Issue
Block a user