Changeset c84b4be for libcfa/src/bits/debug.hfa
- Timestamp:
- Dec 13, 2019, 1:45:49 PM (5 years ago)
- Branches:
- ADT, arm-eh, ast-experimental, enum, forall-pointer-decay, jacob/cs343-translation, master, new-ast, new-ast-unique-expr, pthread-emulation, qualifiedEnum
- Children:
- 75ca7f4
- Parents:
- 983edfd
- File:
-
- 1 edited
Legend:
- Unmodified
- Added
- Removed
-
libcfa/src/bits/debug.hfa
r983edfd rc84b4be 37 37 #include <stdarg.h> 38 38 #include <stdio.h> 39 #include <unistd.h> 39 40 40 41 extern void __cfaabi_bits_write( int fd, const char *buffer, int len ); … … 49 50 #endif 50 51 52 // #define __CFA_DEBUG_PRINT__ 53 51 54 #ifdef __CFA_DEBUG_PRINT__ 52 55 #define __cfaabi_dbg_write( buffer, len ) __cfaabi_bits_write( STDERR_FILENO, buffer, len ) 53 56 #define __cfaabi_dbg_acquire() __cfaabi_bits_acquire() 54 57 #define __cfaabi_dbg_release() __cfaabi_bits_release() 55 #define __cfaabi_dbg_print_safe(...) __cfaabi_bits_print_safe (__VA_ARGS__)56 #define __cfaabi_dbg_print_nolock(...) __cfaabi_bits_print_nolock (__VA_ARGS__)57 #define __cfaabi_dbg_print_buffer(...) __cfaabi_bits_print_buffer (__VA_ARGS__)58 #define __cfaabi_dbg_print_buffer_decl(...) char __dbg_text[256]; int __dbg_len = snprintf( __dbg_text, 256, __VA_ARGS__ ); __cfaabi_bits_write( __dbg_text, __dbg_len );59 #define __cfaabi_dbg_print_buffer_local(...) __dbg_len = snprintf( __dbg_text, 256, __VA_ARGS__ ); __cfaabi_ dbg_write(__dbg_text, __dbg_len );58 #define __cfaabi_dbg_print_safe(...) __cfaabi_bits_print_safe ( STDERR_FILENO, __VA_ARGS__ ) 59 #define __cfaabi_dbg_print_nolock(...) __cfaabi_bits_print_nolock( STDERR_FILENO, __VA_ARGS__ ) 60 #define __cfaabi_dbg_print_buffer(...) __cfaabi_bits_print_buffer( STDERR_FILENO, __VA_ARGS__ ) 61 #define __cfaabi_dbg_print_buffer_decl(...) char __dbg_text[256]; int __dbg_len = snprintf( __dbg_text, 256, __VA_ARGS__ ); __cfaabi_bits_write( STDERR_FILENO, __dbg_text, __dbg_len ); 62 #define __cfaabi_dbg_print_buffer_local(...) __dbg_len = snprintf( __dbg_text, 256, __VA_ARGS__ ); __cfaabi_bits_write( STDERR_FILENO, __dbg_text, __dbg_len ); 60 63 #else 61 64 #define __cfaabi_dbg_write(...) ((void)0)
Note: See TracChangeset
for help on using the changeset viewer.