On 28/07/2016 20:34, Corinna Vinschen wrote:
On Jul 28 12:43, Jon Turney wrote:
GDB with the patch from [1] can report and use these names.
This is still WIP, right?
Yes, that's right.
--- a/winsup/cygwin/cygthread.cc
+++ b/winsup/cygwin/cygthread.cc
@@ -213,6 +213,8 @@ cygthread::create ()
this, 0, &id);
if (!htobe)
api_fatal ("CreateThread failed for %s - %p<%y>, %E", __name, h, id);
+ else
+ SetThreadName(GetThreadId(htobe), __name);
^^^ ^^^
space? space?
Just wondering: Wouldn't it make sense to rename the internal threads
so they either always start with "cyg_" or with double underscore or
something like that to mark them as internal? E.g.
Yeah, I wanted to do something like that.
But messing with the thread names may have other consequences (See
fhandler_tty.cc:109), and I was a bit wary of introducing a malloc/free
to into cygthread::create() to dynamically make the name with a "__"
prepended