On 16/12/2016 12:11, Andrey Semashev wrote:
The config macro to disable the stacktrace doesn't satisfy me. First, because it is a way to opt out whereas I believe such a feature should be an opt in as it is expensive. Second, because it doesn't work with compiled binaries (e.g. distributed in package distros and Boost installers). Third, I suspect this feature could be useful in a subset of source code, e.g. a particular set of function calls or a scope, while not so useful in other places of the application. For instance, one might want to temporarily enable it to debug a particular place of code without affecting the rest of the program. For that the feature should be configurable in runtime.
I'm curious whether your answer would change if your first two objections were invalid, ie. if it were not expensive and if it could be used for optimised and stripped binaries. (Regarding that latter point, that's what both Nat and I [in the pre-review] were talking about as a feature request, that the raw trace could be serialised and decoded later on a separate machine with access to the corresponding symbol files. This practice is not uncommon in Windows with minidumps and pdb files.)