Use SetThreadDescription on Windows 10
Categories
(Core :: General, defect)
Tracking
()
People
(Reporter: away, Unassigned)
References
Details
Comment 1•8 years ago
|
||
Comment 2•8 years ago
|
||
Comment 4•5 years ago
|
||
NSPR now does use SetThreadDescription but debuggers still show thread numbers instead of their names. Should there be more work on this?
Comment 5•5 years ago
|
||
(In reply to Kagami :saschanaz from comment #4)
NSPR now does use SetThreadDescription but debuggers still show thread numbers instead of their names. Should there be more work on this?
Are you attaching to a running process? it may be that SetThreadDescription doesn't always work and the current code will only do the exception hacky thing which works only when the debugger (VS) is attached.
Comment 6•5 years ago
|
||
(In reply to Honza Bambas (:mayhemer) from comment #5)
Are you attaching to a running process? it may be that SetThreadDescription doesn't always work and the current code will only do the exception hacky thing which works only when the debugger (VS) is attached.
I tried both launching a new process and attaching to a running process but have never seen a named thread. It's interesting to see it uses w95thred.c instead of ntthread.c on Windows 10.
(In reply to Kagami :saschanaz from comment #6)
I tried both launching a new process and attaching to a running process but have never seen a named thread.
Could you try stepping through the code that calls SetThreadDescription? Do we even reach there? Is the function pointer nonnull?
It's interesting to see it uses
w95thred.cinstead ofntthread.con Windows 10.
As a wild guess I'd say that might be ICF trickery.
Comment 8•5 years ago
|
||
It does call SetThreadDescription, and it does name the threads, but the names evaporate when the program resumes.
Updated•3 years ago
|
Description
•