Code Listener  [unstable] git snapshot
config_cl.h
Go to the documentation of this file.
1 /*
2  * Copyright (C) 2009-2010 Kamil Dudka <kdudka@redhat.com>
3  *
4  * This file is part of predator.
5  *
6  * predator is free software: you can redistribute it and/or modify
7  * it under the terms of the GNU General Public License as published by
8  * the Free Software Foundation, either version 3 of the License, or
9  * any later version.
10  *
11  * predator is distributed in the hope that it will be useful,
12  * but WITHOUT ANY WARRANTY; without even the implied warranty of
13  * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
14  * GNU General Public License for more details.
15  *
16  * You should have received a copy of the GNU General Public License
17  * along with predator. If not, see <http://www.gnu.org/licenses/>.
18  */
19 
20 /**
21  * @file config_cl.h
22  * various compile-time options
23  */
24 
25 #define GIT_SHA1 cl_git_sha1
26 #include "trap.h"
27 
28 /**
29  * if 1, print amount of allocated memory on certain places when in verbose mode
30  */
31 #ifndef NDEBUG
32 # define DEBUG_MEM_USAGE 1
33 #else
34 # define DEBUG_MEM_USAGE 0
35 #endif
36 
37 /**
38  * if 1, check each code_listener filter by the integrity checker
39  */
40 #define CL_DEBUG_CLF 0
41 
42 /**
43  * print each gimple statement before its processing
44  */
45 #define CL_DEBUG_GCC_GIMPLE 0
46 
47 /**
48  * dump gcc tree of unhandled expressions
49  */
50 #define CL_DEBUG_GCC_TREE 0
51 
52 /**
53  * print location info using the cl_locator code listener
54  */
55 #define CL_DEBUG_LOCATION 0
56 
57 /**
58  * debug level of the CFG loop scanner
59  * - 0 ... print only time elapsed
60  * - 1 ... print edges marked as loop-closing
61  * - 2 ... print some basic progress info
62  */
63 #define CL_DEBUG_LOOP_SCAN 0
64 
65 /**
66  * debug level of points-to analyze algorithm
67  * - 0 ... print only time elapsed
68  * - 1 ... info regarding actually analyzed function
69  * - 2 ... print more deeply progress info at the basic block level
70  * - 3 ... debug info at the instruction level
71  * - 4 ... all info -- including info about creating/deleting PT-nodes
72  */
73 #define CL_DEBUG_POINTS_TO 0
74 
75 /**
76  * debug level of the verbose output when killing variables
77  * - 0 ... print only time elapsed
78  * - 1 ... print variables being killed and variables black-listed for killing
79  * - 2 ... print some basic progress info
80  * - 3 ... debug the algorithm at the level of instructions
81  * - 4 ... debug the algorithm at the level of operands
82  */
83 #define CL_DEBUG_VAR_KILLER 0
84 
85 /**
86  * if 1, show the amount of time taken by the analysis even without verbose mode
87  */
88 #define CL_EASY_TIMER 1
89 
90 /**
91  * if 1, filter out repeated error/warning messages (sort of 2>&1 | uniq)
92  */
93 #define CL_MSG_SQUEEZE_REPEATS 1
94 
95 /**
96  * if 1, suppress warnings about unhandled code constructs
97  */
98 #define CLPLUG_SILENT 0
99 
100 /**
101  * if 1, print progress of code_listener factory when running in verbose mode
102  */
103 #define DEBUG_CL_FACTORY 0