debug: add __smatch_debug_implied_on/off()
authorDan Carpenter <dan.carpenter@oracle.com>
Fri, 23 Nov 2012 06:28:55 +0000 (23 09:28 +0300)
committerDan Carpenter <dan.carpenter@oracle.com>
Fri, 23 Nov 2012 06:28:55 +0000 (23 09:28 +0300)
Turn on implication debugging for just part of a file.

Signed-off-by: Dan Carpenter <dan.carpenter@oracle.com>
check_debug.c
check_debug.h

index bdcfb37..d0f51ae 100644 (file)
@@ -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);
 }
index 8cdc07b..85fe047 100644 (file)
@@ -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