Title: [226152] trunk/Source/WTF
- Revision
- 226152
- Author
- bb...@apple.com
- Date
- 2017-12-19 15:50:04 -0800 (Tue, 19 Dec 2017)
Log Message
SLEEP_THREAD_FOR_DEBUGGER() macro should try to print out the PID of the affected process
https://bugs.webkit.org/show_bug.cgi?id=180947
Reviewed by Joseph Pecoraro.
* wtf/DebugUtilities.h:
- Use sleep() from CurrentTime.h as it is more cross-platform.
- Print a message with the process PID to simplify attaching to sleeping thread.
- Include source location in case multiple such macros are being used.
Modified Paths
Diff
Modified: trunk/Source/WTF/ChangeLog (226151 => 226152)
--- trunk/Source/WTF/ChangeLog 2017-12-19 23:40:16 UTC (rev 226151)
+++ trunk/Source/WTF/ChangeLog 2017-12-19 23:50:04 UTC (rev 226152)
@@ -1,3 +1,15 @@
+2017-12-19 Brian Burg <bb...@apple.com>
+
+ SLEEP_THREAD_FOR_DEBUGGER() macro should try to print out the PID of the affected process
+ https://bugs.webkit.org/show_bug.cgi?id=180947
+
+ Reviewed by Joseph Pecoraro.
+
+ * wtf/DebugUtilities.h:
+ - Use sleep() from CurrentTime.h as it is more cross-platform.
+ - Print a message with the process PID to simplify attaching to sleeping thread.
+ - Include source location in case multiple such macros are being used.
+
2017-12-18 Daniel Bates <daba...@apple.com>
Conditionally forward declare NSMapTable SPI
Modified: trunk/Source/WTF/wtf/DebugUtilities.h (226151 => 226152)
--- trunk/Source/WTF/wtf/DebugUtilities.h 2017-12-19 23:40:16 UTC (rev 226151)
+++ trunk/Source/WTF/wtf/DebugUtilities.h 2017-12-19 23:50:04 UTC (rev 226152)
@@ -27,14 +27,17 @@
#define WTF_DebugUtilities_h
#include <wtf/Assertions.h>
+#include <wtf/CurrentTime.h>
+#include <wtf/ProcessID.h>
#define SLEEP_THREAD_FOR_DEBUGGER() \
do { \
do { \
- sleep(1); \
+ sleep(1.0); \
if (WTFIsDebuggerAttached()) \
break; \
} while (1); \
+ WTFReportError(__FILE__, __LINE__, WTF_PRETTY_FUNCTION, "Sleeping thread for debugger; attach to process (PID: %d) to unsleep the thread.", getCurrentProcessID()); \
WTFBreakpointTrap(); \
} while (0)
_______________________________________________
webkit-changes mailing list
webkit-changes@lists.webkit.org
https://lists.webkit.org/mailman/listinfo/webkit-changes