src/macosx/native/sun/osxapp/AWT_debug.h

Print this page

        

*** 26,41 **** --- 26,52 ---- #ifndef macosx_port_awt_debug_h #define macosx_port_awt_debug_h #import <Cocoa/Cocoa.h> + static bool ShouldPrintVerboseDebugging() { + static int debug = -1; + if (debug == -1) { + debug = (int)(getenv("JAVA_AWT_VERBOSE") != NULL); + } + return (bool)debug; + } + #define kInternalError "java/lang/InternalError" #define AWT_DEBUG_LOG(str) \ NSLog(@"\tCocoa AWT: %@ %@", str, [NSThread callStackSymbols]) + #define AWT_STARTUP_LOG(str) \ + if (ShouldPrintVerboseDebugging()) AWT_DEBUG_LOG((str)) + #define AWT_DEBUG_BUG_REPORT_MESSAGE \ NSLog(@"\tPlease file a bug report at http://bugreport.java.com/bugreport \ with this message and a reproducible test case.") #endif