diff options
author | Pavel Filipenský <pfilipensky@samba.org> | 2022-08-26 11:41:44 +0200 |
---|---|---|
committer | Andreas Schneider <asn@cryptomilk.org> | 2023-01-26 14:10:36 +0000 |
commit | e3e687b659ac0d60a0e1f0775ab3cc7181b3cc29 (patch) | |
tree | 463e3f027801e1e76e8079bb741f0d97b628acdb /lib/util | |
parent | 13d2db03973c4e26b2cff0925faab785a3c12494 (diff) | |
download | samba-e3e687b659ac0d60a0e1f0775ab3cc7181b3cc29.tar.gz |
debug: Call depth: Interface
BUG: https://bugzilla.samba.org/show_bug.cgi?id=15287
Signed-off-by: Pavel Filipenský <pfilipensky@samba.org>
Reviewed-by: Andreas Schneider <asn@samba.org>
Diffstat (limited to 'lib/util')
-rw-r--r-- | lib/util/debug.c | 11 | ||||
-rw-r--r-- | lib/util/debug.h | 2 |
2 files changed, 13 insertions, 0 deletions
diff --git a/lib/util/debug.c b/lib/util/debug.c index af742520ddd..1e28a4a2dac 100644 --- a/lib/util/debug.c +++ b/lib/util/debug.c @@ -1598,6 +1598,17 @@ static void bufr_print( void ) format_pos = 0; } +/* + * If set (by tevent_thread_call_depth_set()) to value > 0, debug code will use + * it for the trace indentation. + */ +static size_t debug_call_depth = 0; + +size_t *debug_call_depth_addr(void) +{ + return &debug_call_depth; +} + /*************************************************************************** Format the debug message text. diff --git a/lib/util/debug.h b/lib/util/debug.h index f58bb005145..4bbfa05df65 100644 --- a/lib/util/debug.h +++ b/lib/util/debug.h @@ -378,4 +378,6 @@ uint64_t debug_traceid_set(uint64_t id); /* Get the current traceid. */ uint64_t debug_traceid_get(void); +size_t *debug_call_depth_addr(void); + #endif /* _SAMBA_DEBUG_H */ |