[PATCH] introduce verbose debug
Sascha Hauer
s.hauer at pengutronix.de
Tue Jul 15 06:45:10 PDT 2014
During debugging it sometimes helps to me even more verbose. This
adds an additional debug level for this.
Signed-off-by: Sascha Hauer <s.hauer at pengutronix.de>
---
common/Kconfig | 2 ++
include/printk.h | 8 +++++++-
2 files changed, 9 insertions(+), 1 deletion(-)
diff --git a/common/Kconfig b/common/Kconfig
index bba7f15..e7c22e5 100644
--- a/common/Kconfig
+++ b/common/Kconfig
@@ -676,6 +676,7 @@ config COMPILE_LOGLEVEL
5 normal but significant condition (notice)
6 informational (info)
7 debug-level messages (debug)
+ 8 verbose debug messages (vdebug)
config DEFAULT_LOGLEVEL
int "default loglevel"
@@ -692,6 +693,7 @@ config DEFAULT_LOGLEVEL
5 normal but significant condition (notice)
6 informational (info)
7 debug-level messages (debug)
+ 8 verbose debug messages (vdebug)
config DEBUG_INFO
bool
diff --git a/include/printk.h b/include/printk.h
index f550f07..4543156 100644
--- a/include/printk.h
+++ b/include/printk.h
@@ -9,8 +9,11 @@
#define MSG_NOTICE 5 /* normal but significant condition */
#define MSG_INFO 6 /* informational */
#define MSG_DEBUG 7 /* debug-level messages */
+#define MSG_VDEBUG 8 /* verbose debug messages */
-#ifdef DEBUG
+#ifdef VERBOSE_DEBUG
+#define LOGLEVEL MSG_VDEBUG
+#elif defined DEBUG
#define LOGLEVEL MSG_DEBUG
#else
#define LOGLEVEL CONFIG_COMPILE_LOGLEVEL
@@ -46,6 +49,8 @@ int dev_printf(int level, const struct device_d *dev, const char *format, ...)
__dev_printf(6, (dev) , format , ## arg)
#define dev_dbg(dev, format, arg...) \
__dev_printf(7, (dev) , format , ## arg)
+#define dev_vdbg(dev, format, arg...) \
+ __dev_printf(8, (dev) , format , ## arg)
#define __pr_printk(level, format, args...) \
({ \
@@ -65,5 +70,6 @@ int dev_printf(int level, const struct device_d *dev, const char *format, ...)
#define pr_info(fmt, arg...) __pr_printk(6, pr_fmt(fmt), ##arg)
#define pr_debug(fmt, arg...) __pr_printk(7, pr_fmt(fmt), ##arg)
#define debug(fmt, arg...) __pr_printk(7, pr_fmt(fmt), ##arg)
+#define pr_vdebug(fmt, arg...) __pr_printk(8, pr_fmt(fmt), ##arg)
#endif
--
2.0.1
More information about the barebox
mailing list