On Fri, 09 Dec 2022 08:53:57 +0100 Thomas Monjalon <tho...@monjalon.net> wrote:
> > > If some execution environment doesn't support thread names, it could > > > return a string that makes it possible for a human to identify the > > > thread, e.g. the tread id. Again, this is assuming that it is only used > > > for debugging, trace, and similar. > > > > i think this raises a good question. is the purpose of setting a thread name > > meant to be something we can use from the application or is it something > > that > > is for debugging diagnostics and may be a best effort? > > I think yes it is only for debugging. > So best effort looks to be a good approach. > I'm not sure you need to replace the functions. > Can you just complete the implementations? Surprisingly, thread names are not preserved in core dumps. The core dump standard used by Linux does not put thread name in the image. Since this is a ELF ABI unlikely to be ever be added.