Boost logo

Boost :

Subject: Re: [boost] [stacktrace] review
From: Antony Polukhin (antoshkka_at_[hidden])
Date: 2016-12-22 13:49:12


2016-12-21 18:58 GMT+03:00 Artyom Beilis <artyom.beilis_at_[hidden]>:
<...>
> I have a question why you used COM instead of SymFromAddr functions? I
> understand thread safety issues but simple mutex can solve them.

The library is header only by default, so it's impossible to create a
global mutex. This may also interact badly with libraries that use the
same functions.

> My concerns are regarding MinGW compilers. Have you tested it on MinGW compiler?
> It wouldn't work as it used MSVC debug information in general
> so maybe it is good idea to provide an alternative backend that
> extracts only address and
> DLL name so you can analyse the stacktrace later (using addr2line
> utility for example)

Yes, MinGW build requires fixes. I'll take care of that.

>
> Take a look on my code [1] regarding non-msvc windows compilers - it
> provides at least some useful information.
>
>
>> - What is your evaluation of the documentation?
>
> The documentation is ok in general and straight forward as the library itself.
> What I do lack is the documentation of underlying backends - how do they work.

Good point! Thanks!

> 1. use of -rdynamic/-export-dynamic should be noted in "bold face" regarding
> the use of the library.

Those flags are not required because addr2line can extract information
from debug sections of the binary.

> 2. please do not call it "POSIX backend" - as there none of the stuff you use, not only from the export sections
> is actually POSIX...
>
> Also you'll probably need different backends for MINGW and mention it.

+1

> [1] https://sourceforge.net/p/cppcms/code/HEAD/tree/framework/trunk/booster/booster/backtrace.h
> https://sourceforge.net/p/cppcms/code/HEAD/tree/framework/trunk/booster/lib/backtrace/src/backtrace.cpp
>
> [2] https://sourceforge.net/p/cppcms/code/HEAD/tree/framework/trunk/booster/booster/backtrace.h#l271

Thanks for the review and for the links!

-- 
Best regards,
Antony Polukhin

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