2008-01-09 02:13:24 +01:00
|
|
|
/****************************************************************************
|
2009-06-17 18:28:50 +02:00
|
|
|
* include/debug.h
|
2007-02-18 00:21:28 +01:00
|
|
|
*
|
2016-06-11 20:38:37 +02:00
|
|
|
* Copyright (C) 2007-2011, 2014, 2016 Gregory Nutt. All rights reserved.
|
2012-07-17 05:58:11 +02:00
|
|
|
* Author: Gregory Nutt <gnutt@nuttx.org>
|
2007-02-18 00:21:28 +01:00
|
|
|
*
|
|
|
|
* Redistribution and use in source and binary forms, with or without
|
|
|
|
* modification, are permitted provided that the following conditions
|
|
|
|
* are met:
|
|
|
|
*
|
|
|
|
* 1. Redistributions of source code must retain the above copyright
|
|
|
|
* notice, this list of conditions and the following disclaimer.
|
|
|
|
* 2. Redistributions in binary form must reproduce the above copyright
|
|
|
|
* notice, this list of conditions and the following disclaimer in
|
|
|
|
* the documentation and/or other materials provided with the
|
|
|
|
* distribution.
|
2008-01-09 02:13:24 +01:00
|
|
|
* 3. Neither the name NuttX nor the names of its contributors may be
|
2007-02-18 00:21:28 +01:00
|
|
|
* used to endorse or promote products derived from this software
|
|
|
|
* without specific prior written permission.
|
|
|
|
*
|
|
|
|
* THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS
|
|
|
|
* "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT
|
|
|
|
* LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS
|
|
|
|
* FOR A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE
|
|
|
|
* COPYRIGHT OWNER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT,
|
|
|
|
* INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING,
|
|
|
|
* BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS
|
|
|
|
* OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED
|
|
|
|
* AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT
|
|
|
|
* LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN
|
|
|
|
* ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE
|
|
|
|
* POSSIBILITY OF SUCH DAMAGE.
|
|
|
|
*
|
2008-01-09 02:13:24 +01:00
|
|
|
****************************************************************************/
|
2007-02-18 00:21:28 +01:00
|
|
|
|
2009-06-17 18:28:50 +02:00
|
|
|
#ifndef __INCLUDE_DEBUG_H
|
|
|
|
#define __INCLUDE_DEBUG_H
|
2007-02-18 00:21:28 +01:00
|
|
|
|
2008-01-09 02:13:24 +01:00
|
|
|
/****************************************************************************
|
2007-02-18 00:21:28 +01:00
|
|
|
* Included Files
|
2008-01-09 02:13:24 +01:00
|
|
|
****************************************************************************/
|
2007-02-18 00:21:28 +01:00
|
|
|
|
|
|
|
#include <nuttx/config.h>
|
2008-01-09 02:13:24 +01:00
|
|
|
#include <nuttx/compiler.h>
|
2009-12-15 00:32:23 +01:00
|
|
|
|
2016-01-09 13:28:12 +01:00
|
|
|
#ifdef CONFIG_ARCH_DEBUG_H
|
|
|
|
# include <arch/debug.h>
|
|
|
|
#endif
|
|
|
|
|
2013-01-28 22:55:16 +01:00
|
|
|
#include <syslog.h>
|
2007-02-18 00:21:28 +01:00
|
|
|
|
2008-01-09 02:13:24 +01:00
|
|
|
/****************************************************************************
|
2009-12-15 00:32:23 +01:00
|
|
|
* Pre-processor Definitions
|
2008-01-09 02:13:24 +01:00
|
|
|
****************************************************************************/
|
2007-02-18 00:21:28 +01:00
|
|
|
|
2009-09-15 17:44:14 +02:00
|
|
|
/* Debug macros to runtime filter the debug messages sent to the console. In
|
|
|
|
* general, there are four forms of the debug macros:
|
|
|
|
*
|
2016-06-11 20:38:37 +02:00
|
|
|
* [a-z]info() -- Outputs messages to the console similar to printf() except
|
|
|
|
* that the output is not buffered. Output is only generated if
|
|
|
|
* CONFIG_DEBUG_INFO is defined. The info macros are intended for
|
|
|
|
* verbose "informational" debug output. If you enable CONFIG_DEBUG_INFO,
|
|
|
|
* then very chatty (and often annoying) output will be generated.
|
|
|
|
*
|
|
|
|
* The first character of the macro name indicates the system system
|
|
|
|
* (e.g., n=network, f=filesystm, etc.). If the first character is
|
|
|
|
* missing (i.e., info()), then it is common. The common info() macro
|
|
|
|
* is enabled simply with CONFIG_DEBUG_INFO. Subsystem debug requires an
|
2009-09-15 17:44:14 +02:00
|
|
|
* additional configuration setting to enable it (e.g., CONFIG_DEBUG_NET
|
2014-07-03 15:58:43 +02:00
|
|
|
* for the network, CONFIG_DEBUG_FS for the file system, etc).
|
2009-09-15 17:44:14 +02:00
|
|
|
*
|
|
|
|
* In general, error messages and output of importance use [a-z]dbg().
|
|
|
|
* [a-z]dbg() is implementation dependent but usually uses file descriptors.
|
|
|
|
* (that is a problem only because the interrupt task may have re-
|
|
|
|
* directed stdout). Therefore [a-z]dbg() should not be used in interrupt
|
|
|
|
* handlers.
|
|
|
|
*
|
2016-06-11 20:38:37 +02:00
|
|
|
* [a-z]warn() -- Identical to [a-z]info() except that it also requires that
|
|
|
|
* CONFIG_DEBUG_WARN be defined. This is intended for important exception
|
|
|
|
* conditions that are potential errors (or perhaps real errors with non-
|
|
|
|
* fatal consequences).
|
|
|
|
*
|
|
|
|
* [a-z]dbg() -- Identical to [a-z]info() except that it also requires that
|
2016-06-11 22:14:08 +02:00
|
|
|
* CONFIG_DEBUG_FEATURES be defined. This is intended for important error-related
|
2016-06-11 20:38:37 +02:00
|
|
|
* information that you probably not want to suppress during normal debug
|
|
|
|
* general debugging.
|
2009-09-15 17:44:14 +02:00
|
|
|
*
|
2016-06-11 20:38:37 +02:00
|
|
|
* [a-z]llinfo() -- Identical to [a-z]dbg() except this is uses special
|
2009-09-15 17:44:14 +02:00
|
|
|
* interfaces provided by architecture-specific logic to talk directly
|
|
|
|
* to the underlying console hardware. If the architecture provides such
|
|
|
|
* logic, it should define CONFIG_ARCH_LOWPUTC.
|
|
|
|
*
|
2016-06-11 20:38:37 +02:00
|
|
|
* [a-z]llinfo() should not be used in normal code because the implementation
|
2009-09-15 17:44:14 +02:00
|
|
|
* probably disables interrupts and does things that are not consistent with
|
2016-06-11 20:38:37 +02:00
|
|
|
* good real-time performance. However, [a-z]llinfo() is particularly useful
|
2009-09-15 17:44:14 +02:00
|
|
|
* in low-level code where it is inappropriate to use file descriptors. For
|
2016-06-11 20:38:37 +02:00
|
|
|
* example, only [a-z]llinfo() should be used in interrupt handlers.
|
|
|
|
*
|
|
|
|
* [a-z]llwarn() -- Identical to [a-z]llinfo() except that it also requires that
|
|
|
|
* CONFIG_DEBUG_WARN be defined. This is intended for important exception
|
|
|
|
* conditions that are potential errors (or perhaps real errors with non-
|
|
|
|
* fatal consequences).
|
2009-09-15 17:44:14 +02:00
|
|
|
*
|
2016-06-11 22:55:27 +02:00
|
|
|
* [a-z]llerr() -- Identical to [a-z]llinfo() except that it also requires that
|
2016-06-11 22:14:08 +02:00
|
|
|
* CONFIG_DEBUG_FEATURES be defined. This is intended for important error-related
|
2016-06-11 20:38:37 +02:00
|
|
|
* information that you probably not want to suppress during normal debug
|
|
|
|
* general debugging.
|
2009-09-15 17:44:14 +02:00
|
|
|
*/
|
2007-02-18 00:21:28 +01:00
|
|
|
|
2008-01-09 02:13:24 +01:00
|
|
|
#ifdef CONFIG_HAVE_FUNCTIONNAME
|
2016-06-11 20:38:37 +02:00
|
|
|
# define EXTRA_FMT "%s: "
|
|
|
|
# define EXTRA_ARG ,__FUNCTION__
|
2007-02-20 23:39:56 +01:00
|
|
|
#else
|
2016-06-11 20:38:37 +02:00
|
|
|
# define EXTRA_FMT
|
|
|
|
# define EXTRA_ARG
|
2007-02-20 23:39:56 +01:00
|
|
|
#endif
|
|
|
|
|
2016-01-09 14:27:22 +01:00
|
|
|
/* The actual logger function may be overridden in arch/debug.h if needed. */
|
2016-01-09 13:28:12 +01:00
|
|
|
|
|
|
|
#ifndef __arch_syslog
|
2016-06-11 20:38:37 +02:00
|
|
|
# define __arch_syslog syslog
|
2016-01-09 13:28:12 +01:00
|
|
|
#endif
|
|
|
|
#ifndef __arch_lowsyslog
|
2016-06-11 20:38:37 +02:00
|
|
|
# define __arch_lowsyslog lowsyslog
|
2016-01-09 13:28:12 +01:00
|
|
|
#endif
|
|
|
|
|
2008-01-09 02:13:24 +01:00
|
|
|
/* Debug macros will differ depending upon if the toolchain supports
|
|
|
|
* macros with a variable number of arguments or not.
|
|
|
|
*/
|
|
|
|
|
|
|
|
#ifdef CONFIG_CPP_HAVE_VARARGS
|
|
|
|
|
2014-05-22 17:01:51 +02:00
|
|
|
/* C-99 style variadic macros are supported */
|
2008-01-09 02:13:24 +01:00
|
|
|
|
2016-06-11 22:14:08 +02:00
|
|
|
#ifdef CONFIG_DEBUG_FEATURES
|
2016-06-11 20:38:37 +02:00
|
|
|
# define dbg(format, ...) \
|
|
|
|
__arch_syslog(LOG_ERR, EXTRA_FMT format EXTRA_ARG, ##__VA_ARGS__)
|
2007-02-18 00:21:28 +01:00
|
|
|
|
|
|
|
# ifdef CONFIG_ARCH_LOWPUTC
|
2016-06-11 22:55:27 +02:00
|
|
|
# define llerr(format, ...) \
|
2016-01-09 13:28:12 +01:00
|
|
|
__arch_lowsyslog(LOG_ERR, EXTRA_FMT format EXTRA_ARG, ##__VA_ARGS__)
|
2007-02-18 00:21:28 +01:00
|
|
|
# else
|
2016-06-11 22:55:27 +02:00
|
|
|
# define llerr(x...)
|
2007-02-18 00:21:28 +01:00
|
|
|
# endif
|
2016-06-11 22:14:08 +02:00
|
|
|
#else /* CONFIG_DEBUG_FEATURES */
|
2016-06-11 20:38:37 +02:00
|
|
|
|
|
|
|
# define dbg(x...)
|
2016-06-11 22:55:27 +02:00
|
|
|
# define llerr(x...)
|
2016-06-11 20:38:37 +02:00
|
|
|
#endif
|
|
|
|
|
|
|
|
#ifdef CONFIG_DEBUG_WARN
|
|
|
|
# define warn(format, ...) \
|
|
|
|
__arch_syslog(LOG_DEBUG, EXTRA_FMT format EXTRA_ARG, ##__VA_ARGS__)
|
|
|
|
|
|
|
|
# ifdef CONFIG_ARCH_LOWPUTC
|
|
|
|
# define llwarn(format, ...) \
|
|
|
|
__arch_lowsyslog(LOG_DEBUG, EXTRA_FMT format EXTRA_ARG, ##__VA_ARGS__)
|
|
|
|
# else
|
|
|
|
# define llwarn(x...)
|
|
|
|
# endif
|
|
|
|
#else /* CONFIG_DEBUG_INFO */
|
|
|
|
# define warn(x...)
|
|
|
|
# define llwarn(x...)
|
|
|
|
#endif /* CONFIG_DEBUG_INFO */
|
2007-02-18 00:21:28 +01:00
|
|
|
|
2016-06-11 20:38:37 +02:00
|
|
|
#ifdef CONFIG_DEBUG_INFO
|
2016-06-11 19:59:51 +02:00
|
|
|
# define info(format, ...) \
|
2016-01-09 13:28:12 +01:00
|
|
|
__arch_syslog(LOG_DEBUG, EXTRA_FMT format EXTRA_ARG, ##__VA_ARGS__)
|
2008-10-27 17:37:48 +01:00
|
|
|
|
2009-06-25 19:44:35 +02:00
|
|
|
# ifdef CONFIG_ARCH_LOWPUTC
|
2016-06-11 19:59:51 +02:00
|
|
|
# define llinfo(format, ...) \
|
2016-01-09 13:28:12 +01:00
|
|
|
__arch_lowsyslog(LOG_DEBUG, EXTRA_FMT format EXTRA_ARG, ##__VA_ARGS__)
|
2009-06-25 19:44:35 +02:00
|
|
|
# else
|
2016-06-11 19:59:51 +02:00
|
|
|
# define llinfo(x...)
|
2009-06-25 19:44:35 +02:00
|
|
|
# endif
|
2016-06-11 20:38:37 +02:00
|
|
|
#else /* CONFIG_DEBUG_INFO */
|
2016-06-11 19:59:51 +02:00
|
|
|
# define info(x...)
|
|
|
|
# define llinfo(x...)
|
2016-06-11 20:38:37 +02:00
|
|
|
#endif /* CONFIG_DEBUG_INFO */
|
2007-02-18 00:21:28 +01:00
|
|
|
|
2007-11-23 23:32:52 +01:00
|
|
|
/* Subsystem specific debug */
|
|
|
|
|
|
|
|
#ifdef CONFIG_DEBUG_MM
|
2016-06-11 20:38:37 +02:00
|
|
|
# define mdbg(format, ...) dbg(format, ##__VA_ARGS__)
|
2016-06-11 22:55:27 +02:00
|
|
|
# define mllerr(format, ...) llerr(format, ##__VA_ARGS__)
|
2016-06-11 20:38:37 +02:00
|
|
|
# define mwarn(format, ...) warn(format, ##__VA_ARGS__)
|
|
|
|
# define mllwarn(format, ...) llwarn(format, ##__VA_ARGS__)
|
|
|
|
# define minfo(format, ...) info(format, ##__VA_ARGS__)
|
|
|
|
# define mllinfo(format, ...) llinfo(format, ##__VA_ARGS__)
|
2007-11-23 23:32:52 +01:00
|
|
|
#else
|
2016-06-11 20:38:37 +02:00
|
|
|
# define mdbg(x...)
|
2016-06-11 22:55:27 +02:00
|
|
|
# define mllerr(x...)
|
2016-06-11 20:38:37 +02:00
|
|
|
# define mwarn(x...)
|
|
|
|
# define mllwarn(x...)
|
|
|
|
# define minfo(x...)
|
|
|
|
# define mllinfo(x...)
|
2007-11-23 23:32:52 +01:00
|
|
|
#endif
|
|
|
|
|
|
|
|
#ifdef CONFIG_DEBUG_SCHED
|
2016-06-11 20:38:37 +02:00
|
|
|
# define sdbg(format, ...) dbg(format, ##__VA_ARGS__)
|
2016-06-11 22:55:27 +02:00
|
|
|
# define sllerr(format, ...) llerr(format, ##__VA_ARGS__)
|
2016-06-11 20:38:37 +02:00
|
|
|
# define swarn(format, ...) warn(format, ##__VA_ARGS__)
|
|
|
|
# define sllwarn(format, ...) llwarn(format, ##__VA_ARGS__)
|
|
|
|
# define sinfo(format, ...) info(format, ##__VA_ARGS__)
|
|
|
|
# define sllinfo(format, ...) llinfo(format, ##__VA_ARGS__)
|
2007-11-23 23:32:52 +01:00
|
|
|
#else
|
2016-06-11 20:38:37 +02:00
|
|
|
# define sdbg(x...)
|
2016-06-11 22:55:27 +02:00
|
|
|
# define sllerr(x...)
|
2016-06-11 20:38:37 +02:00
|
|
|
# define swarn(x...)
|
|
|
|
# define sllwarn(x...)
|
|
|
|
# define sinfo(x...)
|
|
|
|
# define sllinfo(x...)
|
2007-11-23 23:32:52 +01:00
|
|
|
#endif
|
|
|
|
|
2010-08-22 05:44:18 +02:00
|
|
|
#ifdef CONFIG_DEBUG_PAGING
|
2016-06-11 20:38:37 +02:00
|
|
|
# define pgdbg(format, ...) dbg(format, ##__VA_ARGS__)
|
2016-06-11 22:55:27 +02:00
|
|
|
# define pgllerr(format, ...) llerr(format, ##__VA_ARGS__)
|
2016-06-11 20:38:37 +02:00
|
|
|
# define pgwarn(format, ...) warn(format, ##__VA_ARGS__)
|
|
|
|
# define pgllwarn(format, ...) llwarn(format, ##__VA_ARGS__)
|
|
|
|
# define pginfo(format, ...) info(format, ##__VA_ARGS__)
|
|
|
|
# define pgllinfo(format, ...) llinfo(format, ##__VA_ARGS__)
|
2010-08-22 05:44:18 +02:00
|
|
|
#else
|
2016-06-11 20:38:37 +02:00
|
|
|
# define pgdbg(x...)
|
2016-06-11 22:55:27 +02:00
|
|
|
# define pgllerr(x...)
|
2016-06-11 20:38:37 +02:00
|
|
|
# define pgwarn(x...)
|
|
|
|
# define pgllwarn(x...)
|
|
|
|
# define pginfo(x...)
|
|
|
|
# define pgllinfo(x...)
|
2010-08-22 05:44:18 +02:00
|
|
|
#endif
|
|
|
|
|
2009-11-26 01:18:22 +01:00
|
|
|
#ifdef CONFIG_DEBUG_DMA
|
2016-06-11 20:38:37 +02:00
|
|
|
# define dmadbg(format, ...) dbg(format, ##__VA_ARGS__)
|
2016-06-11 22:55:27 +02:00
|
|
|
# define dmallerr(format, ...) llerr(format, ##__VA_ARGS__)
|
2016-06-11 20:38:37 +02:00
|
|
|
# define dmawarn(format, ...) warn(format, ##__VA_ARGS__)
|
|
|
|
# define dmallwarn(format, ...) llwarn(format, ##__VA_ARGS__)
|
|
|
|
# define dmainfo(format, ...) info(format, ##__VA_ARGS__)
|
|
|
|
# define dmallinfo(format, ...) llinfo(format, ##__VA_ARGS__)
|
2009-11-26 01:18:22 +01:00
|
|
|
#else
|
2016-06-11 20:38:37 +02:00
|
|
|
# define dmadbg(x...)
|
2016-06-11 22:55:27 +02:00
|
|
|
# define dmallerr(x...)
|
2016-06-11 20:38:37 +02:00
|
|
|
# define dmawarn(x...)
|
|
|
|
# define dmallwarn(x...)
|
|
|
|
# define dmainfo(x...)
|
|
|
|
# define dmallinfo(x...)
|
2009-11-26 01:18:22 +01:00
|
|
|
#endif
|
|
|
|
|
2007-11-23 23:32:52 +01:00
|
|
|
#ifdef CONFIG_DEBUG_NET
|
2016-06-11 20:38:37 +02:00
|
|
|
# define ndbg(format, ...) dbg(format, ##__VA_ARGS__)
|
2016-06-11 22:55:27 +02:00
|
|
|
# define nllerr(format, ...) llerr(format, ##__VA_ARGS__)
|
2016-06-11 20:38:37 +02:00
|
|
|
# define nwarn(format, ...) warn(format, ##__VA_ARGS__)
|
|
|
|
# define nllwarn(format, ...) llwarn(format, ##__VA_ARGS__)
|
|
|
|
# define ninfo(format, ...) info(format, ##__VA_ARGS__)
|
|
|
|
# define nllinfo(format, ...) llinfo(format, ##__VA_ARGS__)
|
2007-11-23 23:32:52 +01:00
|
|
|
#else
|
2016-06-11 20:38:37 +02:00
|
|
|
# define ndbg(x...)
|
2016-06-11 22:55:27 +02:00
|
|
|
# define nllerr(x...)
|
2016-06-11 20:38:37 +02:00
|
|
|
# define nwarn(x...)
|
|
|
|
# define nllwarn(x...)
|
|
|
|
# define ninfo(x...)
|
|
|
|
# define nllinfo(x...)
|
2007-11-23 23:32:52 +01:00
|
|
|
#endif
|
|
|
|
|
2008-09-28 19:15:17 +02:00
|
|
|
#ifdef CONFIG_DEBUG_USB
|
2016-06-11 20:38:37 +02:00
|
|
|
# define udbg(format, ...) dbg(format, ##__VA_ARGS__)
|
2016-06-11 22:55:27 +02:00
|
|
|
# define ullerr(format, ...) llerr(format, ##__VA_ARGS__)
|
2016-06-11 20:38:37 +02:00
|
|
|
# define uwarn(format, ...) warn(format, ##__VA_ARGS__)
|
|
|
|
# define ullwarn(format, ...) llwarn(format, ##__VA_ARGS__)
|
|
|
|
# define uinfo(format, ...) info(format, ##__VA_ARGS__)
|
|
|
|
# define ullinfo(format, ...) llinfo(format, ##__VA_ARGS__)
|
2008-09-28 19:15:17 +02:00
|
|
|
#else
|
2016-06-11 20:38:37 +02:00
|
|
|
# define udbg(x...)
|
2016-06-11 22:55:27 +02:00
|
|
|
# define ullerr(x...)
|
2016-06-11 20:38:37 +02:00
|
|
|
# define uwarn(x...)
|
|
|
|
# define ullwarn(x...)
|
|
|
|
# define uinfo(x...)
|
|
|
|
# define ullinfo(x...)
|
2008-09-28 19:15:17 +02:00
|
|
|
#endif
|
|
|
|
|
2007-11-24 14:59:57 +01:00
|
|
|
#ifdef CONFIG_DEBUG_FS
|
2016-06-11 20:38:37 +02:00
|
|
|
# define fdbg(format, ...) dbg(format, ##__VA_ARGS__)
|
2016-06-11 22:55:27 +02:00
|
|
|
# define fllerr(format, ...) llerr(format, ##__VA_ARGS__)
|
2016-06-11 20:38:37 +02:00
|
|
|
# define fwarn(format, ...) warn(format, ##__VA_ARGS__)
|
|
|
|
# define fllwarn(format, ...) llwarn(format, ##__VA_ARGS__)
|
|
|
|
# define finfo(format, ...) info(format, ##__VA_ARGS__)
|
|
|
|
# define fllinfo(format, ...) llinfo(format, ##__VA_ARGS__)
|
2007-11-24 14:59:57 +01:00
|
|
|
#else
|
2016-06-11 20:38:37 +02:00
|
|
|
# define fdbg(x...)
|
2016-06-11 22:55:27 +02:00
|
|
|
# define fllerr(x...)
|
2016-06-11 20:38:37 +02:00
|
|
|
# define fwarn(x...)
|
|
|
|
# define fllwarn(x...)
|
|
|
|
# define finfo(x...)
|
|
|
|
# define fllinfo(x...)
|
2007-11-24 14:59:57 +01:00
|
|
|
#endif
|
|
|
|
|
2014-07-03 15:58:43 +02:00
|
|
|
#ifdef CONFIG_DEBUG_CRYPTO
|
2016-06-11 20:38:37 +02:00
|
|
|
# define cryptdbg(format, ...) dbg(format, ##__VA_ARGS__)
|
2016-06-11 22:55:27 +02:00
|
|
|
# define cryptllerr(format, ...) llerr(format, ##__VA_ARGS__)
|
2016-06-11 20:38:37 +02:00
|
|
|
# define cryptwarn(format, ...) warn(format, ##__VA_ARGS__)
|
|
|
|
# define cryptllwarn(format, ...) llwarn(format, ##__VA_ARGS__)
|
|
|
|
# define cryptinfo(format, ...) info(format, ##__VA_ARGS__)
|
|
|
|
# define cryptllinfo(format, ...) llinfo(format, ##__VA_ARGS__)
|
2014-07-03 15:58:43 +02:00
|
|
|
#else
|
2016-06-11 20:38:37 +02:00
|
|
|
# define cryptdbg(x...)
|
2016-06-11 22:55:27 +02:00
|
|
|
# define cryptllerr(x...)
|
2016-06-11 20:38:37 +02:00
|
|
|
# define cryptwarn(x...)
|
|
|
|
# define cryptllwarn(x...)
|
|
|
|
# define cryptinfo(x...)
|
|
|
|
# define cryptllinfo(x...)
|
2014-07-03 15:58:43 +02:00
|
|
|
#endif
|
|
|
|
|
2011-07-29 20:51:56 +02:00
|
|
|
#ifdef CONFIG_DEBUG_INPUT
|
2016-06-11 20:38:37 +02:00
|
|
|
# define idbg(format, ...) dbg(format, ##__VA_ARGS__)
|
2016-06-11 22:55:27 +02:00
|
|
|
# define illerr(format, ...) llerr(format, ##__VA_ARGS__)
|
2016-06-11 20:38:37 +02:00
|
|
|
# define iwarn(format, ...) warn(format, ##__VA_ARGS__)
|
|
|
|
# define illwarn(format, ...) llwarn(format, ##__VA_ARGS__)
|
|
|
|
# define iinfo(format, ...) info(format, ##__VA_ARGS__)
|
|
|
|
# define illinfo(format, ...) llinfo(format, ##__VA_ARGS__)
|
2011-07-29 20:51:56 +02:00
|
|
|
#else
|
2016-06-11 20:38:37 +02:00
|
|
|
# define idbg(x...)
|
2016-06-11 22:55:27 +02:00
|
|
|
# define illerr(x...)
|
2016-06-11 20:38:37 +02:00
|
|
|
# define iwarn(x...)
|
|
|
|
# define illwarn(x...)
|
|
|
|
# define iinfo(x...)
|
|
|
|
# define illinfo(x...)
|
2011-07-29 20:51:56 +02:00
|
|
|
#endif
|
|
|
|
|
2014-12-16 16:54:32 +01:00
|
|
|
#ifdef CONFIG_DEBUG_SENSORS
|
2016-06-11 20:38:37 +02:00
|
|
|
# define sndbg(format, ...) dbg(format, ##__VA_ARGS__)
|
2016-06-11 22:55:27 +02:00
|
|
|
# define snllerr(format, ...) llerr(format, ##__VA_ARGS__)
|
2016-06-11 20:38:37 +02:00
|
|
|
# define snwarn(format, ...) warn(format, ##__VA_ARGS__)
|
|
|
|
# define snllwarn(format, ...) llwarn(format, ##__VA_ARGS__)
|
|
|
|
# define sninfo(format, ...) info(format, ##__VA_ARGS__)
|
|
|
|
# define snllinfo(format, ...) llinfo(format, ##__VA_ARGS__)
|
2014-12-16 16:54:32 +01:00
|
|
|
#else
|
2016-06-11 20:38:37 +02:00
|
|
|
# define sndbg(x...)
|
2016-06-11 22:55:27 +02:00
|
|
|
# define snllerr(x...)
|
2016-06-11 20:38:37 +02:00
|
|
|
# define snwarn(x...)
|
|
|
|
# define snllwarn(x...)
|
|
|
|
# define sninfo(x...)
|
|
|
|
# define snllinfo(x...)
|
2014-12-16 16:54:32 +01:00
|
|
|
#endif
|
|
|
|
|
2011-12-14 20:12:00 +01:00
|
|
|
#ifdef CONFIG_DEBUG_ANALOG
|
2016-06-11 20:38:37 +02:00
|
|
|
# define adbg(format, ...) dbg(format, ##__VA_ARGS__)
|
2016-06-11 22:55:27 +02:00
|
|
|
# define allerr(format, ...) llerr(format, ##__VA_ARGS__)
|
2016-06-11 20:38:37 +02:00
|
|
|
# define awarn(format, ...) warn(format, ##__VA_ARGS__)
|
|
|
|
# define allwarn(format, ...) llwarn(format, ##__VA_ARGS__)
|
|
|
|
# define ainfo(format, ...) info(format, ##__VA_ARGS__)
|
|
|
|
# define allinfo(format, ...) llinfo(format, ##__VA_ARGS__)
|
2011-12-14 20:12:00 +01:00
|
|
|
#else
|
2016-06-11 20:38:37 +02:00
|
|
|
# define adbg(x...)
|
2016-06-11 22:55:27 +02:00
|
|
|
# define allerr(x...)
|
2016-06-11 20:38:37 +02:00
|
|
|
# define awarn(x...)
|
|
|
|
# define allwarn(x...)
|
|
|
|
# define ainfo(x...)
|
|
|
|
# define allinfo(x...)
|
2011-12-14 20:12:00 +01:00
|
|
|
#endif
|
|
|
|
|
2008-11-25 01:09:14 +01:00
|
|
|
#ifdef CONFIG_DEBUG_GRAPHICS
|
2016-06-11 20:38:37 +02:00
|
|
|
# define gdbg(format, ...) dbg(format, ##__VA_ARGS__)
|
2016-06-11 22:55:27 +02:00
|
|
|
# define gllerr(format, ...) llerr(format, ##__VA_ARGS__)
|
2016-06-11 20:38:37 +02:00
|
|
|
# define gwarn(format, ...) warn(format, ##__VA_ARGS__)
|
|
|
|
# define gllwarn(format, ...) llwarn(format, ##__VA_ARGS__)
|
|
|
|
# define ginfo(format, ...) info(format, ##__VA_ARGS__)
|
|
|
|
# define gllinfo(format, ...) llinfo(format, ##__VA_ARGS__)
|
2008-11-25 01:09:14 +01:00
|
|
|
#else
|
2016-06-11 20:38:37 +02:00
|
|
|
# define gdbg(x...)
|
2016-06-11 22:55:27 +02:00
|
|
|
# define gllerr(x...)
|
2016-06-11 20:38:37 +02:00
|
|
|
# define gwarn(x...)
|
|
|
|
# define gllwarn(x...)
|
|
|
|
# define ginfo(x...)
|
|
|
|
# define gllinfo(x...)
|
2008-11-25 01:09:14 +01:00
|
|
|
#endif
|
|
|
|
|
2009-06-17 18:28:50 +02:00
|
|
|
#ifdef CONFIG_DEBUG_BINFMT
|
2016-06-11 20:38:37 +02:00
|
|
|
# define bdbg(format, ...) dbg(format, ##__VA_ARGS__)
|
2016-06-11 22:55:27 +02:00
|
|
|
# define bllerr(format, ...) llerr(format, ##__VA_ARGS__)
|
2016-06-11 20:38:37 +02:00
|
|
|
# define bwarn(format, ...) warn(format, ##__VA_ARGS__)
|
|
|
|
# define bllwarn(format, ...) llwarn(format, ##__VA_ARGS__)
|
|
|
|
# define binfo(format, ...) info(format, ##__VA_ARGS__)
|
|
|
|
# define bllinfo(format, ...) llinfo(format, ##__VA_ARGS__)
|
2009-06-17 18:28:50 +02:00
|
|
|
#else
|
2016-06-11 20:38:37 +02:00
|
|
|
# define bdbg(x...)
|
2016-06-11 22:55:27 +02:00
|
|
|
# define bllerr(x...)
|
2016-06-11 20:38:37 +02:00
|
|
|
# define bwarn(x...)
|
|
|
|
# define bllwarn(x...)
|
|
|
|
# define binfo(x...)
|
|
|
|
# define bllinfo(x...)
|
2009-06-17 18:28:50 +02:00
|
|
|
#endif
|
|
|
|
|
2007-11-24 14:59:57 +01:00
|
|
|
#ifdef CONFIG_DEBUG_LIB
|
2016-06-11 20:38:37 +02:00
|
|
|
# define ldbg(format, ...) dbg(format, ##__VA_ARGS__)
|
2016-06-11 22:55:27 +02:00
|
|
|
# define lllerr(format, ...) llerr(format, ##__VA_ARGS__)
|
2016-06-11 20:38:37 +02:00
|
|
|
# define lwarn(format, ...) warn(format, ##__VA_ARGS__)
|
|
|
|
# define lllwarn(format, ...) llwarn(format, ##__VA_ARGS__)
|
|
|
|
# define linfo(format, ...) info(format, ##__VA_ARGS__)
|
|
|
|
# define lllinfo(format, ...) llinfo(format, ##__VA_ARGS__)
|
2007-11-24 14:59:57 +01:00
|
|
|
#else
|
2016-06-11 20:38:37 +02:00
|
|
|
# define ldbg(x...)
|
2016-06-11 22:55:27 +02:00
|
|
|
# define lllerr(x...)
|
2016-06-11 20:38:37 +02:00
|
|
|
# define lwarn(x...)
|
|
|
|
# define lllwarn(x...)
|
|
|
|
# define linfo(x...)
|
|
|
|
# define lllinfo(x...)
|
2007-11-24 14:59:57 +01:00
|
|
|
#endif
|
|
|
|
|
2013-05-19 23:12:28 +02:00
|
|
|
#ifdef CONFIG_DEBUG_AUDIO
|
2016-06-11 20:38:37 +02:00
|
|
|
# define auddbg(format, ...) dbg(format, ##__VA_ARGS__)
|
2016-06-11 22:55:27 +02:00
|
|
|
# define audllerr(format, ...) llerr(format, ##__VA_ARGS__)
|
2016-06-11 20:38:37 +02:00
|
|
|
# define audwarn(format, ...) warn(format, ##__VA_ARGS__)
|
|
|
|
# define audllwarn(format, ...) llwarn(format, ##__VA_ARGS__)
|
|
|
|
# define audinfo(format, ...) info(format, ##__VA_ARGS__)
|
|
|
|
# define audllinfo(format, ...) llinfo(format, ##__VA_ARGS__)
|
2013-05-19 23:12:28 +02:00
|
|
|
#else
|
2016-06-11 20:38:37 +02:00
|
|
|
# define auddbg(x...)
|
2016-06-11 22:55:27 +02:00
|
|
|
# define audllerr(x...)
|
2016-06-11 20:38:37 +02:00
|
|
|
# define audwarn(x...)
|
|
|
|
# define audllwarn(x...)
|
|
|
|
# define audinfo(x...)
|
|
|
|
# define audllinfo(x...)
|
2013-05-19 23:12:28 +02:00
|
|
|
#endif
|
|
|
|
|
2008-01-09 02:13:24 +01:00
|
|
|
#else /* CONFIG_CPP_HAVE_VARARGS */
|
|
|
|
|
2014-05-22 17:01:51 +02:00
|
|
|
/* Variadic macros NOT supported */
|
2008-01-09 02:13:24 +01:00
|
|
|
|
2016-06-11 22:14:08 +02:00
|
|
|
#ifdef CONFIG_DEBUG_FEATURES
|
2008-10-27 17:37:48 +01:00
|
|
|
# ifndef CONFIG_ARCH_LOWPUTC
|
2016-06-11 22:55:27 +02:00
|
|
|
# define llerr (void)
|
2016-06-11 20:38:37 +02:00
|
|
|
# endif
|
|
|
|
#else
|
|
|
|
# define dbg (void)
|
2016-06-11 22:55:27 +02:00
|
|
|
# define llerr (void)
|
2016-06-11 20:38:37 +02:00
|
|
|
#endif
|
|
|
|
|
|
|
|
#ifdef CONFIG_DEBUG_WARN
|
|
|
|
# ifndef CONFIG_ARCH_LOWPUTC
|
|
|
|
# define llwarn (void)
|
|
|
|
# endif
|
|
|
|
#else
|
|
|
|
# define warn (void)
|
|
|
|
# define llwarn (void)
|
|
|
|
#endif
|
|
|
|
|
|
|
|
#ifdef CONFIG_DEBUG_INFO
|
|
|
|
# ifndef CONFIG_ARCH_LOWPUTC
|
|
|
|
# define llinfo (void)
|
2008-10-27 17:37:48 +01:00
|
|
|
# endif
|
2008-01-09 02:13:24 +01:00
|
|
|
#else
|
2016-06-11 20:38:37 +02:00
|
|
|
# define info (void)
|
|
|
|
# define llinfo (void)
|
2008-01-09 02:13:24 +01:00
|
|
|
#endif
|
|
|
|
|
|
|
|
/* Subsystem specific debug */
|
|
|
|
|
|
|
|
#ifdef CONFIG_DEBUG_MM
|
2016-06-11 20:38:37 +02:00
|
|
|
# define mdbg dbg
|
2016-06-11 22:55:27 +02:00
|
|
|
# define mllerr llerr
|
2016-06-11 20:38:37 +02:00
|
|
|
# define mwarn warn
|
|
|
|
# define mllwarn llwarn
|
|
|
|
# define minfo info
|
|
|
|
# define mllinfo llinfo
|
2008-01-09 02:13:24 +01:00
|
|
|
#else
|
2016-06-11 20:38:37 +02:00
|
|
|
# define mdbg (void)
|
2016-06-11 22:55:27 +02:00
|
|
|
# define mllerr (void)
|
2016-06-11 20:38:37 +02:00
|
|
|
# define mwarn (void)
|
|
|
|
# define mllwarn (void)
|
|
|
|
# define minfo (void)
|
|
|
|
# define mllinfo (void)
|
2008-01-09 02:13:24 +01:00
|
|
|
#endif
|
|
|
|
|
|
|
|
#ifdef CONFIG_DEBUG_SCHED
|
2016-06-11 20:38:37 +02:00
|
|
|
# define sdbg dbg
|
2016-06-11 22:55:27 +02:00
|
|
|
# define sllerr llerr
|
2016-06-11 20:38:37 +02:00
|
|
|
# define swarn warn
|
|
|
|
# define sllwarn llwarn
|
|
|
|
# define sinfo info
|
|
|
|
# define sllinfo llinfo
|
2008-01-09 02:13:24 +01:00
|
|
|
#else
|
2016-06-11 20:38:37 +02:00
|
|
|
# define sdbg (void)
|
2016-06-11 22:55:27 +02:00
|
|
|
# define sllerr (void)
|
2016-06-11 20:38:37 +02:00
|
|
|
# define swarn (void)
|
|
|
|
# define sllwarn (void)
|
|
|
|
# define sinfo (void)
|
|
|
|
# define sllinfo (void)
|
2008-01-09 02:13:24 +01:00
|
|
|
#endif
|
|
|
|
|
2010-08-22 05:44:18 +02:00
|
|
|
#ifdef CONFIG_DEBUG_PAGING
|
2016-06-11 20:38:37 +02:00
|
|
|
# define pgdbg dbg
|
2016-06-11 22:55:27 +02:00
|
|
|
# define pgllerr llerr
|
2016-06-11 20:38:37 +02:00
|
|
|
# define pgwarn warn
|
|
|
|
# define pgllwarn llwarn
|
|
|
|
# define pginfo info
|
|
|
|
# define pgllinfo llinfo
|
2010-08-22 05:44:18 +02:00
|
|
|
#else
|
2016-06-11 20:38:37 +02:00
|
|
|
# define pgdbg (void)
|
2016-06-11 22:55:27 +02:00
|
|
|
# define pgllerr (void)
|
2016-06-11 20:38:37 +02:00
|
|
|
# define pgwarn (void)
|
|
|
|
# define pgllwarn (void)
|
|
|
|
# define pginfo (void)
|
|
|
|
# define pgllinfo (void)
|
2010-08-22 05:44:18 +02:00
|
|
|
#endif
|
|
|
|
|
2009-11-26 01:18:22 +01:00
|
|
|
#ifdef CONFIG_DEBUG_DMA
|
2016-06-11 20:38:37 +02:00
|
|
|
# define dmadbg dbg
|
2016-06-11 22:55:27 +02:00
|
|
|
# define dmallerr llerr
|
2016-06-11 20:38:37 +02:00
|
|
|
# define dmawarn warn
|
|
|
|
# define dmallwarn llwarn
|
|
|
|
# define dmainfo info
|
|
|
|
# define dmallinfo llinfo
|
2009-11-26 01:18:22 +01:00
|
|
|
#else
|
2016-06-11 20:38:37 +02:00
|
|
|
# define dmadbg (void)
|
2016-06-11 22:55:27 +02:00
|
|
|
# define dmallerr (void)
|
2016-06-11 20:38:37 +02:00
|
|
|
# define dmawarn (void)
|
|
|
|
# define dmallwarn (void)
|
|
|
|
# define dmainfo (void)
|
|
|
|
# define dmallinfo (void)
|
2009-11-26 01:18:22 +01:00
|
|
|
#endif
|
|
|
|
|
2008-01-09 02:13:24 +01:00
|
|
|
#ifdef CONFIG_DEBUG_NET
|
2016-06-11 20:38:37 +02:00
|
|
|
# define ndbg dbg
|
2016-06-11 22:55:27 +02:00
|
|
|
# define nllerr llerr
|
2016-06-11 20:38:37 +02:00
|
|
|
# define nwarn warn
|
|
|
|
# define nllwarn llwarn
|
|
|
|
# define ninfo info
|
|
|
|
# define nllinfo llinfo
|
2008-01-09 02:13:24 +01:00
|
|
|
#else
|
2016-06-11 20:38:37 +02:00
|
|
|
# define ndbg (void)
|
2016-06-11 22:55:27 +02:00
|
|
|
# define nllerr (void)
|
2016-06-11 20:38:37 +02:00
|
|
|
# define nwarn (void)
|
|
|
|
# define nllwarn (void)
|
|
|
|
# define ninfo (void)
|
|
|
|
# define nllinfo (void)
|
2008-01-09 02:13:24 +01:00
|
|
|
#endif
|
|
|
|
|
2008-09-28 19:15:17 +02:00
|
|
|
#ifdef CONFIG_DEBUG_USB
|
2016-06-11 20:38:37 +02:00
|
|
|
# define udbg dbg
|
2016-06-11 22:55:27 +02:00
|
|
|
# define ullerr llerr
|
2016-06-11 20:38:37 +02:00
|
|
|
# define uwarn warn
|
|
|
|
# define ullwarn llwarn
|
|
|
|
# define uinfo info
|
|
|
|
# define ullinfo llinfo
|
2008-09-28 19:15:17 +02:00
|
|
|
#else
|
2016-06-11 20:38:37 +02:00
|
|
|
# define udbg (void)
|
2016-06-11 22:55:27 +02:00
|
|
|
# define ullerr (void)
|
2016-06-11 20:38:37 +02:00
|
|
|
# define uwarn (void)
|
|
|
|
# define ullwarn (void)
|
|
|
|
# define uinfo (void)
|
|
|
|
# define ullinfo (void)
|
2008-09-28 19:15:17 +02:00
|
|
|
#endif
|
|
|
|
|
2008-01-09 02:13:24 +01:00
|
|
|
#ifdef CONFIG_DEBUG_FS
|
2016-06-11 20:38:37 +02:00
|
|
|
# define fdbg dbg
|
2016-06-11 22:55:27 +02:00
|
|
|
# define fllerr llerr
|
2016-06-11 20:38:37 +02:00
|
|
|
# define fwarn warn
|
|
|
|
# define fllwarn llwarn
|
|
|
|
# define finfo info
|
|
|
|
# define fllinfo llinfo
|
2014-07-03 15:58:43 +02:00
|
|
|
#else
|
2016-06-11 20:38:37 +02:00
|
|
|
# define fdbg (void)
|
2016-06-11 22:55:27 +02:00
|
|
|
# define fllerr (void)
|
2016-06-11 20:38:37 +02:00
|
|
|
# define fwarn (void)
|
|
|
|
# define fllwarn (void)
|
|
|
|
# define finfo (void)
|
|
|
|
# define fllinfo (void)
|
2014-07-03 15:58:43 +02:00
|
|
|
#endif
|
|
|
|
|
|
|
|
#ifdef CONFIG_DEBUG_CRYPTO
|
2016-06-11 20:38:37 +02:00
|
|
|
# define cryptdbg dbg
|
2016-06-11 22:55:27 +02:00
|
|
|
# define cryptllerr llerr
|
2016-06-11 20:38:37 +02:00
|
|
|
# define cryptwarn warn
|
|
|
|
# define cryptllwarn llwarn
|
|
|
|
# define cryptinfo info
|
|
|
|
# define cryptllinfo llinfo
|
2008-01-09 02:13:24 +01:00
|
|
|
#else
|
2016-06-11 20:38:37 +02:00
|
|
|
# define cryptdbg (void)
|
2016-06-11 22:55:27 +02:00
|
|
|
# define cryptllerr (void)
|
2016-06-11 20:38:37 +02:00
|
|
|
# define cryptwarn (void)
|
|
|
|
# define cryptllwarn (void)
|
|
|
|
# define cryptinfo (void)
|
|
|
|
# define cryptllinfo (void)
|
2008-01-09 02:13:24 +01:00
|
|
|
#endif
|
|
|
|
|
2011-07-29 20:51:56 +02:00
|
|
|
#ifdef CONFIG_DEBUG_INPUT
|
2016-06-11 20:38:37 +02:00
|
|
|
# define idbg dbg
|
2016-06-11 22:55:27 +02:00
|
|
|
# define illerr llerr
|
2016-06-11 20:38:37 +02:00
|
|
|
# define iwarn warn
|
|
|
|
# define illwarn llwarn
|
|
|
|
# define iinfo info
|
|
|
|
# define illinfo llinfo
|
2011-07-29 20:51:56 +02:00
|
|
|
#else
|
2016-06-11 20:38:37 +02:00
|
|
|
# define idbg (void)
|
2016-06-11 22:55:27 +02:00
|
|
|
# define illerr (void)
|
2016-06-11 20:38:37 +02:00
|
|
|
# define iwarn (void)
|
|
|
|
# define illwarn (void)
|
|
|
|
# define iinfo (void)
|
|
|
|
# define illinfo (void)
|
2011-07-29 20:51:56 +02:00
|
|
|
#endif
|
|
|
|
|
2014-12-16 16:54:32 +01:00
|
|
|
#ifdef CONFIG_DEBUG_SENSORS
|
2016-06-11 20:38:37 +02:00
|
|
|
# define sndbg dbg
|
2016-06-11 22:55:27 +02:00
|
|
|
# define snllerr llerr
|
2016-06-11 20:38:37 +02:00
|
|
|
# define snwarn warn
|
|
|
|
# define snllwarn llwarn
|
|
|
|
# define sninfo info
|
|
|
|
# define snllinfo llinfo
|
2014-12-16 16:54:32 +01:00
|
|
|
#else
|
2016-06-11 20:38:37 +02:00
|
|
|
# define sndbg (void)
|
2016-06-11 22:55:27 +02:00
|
|
|
# define snllerr (void)
|
2016-06-11 20:38:37 +02:00
|
|
|
# define snwarn (void)
|
|
|
|
# define snllwarn (void)
|
|
|
|
# define sninfo (void)
|
|
|
|
# define snllinfo (void)
|
2014-12-16 16:54:32 +01:00
|
|
|
#endif
|
|
|
|
|
2011-12-14 20:12:00 +01:00
|
|
|
#ifdef CONFIG_DEBUG_ANALOG
|
2016-06-11 20:38:37 +02:00
|
|
|
# define adbg dbg
|
2016-06-11 22:55:27 +02:00
|
|
|
# define allerr llerr
|
2016-06-11 20:38:37 +02:00
|
|
|
# define awarn warn
|
|
|
|
# define allwarn llwarn
|
|
|
|
# define ainfo info
|
|
|
|
# define allinfo llinfo
|
2011-12-14 20:12:00 +01:00
|
|
|
#else
|
2016-06-11 20:38:37 +02:00
|
|
|
# define adbg (void)
|
2016-06-11 22:55:27 +02:00
|
|
|
# define allerr (void)
|
2016-06-11 20:38:37 +02:00
|
|
|
# define awarn (void)
|
|
|
|
# define allwarn (void)
|
|
|
|
# define ainfo (void)
|
|
|
|
# define allinfo (void)
|
2011-12-14 20:12:00 +01:00
|
|
|
#endif
|
|
|
|
|
2008-11-25 01:09:14 +01:00
|
|
|
#ifdef CONFIG_DEBUG_GRAPHICS
|
2016-06-11 20:38:37 +02:00
|
|
|
# define gdbg dbg
|
2016-06-11 22:55:27 +02:00
|
|
|
# define gllerr llerr
|
2016-06-11 20:38:37 +02:00
|
|
|
# define gwarn warn
|
|
|
|
# define gllwarn llwarn
|
|
|
|
# define ginfo info
|
|
|
|
# define gllinfo llinfo
|
2008-11-25 01:09:14 +01:00
|
|
|
#else
|
2016-06-11 20:38:37 +02:00
|
|
|
# define gdbg (void)
|
2016-06-11 22:55:27 +02:00
|
|
|
# define gllerr (void)
|
2016-06-11 20:38:37 +02:00
|
|
|
# define gwarn (void)
|
|
|
|
# define gllwarn (void)
|
|
|
|
# define ginfo (void)
|
|
|
|
# define gllinfo (void)
|
2008-11-25 01:09:14 +01:00
|
|
|
#endif
|
|
|
|
|
2009-06-17 18:28:50 +02:00
|
|
|
#ifdef CONFIG_DEBUG_BINFMT
|
2016-06-11 20:38:37 +02:00
|
|
|
# define bdbg dbg
|
2016-06-11 22:55:27 +02:00
|
|
|
# define bllerr llerr
|
2016-06-11 20:38:37 +02:00
|
|
|
# define bwarn warn
|
|
|
|
# define bllwarn llwarn
|
|
|
|
# define binfo info
|
|
|
|
# define bllinfo llinfo
|
2009-06-17 18:28:50 +02:00
|
|
|
#else
|
2016-06-11 20:38:37 +02:00
|
|
|
# define bdbg (void)
|
2016-06-11 22:55:27 +02:00
|
|
|
# define bllerr (void)
|
2016-06-11 20:38:37 +02:00
|
|
|
# define bwarn (void)
|
|
|
|
# define bllwarn (void)
|
|
|
|
# define binfo (void)
|
|
|
|
# define bllinfo (void)
|
2009-06-17 18:28:50 +02:00
|
|
|
#endif
|
|
|
|
|
2008-01-09 02:13:24 +01:00
|
|
|
#ifdef CONFIG_DEBUG_LIB
|
2016-06-11 20:38:37 +02:00
|
|
|
# define ldbg dbg
|
2016-06-11 22:55:27 +02:00
|
|
|
# define lllerr llerr
|
2016-06-11 20:38:37 +02:00
|
|
|
# define lwarn warn
|
|
|
|
# define lllwarn llwarn
|
|
|
|
# define linfo info
|
|
|
|
# define lllinfo llinfo
|
2008-01-09 02:13:24 +01:00
|
|
|
#else
|
2016-06-11 20:38:37 +02:00
|
|
|
# define ldbg (void)
|
2016-06-11 22:55:27 +02:00
|
|
|
# define lllerr (void)
|
2016-06-11 20:38:37 +02:00
|
|
|
# define lwarn (void)
|
|
|
|
# define lllwarn (void)
|
|
|
|
# define linfo (void)
|
|
|
|
# define lllinfo (void)
|
2008-01-09 02:13:24 +01:00
|
|
|
#endif
|
|
|
|
|
2013-05-19 23:12:28 +02:00
|
|
|
#ifdef CONFIG_DEBUG_AUDIO
|
2016-06-11 20:38:37 +02:00
|
|
|
# define auddbg dbg
|
2016-06-11 22:55:27 +02:00
|
|
|
# define audllerr llerr
|
2016-06-11 20:38:37 +02:00
|
|
|
# define audwarn warn
|
|
|
|
# define audllwarn llwarn
|
|
|
|
# define audinfo info
|
|
|
|
# define audllinfo llinfo
|
2013-05-19 23:12:28 +02:00
|
|
|
#else
|
2016-06-11 20:38:37 +02:00
|
|
|
# define auddbg (void)
|
2016-06-11 22:55:27 +02:00
|
|
|
# define audllerr (void)
|
2016-06-11 20:38:37 +02:00
|
|
|
# define audwarn (void)
|
|
|
|
# define audllwarn (void)
|
|
|
|
# define audinfo (void)
|
|
|
|
# define audllinfo (void)
|
2013-05-19 23:12:28 +02:00
|
|
|
#endif
|
|
|
|
|
2008-01-09 02:13:24 +01:00
|
|
|
#endif /* CONFIG_CPP_HAVE_VARARGS */
|
|
|
|
|
2009-06-25 19:44:35 +02:00
|
|
|
/* Buffer dumping macros do not depend on varargs */
|
|
|
|
|
2016-06-11 22:14:08 +02:00
|
|
|
#ifdef CONFIG_DEBUG_FEATURES
|
2009-06-25 19:44:35 +02:00
|
|
|
# define dbgdumpbuffer(m,b,n) lib_dumpbuffer(m,b,n)
|
2016-06-11 19:50:18 +02:00
|
|
|
# ifdef CONFIG_DEBUG_INFO
|
2016-06-11 19:59:51 +02:00
|
|
|
# define infodumpbuffer(m,b,n) lib_dumpbuffer(m,b,n)
|
2009-06-25 19:44:35 +02:00
|
|
|
# else
|
2016-06-11 19:59:51 +02:00
|
|
|
# define infodumpbuffer(m,b,n)
|
2009-06-25 19:44:35 +02:00
|
|
|
# endif
|
|
|
|
#else
|
|
|
|
# define dbgdumpbuffer(m,b,n)
|
2016-06-11 19:59:51 +02:00
|
|
|
# define infodumpbuffer(m,b,n)
|
2009-06-25 19:44:35 +02:00
|
|
|
# endif
|
|
|
|
|
|
|
|
/* Subsystem specific debug */
|
|
|
|
|
|
|
|
#ifdef CONFIG_DEBUG_MM
|
|
|
|
# define mdbgdumpbuffer(m,b,n) dbgdumpbuffer(m,b,n)
|
2016-06-11 19:59:51 +02:00
|
|
|
# define minfodumpbuffer(m,b,n) infodumpbuffer(m,b,n)
|
2009-06-25 19:44:35 +02:00
|
|
|
#else
|
|
|
|
# define mdbgdumpbuffer(m,b,n)
|
2016-06-11 19:59:51 +02:00
|
|
|
# define minfodumpbuffer(m,b,n)
|
2009-06-25 19:44:35 +02:00
|
|
|
#endif
|
|
|
|
|
|
|
|
#ifdef CONFIG_DEBUG_SCHED
|
|
|
|
# define sdbgdumpbuffer(m,b,n) dbgdumpbuffer(m,b,n)
|
2016-06-11 19:59:51 +02:00
|
|
|
# define sinfodumpbuffer(m,b,n) infodumpbuffer(m,b,n)
|
2009-06-25 19:44:35 +02:00
|
|
|
#else
|
|
|
|
# define sdbgdumpbuffer(m,b,n)
|
2016-06-11 19:59:51 +02:00
|
|
|
# define sinfodumpbuffer(m,b,n)
|
2009-06-25 19:44:35 +02:00
|
|
|
#endif
|
|
|
|
|
2010-08-22 05:44:18 +02:00
|
|
|
#ifdef CONFIG_DEBUG_PAGING
|
|
|
|
# define pgdbgdumpbuffer(m,b,n) dbgdumpbuffer(m,b,n)
|
2016-06-11 19:59:51 +02:00
|
|
|
# define pginfodumpbuffer(m,b,n) infodumpbuffer(m,b,n)
|
2010-08-22 05:44:18 +02:00
|
|
|
#else
|
|
|
|
# define pgdbgdumpbuffer(m,b,n)
|
2016-06-11 19:59:51 +02:00
|
|
|
# define pginfodumpbuffer(m,b,n)
|
2010-08-22 05:44:18 +02:00
|
|
|
#endif
|
|
|
|
|
2009-11-26 01:18:22 +01:00
|
|
|
#ifdef CONFIG_DEBUG_DMA
|
|
|
|
# define dmadbgdumpbuffer(m,b,n) dbgdumpbuffer(m,b,n)
|
2016-06-11 19:59:51 +02:00
|
|
|
# define dmainfodumpbuffer(m,b,n) infodumpbuffer(m,b,n)
|
2009-11-26 01:18:22 +01:00
|
|
|
#else
|
|
|
|
# define dmadbgdumpbuffer(m,b,n)
|
2016-06-11 19:59:51 +02:00
|
|
|
# define dmainfodumpbuffer(m,b,n)
|
2009-11-26 01:18:22 +01:00
|
|
|
#endif
|
|
|
|
|
2009-06-25 19:44:35 +02:00
|
|
|
#ifdef CONFIG_DEBUG_NET
|
|
|
|
# define ndbgdumpbuffer(m,b,n) dbgdumpbuffer(m,b,n)
|
2016-06-11 19:59:51 +02:00
|
|
|
# define ninfodumpbuffer(m,b,n) infodumpbuffer(m,b,n)
|
2009-06-25 19:44:35 +02:00
|
|
|
#else
|
|
|
|
# define ndbgdumpbuffer(m,b,n)
|
2016-06-11 19:59:51 +02:00
|
|
|
# define ninfodumpbuffer(m,b,n)
|
2009-06-25 19:44:35 +02:00
|
|
|
#endif
|
|
|
|
|
|
|
|
#ifdef CONFIG_DEBUG_USB
|
|
|
|
# define udbgdumpbuffer(m,b,n) dbgdumpbuffer(m,b,n)
|
2016-06-11 19:59:51 +02:00
|
|
|
# define uinfodumpbuffer(m,b,n) infodumpbuffer(m,b,n)
|
2009-06-25 19:44:35 +02:00
|
|
|
#else
|
|
|
|
# define udbgdumpbuffer(m,b,n)
|
2016-06-11 19:59:51 +02:00
|
|
|
# define uinfodumpbuffer(m,b,n)
|
2009-06-25 19:44:35 +02:00
|
|
|
#endif
|
|
|
|
|
|
|
|
#ifdef CONFIG_DEBUG_FS
|
|
|
|
# define fdbgdumpbuffer(m,b,n) dbgdumpbuffer(m,b,n)
|
2016-06-11 19:59:51 +02:00
|
|
|
# define finfodumpbuffer(m,b,n) infodumpbuffer(m,b,n)
|
2009-06-25 19:44:35 +02:00
|
|
|
#else
|
|
|
|
# define fdbgdumpbuffer(m,b,n)
|
2016-06-11 19:59:51 +02:00
|
|
|
# define finfodumpbuffer(m,b,n)
|
2009-06-25 19:44:35 +02:00
|
|
|
#endif
|
|
|
|
|
2011-07-29 20:51:56 +02:00
|
|
|
#ifdef CONFIG_DEBUG_INPUT
|
|
|
|
# define idbgdumpbuffer(m,b,n) dbgdumpbuffer(m,b,n)
|
2016-06-11 19:59:51 +02:00
|
|
|
# define iinfodumpbuffer(m,b,n) infodumpbuffer(m,b,n)
|
2011-07-29 20:51:56 +02:00
|
|
|
#else
|
|
|
|
# define idbgdumpbuffer(m,b,n)
|
2016-06-11 19:59:51 +02:00
|
|
|
# define iinfodumpbuffer(m,b,n)
|
2011-07-29 20:51:56 +02:00
|
|
|
#endif
|
|
|
|
|
2009-06-25 19:44:35 +02:00
|
|
|
#ifdef CONFIG_DEBUG_GRAPHICS
|
|
|
|
# define gdbgdumpbuffer(m,b,n) dbgdumpbuffer(m,b,n)
|
2016-06-11 19:59:51 +02:00
|
|
|
# define ginfodumpbuffer(m,b,n) infodumpbuffer(m,b,n)
|
2009-06-25 19:44:35 +02:00
|
|
|
#else
|
|
|
|
# define gdbgdumpbuffer(m,b,n)
|
2016-06-11 19:59:51 +02:00
|
|
|
# define ginfodumpbuffer(m,b,n)
|
2009-06-25 19:44:35 +02:00
|
|
|
#endif
|
|
|
|
|
|
|
|
#ifdef CONFIG_DEBUG_BINFMT
|
|
|
|
# define bdbgdumpbuffer(m,b,n) dbgdumpbuffer(m,b,n)
|
2016-06-11 19:59:51 +02:00
|
|
|
# define binfodumpbuffer(m,b,n) infodumpbuffer(m,b,n)
|
2009-06-25 19:44:35 +02:00
|
|
|
#else
|
|
|
|
# define bdbgdumpbuffer(m,b,n)
|
2016-06-11 19:59:51 +02:00
|
|
|
# define binfodumpbuffer(m,b,n)
|
2009-06-25 19:44:35 +02:00
|
|
|
#endif
|
|
|
|
|
|
|
|
#ifdef CONFIG_DEBUG_LIB
|
|
|
|
# define ldbgdumpbuffer(m,b,n) dbgdumpbuffer(m,b,n)
|
2016-06-11 19:59:51 +02:00
|
|
|
# define linfodumpbuffer(m,b,n) infodumpbuffer(m,b,n)
|
2009-06-25 19:44:35 +02:00
|
|
|
#else
|
|
|
|
# define ldbgdumpbuffer(m,b,n)
|
2016-06-11 19:59:51 +02:00
|
|
|
# define linfodumpbuffer(m,b,n)
|
2009-06-25 19:44:35 +02:00
|
|
|
#endif
|
|
|
|
|
2013-05-19 23:12:28 +02:00
|
|
|
#ifdef CONFIG_DEBUG_AUDIO
|
|
|
|
# define auddbgdumpbuffer(m,b,n) dbgdumpbuffer(m,b,n)
|
2016-06-11 19:59:51 +02:00
|
|
|
# define audinfodumpbuffer(m,b,n) infodumpbuffer(m,b,n)
|
2013-05-19 23:12:28 +02:00
|
|
|
#else
|
|
|
|
# define auddbgdumpbuffer(m,b,n)
|
2016-06-11 19:59:51 +02:00
|
|
|
# define audinfodumpbuffer(m,b,n)
|
2013-05-19 23:12:28 +02:00
|
|
|
#endif
|
|
|
|
|
2008-01-09 02:13:24 +01:00
|
|
|
/****************************************************************************
|
2007-02-18 00:21:28 +01:00
|
|
|
* Public Type Declarations
|
2008-01-09 02:13:24 +01:00
|
|
|
****************************************************************************/
|
2007-02-18 00:21:28 +01:00
|
|
|
|
2008-01-09 02:13:24 +01:00
|
|
|
/****************************************************************************
|
2015-10-03 00:30:35 +02:00
|
|
|
* Public Data
|
2008-01-09 02:13:24 +01:00
|
|
|
****************************************************************************/
|
2007-02-18 00:21:28 +01:00
|
|
|
|
2008-01-09 02:13:24 +01:00
|
|
|
/****************************************************************************
|
2007-02-18 00:21:28 +01:00
|
|
|
* Public Function Prototypes
|
2008-01-09 02:13:24 +01:00
|
|
|
****************************************************************************/
|
2007-02-18 00:21:28 +01:00
|
|
|
|
|
|
|
#if defined(__cplusplus)
|
2012-12-11 23:51:20 +01:00
|
|
|
extern "C"
|
|
|
|
{
|
2007-02-18 00:21:28 +01:00
|
|
|
#endif
|
|
|
|
|
2009-06-25 19:44:35 +02:00
|
|
|
/* Dump a buffer of data */
|
|
|
|
|
2014-07-03 15:58:43 +02:00
|
|
|
void lib_dumpbuffer(FAR const char *msg, FAR const uint8_t *buffer,
|
|
|
|
unsigned int buflen);
|
2009-06-25 19:44:35 +02:00
|
|
|
|
2014-07-03 15:58:43 +02:00
|
|
|
/* The system logging interfaces are normally accessed via the macros
|
2013-01-28 22:55:16 +01:00
|
|
|
* provided above. If the cross-compiler's C pre-processor supports a
|
|
|
|
* variable number of macro arguments, then those macros below will map all
|
|
|
|
* debug statements to the logging interfaces declared in syslog.h.
|
|
|
|
*
|
|
|
|
* If the cross-compiler's pre-processor does not support variable length
|
2012-07-17 05:58:11 +02:00
|
|
|
* arguments, then these additional APIs will be built.
|
2008-01-09 02:13:24 +01:00
|
|
|
*/
|
|
|
|
|
|
|
|
#ifndef CONFIG_CPP_HAVE_VARARGS
|
2016-06-11 22:14:08 +02:00
|
|
|
#ifdef CONFIG_DEBUG_FEATURES
|
2012-12-11 23:51:20 +01:00
|
|
|
int dbg(const char *format, ...);
|
2008-01-09 02:13:24 +01:00
|
|
|
|
|
|
|
# ifdef CONFIG_ARCH_LOWPUTC
|
2016-06-11 22:55:27 +02:00
|
|
|
int llerr(const char *format, ...);
|
2008-01-09 02:13:24 +01:00
|
|
|
# endif
|
2016-06-11 22:14:08 +02:00
|
|
|
#endif /* CONFIG_DEBUG_FEATURES */
|
2016-06-11 20:38:37 +02:00
|
|
|
|
|
|
|
#ifdef CONFIG_DEBUG_WARN
|
|
|
|
int warn(const char *format, ...);
|
|
|
|
|
|
|
|
# ifdef CONFIG_ARCH_LOWPUTC
|
|
|
|
int llwarn(const char *format, ...);
|
|
|
|
# endif
|
|
|
|
#endif /* CONFIG_DEBUG_WARN */
|
2008-01-09 02:13:24 +01:00
|
|
|
|
2016-06-11 20:38:37 +02:00
|
|
|
#ifdef CONFIG_DEBUG_INFO
|
2016-06-11 19:59:51 +02:00
|
|
|
int info(const char *format, ...);
|
2008-10-27 17:37:48 +01:00
|
|
|
|
|
|
|
# ifdef CONFIG_ARCH_LOWPUTC
|
2016-06-11 19:59:51 +02:00
|
|
|
int llinfo(const char *format, ...);
|
2008-10-27 17:37:48 +01:00
|
|
|
# endif
|
2016-06-11 20:38:37 +02:00
|
|
|
#endif /* CONFIG_DEBUG_INFO */
|
2008-01-09 02:13:24 +01:00
|
|
|
#endif /* CONFIG_CPP_HAVE_VARARGS */
|
|
|
|
|
2007-02-18 00:21:28 +01:00
|
|
|
#if defined(__cplusplus)
|
|
|
|
}
|
|
|
|
#endif
|
|
|
|
|
2009-06-17 18:28:50 +02:00
|
|
|
#endif /* __INCLUDE_DEBUG_H */
|