diff options
author | Laurent Pinchart <laurent.pinchart@ideasonboard.com> | 2019-11-23 11:20:29 +0200 |
---|---|---|
committer | Laurent Pinchart <laurent.pinchart@ideasonboard.com> | 2019-11-26 18:47:15 +0200 |
commit | 442f516c6215aa0bbdeec4c7f2d6c406521a92fd (patch) | |
tree | 35bf85ad9be50efcbef9dd049b29ebbd5c9785dd /test/v4l2_subdevice/v4l2_subdevice_test.cpp | |
parent | a1225b838f1f4cf4544455abf72dddcbd6372490 (diff) |
libcamera: Print backtrace on fatal errors
When a fatal error occurs the program aborts, and all the logger
provides is the location of the line that caused the error. Extend this
with a full backtrace to help debugging.
The backtrace is generated using the backtrace() call, a GNU extension
to the C library. It is available in glibc and uClibc but not in musl.
Test for availability of the function to condition compilation of the
backtrace printing. Implementing backtrace support with musl is an
exercise left to the reader if desired.
The LogOutput class is extended to support writing string messages
directly to the output. Strings written directly will be considered as
LogDebug messages when written to the Syslog.
Signed-off-by: Laurent Pinchart <laurent.pinchart@ideasonboard.com>
Tested-by: Kieran Bingham <kieran.bingham@ideasonboard.com>
Reviewed-by: Kieran Bingham <kieran.bingham@ideasonboard.com>
Diffstat (limited to 'test/v4l2_subdevice/v4l2_subdevice_test.cpp')
0 files changed, 0 insertions, 0 deletions