Search code examples
c++debuggingprofilingruntimeinstrumentation

Instrumentation (diagnostic) library for C++


I'm thinking about adding code to my application that would gather diagnostic information for later examination. Is there any C++ library created for such purpose? What I'm trying to do is similar to profiling, but it's not the same, because gathered data will be used more for debugging than profiling.

EDIT:
Platform: Linux
Diagnostic information to gather: information resulting from application logic, various asserts and statistics.


Solution

  • You might also want to check out libcwd:

    Libcwd is a thread-safe, full-featured debugging support library for C++ developers. It includes ostream-based debug output with custom debug channels and devices, powerful memory allocation debugging support, as well as run-time support for printing source file:line number information and demangled type names.

    Also, another interesting logging library is pantheios:

    Pantheios is an Open Source C/C++ Logging API library, offering an optimal combination of 100% type-safety, efficiency, genericity and extensibility. It is simple to use and extend, highly-portable (platform and compiler-independent) and, best of all, it upholds the C tradition of you only pay for what you use.