gdb show thread names

Kamil Rytarowski kamil@netbsd.org
Mon Jun 15 11:42:45 GMT 2020


On 13.06.2020 02:16, Jonny Grant wrote:
> Hello
> Just wondering if gdb could show the thread names as they are created and deleted?
> 

As created generally no, as it gets a meaningful name usually after
creation from a dedicated syscall.

If there is a legitimate use-case, I can implement reporting thread
rename for NetBSD and report in GDB. But as we would report thread
renames, what about other events?

> 
> [Thread 0x7fff695e9700 (LWP 3580240) exited]
> [New Thread 0x7fff98ff9700 (LWP 3580609)]
> 
> $ cat /proc/3580609/comm
> ThreadPoolForeg
> 
> Could be a race condition, if GDB showed the name, before it was renamed by the application, but still pretty useful to see the names.
> 
> If I break, and type "info thread" I can see those still created.
> 
> Jonny
> 


-------------- next part --------------
A non-text attachment was scrubbed...
Name: signature.asc
Type: application/pgp-signature
Size: 833 bytes
Desc: OpenPGP digital signature
URL: <https://sourceware.org/pipermail/gdb/attachments/20200615/0099f710/attachment.sig>


More information about the Gdb mailing list