Backward is a useful tool for C++ developers for diagnosing bugs.
In a nut shell, when a program terminates abnormally, Backward prints out the line in the source code that causes the trouble. It does this by catching signals and relies on either elfutils or GNU/binutils libraries to print out the debugging symbols in the executable.
To use it is as simple as 1, 2 3:
- include backward.hpp in the source file
- compile the source code with debugging symbols. i.e. compile with -g flag.
- link with elfutils or GNU/binutils library