Skip to content
Snippets Groups Projects
Commit ac88d796 authored by Oleg Hahm's avatar Oleg Hahm
Browse files

core: remove DEBUGF macro

parent fac95806
No related branches found
No related tags found
No related merge requests found
...@@ -14,15 +14,10 @@ ...@@ -14,15 +14,10 @@
* @brief Debug-header * @brief Debug-header
* *
* @details If *ENABLE_DEBUG* is defined inside an implementation file, all * @details If *ENABLE_DEBUG* is defined inside an implementation file, all
* calls to ::DEBUG and ::DEBUGF* will work the same as *printf* * calls to ::DEBUG will work the same as *printf* and output the
* and output the given information to stdout. If *ENABLE_DEBUG* * given information to stdout. If *ENABLE_DEBUG* is not defined,
* is not defined, all calls to ::DEBUG and ::DEBUGF will be * all calls to ::DEBUG will be ignored.
* ignored.
* *
* In addition to just printing the given information ::DEBUGF
* will further print extended debug information about the current
* thread and function.
*
* @author Kaspar Schleiser <kaspar@schleiser.de> * @author Kaspar Schleiser <kaspar@schleiser.de>
*/ */
...@@ -40,8 +35,7 @@ extern "C" { ...@@ -40,8 +35,7 @@ extern "C" {
/** /**
* @def ENABLE_DEBUG * @def ENABLE_DEBUG
* @brief This macro can be defined as 0 or other on a file-based level. * @brief This macro can be defined as 0 or other on a file-based level.
* If ENABLE_DEBUG is 0 @ref DEBUG() and @ref DEBUGF() will generate * @ref DEBUG() will generate output only if ENABLE_DEBUG is non-zero.
* no output if not they will generate output.
*/ */
/** /**
...@@ -100,22 +94,8 @@ extern "C" { ...@@ -100,22 +94,8 @@ extern "C" {
* @note Another name for ::DEBUG_PRINT * @note Another name for ::DEBUG_PRINT
*/ */
#define DEBUG(...) DEBUG_PRINT(__VA_ARGS__) #define DEBUG(...) DEBUG_PRINT(__VA_ARGS__)
/**
* @def DEBUGF
*
* @brief Print extended debug information about the current thread and
* function to stdout
*/
#define DEBUGF(...) \
do { \
DEBUG_PRINT("DEBUG(%s): %s:%d in %s: ", \
sched_active_thread ? sched_active_thread->name : "NO THREAD", \
__FILE__, __LINE__, DEBUG_FUNC); \
DEBUG_PRINT(__VA_ARGS__); \
} while (0)
#else #else
#define DEBUG(...) #define DEBUG(...)
#define DEBUGF(...)
#endif #endif
/** @} */ /** @} */
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment