Re: boost::stacktrace::stacktrace AND addr2line
Antony Polukhin via Boost-users <[email protected]> Sun, 18 Feb 2024 17:06:55 +0300
| Newsgroups | gmane.comp.lib.boost.user |
|---|---|
| Message-ID | <CAKqmYPa_ZXW6-ci9xh3eeAUU81qkUVyOUKoj5EfD16GzsAP7TA@mail.gmail.com> |
On Fri, Feb 9, 2024, 20:02 Foelsche, Peter via Boost-users < [email protected]> wrote: > Dear All, > > > > Thanks for outstanding quality of boost! > > > > I’m using the stacktrace object together with debug info and *BOOST_STACKTRACE_USE_ADDR2LINE > defined.* > > *Would it be possible to cache the output of addr2line assuming that > during the lifetime of the calling process the queried executable or shared > objects do not change?* > You could do a generic cache that does not depend on the stacktrace implementation. Just make a unordered_map and map a stacktrace object to a string with decoded stacktrace. Or you could do a per-frame cache, mapping a frame to demangled name. Here's an example: https://github.com/userver-framework/userver/blob/develop/universal/src/logging/stacktrace_cache.cpp > *Thanks* > > *Peter* > > > _______________________________________________ > Boost-users mailing list > [email protected] > https://lists.boost.org/mailman/listinfo.cgi/boost-users > _______________________________________________ Boost-users mailing list [email protected] https://lists.boost.org/mailman/listinfo.cgi/boost-users