diff options
author | Daniel Friesel <derf@derf.homelinux.org> | 2010-06-10 21:43:28 +0200 |
---|---|---|
committer | Daniel Friesel <derf@derf.homelinux.org> | 2010-06-10 21:43:28 +0200 |
commit | a12feb1d950d2fc2d30ac69f1175e9fa7d48deaf (patch) | |
tree | db6b08ea008d3c4e42d0c83d01267f17e568da53 /src/debug.h | |
parent | c262680c9375940fbd2c1ebf97a15843422a2ede (diff) | |
download | feh-a12feb1d950d2fc2d30ac69f1175e9fa7d48deaf.zip |
Remove D_ENTER/D_RETURN, use gdb tracepoints + readelf/awk magic instead
Diffstat (limited to 'src/debug.h')
-rw-r--r-- | src/debug.h | 59 |
1 files changed, 5 insertions, 54 deletions
diff --git a/src/debug.h b/src/debug.h index 3585cd7..db4369d 100644 --- a/src/debug.h +++ b/src/debug.h @@ -26,8 +26,6 @@ CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE. #ifndef DEBUG_H #define DEBUG_H -/* #define DEBUG */ - #ifdef WITH_DMALLOC #include <dmalloc.h> #define emalloc(a) malloc(a) @@ -50,36 +48,7 @@ CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE. fflush(stdout); \ } \ } -#define D_ENTER(i) \ - { \ - call_level++; \ - if(i <= opt.debug_level) \ - { \ - printf("%s +%u %s() %s ENTER\n",__FILE__,__LINE__,__FUNCTION__, stroflen('>', call_level)); \ - fflush(stdout); \ - } \ - } -#define D_RETURN(i, a) \ -{ \ - if(i <= opt.debug_level) \ - { \ - printf("%s +%u %s() %s LEAVE\n",__FILE__,__LINE__,__FUNCTION__, stroflen('<', call_level)); \ - fflush(stdout); \ - } \ - call_level--; \ - return (a); \ - } -#define D_RETURN_(i) \ -{ \ - if(i <= opt.debug_level) \ - { \ - printf("%s +%u %s() %s LEAVE\n",__FILE__,__LINE__,__FUNCTION__, stroflen('<', call_level)); \ - fflush(stdout); \ - } \ - call_level--; \ - return; \ - } -#else +#else /* __GNUC__ */ #define D(i, a) \ { \ if(i <= opt.debug_level) \ @@ -89,27 +58,9 @@ CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE. } \ fflush(stdout); \ } -#define D_ENTER(a) -#define D_RETURN(i, a) \ - { \ - return(a); \ - } -#define D_RETURN_(i) \ - { \ - return; \ - } -#endif -#else +#endif /* __GNUC__ */ +#else /* DEBUG */ #define D(i,a) -#define D_ENTER(a) -#define D_RETURN(i, a) \ - { \ - return (a); \ - } -#define D_RETURN_(i) \ - { \ - return; \ - } -#endif +#endif /* DEBUG */ -#endif +#endif /* DEBUG_H */ |