Macros for debugging and tracing.
More...
Macros for debugging and tracing.
◆ LOG_DEBUG
| #define LOG_DEBUG |
( |
|
formatted_string, |
|
|
|
... |
|
) |
| |
Value: do { \
printf(
"\e[0;32m" DEBUG "( " __FILE__
": " TOSTRING(__LINE__)
" )" \
"\e[0m" \
" " formatted_string, \
##__VA_ARGS__); \
} while (0)
#define TOSTRING(x)
Definition log.h:36
#define DEBUG
Definition logconstants.h:10
Prints a debug message.
- Parameters
-
| formatted_string | The string which specifies what is outputted |
◆ LOG_FUNCTION_BACK
| #define LOG_FUNCTION_BACK |
( |
|
fn_name | ) |
LOG_DEBUG("Back in " #fn_name "\n"); |
Prints a return to a function.
- Parameters
-
| fn_name | The name of the function were the program is now. |
◆ LOG_FUNCTION_CALL
| #define LOG_FUNCTION_CALL |
( |
|
fn_name | ) |
LOG_DEBUG(#fn_name " was called.\n"); |
Prints a function call.
- Parameters
-
| fn_name | The name of the function that was called. |
◆ LOG_PARAMETER
| #define LOG_PARAMETER |
( |
|
ordinal_number, |
|
|
|
type, |
|
|
|
type_call, |
|
|
|
fmt, |
|
|
|
... |
|
) |
| |
Value: LOG_DEBUG(#ordinal_number
" parameter (type: " #type
") with %s " fmt, \
#define LOG_DEBUG(formatted_string,...)
Prints a debug message.
Definition log.h:46
#define TYPE_CALL_ADDRESS
Specifies that the given parameter is a pointer.
Definition log.h:67
Prints a parameter of a function.
- Parameters
-
| ordinal_number | The number of the parameter (e.g. 1st, 2nd, ...) |
| type | The type of the parameter (e.g. int, char, double, ...) |
| type_call | Specifies whether the parameter is a pointer or a value |
| fmt | Makes additional information possible |
- See also
- TCA
-
TCV
-
TYPE_CALL_ADDRESS
-
TYPE_CALL_VALUE
◆ LOG_RETURN
| #define LOG_RETURN |
( |
|
type, |
|
|
|
type_call, |
|
|
|
fmt, |
|
|
|
... |
|
) |
| |
Value:
Prints the value or address that a function will return.
- Parameters
-
| type | The type of the return value (e.g. int, char, double, ...) |
| type_call | Specifies whether the return value is a pointer or a value |
| fmt | Makes additional information possible |
- See also
- TCA
-
TCV
-
TYPE_CALL_ADDRESS
-
TYPE_CALL_VALUE
◆ TCA
◆ TCV
◆ TYPE_CALL_ADDRESS
| #define TYPE_CALL_ADDRESS 0 |
Specifies that the given parameter is a pointer.
- See also
- LOG_PARAMETER
◆ TYPE_CALL_VALUE
| #define TYPE_CALL_VALUE 1 |
Specifies that the given parameter is a value.
- See also
- LOG_PARAMETER