From: Dan Carpenter Date: Fri, 23 Nov 2012 06:28:55 +0000 (+0300) Subject: debug: add __smatch_debug_implied_on/off() X-Git-Tag: 1.57~168 X-Git-Url: https://repo.or.cz/w/smatch.git/commitdiff_plain/083d193fc170733452b9ff6499dbea8abb18f5a9 debug: add __smatch_debug_implied_on/off() Turn on implication debugging for just part of a file. Signed-off-by: Dan Carpenter --- diff --git a/check_debug.c b/check_debug.c index bdcfb378..d0f51ae1 100644 --- a/check_debug.c +++ b/check_debug.c @@ -285,6 +285,16 @@ static void match_local_debug_off(const char *fn, struct expression *expr, void local_debug = 0; } +static void match_debug_implied_on(const char *fn, struct expression *expr, void *info) +{ + option_debug_implied = 1; +} + +static void match_debug_implied_off(const char *fn, struct expression *expr, void *info) +{ + option_debug_implied = 0; +} + void check_debug(int id) { my_id = id; @@ -307,4 +317,6 @@ void check_debug(int id) add_function_hook("__smatch_debug_off", &match_debug_off, NULL); add_function_hook("__smatch_local_debug_on", &match_local_debug_on, NULL); add_function_hook("__smatch_local_debug_off", &match_local_debug_off, NULL); + add_function_hook("__smatch_debug_implied_on", &match_debug_implied_on, NULL); + add_function_hook("__smatch_debug_implied_off", &match_debug_implied_off, NULL); } diff --git a/check_debug.h b/check_debug.h index 8cdc07b3..85fe047a 100644 --- a/check_debug.h +++ b/check_debug.h @@ -31,4 +31,7 @@ static inline void __smatch_debug_off(void){} static inline void __smatch_local_debug_on(void){} static inline void __smatch_local_debug_off(void){} +static inline void __smatch_debug_implied_on(void){} +static inline void __smatch_debug_implied_off(void){} + #endif