Changeset 78 for trunk/IPs/systemC/processor/Morpheo/Common/include/Debug.h
- Timestamp:
- Mar 27, 2008, 11:04:49 AM (16 years ago)
- File:
-
- 1 edited
Legend:
- Unmodified
- Added
- Removed
-
trunk/IPs/systemC/processor/Morpheo/Common/include/Debug.h
r71 r78 9 9 #include <sstream> 10 10 #include <string> 11 12 std::string debug_tab (void); 13 void debug_function_begin (std::string component, std::string function); 14 void debug_function_end (std::string component, std::string function); 11 15 12 16 // Debug's Level : … … 27 31 28 32 #ifdef DEBUG 29 //Debug 30 # define log_printf(level, component, func, str... ) \ 33 # define log_printf(level, component, func, str... ) \ 31 34 do \ 32 35 { \ … … 36 39 ( DEBUG_ ## component == true )) ) \ 37 40 { \ 41 msg(_("%s"),debug_tab().c_str()); \ 38 42 if (DEBUG >= DEBUG_ALL ) \ 39 43 { \ … … 48 52 } \ 49 53 } \ 50 msg(_("<%s> "),func); \51 54 if (DEBUG >= DEBUG_FUNC) \ 52 55 { \ 56 msg(_("<%s> "),func); \ 53 57 msg(_("In file %s, "),__FILE__); \ 54 msg(_("at line %d, "),__LINE__); \ 58 msg(_("at line %d " ),__LINE__); \ 59 msg(_(": ")); \ 55 60 } \ 56 msg(_(": ")); \57 61 msg(str); \ 58 62 msg(_("\n")); \ … … 60 64 } \ 61 65 } while(0) 62 63 66 #else 64 // No debug 65 66 # define log_printf(level, component, func, str... ) \ 67 do \ 68 { \ 69 } while(0) 70 67 # define log_printf(level, component, func, str... ) \ 68 do \ 69 { \ 70 } while(0) 71 71 #endif // DEBUG 72 73 72 #endif // !DEBUG_H
Note: See TracChangeset
for help on using the changeset viewer.