Changeset 66345 in webkit
- Timestamp:
- Aug 29, 2010 6:46:43 PM (14 years ago)
- Location:
- trunk/JavaScriptCore
- Files:
-
- 2 edited
Legend:
- Unmodified
- Added
- Removed
-
trunk/JavaScriptCore/ChangeLog
r66318 r66345 1 2010-08-29 Kwang Yul Seo <skyul@company100.net> 2 3 Reviewed by Kent Tamura. 4 5 [BREWMP] Port vprintf_stderr_common 6 https://bugs.webkit.org/show_bug.cgi?id=33568 7 8 Use BREW's DBGPRINTF to output debug messages. 9 10 * wtf/Assertions.cpp: 11 1 12 2010-08-28 Gavin Barraclough <barraclough@apple.com> 2 13 -
trunk/JavaScriptCore/wtf/Assertions.cpp
r52791 r66345 36 36 #endif 37 37 38 #if COMPILER(MSVC) && !OS(WINCE) 38 #if COMPILER(MSVC) && !OS(WINCE) && !PLATFORM(BREWMP) 39 39 #ifndef WINVER 40 40 #define WINVER 0x0500 … … 51 51 #endif 52 52 53 #if PLATFORM(BREWMP) 54 #include <AEEStdLib.h> 55 #include <wtf/Vector.h> 56 #endif 57 53 58 extern "C" { 59 60 #if PLATFORM(BREWMP) 61 62 static void printLog(const Vector<char>& buffer) 63 { 64 // Each call to DBGPRINTF generates at most 128 bytes of output on the Windows SDK. 65 // On Qualcomm chipset targets, DBGPRINTF() comes out the diag port (though this may change). 66 // The length of each output string is constrained even more than on the Windows SDK. 67 #if COMPILER(MSVC) 68 const int printBufferSize = 128; 69 #else 70 const int printBufferSize = 32; 71 #endif 72 73 char printBuffer[printBufferSize + 1]; 74 printBuffer[printBufferSize] = 0; // to guarantee null termination 75 76 const char* p = buffer.data(); 77 const char* end = buffer.data() + buffer.size(); 78 while (p < end) { 79 strncpy(printBuffer, p, printBufferSize); 80 DBGPRINTF(printBuffer); 81 p += printBufferSize; 82 } 83 } 84 85 #endif 54 86 55 87 WTF_ATTRIBUTE_PRINTF(1, 0) … … 72 104 CFRelease(cfFormat); 73 105 } else 106 #elif PLATFORM(BREWMP) 107 // When str is 0, the return value is the number of bytes needed 108 // to accept the result including null termination. 109 int size = vsnprintf(0, 0, format, args); 110 if (size > 0) { 111 Vector<char> buffer(size); 112 vsnprintf(buffer.data(), size, format, args); 113 printLog(buffer); 114 } 115 74 116 #elif COMPILER(MSVC) && !defined(WINCEBASIC) 75 117 if (IsDebuggerPresent()) {
Note: See TracChangeset
for help on using the changeset viewer.