Download

Support

lib/ewl_debug.h File Reference

#include "ewl_misc.h"
#include <stdio.h>
#include <stdlib.h>
#include <string.h>

Include dependency graph for ewl_debug.h:

This graph shows which files directly or indirectly include this file:

Go to the source code of this file.


Data Structures

struct  Ewl_Config_Cache
 Contains cached Ewl configuration data. More...

Defines

#define DCHECK_PARAM_PTR(ptr)
#define DCHECK_PARAM_PTR_RET(ptr, ret)
#define DCHECK_TYPE(ptr, type)   {}
#define DCHECK_TYPE_RET(ptr, type, ret)   {}
#define DENTER_FUNCTION(lvl)   {}
#define DERROR(fmt)
#define DLEAVE_FUNCTION(lvl)   {}
#define DLEVEL_STABLE   20
#define DLEVEL_TESTING   10
#define DLEVEL_UNSTABLE   0
#define DRETURN(lvl)   return
#define DRETURN_FLOAT(num, lvl)   return num
#define DRETURN_INT(num, lvl)   return num
#define DRETURN_PTR(ptr, lvl)   return (ptr)
#define DSTATIC_ASSERT(expr)
#define DWARNING(fmt, args...)   {}

Typedefs

typedef Ewl_Config_Cache Ewl_Config_Cache

Functions

void ewl_backtrace (void)
 This will print a backtrace at the given point.
int ewl_cast_pointer_to_integer (void *ptr)
void ewl_print_warning (void)
 This is used by debugging macros for breakpoints.
void ewl_segv (void)
 This will cause EWL to SEGV. (Handy for debugging).

Variables

Ewl_Config_Cache ewl_config_cache

Define Documentation

#define DCHECK_PARAM_PTR ( ptr   ) 

Value:

do { \
        if (!(ptr)) { \
                return; \
        } \
} while (0)

#define DCHECK_PARAM_PTR_RET ( ptr,
ret   ) 

Value:

do { \
        if (!(ptr)) { \
                return ret; \
        } \
} while (0)

#define DCHECK_TYPE ( ptr,
type   )     {}

#define DCHECK_TYPE_RET ( ptr,
type,
ret   )     {}

#define DENTER_FUNCTION ( lvl   )     {}

#define DERROR ( fmt   ) 

Value:

do { \
        ewl_print_warning(); \
        fprintf(stderr, "\tIn function:\n\n" \
                        "\t%s();\n\n", __func__); \
        fprintf(stderr, fmt); \
} while (0)

#define DLEAVE_FUNCTION ( lvl   )     {}

#define DLEVEL_STABLE   20

#define DLEVEL_TESTING   10

#define DLEVEL_UNSTABLE   0

#define DRETURN ( lvl   )     return

#define DRETURN_FLOAT ( num,
lvl   )     return num

#define DRETURN_INT ( num,
lvl   )     return num

#define DRETURN_PTR ( ptr,
lvl   )     return (ptr)

#define DSTATIC_ASSERT ( expr   ) 

Value:

extern char STATIC_ASSERTION[1]; \
    extern char STATIC_ASSERTION[(expr)?1:2]

#define DWARNING ( fmt,
args...   )     {}


Typedef Documentation

The Ewl_Config_Cache structure


Function Documentation

void ewl_backtrace ( void   ) 

This will print a backtrace at the given point.

Returns:
Returns no value.

int ewl_cast_pointer_to_integer ( void *  ptr  ) 

Parameters:
ptr,: the pointer to cast
Returns:
The integer value of the pointer
This function casts a pointer into an integer. If there should be an information lost, i.e. the content of the pointer does not fit into an integer, it will print a runtime warning.

void ewl_print_warning ( void   ) 

This is used by debugging macros for breakpoints.

Returns:
Returns no value.
Set a breakpoint at this function in order to retrieve backtraces from warning messages.

void ewl_segv ( void   ) 

This will cause EWL to SEGV. (Handy for debugging).

Returns:
Returns no value.


Variable Documentation

system debug data


Copyright © Enlightenment.org

Enlightened Widget Library Documentation Generated: Sun Sep 27 01:49:03 2009