Added backtrace functions for debugging

This commit is contained in:
Klaus Schmidinger
2017-06-03 12:43:22 +02:00
parent bae02358a3
commit 2c74a31afe
5 changed files with 234 additions and 95 deletions

20
HISTORY
View File

@@ -9058,11 +9058,21 @@ Video Disk Recorder Revision History
2017-05-31: Version 2.3.6
- Added debug output for checking the correct sequence of locking global lists
(with help and suggestions from Jasmin Jessich). To activate this, define the
macro DEBUG_LOCKSEQ in thread.c. At the first occurrence of an invalid locking
sequence, the 20 most recent locks will be printed to stderr, followed by a
backtrace that led to the call in question.
- Added backtrace functions for debugging (see cBackTrace in thread.h).
- Added checking the correct sequence of locking global lists (with help and
suggestions from Jasmin Jessich). At the first occurrence of an invalid locking
sequence, the 20 most recent locks will be written to the log file, followed by a
backtrace that led to the call in question. This code can be activated by defining
the macro DEBUG_LOCKSEQ in thread.c (which is on by default).
When debugging an actual invalid locking sequence, you can additionally define
the macro DEBUG_LOCKCALL in thread.c, which will add information about the caller
of each lock. Note that this may cause some stress on the CPU, therefore it is off
by default.
- The file Make.config.template now reacts on DEBUG=1 in the 'make' command line,
and disables code optimizations by setting -O0 (thanks to Jasmin Jessich).
This can be helpful when backtracing highly optimized code. You may want to
'make distclean' before running 'make' with a modified setting of DEBUG, to make
sure all object files are newly compiled.
- Fixed the locking sequence when dumping EPG data.
- Fixed the locking sequence when starting a recording.
- The Makefiles now use the macro $(Q) instead of a plain '@' in front of their