RTEMS CPU Kit with SuperCore  4.11.3
rtl-trace.h
Go to the documentation of this file.
1 /*
2  * COPYRIGHT (c) 2012-2014 Chris Johns <chrisj@rtems.org>
3  *
4  * The license and distribution terms for this file may be
5  * found in the file LICENSE in this distribution or at
6  * http://www.rtems.org/license/LICENSE.
7  */
16 #if !defined (_RTEMS_RTL_TRACE_H_)
17 #define _RTEMS_RTL_TRACE_H_
18 
19 #ifdef __cplusplus
20 extern "C" {
21 #endif /* __cplusplus */
22 
23 #include <stdbool.h>
24 #include <stdint.h>
25 
29 #define RTEMS_RTL_TRACE 1
30 
34 typedef uint32_t rtems_rtl_trace_mask;
35 
39 #define RTEMS_RTL_TRACE_DETAIL (1UL << 0)
40 #define RTEMS_RTL_TRACE_WARNING (1UL << 1)
41 #define RTEMS_RTL_TRACE_LOAD (1UL << 2)
42 #define RTEMS_RTL_TRACE_UNLOAD (1UL << 3)
43 #define RTEMS_RTL_TRACE_SECTION (1UL << 4)
44 #define RTEMS_RTL_TRACE_SYMBOL (1UL << 5)
45 #define RTEMS_RTL_TRACE_RELOC (1UL << 6)
46 #define RTEMS_RTL_TRACE_GLOBAL_SYM (1UL << 7)
47 #define RTEMS_RTL_TRACE_LOAD_SECT (1UL << 8)
48 #define RTEMS_RTL_TRACE_ALLOCATOR (1UL << 9)
49 #define RTEMS_RTL_TRACE_UNRESOLVED (1UL << 10)
50 #define RTEMS_RTL_TRACE_CACHE (1UL << 11)
51 #define RTEMS_RTL_TRACE_ALL (0xffffffffUL & ~(RTEMS_RTL_TRACE_CACHE))
52 
61 #if RTEMS_RTL_TRACE
62 bool rtems_rtl_trace (rtems_rtl_trace_mask mask);
63 #else
64 #define rtems_rtl_trace(_m) (0)
65 #endif
66 
73 #if RTEMS_RTL_TRACE
74 rtems_rtl_trace_mask rtems_rtl_trace_set_mask (rtems_rtl_trace_mask mask);
75 #else
76 #define rtems_rtl_trace_set_mask(_m)
77 #endif
78 
85 #if RTEMS_RTL_TRACE
86 rtems_rtl_trace_mask rtems_rtl_trace_clear_mask (rtems_rtl_trace_mask mask);
87 #else
88 #define rtems_rtl_trace_clear_mask(_m)
89 #endif
90 
94 #if RTEMS_RTL_TRACE
95 int rtems_rtl_trace_shell_command (int argc, char *argv[]);
96 #endif
97 
98 #ifdef __cplusplus
99 }
100 #endif /* __cplusplus */
101 
102 #endif
rtems_rtl_trace_mask rtems_rtl_trace_clear_mask(rtems_rtl_trace_mask mask)
Clear the mask.
Definition: rtl-trace.c:49
int rtems_rtl_trace_shell_command(int argc, char *argv[])
Add shell trace shell command.
Definition: rtl-trace.c:57
uint32_t rtems_rtl_trace_mask
The type of the mask.
Definition: rtl-trace.h:34
rtems_rtl_trace_mask rtems_rtl_trace_set_mask(rtems_rtl_trace_mask mask)
Set the mask.
Definition: rtl-trace.c:41
bool rtems_rtl_trace(rtems_rtl_trace_mask mask)
Call to check if this part is bring traced.
Definition: rtl-trace.c:32