Changeset 237382 in webkit
- Timestamp:
- Oct 24, 2018 7:27:13 AM (6 years ago)
- Location:
- trunk/Source/WTF
- Files:
-
- 2 added
- 4 edited
Legend:
- Unmodified
- Added
- Removed
-
trunk/Source/WTF/ChangeLog
r237361 r237382 1 2018-10-24 Christopher Reid <chris.reid@sony.com> 2 3 [Win] Add function call name information to stack traces 4 https://bugs.webkit.org/show_bug.cgi?id=190761 5 6 Reviewed by Fujii Hironori. 7 8 Add symbol information to stack traces using dbghelp.dll 9 This library will use symbols files from these sources: 10 - The current working directory 11 - The directory containing the application's executable 12 - _NT_SYMBOL_PATH environment variable 13 - _NT_ALTERNATE_SYMBOL_PATH environment variable 14 15 This functionality is currently only enabled in debug mode since dbghelp is not threadsafe. 16 The DbgHelper class attempts to synchronize calls to dbghelp.dll but external code 17 can still attempt to call the library at the same time as WebKit. 18 19 * wtf/CMakeLists.txt: 20 * wtf/PlatformWin.cmake: 21 * wtf/StackTrace.cpp: 22 * wtf/win/DbgHelperWin.cpp: Added. 23 * wtf/win/DbgHelperWin.h: Added. 24 1 25 2018-10-22 Alexey Proskuryakov <ap@apple.com> 2 26 -
trunk/Source/WTF/wtf/CMakeLists.txt
r237052 r237382 500 500 ) 501 501 list(APPEND WTF_LIBRARIES 502 DbgHelp 502 503 winmm 503 504 ) -
trunk/Source/WTF/wtf/PlatformWin.cmake
r232888 r237382 2 2 text/win/WCharStringExtras.h 3 3 4 win/DbgHelperWin.h 4 5 win/GDIObject.h 5 6 win/SoftLinking.h … … 11 12 12 13 win/CPUTimeWin.cpp 14 win/DbgHelperWin.cpp 13 15 win/LanguageWin.cpp 14 16 win/MainThreadWin.cpp -
trunk/Source/WTF/wtf/StackTrace.cpp
r237099 r237382 42 42 #if OS(WINDOWS) 43 43 #include <windows.h> 44 #include <wtf/win/DbgHelperWin.h> 44 45 #endif 45 46 … … 111 112 if (!symbols) 112 113 return; 114 #elif OS(WINDOWS) 115 HANDLE hProc = GetCurrentProcess(); 116 uint8_t symbolData[sizeof(SYMBOL_INFO) + MAX_SYM_NAME * sizeof(TCHAR)] = { 0 }; 117 auto symbolInfo = reinterpret_cast<SYMBOL_INFO*>(symbolData); 118 119 symbolInfo->SizeOfStruct = sizeof(SYMBOL_INFO); 120 symbolInfo->MaxNameLen = MAX_SYM_NAME; 113 121 #endif 114 122 … … 126 134 cxaDemangled = demangled->demangledName(); 127 135 } 136 #elif OS(WINDOWS) 137 if (DbgHelper::SymFromAddress(hProc, reinterpret_cast<DWORD64>(stack[i]), 0, symbolInfo)) 138 mangledName = symbolInfo->Name; 128 139 #endif 129 140 const int frameNumber = i + 1;
Note: See TracChangeset
for help on using the changeset viewer.