[PATCH 2/2] Send thread names to debugger
Fri Jul 29 13:58:00 GMT 2016
On Jul 29 14:17, Jon Turney wrote:
> On 28/07/2016 20:34, Corinna Vinschen wrote:
> > On Jul 28 12:43, Jon Turney wrote:
> > > GDB with the patch from  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
Corinna Vinschen Please, send mails regarding Cygwin to
Cygwin Maintainer cygwin AT cygwin DOT com
-------------- next part --------------
A non-text attachment was scrubbed...
Size: 819 bytes
Desc: not available
More information about the Cygwin-patches