In our code, we need to take certain cleanup actions
after receiving a SIGSEGV. This makes it difficult to
integrate with backward, as our custom sighandler is overriden.
A simple solution is to have backward-cpp expose the
core sighandling logic as a public function, which
we can simply call from within our code. This is not
currently possible since sig_handler is private, and
additionally raises the signal again at the end.
This pull request makes the above possible. The alternative
is to copy handleSignal into our own code, which is just ugly.
*Read the pc as specified for aarch64 processors.
*Disable division by zero tests, since aarch64 does not trap these and
therefore does not generate SIGFPEs there.
*All other tests succeed.
for ip==0, we sometimes calculate ip-=1.
ip is unsigned, so this is an underflow.
This is not strictly an UB, but more pedantic sanitizers
do catch this and report as possible error.
So why not instead just explicitly set value 0xffff...
(result of 0-1) and avoid this warnings.
This is a breaking change.
The printer now offers a color_mode setting: automatic, always, never.
When given a FILE* stream on linux, the automatic mode will retrieve
file descriptor behind it and call isatty().
Operator names are not supported by MSVC out of the box. Using them
breaks code that needs to build with MSVC and/or (thus) uses
"-fno-operator-names". As a header-only library should pursue maximal
portability, this commit replaces the single usage of operator names
with the more portable operator syntax.
When the stack trace is used directly (and not by a signal),
one may want to hide some of the first stack items because
they will always be the same calls.
On ArchLinux at least the bfd.h header errors out early if
PACKAGE or PACKAGE_VERSION have not been set. This patch
makes backward.hpp compile on this platform for me.
This change is needed for compatibility to Qt applications.
Qt defines a macro "signals" that expands to nothing and is used by
Qt's meta object compiler (which is kind of a C++ pre-processor) to
add signal-slot feature (http://doc.qt.io/qt-5/signalsandslots.html).
This will cause compilation of backward.hpp to fail, when used from a
Qt application, because the variable "signals" will be expanded to ""
by the cpp pre processor.
Change all the line counter variable types from size_t to unsigned, so
that we can printf() them as '%u' in a portable way, effectively fixing
build errors on ancient i386 machines.