C-libs 0.1.0
Some C utils libraries
 
Loading...
Searching...
No Matches
example_debug.c
DBG_ARRAY_FUNC_DECL(const char **, string, "\"%s\"")
int main(void) {
int a = 5;
float b = 3.14f;
double c = 2.718281828;
char d = 'x';
char *e = "Hello, world!";
dbg(a);
dbg(b);
dbg(c);
dbg(d);
dbg(e);
bool f = dbg((bool)(a == 0));
dbg(f);
char *g[] = { "This", "is", "a", "test", "!" };
dbg(g);
CALL_DBG_ARRAY(dbg_array_string, (const char **)g, sizeof(g) / sizeof(*g));
return 0;
}
Debug utilities for various data types and arrays.
#define CALL_DBG_ARRAY(dbg_func_name, value, length)
Macro to call a debug function for an array.
Definition debug.h:241
void set_breakpoint(void)
Function to set a breakpoint for debugging.
#define dbg(value)
Macro to print a debug message for a variable.
Definition debug.h:105
#define DBG_ARRAY_FUNC_DECL(type, name, fmt)
Macro to declare a debug function for an array.
Definition debug.h:321