Thread names and non-ASCII characters

Paul Koning paulkoning@comcast.net
Thu Dec 19 17:55:00 GMT 2019



> On Dec 19, 2019, at 12:22 PM, Tom Tromey <tom@tromey.com> wrote:
> 
>>>>>> "Eli" == Eli Zaretskii <eliz@gnu.org> writes:
> 
> Eli> Can someone tell what GDB assumes to be the character encoding used by
> Eli> thread names we get from the system APIs (such as pthread_getname_np)?
> Eli> It sounds like we assume the host character set, since the functions
> Eli> used to display the thread name don't perform any encoding conversion.
> Eli> Is my understanding correct?
> 
> Yes, I believe so.
> 
> Eli> I'm asking because Windows 10 introduces a new API for setting and
> Eli> getting a thread's name, but this API wants a UTF-16 encoded string,
> Eli> so if we want to use it, we need to decide from/to what encoding to
> Eli> convert to/from UTF-16.
> 
> Converting to the host charset is probably the thing to do.

Host charset, or target charset?  I would assume target since we're talking about threads on the target.

	paul




More information about the Gdb mailing list