Fix folly lint errors
[folly.git] / folly / experimental / exception_tracer / README
1 Exception tracer library
2
3 This library allows you to inspect the exception stack at runtime.
4 The library can be used in three ways:
5
6 1. Link in the exception_tracer_base library.  You get access to the functions
7 in ExceptionTracer.h, but no stack traces.  This has no runtime overhead,
8 and is compliant with the C++ ABI.
9
10 2. Link in the (full) exception_tracer library.  You get access to the
11 functions in ExceptionTracer.h, the std::terminate and std::unexpected
12 handlers are installed by default, and you get full stack traces with
13 all exceptions.  This has some runtime overhead (the stack trace must be
14 captured and stored whenever an exception is thrown) added to throw
15 and catch, but no runtime overhead otherwise.  This is less portable
16 (depends on internal details of GNU's libstdc++).
17
18 3. LD_PRELOAD libexceptiontracer.so.  This is equivalent to #2 above, but
19 requires no link-time changes.  On the other hand, you need to ensure that
20 libexceptiontracer.so is compiled with the same compiler and flags as
21 your binary, and the usual caveats about LD_PRELOAD apply (it propagates
22 to child processes, etc).