Boost logo

Boost :

Subject: Re: [boost] [Stacktrace] review, please stop discussing non-Stacktrace issues
From: Peter Dimov (lists_at_[hidden])
Date: 2016-12-17 11:23:55


> In
>
> std::string name = f.name();
> if (!name.empty()) {
> os << name;
> } else {
> os << f.address();
> }
>
> const std::size_t source_line = f.source_line();
> if (source_line) {
> os << " at " << f.source_file() << ':' << source_line;
> }
>
> which is perfectly reasonable code given the current interface, addr2line
> is called three times instead of just one. And in operator<< for a
> stacktrace of depth N, addr2line will be called 3*N times instead of one.

The same problem exists in the Windows backend, where the COM machinery is
initialized/deinitialized on each call, and GetLineByOffset is called twice,
each time discarding half of the result.


Boost list run by bdawes at acm.org, gregod at cs.rpi.edu, cpdaniel at pacbell.net, john at johnmaddock.co.uk