summaryrefslogtreecommitdiff
path: root/lib/debug.c
AgeCommit message (Collapse)Author
2023-02-09*: auto-convert to SPDX License IDsDavid Lamparter
Done with a combination of regex'ing and banging my head against a wall. Signed-off-by: David Lamparter <equinox@opensourcerouting.org>
2021-03-17*: require semicolon after DEFINE_<typesafe...>David Lamparter
Again, see previous commits. Signed-off-by: David Lamparter <equinox@diac24.net>
2019-05-28lib: Separate out the debug_init apiDonald Sharp
Separate out the debug_init api to have 2 functions: 1) Function to register a callback 2) Function to initiate the cli. Signed-off-by: Donald Sharp <sharpd@cumulusnetworks.com>
2019-05-28lib: Make the debug callbacks a list of callbacksDonald Sharp
Allow multiple callers to initialize themselves to receive callbacks for debug on/off operations. Signed-off-by: Donald Sharp <sharpd@cumulusnetworks.com>
2019-04-15lib: fix inverted logic in the "debug all" commandRenato Westphal
Signed-off-by: Renato Westphal <renato@opensourcerouting.org>
2018-03-01lib: add mt-safe debugging facilitiesQuentin Young
The current strategy for fine-grained debugging across FRR is to use static long int bitfields, in combination with helper macros that are copy-pasted between daemons, to hold state on what debugging information should be collected at any given time. This has a couple of problems: * These bitfields are generally extern'd and accessed everywhere, so they are not MT-safe or easy to make MT-safe * Lots of code duplication from copy-pasting the DEBUG_* macros... * Code duplication because of the "term" vs "conf" debugging concept This patch aims to remedy that by providing some infrastructure to work with debugs. The core concept of using bitfields has been retained, but the number of these for each debug has been reduced to 1. This allows easy use of lock-free methods for synchronizing access to debugging info. The helper macros have also been retained but they are now collected in one place and perform exclusively atomic operations. Finally there is a bit of code that allows daemons to register callbacks, which I used to implement a command that will toggle all debugging for any daemons that use these facilities. Signed-off-by: Quentin Young <qlyoung@cumulusnetworks.com>
2004-11-262004-11-26 Andrew J. Schorr <ajschorr@alumni.princeton.edu>ajs
* debug.[ch]: Remove unused files. * Makefile.am: Remove references to debug.c and debug.h * ospf_main.c: Remove #include "debug.h" (was not being used, and lib/debug.h has now been deleted).
2004-03-04Many warning fixes from PC Drew ([quagga-dev 940]) and removing using PAGERhasso
from vtysh ([quagga-dev 932]).
2003-06-04Paul Jakma:paul
lib/debug.{c,h}: glibc backtrace printing function (from the glibc info page) configure.ac: check for glibc backtrace and set define lib/zebra.h: glibc backtrace support