summaryrefslogtreecommitdiffstats
path: root/winsup/cygwin/miscfuncs.h
diff options
context:
space:
mode:
authorJon Turney <jon.turney@dronecode.org.uk>2016-07-28 00:40:23 +0100
committerJon Turney <jon.turney@dronecode.org.uk>2016-08-23 15:07:42 +0100
commit9e0f9ec7aedb59cacaf5831a27b925d791090113 (patch)
tree2c0578bb4a92c36a8f06e95ca5e7dfd373abd792 /winsup/cygwin/miscfuncs.h
parentfdb7df230ded019be0472565d79de14fe677dea7 (diff)
downloadcygnal-9e0f9ec7aedb59cacaf5831a27b925d791090113.tar.gz
cygnal-9e0f9ec7aedb59cacaf5831a27b925d791090113.tar.bz2
cygnal-9e0f9ec7aedb59cacaf5831a27b925d791090113.zip
Send thread names to debugger
GDB since commit 24cdb46e [1] can report and use these names. Add utility function SetThreadName(), which sends a thread name to the debugger. Use that: - to set the default thread name for main thread and newly created pthreads. - in pthread_setname_np() for user thread names. - for helper thread names in cygthread::create() - for helper threads which are created directly with CreateThread. Note that there can still be anonymous threads, created by system or injected DLLs. [1] https://sourceware.org/git/gitweb.cgi?p=binutils-gdb.git;h=24cdb46e9f0a694b4fbc11085e094857f08c0419
Diffstat (limited to 'winsup/cygwin/miscfuncs.h')
-rw-r--r--winsup/cygwin/miscfuncs.h2
1 files changed, 2 insertions, 0 deletions
diff --git a/winsup/cygwin/miscfuncs.h b/winsup/cygwin/miscfuncs.h
index a885dcf19..508729954 100644
--- a/winsup/cygwin/miscfuncs.h
+++ b/winsup/cygwin/miscfuncs.h
@@ -85,4 +85,6 @@ extern "C" HANDLE WINAPI CygwinCreateThread (LPTHREAD_START_ROUTINE thread_func,
DWORD creation_flags,
LPDWORD thread_id);
+void SetThreadName (DWORD dwThreadID, const char* threadName);
+
#endif /*_MISCFUNCS_H*/