Changeset 226152 in webkit
- Timestamp:
- Dec 19, 2017 3:50:04 PM (6 years ago)
- Location:
- trunk/Source/WTF
- Files:
-
- 2 edited
Legend:
- Unmodified
- Added
- Removed
-
trunk/Source/WTF/ChangeLog
r226073 r226152 1 2017-12-19 Brian Burg <bburg@apple.com> 2 3 SLEEP_THREAD_FOR_DEBUGGER() macro should try to print out the PID of the affected process 4 https://bugs.webkit.org/show_bug.cgi?id=180947 5 6 Reviewed by Joseph Pecoraro. 7 8 * wtf/DebugUtilities.h: 9 - Use sleep() from CurrentTime.h as it is more cross-platform. 10 - Print a message with the process PID to simplify attaching to sleeping thread. 11 - Include source location in case multiple such macros are being used. 12 1 13 2017-12-18 Daniel Bates <dabates@apple.com> 2 14 -
trunk/Source/WTF/wtf/DebugUtilities.h
r217233 r226152 28 28 29 29 #include <wtf/Assertions.h> 30 #include <wtf/CurrentTime.h> 31 #include <wtf/ProcessID.h> 30 32 31 33 #define SLEEP_THREAD_FOR_DEBUGGER() \ 32 34 do { \ 33 35 do { \ 34 sleep(1 ); \36 sleep(1.0); \ 35 37 if (WTFIsDebuggerAttached()) \ 36 38 break; \ 37 39 } while (1); \ 40 WTFReportError(__FILE__, __LINE__, WTF_PRETTY_FUNCTION, "Sleeping thread for debugger; attach to process (PID: %d) to unsleep the thread.", getCurrentProcessID()); \ 38 41 WTFBreakpointTrap(); \ 39 42 } while (0)
Note: See TracChangeset
for help on using the changeset viewer.