summaryrefslogtreecommitdiffstats
path: root/include/debug.h
Commit message (Collapse)AuthorAgeFilesLines
* include/debug: introduce __UL_INIT_DEBUG_FROM_STRING()Karel Zak2018-01-171-7/+12
| | | | | | | Let's make it possible to use debug.h without environment variables. Suggested-by: J William Piggott <elseifthen@gmx.com> Signed-off-by: Karel Zak <kzak@redhat.com>
* include/debug: improve debug messageKarel Zak2018-01-121-1/+1
| | | | Signed-off-by: Karel Zak <kzak@redhat.com>
* include/debug: print info when addresses suppressedKarel Zak2018-01-121-1/+3
| | | | | Suggested-by: Peter Cordes <peter@cordes.ca> Signed-off-by: Karel Zak <kzak@redhat.com>
* include/debug: don't print pointer address for SUID programsKarel Zak2018-01-121-16/+11Star
| | | | | | | | | | | | | | | | * introduce new flag __UL_DEBUG_FL_NOADDR to suppress pointer address printing * use __UL_DEBUG_FL_NOADDR when SUID * move ul_debugobj() to debugobj.h, and require UL_DEBUG_CURRENT_MASK to provide access to the current mask from ul_debugobj(). It's better than modify all ul_debugobj() calls and use the global mask as argument. * remove never used UL_DEBUG_DEFINE_FLAG Reported-by: halfdog <me@halfdog.net> Signed-off-by: Karel Zak <kzak@redhat.com>
* debug: use const void * for ul_debugobj()Igor Gnatenko2016-09-211-1/+1
| | | | | | | | | | We don't modify data it's pointing out and we should not modify it. Also remove casting to void * as gcc will do it automatically (before we had to cast it explicitly to avoid warning on discarding 'const' qualifier). Signed-off-by: Igor Gnatenko <i.gnatenko.brain@gmail.com>
* misc: Fix various typosSebastian Rasmussen2016-05-311-1/+1
| | | | | | | Fix various typos in error messages, warnings, debug strings, comments and names of static functions. Signed-off-by: Sebastian Rasmussen <sebras@gmail.com>
* include/debug: improve and cleanupKarel Zak2014-11-031-17/+70
| | | | | | | | | * use ul_debug_ prefix for all routines * support <NAME>_DEBUG=all also for programs without debug mask names (so we can avoid 0xffff mask in man pages) * add function to print debug help Signed-off-by: Karel Zak <kzak@redhat.com>
* include/debug: fix typoKarel Zak2014-10-241-1/+1
| | | | Signed-off-by: Karel Zak <kzak@redhat.com>
* whereis: cleanup debug stuff, fix argv[] usageKarel Zak2014-10-231-1/+1
| | | | | | | | | | | | | | | | | | | | * use debug stuff from include/debug.h and make whereis(1) sensitive to WHEREIS_DEBUG=0xffff mask * fix problem with argv[] usage # whereis -b -m -M /usr/share/man/man1 -B /usr/bin -f gcc bin: /usr/local/bin gcc: /usr/bin/gcc /usr/lib/gcc /usr/libexec/gcc /usr/share/man/man1/gcc.1.gz the code ignores "-B" and /usr/bin is interpreted as search pattern, expected result is: # whereis -b -m -M /usr/share/man/man1 -B /usr/bin -f gcc gcc: /usr/share/man/man1/gcc.1.gz /usr/bin/gcc Addresses: https://bugs.debian.org/cgi-bin/bugreport.cgi?bug=765306 Signed-off-by: Karel Zak <kzak@redhat.com>
* include/debug: remove duplicate 'const' declaration warningSami Kerola2014-10-011-1/+1
| | | | | | ./include/debug.h:89:55: warning: duplicate 'const' declaration specifier [-Wduplicate-decl-specifier] Signed-off-by: Sami Kerola <kerolasa@iki.fi>
* include/debug: allow to speficy empty masknamesKarel Zak2014-08-131-1/+3
| | | | Signed-off-by: Karel Zak <kzak@redhat.com>
* include/debug: cleanup masksKarel Zak2014-08-131-0/+1
| | | | Signed-off-by: Karel Zak <kzak@redhat.com>
* include/debug: make masknames optionalKarel Zak2014-08-131-1/+1
| | | | Signed-off-by: Karel Zak <kzak@redhat.com>
* libs/debug: accept human readable names for _DEBUG=Ondrej Oprala2014-08-131-1/+41
| | | | | | | | | | For example $ LIBMOUNT_DEBUG=tab,cache findmnt to debug only TAB and CACHE subsystem. Signed-off-by: Ondrej Oprala <ooprala@redhat.com> Signed-off-by: Karel Zak <kzak@redhat.com>
* include/debug: add another debug macrosKarel Zak2014-03-211-1/+17
| | | | Signed-off-by: Karel Zak <kzak@redhat.com>
* include/debug: fix coding styleKarel Zak2014-03-211-21/+22
| | | | Signed-off-by: Karel Zak <kzak@redhat.com>
* clean up redundant macros and definesOndrej Oprala2014-03-131-8/+0Star
| | | | Signed-off-by: Ondrej Oprala <ooprala@redhat.com>
* libcommon: don't mention lib versions in debug macrosOndrej Oprala2014-03-131-3/+0Star
| | | | Signed-off-by: Ondrej Oprala <ooprala@redhat.com>
* libcommon: define more debugging macrosOndrej Oprala2014-03-121-0/+7
| | | | Signed-off-by: Ondrej Oprala <ooprala@redhat.com>
* libcommon: add common debugging routinesOndrej Oprala2014-03-121-0/+70
Signed-off-by: Ondrej Oprala <ooprala@redhat.com>