TizenRT Libs&Environment
v2.0 M2
Main Page
Modules
Data Structures
Files
File List
Globals
debug.h
Go to the documentation of this file.
1
/****************************************************************************
2
*
3
* Copyright 2016 Samsung Electronics All Rights Reserved.
4
*
5
* Licensed under the Apache License, Version 2.0 (the "License");
6
* you may not use this file except in compliance with the License.
7
* You may obtain a copy of the License at
8
*
9
* http://www.apache.org/licenses/LICENSE-2.0
10
*
11
* Unless required by applicable law or agreed to in writing,
12
* software distributed under the License is distributed on an
13
* "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND,
14
* either express or implied. See the License for the specific
15
* language governing permissions and limitations under the License.
16
*
17
****************************************************************************/
18
/****************************************************************************
19
* include/debug.h
20
*
21
* Copyright (C) 2007-2011, 2014 Gregory Nutt. All rights reserved.
22
* Author: Gregory Nutt <gnutt@nuttx.org>
23
*
24
* Redistribution and use in source and binary forms, with or without
25
* modification, are permitted provided that the following conditions
26
* are met:
27
*
28
* 1. Redistributions of source code must retain the above copyright
29
* notice, this list of conditions and the following disclaimer.
30
* 2. Redistributions in binary form must reproduce the above copyright
31
* notice, this list of conditions and the following disclaimer in
32
* the documentation and/or other materials provided with the
33
* distribution.
34
* 3. Neither the name NuttX nor the names of its contributors may be
35
* used to endorse or promote products derived from this software
36
* without specific prior written permission.
37
*
38
* THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS
39
* "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT
40
* LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS
41
* FOR A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE
42
* COPYRIGHT OWNER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT,
43
* INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING,
44
* BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS
45
* OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED
46
* AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT
47
* LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN
48
* ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE
49
* POSSIBILITY OF SUCH DAMAGE.
50
*
51
****************************************************************************/
60
63
#ifndef __INCLUDE_DEBUG_H
64
#define __INCLUDE_DEBUG_H
65
66
/****************************************************************************
67
* Included Files
68
****************************************************************************/
69
70
#include <tinyara/config.h>
71
#include <tinyara/compiler.h>
72
#include <tinyara/logm.h>
73
74
#include <
syslog.h
>
75
76
/****************************************************************************
77
* Pre-processor Definitions
78
****************************************************************************/
79
80
/* Debug macros to runtime filter the debug messages sent to the console. In
81
* general, there are four forms of the debug macros:
82
*
83
* [a-z]dbg() -- Outputs messages to the console similar to printf() except
84
* that the output is not buffered. The first character indicates the
85
* system system (e.g., n=network, f=filesystem, etc.). If the first
86
* character is missing (i.e., dbg()), then it is common. The common
87
* dbg() macro is enabled by CONFIG_DEBUG. Subsystem debug requires an
88
* additional configuration setting to enable it (e.g., CONFIG_DEBUG_NET
89
* for the network, CONFIG_DEBUG_FS for the file system, etc).
90
*
91
* In general, error messages and output of importance use [a-z]dbg().
92
* [a-z]dbg() is implementation dependent but usually uses file descriptors.
93
* (that is a problem only because the interrupt task may have re-
94
* directed stdout). Therefore [a-z]dbg() should not be used in interrupt
95
* handlers.
96
*
97
* [a-z]vdbg() -- Identical to [a-z]dbg() except that it also requires that
98
* CONFIG_DEBUG_VERBOSE be defined. This is intended for general debug
99
* output that you would normally want to suppress.
100
*
101
* [a-z]lldbg() -- Identical to [a-z]dbg() except this is uses special
102
* interfaces provided by architecture-specific logic to talk directly
103
* to the underlying console hardware. If the architecture provides such
104
* logic, it should define CONFIG_ARCH_LOWPUTC.
105
*
106
* [a-z]lldbg() should not be used in normal code because the implementation
107
* probably disables interrupts and does things that are not consistent with
108
* good real-time performance. However, [a-z]lldbg() is particularly useful
109
* in low-level code where it is inappropriate to use file descriptors. For
110
* example, only [a-z]lldbg() should be used in interrupt handlers.
111
*
112
* [a-z]llvdbg() -- Identical to [a-z]lldbg() except that it also requires that
113
* CONFIG_DEBUG_VERBOSE be defined. This is intended for general debug
114
* output that you would normally want to suppress.
115
*/
116
117
#ifdef CONFIG_HAVE_FUNCTIONNAME
118
#define EXTRA_FMT "%s: "
119
#define EXTRA_ARG , __FUNCTION__
120
#else
121
#define EXTRA_FMT
122
#define EXTRA_ARG
123
#endif
124
125
/* Debug macros will differ depending upon if the toolchain supports
126
* macros with a variable number of arguments or not.
127
*/
128
129
#ifdef CONFIG_CPP_HAVE_VARARGS
130
131
/* C-99 style variadic macros are supported */
132
133
#ifdef CONFIG_DEBUG
134
/* Temporary LOGM macros to route all dbg messages.
135
Once LOGM is approved, each module should have its own index
136
*/
137
#define LOGM_IDX (0)
138
139
#ifdef CONFIG_DEBUG_ERROR
140
#ifdef CONFIG_LOGM
141
#define dbg(format, ...) \
142
logm(LOGM_NORMAL, LOGM_IDX, LOGM_ERR, EXTRA_FMT format EXTRA_ARG, ##__VA_ARGS__)
143
144
#define dbg_noarg(format, ...) \
145
logm(LOGM_NORMAL, LOGM_IDX, LOGM_ERR, format, ##__VA_ARGS__)
146
147
#define lldbg(format, ...) \
148
logm(LOGM_LOWPUT, LOGM_IDX, LOGM_ERR, EXTRA_FMT format EXTRA_ARG, ##__VA_ARGS__)
149
150
#else
151
156
#define dbg(format, ...) \
157
syslog(LOG_ERR, EXTRA_FMT format EXTRA_ARG, ##__VA_ARGS__)
158
#define dbg_noarg(format, ...) \
159
syslog(LOG_ERR, format, ##__VA_ARGS__)
160
161
#ifdef CONFIG_ARCH_LOWPUTC
162
167
#define lldbg(format, ...) \
168
lowsyslog(LOG_ERR, EXTRA_FMT format EXTRA_ARG, ##__VA_ARGS__)
169
#else
170
#define lldbg(...)
171
#endif
172
#endif
173
174
#else
175
#define dbg(...)
176
#define lldbg(...)
177
#endif
178
179
#ifdef CONFIG_DEBUG_WARN
180
#ifdef CONFIG_LOGM
181
#define wdbg(format, ...) \
182
logm(LOGM_NORMAL, LOGM_IDX, LOGM_WRN, EXTRA_FMT format EXTRA_ARG, ##__VA_ARGS__)
183
184
#define llwdbg(format, ...) \
185
logm(LOGM_LOWPUT, LOGM_IDX, LOGM_WRN, EXTRA_FMT format EXTRA_ARG, ##__VA_ARGS__)
186
187
#else
188
193
#define wdbg(format, ...) \
194
syslog(LOG_WARNING, EXTRA_FMT format EXTRA_ARG, ##__VA_ARGS__)
195
196
#ifdef CONFIG_ARCH_LOWPUTC
197
202
#define llwdbg(format, ...) \
203
lowsyslog(LOG_WARNING, EXTRA_FMT format EXTRA_ARG, ##__VA_ARGS__)
204
#else
205
#define llwdbg(...)
206
#endif
207
#endif
208
209
#else
210
#define wdbg(...)
211
#define llwdbg(...)
212
#endif
213
214
#ifdef CONFIG_DEBUG_VERBOSE
215
#ifdef CONFIG_LOGM
216
#define vdbg(format, ...) \
217
logm(LOGM_NORMAL, LOGM_IDX, LOGM_INF, EXTRA_FMT format EXTRA_ARG, ##__VA_ARGS__)
218
219
#define llvdbg(format, ...) \
220
logm(LOGM_LOWPUT, LOGM_IDX, LOGM_INF, EXTRA_FMT format EXTRA_ARG, ##__VA_ARGS__)
221
222
#else
223
228
#define vdbg(format, ...) \
229
syslog(LOG_INFO, EXTRA_FMT format EXTRA_ARG, ##__VA_ARGS__)
230
231
#ifdef CONFIG_ARCH_LOWPUTC
232
237
#define llvdbg(format, ...) \
238
lowsyslog(LOG_INFO, EXTRA_FMT format EXTRA_ARG, ##__VA_ARGS__)
239
240
#else
241
#define llvdbg(...)
242
#endif
243
#endif
244
245
#else
246
#define vdbg(...)
247
#define llvdbg(...)
248
#endif
249
250
#else
/* CONFIG_DEBUG */
251
252
#define dbg(...)
253
#define lldbg(...)
254
#define wdbg(...)
255
#define llwdbg(...)
256
#define vdbg(...)
257
#define llvdbg(...)
258
259
#endif
/* CONFIG_DEBUG */
260
261
/* Subsystem specific debug */
262
263
#ifdef CONFIG_DEBUG_MM_ERROR
264
#define mdbg(format, ...) dbg(format, ##__VA_ARGS__)
265
#define mlldbg(format, ...) lldbg(format, ##__VA_ARGS__)
266
#else
267
#define mdbg(...)
268
#define mlldbg(...)
269
#endif
270
271
#ifdef CONFIG_DEBUG_MM_WARN
272
#define mwdbg(format, ...) wdbg(format, ##__VA_ARGS__)
273
#define mllwdbg(format, ...) llwdbg(format, ##__VA_ARGS__)
274
#else
275
#define mwdbg(...)
276
#define mllwdbg(...)
277
#endif
278
279
#ifdef CONFIG_DEBUG_MM_INFO
280
#define mvdbg(format, ...) vdbg(format, ##__VA_ARGS__)
281
#define mllvdbg(format, ...) llvdbg(format, ##__VA_ARGS__)
282
#else
283
#define mvdbg(...)
284
#define mllvdbg(...)
285
#endif
286
287
#ifdef CONFIG_DEBUG_SCHED_ERROR
288
#define sdbg(format, ...) dbg(format, ##__VA_ARGS__)
289
#define slldbg(format, ...) lldbg(format, ##__VA_ARGS__)
290
#else
291
#define sdbg(...)
292
#define slldbg(...)
293
#endif
294
295
#ifdef CONFIG_DEBUG_SCHED_WARN
296
#define swdbg(format, ...) wdbg(format, ##__VA_ARGS__)
297
#define sllwdbg(format, ...) llwdbg(format, ##__VA_ARGS__)
298
#else
299
#define swdbg(...)
300
#define sllwdbg(...)
301
#endif
302
303
#ifdef CONFIG_DEBUG_SCHED_INFO
304
#define svdbg(format, ...) vdbg(format, ##__VA_ARGS__)
305
#define sllvdbg(format, ...) llvdbg(format, ##__VA_ARGS__)
306
#else
307
#define svdbg(...)
308
#define sllvdbg(...)
309
#endif
310
311
#ifdef CONFIG_DEBUG_PM_ERROR
312
#define pmdbg(format, ...) dbg(format, ##__VA_ARGS__)
313
#define pmlldbg(format, ...) lldbg(format, ##__VA_ARGS__)
314
#else
315
#define pmdbg(...)
316
#define pmlldbg(...)
317
#endif
318
319
#ifdef CONFIG_DEBUG_PM_WARN
320
#define pmwdbg(format, ...) wdbg(format, ##__VA_ARGS__)
321
#define pmllwdbg(format, ...) llwdbg(format, ##__VA_ARGS__)
322
#else
323
#define pmwdbg(...)
324
#define pmllwdbg(...)
325
#endif
326
327
#ifdef CONFIG_DEBUG_PM_INFO
328
#define pmvdbg(format, ...) vdbg(format, ##__VA_ARGS__)
329
#define pmllvdbg(format, ...) llvdbg(format, ##__VA_ARGS__)
330
#else
331
#define pmvdbg(...)
332
#define pmllvdbg(...)
333
#endif
334
335
#ifdef CONFIG_DEBUG_PAGING_ERROR
336
#define pgdbg(format, ...) dbg(format, ##__VA_ARGS__)
337
#define pglldbg(format, ...) lldbg(format, ##__VA_ARGS__)
338
#else
339
#define pgdbg(...)
340
#define pglldbg(...)
341
#endif
342
343
#ifdef CONFIG_DEBUG_PAGING_WARN
344
#define pgwdbg(format, ...) wdbg(format, ##__VA_ARGS__)
345
#define pgllwdbg(format, ...) llwdbg(format, ##__VA_ARGS__)
346
#else
347
#define pgwdbg(...)
348
#define pgllwdbg(...)
349
#endif
350
351
#ifdef CONFIG_DEBUG_PAGING_INFO
352
#define pgvdbg(format, ...) vdbg(format, ##__VA_ARGS__)
353
#define pgllvdbg(format, ...) llvdbg(format, ##__VA_ARGS__)
354
#else
355
#define pgvdbg(...)
356
#define pgllvdbg(...)
357
#endif
358
359
#ifdef CONFIG_DEBUG_DMA_ERROR
360
#define dmadbg(format, ...) dbg(format, ##__VA_ARGS__)
361
#define dmalldbg(format, ...) lldbg(format, ##__VA_ARGS__)
362
#else
363
#define dmadbg(...)
364
#define dmalldbg(...)
365
#endif
366
367
#ifdef CONFIG_DEBUG_DMA_WARN
368
#define dmawdbg(format, ...) wdbg(format, ##__VA_ARGS__)
369
#define dmallwdbg(format, ...) llwdbg(format, ##__VA_ARGS__)
370
#else
371
#define dmawdbg(...)
372
#define dmallwdbg(...)
373
#endif
374
375
#ifdef CONFIG_DEBUG_DMA_INFO
376
#define dmavdbg(format, ...) vdbg(format, ##__VA_ARGS__)
377
#define dmallvdbg(format, ...) llvdbg(format, ##__VA_ARGS__)
378
#else
379
#define dmavdbg(...)
380
#define dmallvdbg(...)
381
#endif
382
383
#ifdef CONFIG_DEBUG_NET_ERROR
384
#define ndbg(format, ...) dbg(format, ##__VA_ARGS__)
385
#define nlldbg(format, ...) lldbg(format, ##__VA_ARGS__)
386
#else
387
#define ndbg(...)
388
#define nlldbg(...)
389
#endif
390
391
#ifdef CONFIG_DEBUG_NET_WARN
392
#define nwdbg(format, ...) wdbg(format, ##__VA_ARGS__)
393
#define nllwdbg(format, ...) llwdbg(format, ##__VA_ARGS__)
394
#else
395
#define nwdbg(...)
396
#define nllwdbg(...)
397
#endif
398
399
#ifdef CONFIG_DEBUG_NET_INFO
400
#define nvdbg(format, ...) vdbg(format, ##__VA_ARGS__)
401
#define nllvdbg(format, ...) llvdbg(format, ##__VA_ARGS__)
402
#else
403
#define nvdbg(...)
404
#define nllvdbg(...)
405
#endif
406
407
#ifdef CONFIG_DEBUG_ERR_REPORT_ERROR
408
#define nwerrdbg(format, ...) dbg(format, ##__VA_ARGS__)
409
#define nwerrlldbg(format, ...) lldbg(format, ##__VA_ARGS__)
410
#else
411
#define nwerrdbg(...)
412
#define nwerrlldbg(...)
413
#endif
414
415
#ifdef CONFIG_DEBUG_ERR_REPORT_WARN
416
#define nwerr_wdbg(format, ...) wdbg(format, ##__VA_ARGS__)
417
#define nwerr_llwdbg(format, ...) llwdbg(format, ##__VA_ARGS__)
418
#else
419
#define nwerr_wdbg(...)
420
#define nwerr_llwdbg(...)
421
#endif
422
423
#ifdef CONFIG_DEBUG_ERR_REPORT_INFO
424
#define nwerr_vdbg(format, ...) vdbg(format, ##__VA_ARGS__)
425
#define nwerr_llvdbg(format, ...) llvdbg(format, ##__VA_ARGS__)
426
#else
427
#define nwerr_vdbg(...)
428
#define nwerr_llvdbg(...)
429
#endif
430
431
#ifdef CONFIG_DEBUG_USB_ERROR
432
#define udbg(format, ...) dbg(format, ##__VA_ARGS__)
433
#define ulldbg(format, ...) lldbg(format, ##__VA_ARGS__)
434
#else
435
#define udbg(...)
436
#define ulldbg(...)
437
#endif
438
439
#ifdef CONFIG_DEBUG_USB_WARN
440
#define uwdbg(format, ...) wdbg(format, ##__VA_ARGS__)
441
#define ullwdbg(format, ...) llwdbg(format, ##__VA_ARGS__)
442
#else
443
#define uwdbg(...)
444
#define ullwdbg(...)
445
#endif
446
447
#ifdef CONFIG_DEBUG_USB_INFO
448
#define uvdbg(format, ...) vdbg(format, ##__VA_ARGS__)
449
#define ullvdbg(format, ...) llvdbg(format, ##__VA_ARGS__)
450
#else
451
#define uvdbg(...)
452
#define ullvdbg(...)
453
#endif
454
455
#ifdef CONFIG_DEBUG_FS_ERROR
456
#define fdbg(format, ...) dbg(format, ##__VA_ARGS__)
457
#define flldbg(format, ...) lldbg(format, ##__VA_ARGS__)
458
#else
459
#define fdbg(...)
460
#define flldbg(...)
461
#endif
462
463
#ifdef CONFIG_DEBUG_FS_WARN
464
#define fwdbg(format, ...) wdbg(format, ##__VA_ARGS__)
465
#define fllwdbg(format, ...) llwdbg(format, ##__VA_ARGS__)
466
#else
467
#define fwdbg(...)
468
#define fllwdbg(...)
469
#endif
470
471
#ifdef CONFIG_DEBUG_FS_INFO
472
#define fvdbg(format, ...) vdbg(format, ##__VA_ARGS__)
473
#define fsdbg(format, ...) dbg_noarg(format, ##__VA_ARGS__)
474
#define fllvdbg(format, ...) llvdbg(format, ##__VA_ARGS__)
475
#else
476
#define fvdbg(...)
477
#define fsdbg(format, ...)
478
#define fllvdbg(...)
479
#endif
480
481
#ifdef CONFIG_DEBUG_DM_ERROR
482
#define dmdbg(format, ...) dbg(format, ##__VA_ARGS__)
483
#define dmlldbg(format, ...) lldbg(format, ##__VA_ARGS__)
484
#else
485
#define dmdbg(...)
486
#define dmlldbg(...)
487
#endif
488
489
#ifdef CONFIG_DEBUG_DM_WARN
490
#define dmwdbg(format, ...) wdbg(format, ##__VA_ARGS__)
491
#define dmllwdbg(format, ...) llwdbg(format, ##__VA_ARGS__)
492
#else
493
#define dmwdbg(...)
494
#define dmllwdbg(...)
495
#endif
496
497
#ifdef CONFIG_DEBUG_DM_INFO
498
#define dmvdbg(format, ...) vdbg(format, ##__VA_ARGS__)
499
#define dmllvdbg(format, ...) llvdbg(format, ##__VA_ARGS__)
500
#else
501
#define dmvdbg(...)
502
#define dmllvdbg(...)
503
#endif
504
505
#ifdef CONFIG_DEBUG_INPUT_ERROR
506
#define idbg(format, ...) dbg(format, ##__VA_ARGS__)
507
#define illdbg(format, ...) lldbg(format, ##__VA_ARGS__)
508
#else
509
#define idbg(...)
510
#define illdbg(...)
511
#endif
512
513
#ifdef CONFIG_DEBUG_INPUT_WARN
514
#define iwdbg(format, ...) wdbg(format, ##__VA_ARGS__)
515
#define illwdbg(format, ...) llwdbg(format, ##__VA_ARGS__)
516
#else
517
#define iwdbg(...)
518
#define illwdbg(...)
519
#endif
520
521
#ifdef CONFIG_DEBUG_INPUT_INFO
522
#define ivdbg(format, ...) vdbg(format, ##__VA_ARGS__)
523
#define illvdbg(format, ...) llvdbg(format, ##__VA_ARGS__)
524
#else
525
#define ivdbg(...)
526
#define illvdbg(...)
527
#endif
528
529
#ifdef CONFIG_DEBUG_SENSORS_ERROR
530
#define sndbg(format, ...) dbg(format, ##__VA_ARGS__)
531
#define snlldbg(format, ...) lldbg(format, ##__VA_ARGS__)
532
#else
533
#define sndbg(...)
534
#define snlldbg(...)
535
#endif
536
537
#ifdef CONFIG_DEBUG_SENSORS_WARN
538
#define snwdbg(format, ...) wdbg(format, ##__VA_ARGS__)
539
#define snllwdbg(format, ...) llwdbg(format, ##__VA_ARGS__)
540
#else
541
#define snwdbg(...)
542
#define snllwdbg(...)
543
#endif
544
545
#ifdef CONFIG_DEBUG_SENSORS_INFO
546
#define snvdbg(format, ...) vdbg(format, ##__VA_ARGS__)
547
#define snllvdbg(format, ...) llvdbg(format, ##__VA_ARGS__)
548
#else
549
#define snvdbg(...)
550
#define snllvdbg(...)
551
#endif
552
553
#ifdef CONFIG_DEBUG_ANALOG_ERROR
554
#define adbg(format, ...) dbg(format, ##__VA_ARGS__)
555
#define alldbg(format, ...) lldbg(format, ##__VA_ARGS__)
556
#else
557
#define adbg(...)
558
#define alldbg(...)
559
#endif
560
561
#ifdef CONFIG_DEBUG_ANALOG_WARN
562
#define awdbg(format, ...) wdbg(format, ##__VA_ARGS__)
563
#define allwdbg(format, ...) llwdbg(format, ##__VA_ARGS__)
564
#else
565
#define awdbg(...)
566
#define allwdbg(...)
567
#endif
568
569
#ifdef CONFIG_DEBUG_ANALOG_INFO
570
#define avdbg(format, ...) vdbg(format, ##__VA_ARGS__)
571
#define allvdbg(format, ...) llvdbg(format, ##__VA_ARGS__)
572
#else
573
#define avdbg(...)
574
#define allvdbg(...)
575
#endif
576
577
#ifdef CONFIG_DEBUG_GRAPHICS_ERROR
578
#define gdbg(format, ...) dbg(format, ##__VA_ARGS__)
579
#define glldbg(format, ...) lldbg(format, ##__VA_ARGS__)
580
#else
581
#define gdbg(...)
582
#define glldbg(...)
583
#endif
584
585
#ifdef CONFIG_DEBUG_GRAPHICS_WARN
586
#define gwdbg(format, ...) wdbg(format, ##__VA_ARGS__)
587
#define gllwdbg(format, ...) llwdbg(format, ##__VA_ARGS__)
588
#else
589
#define gwdbg(...)
590
#define gllwdbg(...)
591
#endif
592
593
#ifdef CONFIG_DEBUG_GRAPHICS_INFO
594
#define gvdbg(format, ...) vdbg(format, ##__VA_ARGS__)
595
#define gllvdbg(format, ...) llvdbg(format, ##__VA_ARGS__)
596
#else
597
#define gvdbg(...)
598
#define gllvdbg(...)
599
#endif
600
601
#ifdef CONFIG_DEBUG_LIB_ERROR
602
#define ldbg(format, ...) dbg(format, ##__VA_ARGS__)
603
#define llldbg(format, ...) lldbg(format, ##__VA_ARGS__)
604
#else
605
#define ldbg(...)
606
#define llldbg(...)
607
#endif
608
609
#ifdef CONFIG_DEBUG_LIB_WARN
610
#define lwdbg(format, ...) wdbg(format, ##__VA_ARGS__)
611
#define lllwdbg(format, ...) llwdbg(format, ##__VA_ARGS__)
612
#else
613
#define lwdbg(...)
614
#define lllwdbg(...)
615
#endif
616
617
#ifdef CONFIG_DEBUG_LIB_INFO
618
#define lvdbg(format, ...) vdbg(format, ##__VA_ARGS__)
619
#define lllvdbg(format, ...) llvdbg(format, ##__VA_ARGS__)
620
#else
621
#define lvdbg(...)
622
#define lllvdbg(...)
623
#endif
624
625
#ifdef CONFIG_DEBUG_AUDIO_ERROR
626
#define auddbg(format, ...) dbg(format, ##__VA_ARGS__)
627
#define audlldbg(format, ...) lldbg(format, ##__VA_ARGS__)
628
#else
629
#define auddbg(...)
630
#define audlldbg(...)
631
#endif
632
633
#ifdef CONFIG_DEBUG_AUDIO_WARN
634
#define audwdbg(format, ...) wdbg(format, ##__VA_ARGS__)
635
#define audllwdbg(format, ...) llwdbg(format, ##__VA_ARGS__)
636
#else
637
#define audwdbg(...)
638
#define audllwdbg(...)
639
#endif
640
641
#ifdef CONFIG_DEBUG_AUDIO_INFO
642
#define audvdbg(format, ...) vdbg(format, ##__VA_ARGS__)
643
#define audllvdbg(format, ...) llvdbg(format, ##__VA_ARGS__)
644
#else
645
#define audvdbg(...)
646
#define audllvdbg(...)
647
#endif
648
649
#ifdef CONFIG_DEBUG_I2C_ERROR
650
#define i2cerr(format, ...) dbg(format, ##__VA_ARGS__)
651
#define i2clldbg(format, ...) lldbg(format, ##__VA_ARGS__)
652
#else
653
#define i2cerr(...)
654
#define i2clldbg(...)
655
#endif
656
657
#ifdef CONFIG_DEBUG_I2C_WARN
658
#define i2cwarn(format, ...) wdbg(format, ##__VA_ARGS__)
659
#define i2cllwdbg(format, ...) llwdbg(format, ##__VA_ARGS__)
660
#else
661
#define i2cwarn(...)
662
#define i2cllwdbg(...)
663
#endif
664
665
#ifdef CONFIG_DEBUG_I2C_INFO
666
#define i2cinfo(format, ...) vdbg(format, ##__VA_ARGS__)
667
#define i2cllvdbg(format, ...) llvdbg(format, ##__VA_ARGS__)
668
#else
669
#define i2cinfo(...)
670
#define i2cllvdbg(...)
671
#endif
672
673
#ifdef CONFIG_DEBUG_I2S_ERROR
674
#define i2serr(format, ...) dbg(format, ##__VA_ARGS__)
675
#define i2slldbg(format, ...) lldbg(format, ##__VA_ARGS__)
676
#else
677
#define i2serr(...)
678
#define i2slldbg(...)
679
#endif
680
681
#ifdef CONFIG_DEBUG_I2S_WARN
682
#define i2swarn(format, ...) wdbg(format, ##__VA_ARGS__)
683
#define i2sllwdbg(format, ...) llwdbg(format, ##__VA_ARGS__)
684
#else
685
#define i2swarn(...)
686
#define i2sllwdbg(...)
687
#endif
688
689
#ifdef CONFIG_DEBUG_I2S_INFO
690
#define i2sinfo(format, ...) vdbg(format, ##__VA_ARGS__)
691
#define i2sllvdbg(format, ...) llvdbg(format, ##__VA_ARGS__)
692
#else
693
#define i2sinfo(...)
694
#define i2sllvdbg(...)
695
#endif
696
697
698
#ifdef CONFIG_NET_LWIP_DEBUG
699
#define lwipdbg(format, ...) dbg(format, ##__VA_ARGS__)
700
#define lwiplldbg(format, ...) lldbg(format, ##__VA_ARGS__)
701
#else
702
#define lwipdbg(...)
703
#define lwiplldbg(...)
704
#endif
705
706
#ifdef CONFIG_DEBUG_TTRACE
707
#define ttdbg(format, ...) dbg(format, ##__VA_ARGS__)
708
#else
709
#define ttdbg(format, ...)
710
#endif
711
712
#ifdef CONFIG_DEBUG_MEDIA_ERROR
713
#define meddbg(format, ...) dbg(format, ##__VA_ARGS__)
714
#define medlldbg(format, ...) lldbg(format, ##__VA_ARGS__)
715
#else
716
#define meddbg(...)
717
#define medlldbg(...)
718
#endif
719
720
#ifdef CONFIG_DEBUG_MEDIA_WARN
721
#define medwdbg(format, ...) wdbg(format, ##__VA_ARGS__)
722
#define medllwdbg(format, ...) llwdbg(format, ##__VA_ARGS__)
723
#else
724
#define medwdbg(...)
725
#define medllwdbg(...)
726
#endif
727
728
#ifdef CONFIG_DEBUG_MEDIA_INFO
729
#define medvdbg(format, ...) vdbg(format, ##__VA_ARGS__)
730
#define medllvdbg(format, ...) llvdbg(format, ##__VA_ARGS__)
731
#else
732
#define medvdbg(...)
733
#define medllvdbg(...)
734
#endif
735
736
#ifdef CONFIG_DEBUG_TASK_MANAGER_ERROR
737
#define tmdbg(format, ...) dbg(format, ##__VA_ARGS__)
738
#define tmlldbg(format, ...) lldbg(format, ##__VA_ARGS__)
739
#else
740
#define tmdbg(...)
741
#define tmlldbg(...)
742
#endif
743
#ifdef CONFIG_DEBUG_TASK_MANAGER_INFO
744
#define tmvdbg(format, ...) vdbg(format, ##__VA_ARGS__)
745
#define tmllvdbg(format, ...) llvdbg(format, ##__VA_ARGS__)
746
#else
747
#define tmvdbg(...)
748
#define tmllvdbg(...)
749
#endif
750
751
#ifdef CONFIG_DEBUG_EVENTLOOP_ERROR
752
#define eldbg(format, ...) dbg(format, ##__VA_ARGS__)
753
#define ellldbg(format, ...) lldbg(format, ##__VA_ARGS__)
754
#else
755
#define eldbg(...)
756
#define ellldbg(...)
757
#endif
758
759
#ifdef CONFIG_DEBUG_EVENTLOOP_INFO
760
#define elvdbg(format, ...) vdbg(format, ##__VA_ARGS__)
761
#define elllvdbg(format, ...) llvdbg(format, ##__VA_ARGS__)
762
#else
763
#define elvdbg(...)
764
#define elllvdbg(...)
765
#endif
766
767
#else
/* CONFIG_CPP_HAVE_VARARGS */
768
769
/* Variadic macros NOT supported */
770
771
#ifdef CONFIG_DEBUG
772
#ifndef CONFIG_DEBUG_ERROR
773
#define dbg (void)
774
#define lldbg (void)
775
#else
776
#ifndef CONFIG_ARCH_LOWPUTC
777
#define lldbg (void)
778
#endif
779
#endif
780
#ifndef CONFIG_DEBUG_WARN
781
#define wdbg (void)
782
#define llwdbg (void)
783
#else
784
#ifndef CONFIG_ARCH_LOWPUTC
785
#define llwdbg (void)
786
#endif
787
#endif
788
#ifndef CONFIG_DEBUG_VERBOSE
789
#define vdbg (void)
790
#define llvdbg (void)
791
#else
792
#ifndef CONFIG_ARCH_LOWPUTC
793
#define llvdbg (void)
794
#endif
795
#endif
796
#else
797
#define dbg (void)
798
#define lldbg (void)
799
#define wdbg (void)
800
#define llwdbg (void)
801
#define vdbg (void)
802
#define llvdbg (void)
803
#endif
804
805
/* Subsystem specific debug */
806
807
#ifdef CONFIG_DEBUG_MM_ERROR
808
#define mdbg dbg
809
#define mlldbg lldbg
810
#else
811
#define mdbg (void)
812
#define mlldbg (void)
813
#endif
814
815
#ifdef CONFIG_DEBUG_MM_WARN
816
#define mwdbg wdbg
817
#define mllwdbg llwdbg
818
#else
819
#define mwdbg (void)
820
#define mlwldbg (void)
821
#endif
822
823
#ifdef CONFIG_DEBUG_MM_INFO
824
#define mvdbg vdbg
825
#define mllvdbg llvdbg
826
#else
827
#define mvdbg (void)
828
#define mllvdbg (void)
829
#endif
830
831
#ifdef CONFIG_DEBUG_SCHED_ERROR
832
#define sdbg dbg
833
#define slldbg lldbg
834
#else
835
#define sdbg (void)
836
#define slldbg (void)
837
#endif
838
839
#ifdef CONFIG_DEBUG_SCHED_WARN
840
#define swdbg wdbg
841
#define sllwdbg llwdbg
842
#else
843
#define swdbg (void)
844
#define sllwdbg (void)
845
#endif
846
847
#ifdef CONFIG_DEBUG_SCHED_INFO
848
#define svdbg vdbg
849
#define sllvdbg llvdbg
850
#else
851
#define svdbg (void)
852
#define sllvdbg (void)
853
#endif
854
855
#ifdef CONFIG_DEBUG_PAGING_ERROR
856
#define pgdbg dbg
857
#define pglldbg lldbg
858
#else
859
#define pgdbg (void)
860
#define pglldbg (void)
861
#endif
862
863
#ifdef CONFIG_DEBUG_PAGING_WARN
864
#define pgwdbg wdbg
865
#define pgllwdbg llwdbg
866
#else
867
#define pgwdbg (void)
868
#define pgllwdbg (void)
869
#endif
870
871
#ifdef CONFIG_DEBUG_PAGING_INFO
872
#define pgvdbg vdbg
873
#define pgllvdbg llvdbg
874
#else
875
#define pgvdbg (void)
876
#define pgllvdbg (void)
877
#endif
878
879
#ifdef CONFIG_DEBUG_DMA_ERROR
880
#define dmadbg dbg
881
#define dmalldbg lldbg
882
#else
883
#define dmadbg (void)
884
#define dmalldbg (void)
885
#endif
886
887
#ifdef CONFIG_DEBUG_DMA_WARN
888
#define dmawdbg wdbg
889
#define dmallwdbg llwdbg
890
#else
891
#define dmawdbg (void)
892
#define dmallwdbg (void)
893
#endif
894
895
#ifdef CONFIG_DEBUG_DMA_INFO
896
#define dmavdbg vdbg
897
#define dmallvdbg llvdbg
898
#else
899
#define dmavdbg (void)
900
#define dmallvdbg (void)
901
#endif
902
903
#ifdef CONFIG_DEBUG_NET_ERROR
904
#define ndbg dbg
905
#define nlldbg lldbg
906
#else
907
#define ndbg (void)
908
#define nlldbg (void)
909
#endif
910
911
#ifdef CONFIG_DEBUG_NET_WARN
912
#define nwdbg wdbg
913
#define nllwdbg llwdbg
914
#else
915
#define nwdbg (void)
916
#define nllwdbg (void)
917
#endif
918
919
#ifdef CONFIG_DEBUG_NET_INFO
920
#define nvdbg vdbg
921
#define nllvdbg llvdbg
922
#else
923
#define nvdbg (void)
924
#define nllvdbg (void)
925
#endif
926
927
#ifdef CONFIG_DEBUG_ERR_REPORT_ERROR
928
#define nwerrdbg dbg
929
#define nwerrlldbg lldbg
930
#else
931
#define nwerrdbg void
932
#define nwerrlldbg void
933
#endif
934
935
#ifdef CONFIG_DEBUG_ERR_REPORT_WARN
936
#define nwerr_wdbg wdbg
937
#define nwerr_llwdbg llwdbg
938
#else
939
#define nwerr_wdbg (void)
940
#define nwerr_llwdbg (void)
941
#endif
942
943
#ifdef CONFIG_DEBUG_ERR_REPORT_INFO
944
#define nwerr_vdbg vdbg
945
#define nwerr_llvdbg llvdbg
946
#else
947
#define nwerr_vdbg (void)
948
#define nwerr_llvdbg (void)
949
#endif
950
951
952
#ifdef CONFIG_DEBUG_USB_ERROR
953
#define udbg dbg
954
#define ulldbg lldbg
955
#else
956
#define udbg (void)
957
#define ulldbg (void)
958
#endif
959
960
#ifdef CONFIG_DEBUG_USB_WARN
961
#define uwdbg wdbg
962
#define ullwdbg llwdbg
963
#else
964
#define uwdbg (void)
965
#define ullwdbg (void)
966
#endif
967
968
#ifdef CONFIG_DEBUG_USB_INFO
969
#define uvdbg vdbg
970
#define ullvdbg llvdbg
971
#else
972
#define uvdbg (void)
973
#define ullvdbg (void)
974
#endif
975
976
#ifdef CONFIG_DEBUG_FS_ERROR
977
#define fdbg dbg
978
#define flldbg lldbg
979
#else
980
#define fdbg (void)
981
#define flldbg (void)
982
#endif
983
984
#ifdef CONFIG_DEBUG_FS_WARN
985
#define fwdbg wdbg
986
#define fllwdbg llwdbg
987
#else
988
#define fwdbg (void)
989
#define fllwdbg (void)
990
#endif
991
992
#ifdef CONFIG_DEBUG_FS_INFO
993
#define fvdbg vdbg
994
#define fllvdbg llvdbg
995
#else
996
#define fvdbg (void)
997
#define fllvdbg (void)
998
#endif
999
1000
#ifdef CONFIG_DEBUG_INPUT_ERROR
1001
#define idbg dbg
1002
#define illdbg lldbg
1003
#else
1004
#define idbg (void)
1005
#define illdbg (void)
1006
#endif
1007
1008
#ifdef CONFIG_DEBUG_INPUT_WARN
1009
#define iwdbg wdbg
1010
#define illwdbg llwdbg
1011
#else
1012
#define iwdbg (void)
1013
#define illwdbg (void)
1014
#endif
1015
1016
#ifdef CONFIG_DEBUG_INPUT_INFO
1017
#define ivdbg vdbg
1018
#define illvdbg llvdbg
1019
#else
1020
#define ivdbg (void)
1021
#define illvdbg (void)
1022
#endif
1023
1024
#ifdef CONFIG_DEBUG_SENSORS_ERROR
1025
#define sndbg dbg
1026
#define snlldbg lldbg
1027
#else
1028
#define sndbg (void)
1029
#define snlldbg (void)
1030
#endif
1031
1032
#ifdef CONFIG_DEBUG_SENSORS_WARN
1033
#define snwdbg wdbg
1034
#define snllwdbg llwdbg
1035
#else
1036
#define snwdbg (void)
1037
#define snllwdbg (void)
1038
#endif
1039
1040
#ifdef CONFIG_DEBUG_SENSORS_INFO
1041
#define snvdbg vdbg
1042
#define snllvdbg llvdbg
1043
#else
1044
#define snvdbg (void)
1045
#define snllvdbg (void)
1046
#endif
1047
1048
#ifdef CONFIG_DEBUG_ANALOG_ERROR
1049
#define adbg dbg
1050
#define alldbg lldbg
1051
#else
1052
#define adbg (void)
1053
#define alldbg (void)
1054
#endif
1055
1056
#ifdef CONFIG_DEBUG_ANALOG_WARN
1057
#define awdbg wdbg
1058
#define allwdbg llwdbg
1059
#else
1060
#define awdbg (void)
1061
#define allwdbg (void)
1062
#endif
1063
1064
#ifdef CONFIG_DEBUG_ANALOG_INFO
1065
#define avdbg vdbg
1066
#define allvdbg llvdbg
1067
#else
1068
#define avdbg (void)
1069
#define allvdbg (void)
1070
#endif
1071
1072
#ifdef CONFIG_DEBUG_GRAPHICS_ERROR
1073
#define gdbg dbg
1074
#define glldbg lldbg
1075
#else
1076
#define gdbg (void)
1077
#define glldbg (void)
1078
#endif
1079
1080
#ifdef CONFIG_DEBUG_GRAPHICS_WARN
1081
#define gwdbg wdbg
1082
#define gllwdbg llwdbg
1083
#else
1084
#define gwdbg (void)
1085
#define gllwdbg (void)
1086
#endif
1087
1088
#ifdef CONFIG_DEBUG_GRAPHICS_INFO
1089
#define gvdbg vdbg
1090
#define gllvdbg llvdbg
1091
#else
1092
#define gvdbg (void)
1093
#define gllvdbg (void)
1094
#endif
1095
1096
#ifdef CONFIG_DEBUG_LIB_ERROR
1097
#define ldbg dbg
1098
#define llldbg lldbg
1099
#else
1100
#define ldbg (void)
1101
#define llldbg (void)
1102
#endif
1103
1104
#ifdef CONFIG_DEBUG_LIB_WARN
1105
#define lwdbg wdbg
1106
#define lllwdbg llwdbg
1107
#else
1108
#define lwdbg (void)
1109
#define lllwdbg (void)
1110
#endif
1111
1112
#ifdef CONFIG_DEBUG_LIB_INFO
1113
#define lvdbg vdbg
1114
#define lllvdbg llvdbg
1115
#else
1116
#define lvdbg (void)
1117
#define lllvdbg (void)
1118
#endif
1119
1120
#ifdef CONFIG_DEBUG_AUDIO_ERROR
1121
#define auddbg dbg
1122
#define audlldbg lldbg
1123
#else
1124
#define auddbg (void)
1125
#define audlldbg (void)
1126
#endif
1127
1128
#ifdef CONFIG_DEBUG_AUDIO_WARN
1129
#define audwdbg wdbg
1130
#define audllwdbg llwdbg
1131
#else
1132
#define audwdbg (void)
1133
#define audllwdbg (void)
1134
#endif
1135
1136
#ifdef CONFIG_DEBUG_AUDIO_INFO
1137
#define audvdbg vdbg
1138
#define audllvdbg llvdbg
1139
#else
1140
#define audvdbg (void)
1141
#define audllvdbg (void)
1142
#endif
1143
1144
#ifdef CONFIG_DEBUG_MEDIA_ERROR
1145
#define meddbg dbg
1146
#define medlldbg lldbg
1147
#else
1148
#define meddbg (void)
1149
#define medlldbg (void)
1150
#endif
1151
1152
#ifdef CONFIG_DEBUG_MEDIA_WARN
1153
#define medwdbg wdbg
1154
#define medllwdbg llwdbg
1155
#else
1156
#define medwdbg (void)
1157
#define medllwdbg (void)
1158
#endif
1159
1160
#ifdef CONFIG_DEBUG_MEDIA_INFO
1161
#define medvdbg vdbg
1162
#define medllvdbg llvdbg
1163
#else
1164
#define medllvdbg (void)
1165
#define medllvdbg (...)
1166
#endif
1167
1168
#ifdef CONFIG_DEBUG_TASK_MANAGER_ERROR
1169
#define tmdbg dbg
1170
#define tmlldbg lldbg
1171
#else
1172
#define tmdbg (void)
1173
#define tmlldbg (void)
1174
#endif
1175
1176
#ifdef CONFIG_DEBUG_TASK_MANAGER_INFO
1177
#define tmvdbg vdbg
1178
#define tmllvdbg llvdbg
1179
#else
1180
#define tmvdbg (void)
1181
#define tmllvdbg (void)
1182
#endif
1183
1184
#ifdef CONFIG_DEBUG_EVENTLOOP_ERROR
1185
#define eldbg dbg
1186
#define ellldbg lldbg
1187
#else
1188
#define eldbg (void)
1189
#define ellldbg (void)
1190
#endif
1191
1192
#ifdef CONFIG_DEBUG_EVENTLOOP_INFO
1193
#define elvdbg vdbg
1194
#define elllvdbg llvdbg
1195
#else
1196
#define elvdbg (void)
1197
#define elllvdbg (void)
1198
#endif
1199
1200
#endif
/* CONFIG_CPP_HAVE_VARARGS */
1201
1202
/* Buffer dumping macros do not depend on varargs */
1203
1204
#ifdef CONFIG_DEBUG
1205
#ifdef CONFIG_DEBUG_ERROR
1206
#define dbgdumpbuffer(m, b, n) lib_dumpbuffer(m, b, n)
1207
#else
1208
#define dbgdumpbuffer(m, b, n)
1209
#endif
1210
#ifdef CONFIG_DEBUG_WARN
1211
#define wdbgdumpbuffer(m, b, n) lib_dumpbuffer(m, b, n)
1212
#else
1213
#define wdbgdumpbuffer(m, b, n)
1214
#endif
1215
#ifdef CONFIG_DEBUG_VERBOSE
1216
#define vdbgdumpbuffer(m, b, n) lib_dumpbuffer(m, b, n)
1217
#else
1218
#define vdbgdumpbuffer(m, b, n)
1219
#endif
1220
#else
1221
#define dbgdumpbuffer(m, b, n)
1222
#define wdbgdumpbuffer(m, b, n)
1223
#define vdbgdumpbuffer(m, b, n)
1224
#endif
1225
1226
/* Subsystem specific debug */
1227
1228
#ifdef CONFIG_DEBUG_MM
1229
#define mdbgdumpbuffer(m, b, n) dbgdumpbuffer(m, b, n)
1230
#define mvdbgdumpbuffer(m, b, n) vdbgdumpbuffer(m, b, n)
1231
#else
1232
#define mdbgdumpbuffer(m, b, n)
1233
#define mvdbgdumpbuffer(m, b, n)
1234
#endif
1235
1236
#ifdef CONFIG_DEBUG_SCHED
1237
#define sdbgdumpbuffer(m, b, n) dbgdumpbuffer(m, b, n)
1238
#define svdbgdumpbuffer(m, b, n) vdbgdumpbuffer(m, b, n)
1239
#else
1240
#define sdbgdumpbuffer(m, b, n)
1241
#define svdbgdumpbuffer(m, b, n)
1242
#endif
1243
1244
#ifdef CONFIG_DEBUG_PAGING
1245
#define pgdbgdumpbuffer(m, b, n) dbgdumpbuffer(m, b, n)
1246
#define pgvdbgdumpbuffer(m, b, n) vdbgdumpbuffer(m, b, n)
1247
#else
1248
#define pgdbgdumpbuffer(m, b, n)
1249
#define pgvdbgdumpbuffer(m, b, n)
1250
#endif
1251
1252
#ifdef CONFIG_DEBUG_DMA
1253
#define dmadbgdumpbuffer(m, b, n) dbgdumpbuffer(m, b, n)
1254
#define dmavdbgdumpbuffer(m, b, n) vdbgdumpbuffer(m, b, n)
1255
#else
1256
#define dmadbgdumpbuffer(m, b, n)
1257
#define dmavdbgdumpbuffer(m, b, n)
1258
#endif
1259
1260
#ifdef CONFIG_DEBUG_NET
1261
#define ndbgdumpbuffer(m, b, n) dbgdumpbuffer(m, b, n)
1262
#define nvdbgdumpbuffer(m, b, n) vdbgdumpbuffer(m, b, n)
1263
#else
1264
#define ndbgdumpbuffer(m, b, n)
1265
#define nvdbgdumpbuffer(m, b, n)
1266
#endif
1267
1268
#ifdef CONFIG_DEBUG_USB
1269
#define udbgdumpbuffer(m, b, n) dbgdumpbuffer(m, b, n)
1270
#define uvdbgdumpbuffer(m, b, n) vdbgdumpbuffer(m, b, n)
1271
#else
1272
#define udbgdumpbuffer(m, b, n)
1273
#define uvdbgdumpbuffer(m, b, n)
1274
#endif
1275
1276
#ifdef CONFIG_DEBUG_FS
1277
#define fdbgdumpbuffer(m, b, n) dbgdumpbuffer(m, b, n)
1278
#define fvdbgdumpbuffer(m, b, n) vdbgdumpbuffer(m, b, n)
1279
#else
1280
#define fdbgdumpbuffer(m, b, n)
1281
#define fvdbgdumpbuffer(m, b, n)
1282
#endif
1283
1284
#ifdef CONFIG_DEBUG_INPUT
1285
#define idbgdumpbuffer(m, b, n) dbgdumpbuffer(m, b, n)
1286
#define ivdbgdumpbuffer(m, b, n) vdbgdumpbuffer(m, b, n)
1287
#else
1288
#define idbgdumpbuffer(m, b, n)
1289
#define ivdbgdumpbuffer(m, b, n)
1290
#endif
1291
1292
#ifdef CONFIG_DEBUG_GRAPHICS
1293
#define gdbgdumpbuffer(m, b, n) dbgdumpbuffer(m, b, n)
1294
#define gvdbgdumpbuffer(m, b, n) vdbgdumpbuffer(m, b, n)
1295
#else
1296
#define gdbgdumpbuffer(m, b, n)
1297
#define gvdbgdumpbuffer(m, b, n)
1298
#endif
1299
1300
#ifdef CONFIG_DEBUG_LIB
1301
#define ldbgdumpbuffer(m, b, n) dbgdumpbuffer(m, b, n)
1302
#define lvdbgdumpbuffer(m, b, n) vdbgdumpbuffer(m, b, n)
1303
#else
1304
#define ldbgdumpbuffer(m, b, n)
1305
#define lvdbgdumpbuffer(m, b, n)
1306
#endif
1307
1308
/****************************************************************************
1309
* Public Type Declarations
1310
****************************************************************************/
1311
1312
/****************************************************************************
1313
* Public Variables
1314
****************************************************************************/
1315
1316
/****************************************************************************
1317
* Public Function Prototypes
1318
****************************************************************************/
1319
1320
#if defined(__cplusplus)
1321
extern
"C"
{
1322
#endif
1323
1336
void
lib_dumpbuffer
(FAR
const
char
*msg, FAR
const
uint8_t *buffer,
unsigned
int
buflen);
1337
1338
/* The system logging interfaces are normally accessed via the macros
1339
* provided above. If the cross-compiler's C pre-processor supports a
1340
* variable number of macro arguments, then those macros below will map all
1341
* debug statements to the logging interfaces declared in syslog.h.
1342
*
1343
* If the cross-compiler's pre-processor does not support variable length
1344
* arguments, then these additional APIs will be built.
1345
*/
1346
1347
#ifndef CONFIG_CPP_HAVE_VARARGS
1348
#ifdef CONFIG_DEBUG
1349
1350
#ifdef CONFIG_DEBUG_ERROR
1351
int
dbg
(
const
char
*format, ...);
1352
1353
#ifdef CONFIG_ARCH_LOWPUTC
1354
int
lldbg
(
const
char
*format, ...);
1355
#endif
1356
#endif
1357
1358
#ifdef CONFIG_DEBUG_WARN
1359
int
wdbg
(
const
char
*format, ...);
1360
1361
#ifdef CONFIG_ARCH_LOWPUTC
1362
int
llwdbg
(
const
char
*format, ...);
1363
#endif
1364
#endif
1365
1366
#ifdef CONFIG_DEBUG_VERBOSE
1367
int
vdbg
(
const
char
*format, ...);
1368
1369
#ifdef CONFIG_ARCH_LOWPUTC
1370
int
llvdbg
(
const
char
*format, ...);
1371
#endif
1372
#endif
1373
1374
#endif
/* CONFIG_DEBUG */
1375
#endif
/* CONFIG_CPP_HAVE_VARARGS */
1376
1377
#if defined(__cplusplus)
1378
}
1379
#endif
1380
#endif
/* __INCLUDE_DEBUG_H */
1381
vdbg
#define vdbg
Definition:
debug.h:789
lldbg
#define lldbg
Definition:
debug.h:774
lib_dumpbuffer
void lib_dumpbuffer(FAR const char *msg, FAR const uint8_t *buffer, unsigned int buflen)
Dump a buffer of data.
llvdbg
#define llvdbg
Definition:
debug.h:790
wdbg
#define wdbg
Definition:
debug.h:781
syslog.h
Syslog APIs.
dbg
#define dbg
Definition:
debug.h:773
llwdbg
#define llwdbg
Definition:
debug.h:782
os
include
debug.h
Generated by
1.8.11