From 083d193fc170733452b9ff6499dbea8abb18f5a9 Mon Sep 17 00:00:00 2001 From: Dan Carpenter Date: Fri, 23 Nov 2012 09:28:55 +0300 Subject: [PATCH] debug: add __smatch_debug_implied_on/off() Turn on implication debugging for just part of a file. Signed-off-by: Dan Carpenter --- check_debug.c | 12 ++++++++++++ check_debug.h | 3 +++ 2 files changed, 15 insertions(+) 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 -- 2.11.4.GIT