You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@nuttx.apache.org by xi...@apache.org on 2021/09/12 03:33:24 UTC
[incubator-nuttx] branch master updated: debug: allow customize
EXTRA_FMT
This is an automated email from the ASF dual-hosted git repository.
xiaoxiang pushed a commit to branch master
in repository https://gitbox.apache.org/repos/asf/incubator-nuttx.git
The following commit(s) were added to refs/heads/master by this push:
new c9c2840 debug: allow customize EXTRA_FMT
c9c2840 is described below
commit c9c284089fe8944d464c54b52ffc40cbdc25b41c
Author: Jiuzhu Dong <do...@xiaomi.com>
AuthorDate: Mon Aug 23 22:28:11 2021 +0800
debug: allow customize EXTRA_FMT
Signed-off-by: Jiuzhu Dong <do...@xiaomi.com>
---
include/debug.h | 9 +++++++--
1 file changed, 7 insertions(+), 2 deletions(-)
diff --git a/include/debug.h b/include/debug.h
index f75a1fa..a869897 100644
--- a/include/debug.h
+++ b/include/debug.h
@@ -78,11 +78,16 @@
* really intended only for crash error reporting.
*/
-#ifdef CONFIG_HAVE_FUNCTIONNAME
+#if !defined(EXTRA_FMT) && !defined(EXTRA_ARG) && defined(CONFIG_HAVE_FUNCTIONNAME)
# define EXTRA_FMT "%s: "
# define EXTRA_ARG ,__FUNCTION__
-#else
+#endif
+
+#ifndef EXTRA_FMT
# define EXTRA_FMT
+#endif
+
+#ifndef EXTRA_ARG
# define EXTRA_ARG
#endif