Mirror of the gdb mailing list
 help / color / mirror / Atom feed
* Thread names and non-ASCII characters
@ 2019-12-19 15:17 Eli Zaretskii
  2019-12-19 17:22 ` Tom Tromey
  0 siblings, 1 reply; 6+ messages in thread
From: Eli Zaretskii @ 2019-12-19 15:17 UTC (permalink / raw)
  To: gdb

Can someone tell what GDB assumes to be the character encoding used by
thread names we get from the system APIs (such as pthread_getname_np)?
It sounds like we assume the host character set, since the functions
used to display the thread name don't perform any encoding conversion.
Is my understanding correct?

I'm asking because Windows 10 introduces a new API for setting and
getting a thread's name, but this API wants a UTF-16 encoded string,
so if we want to use it, we need to decide from/to what encoding to
convert to/from UTF-16.  The current code in windows-nat.c that
processes the special MSVC exception used on older platforms to set
thread names for debugging purposes simply copies the name as an array
of 'char', so it, too, implicitly assumes the host encoding
(a.k.a. "system codepage" in Windows parlance).

Am I missing something?


^ permalink raw reply	[flat|nested] 6+ messages in thread

end of thread, other threads:[~2019-12-19 19:02 UTC | newest]

Thread overview: 6+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2019-12-19 15:17 Thread names and non-ASCII characters Eli Zaretskii
2019-12-19 17:22 ` Tom Tromey
2019-12-19 17:55   ` Paul Koning
2019-12-19 18:25     ` Tom Tromey
2019-12-19 19:02     ` Eli Zaretskii
2019-12-19 18:59   ` Eli Zaretskii

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox