21 |
21 |
22 #if !defined(_STACK_OUTPUT_H_) |
22 #if !defined(_STACK_OUTPUT_H_) |
23 #define _STACK_OUTPUT_H_ |
23 #define _STACK_OUTPUT_H_ |
24 |
24 |
25 #include "eap_am_export.h" |
25 #include "eap_am_export.h" |
|
26 // Start: added by script change_export_macros.sh. |
|
27 #if defined(EAP_NO_EXPORT_EAP_AM_STACK_TRACE_H) |
|
28 #define EAP_CLASS_VISIBILITY_EAP_AM_STACK_TRACE_H EAP_NONSHARABLE |
|
29 #define EAP_FUNC_VISIBILITY_EAP_AM_STACK_TRACE_H |
|
30 #define EAP_C_FUNC_VISIBILITY_EAP_AM_STACK_TRACE_H |
|
31 #define EAP_FUNC_EXPORT_EAP_AM_STACK_TRACE_H |
|
32 #define EAP_C_FUNC_EXPORT_EAP_AM_STACK_TRACE_H |
|
33 #elif defined(EAP_EXPORT_EAP_AM_STACK_TRACE_H) |
|
34 #define EAP_CLASS_VISIBILITY_EAP_AM_STACK_TRACE_H EAP_EXPORT |
|
35 #define EAP_FUNC_VISIBILITY_EAP_AM_STACK_TRACE_H EAP_FUNC_EXPORT |
|
36 #define EAP_C_FUNC_VISIBILITY_EAP_AM_STACK_TRACE_H EAP_C_FUNC_EXPORT |
|
37 #define EAP_FUNC_EXPORT_EAP_AM_STACK_TRACE_H EAP_FUNC_EXPORT |
|
38 #define EAP_C_FUNC_EXPORT_EAP_AM_STACK_TRACE_H EAP_C_FUNC_EXPORT |
|
39 #else |
|
40 #define EAP_CLASS_VISIBILITY_EAP_AM_STACK_TRACE_H EAP_IMPORT |
|
41 #define EAP_FUNC_VISIBILITY_EAP_AM_STACK_TRACE_H EAP_FUNC_IMPORT |
|
42 #define EAP_C_FUNC_VISIBILITY_EAP_AM_STACK_TRACE_H EAP_C_FUNC_IMPORT |
|
43 #define EAP_FUNC_EXPORT_EAP_AM_STACK_TRACE_H |
|
44 #define EAP_C_FUNC_EXPORT_EAP_AM_STACK_TRACE_H |
|
45 #endif |
|
46 // End: added by script change_export_macros.sh. |
26 |
47 |
27 class abs_eap_am_tools_c; |
48 class abs_eap_am_tools_c; |
28 |
49 |
29 /** |
50 /** |
30 * This class implemets a stack trace. This code is highly processor dependent. |
51 * This class implemets a stack trace. This code is highly processor dependent. |
31 * Only Intel processor with gcc or MSVC is supported. |
52 * Only Intel processor with gcc or MSVC is supported. |
32 */ |
53 */ |
33 class EAP_EXPORT stack_trace |
54 class EAP_CLASS_VISIBILITY_EAP_AM_STACK_TRACE_H stack_trace |
34 { |
55 { |
35 private: |
56 private: |
36 |
57 |
37 /// This is pointer to the tools class. |
58 /// This is pointer to the tools class. |
38 abs_eap_am_tools_c * const m_am_tools; |
59 abs_eap_am_tools_c * const m_am_tools; |
39 |
60 |
40 /** |
61 /** |
41 * This function traces stack frames starting from bp. |
62 * This function traces stack frames starting from bp. |
42 * The bp is pointer to base of the starting stack frame. |
63 * The bp is pointer to base of the starting stack frame. |
43 */ |
64 */ |
44 EAP_FUNC_IMPORT void trace_frames( |
65 EAP_FUNC_VISIBILITY_EAP_AM_STACK_TRACE_H void trace_frames( |
45 unsigned long *bp |
66 unsigned long *bp |
46 ); |
67 ); |
47 |
68 |
48 public: |
69 public: |
49 |
70 |
50 /** |
71 /** |
51 * Destructor does nothing special. |
72 * Destructor does nothing special. |
52 */ |
73 */ |
53 EAP_FUNC_IMPORT virtual ~stack_trace(); |
74 EAP_FUNC_VISIBILITY_EAP_AM_STACK_TRACE_H virtual ~stack_trace(); |
54 |
75 |
55 /** |
76 /** |
56 * Constructor does nothing special. |
77 * Constructor does nothing special. |
57 */ |
78 */ |
58 EAP_FUNC_IMPORT stack_trace(abs_eap_am_tools_c * const tools); |
79 EAP_FUNC_VISIBILITY_EAP_AM_STACK_TRACE_H stack_trace(abs_eap_am_tools_c * const tools); |
59 |
80 |
60 /** |
81 /** |
61 * This function traces stack frames starting from current frame. |
82 * This function traces stack frames starting from current frame. |
62 * Value of parameter memory_address is traced in the begin. |
83 * Value of parameter memory_address is traced in the begin. |
63 */ |
84 */ |
64 EAP_FUNC_IMPORT void trace(const void * const memory_address); |
85 EAP_FUNC_VISIBILITY_EAP_AM_STACK_TRACE_H void trace(const void * const memory_address); |
65 |
86 |
66 }; |
87 }; |
67 |
88 |
68 #endif //#if !defined(_STACK_OUTPUT_H_) |
89 #endif //#if !defined(_STACK_OUTPUT_H_) |
69 |
90 |